{
 "metadata": {
  "name": "",
  "signature": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter4 - Measurement of Resistance"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 4.1 page 121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from math import log10\n",
      "t=20 \n",
      "C=8*10**-10 \n",
      "E=200 \n",
      "e=150 \n",
      "a=log10(E/e)\n",
      "R=(0.4343*t)/(C*a)*10**-6 \n",
      "print \"Insulation resistance = %.2f mega-ohm\"%(R)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Insulation resistance = 86902.59 mega-ohm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 4.2 page 121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "t=600 \n",
      "C=2.5*10**-12 \n",
      "E=500 \n",
      "e=300 \n",
      "a=log10(E/e)\n",
      "R=(0.4343*t)/(C*a) \n",
      "print \"Insulation resistance=%.2f mega-ohm\"%(R/1e6)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Insulation resistance=469833614.93 mega-ohm\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 4.3 page 122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import log\n",
      "#V=Eexp(-t/tc)   where tc= RC=Time constant\n",
      "t=30 \n",
      "V=125 \n",
      "E=200 \n",
      "tc=-30/log(V/E) \n",
      "R=(7/15)*tc-7 \n",
      "print \"Insulation resistance=%.2f mega-ohm\"%(R)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Insulation resistance=22.79 mega-ohm\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 4.4 page 122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "Q=3000 \n",
      "S=0.1 \n",
      "M=2000 \n",
      "X=Q*S/M \n",
      "print \"The value of X=%.2f ohm\"%(X)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of X=0.15 ohm\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 4.5 page 122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "lx=55 \n",
      "ly=100-lx \n",
      "Y=100 \n",
      "X=Y*(lx/ly) \n",
      "print \"Resistance of the field coil=%.2f ohm\"%(X)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resistance of the field coil=122.22 ohm\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 4.6 page 122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "p=200.7 \n",
      "q=400 \n",
      "S=200.05*10**-6 \n",
      "P=200.5 \n",
      "Q=400 \n",
      "r=1400*10**-6 \n",
      "X=((P*S/Q)+((q*r)/(p+q))*((P/Q)-(p/q)))*10**6 \n",
      "print \"Unknown resistance=%.2f micro-ohm\"%(X)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Unknown resistance=99.81 micro-ohm\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 4.7 page 123"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "E=230 \n",
      "V1=60 \n",
      "V2=40 \n",
      "Rv=50000 \n",
      "R1=((E-(V1+V2))/V2)*Rv*10**-3 \n",
      "print \"Resistance between positive and earth=%.2f Kohm\"%(R1)\n",
      "R2=((E-(V1+V2))/V1)*Rv*10**-3 \n",
      "print \"\\nResistance between -ve and earth=%.2f Kohm\"%(R2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resistance between positive and earth=162.50 Kohm\n",
        "\n",
        "Resistance between -ve and earth=108.33 Kohm\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Exa 4.8 page 124"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "Q=100.5 \n",
      "M=300 \n",
      "q=100.6 \n",
      "m=300.25 \n",
      "r=0.1 \n",
      "S=0.0045 \n",
      "X=((M*S/Q)+((r)/(r+m*q))*((M*q/Q)-(m)))*10**6 \n",
      "print \"Unknown resistance=%.2f micro-ohm\"%(X)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Unknown resistance=13433.00 micro-ohm\n"
       ]
      }
     ],
     "prompt_number": 9
    }
   ],
   "metadata": {}
  }
 ]
}
