{
 "metadata": {
  "celltoolbar": "Raw Cell Format",
  "name": "",
  "signature": "sha256:9dcf8c834afbbdba5cac9bfd61902345de5a5912fe35cd8c01ac3ee021a2040e"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 3: Dielectric And Magnetic Materials"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.1,Page number 3-35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "A=650*10**-6                             #area\n",
      "d=4*10**-3                               #seperation of plate\n",
      "Q=2*10**-10                              #charge\n",
      "er=3.5                                   #relative permitivity\n",
      "\n",
      "e0=8.85*10**-12                          #absolute permitivity\n",
      "\n",
      "V=(Q*d)/(e0*er*A)\n",
      "\n",
      "print\"voltage across capacitor =\",round(V,4),\"Volt\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "voltage across capacitor = 39.7343 Volt\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.2,Page number 3-36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "A=2000*10**-6                           #area\n",
      "d=0.5*10**-6                            #seperation of plate\n",
      "er=8.0                                    #relative permitivity\n",
      "e0=8.85*10**-12                         #absolute permitivity\n",
      "\n",
      "C=(e0*er*A)/d\n",
      "\n",
      "print\"capacitance for capacitor =\",\"{0:.3e}\".format(C),\"Faraday\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "capacitance for capacitor = 2.832e-07 Faraday\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.3,Page number 3-36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "E=1000                                  #electric field\n",
      "P=4.3*10**-8                            #polarization\n",
      "e0=8.854*10**-12                        #absolute permitivity\n",
      "er=(P/(e0*E))+1                         #as P/E=e0(er-1)\n",
      "\n",
      "print\"relative permittivity =\",round(er,4)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "relative permittivity = 5.8566\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.4,Page number 3-36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "#As C=e0*er*A/d\n",
      "\n",
      "e0=math.e                               #absolute permitivity\n",
      "\n",
      "Ag=1l\n",
      "\n",
      "Ap=Ag                                   #Assuming Area of glass plate and plastic film is same\n",
      "\n",
      "#for glass\n",
      "\n",
      "erg=6                                   #relative permitivity\n",
      "\n",
      "dg=0.25                                 #thickness\n",
      "\n",
      "Cg=e0*erg*Ag/dg\n",
      "\n",
      "#for plastic film\n",
      "\n",
      "erp=3                                   #relative permitivity\n",
      "\n",
      "dp=0.1                                  #thickness\n",
      "\n",
      "Cp=e0*erp*Ap/dp\n",
      "\n",
      "m=Cg/Cp\n",
      "\n",
      "print\"since Cg/Cp=\",m\n",
      "\n",
      "print\"plastic film holds more charge\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "since Cg/Cp= 0.8\n",
        "plastic film holds more charge\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.5,Page number 3-37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "N=2.7*10**25                             #no of atoms per m**3\n",
      "er=1.0000684                            #dielectric constant of He atom at NTP\n",
      "e0=8.854*10**-12                         #absolute permitivity\n",
      "\n",
      "a=e0*(er-1.0)/N                           #electronic polarizability\n",
      "\n",
      "print\"1) electronic polarizability=\",\"{0:.3e}\".format(a)\n",
      "\n",
      "R=(a/(4*3.1472*e0))**(1.0/3)                  #radius of helium atom\n",
      "\n",
      "print\"2) radius of He atoms =\",\"{0:.3e}\".format(R),\"meter\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "1) electronic polarizability= 2.243e-41\n",
        "2) radius of He atoms = 5.860e-11 meter\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.6,Page number 3-37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "er=1.000014                             #dielectric constant of He atom at NTP\n",
      "Xe=er-1.0                                 #electric susceptibility\n",
      "\n",
      "print\"electric susceptibility =\",(Xe)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "electric susceptibility = 1.4e-05\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.7,Page number 3-37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "T=300                                   #temperature of paramagnetic material\n",
      "X=3.7*10**-3                             #susceptibility of material\n",
      "\n",
      "C=X*T                                   #using Curie's law\n",
      "\n",
      "T1=250                                  #temperature\n",
      "T2=600                                  #temperature\n",
      "\n",
      "u1=C/T1                                 #relative permeability of material at 250k\n",
      "\n",
      "u2=C/T2                                 #relative permeability of material at 350k\n",
      "\n",
      "print\"relative permeability at temp 250K=\",\"{0:.3e}\".format(u1)\n",
      "\n",
      "print\"relative permeability at temp 600K =\",\"{0:.3e}\".format(u2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "relative permeability at temp 250K= 4.440e-03\n",
        "relative permeability at temp 600K = 1.850e-03\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.8,Page number 3-38"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "u=0.8*10**-23                            #magnetic dipole moment of an atom \n",
      "B=0.8                                   #magnetic field\n",
      "K=1.38*10**-23                           #boltzmann constant\n",
      "\n",
      "T=(2*u*B)/(3*K)                         #temperature\n",
      "\n",
      "print\"Temperature at which average thermal energy of an atom is equal to magntic energy=\",round(T,4),\"K\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Temperature at which average thermal energy of an atom is equal to magntic energy= 0.3092 K\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.9,Page number 3-38"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "B=0.5                                   #magnetic field\n",
      "t=27                                    #temperature in degree celcius\n",
      "T=273+t                                 #temperature in kelvin\n",
      "\n",
      "u0=4*math.pi*10**-7                          #permeability of free space\n",
      "\n",
      "C=2*10**-3                               #Curie's constant\n",
      "\n",
      "M=(C*B)/(u0*T)                          #magnetization of material\n",
      "\n",
      "print\"magnetization of paramagnetic material =\",round(M,4),\"A/m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnetization of paramagnetic material = 2.6526 A/m\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.10,Page number 3-38"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "u0=4*math.pi*10**-7                          #permeability of free space\n",
      "B=10.9*10**-5                            #flux density\n",
      "\n",
      "H=B/u0                                  #magnetic field\n",
      "\n",
      "print\"Horizontal component of magnetic field =\",round(H,4),\"A-m\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Horizontal component of magnetic field = 86.7394 A-m\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.11,Page number 3-39"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "phi=5.9*10**-3                           #magnetic flux\n",
      "ur=900                                  #relative permeability of material\n",
      "n=700                                   #number of turns\n",
      "\n",
      "u0=4*math.pi*10**-7                     #permeability of free space\n",
      "\n",
      "A=60*10**-4                             #cross section area of ring\n",
      "\n",
      "l=2                                     #mean circumference of ring\n",
      "\n",
      "B=phi/A                                 #flux density\n",
      "\n",
      "H=B/(u0*ur)                             #magnetic field\n",
      "\n",
      "At=H*l                                  #Amp-turns required\n",
      "\n",
      "I=At/n                                  #current required\n",
      "\n",
      "print\"Current required to produce a flux=\",round(I,4),\"Amp\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Current required to produce a flux= 2.4842 Amp\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.12,Page number 3-39"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "phi=2.7*10**-3                           #magnetic flux\n",
      "A=25*10**-4                              #cross section area of ring\n",
      "r=25*10**-2                              #mean circumference of ring\n",
      "la=10**-3                                #air gap\n",
      "\n",
      "ur=900                                  #relative permeability of material\n",
      "n=400                                   #number of turns\n",
      "\n",
      "u0=4*math.pi*10**-7                          #permeability of free space\n",
      "\n",
      "d=40*10**-2                              #mean diameter of ring\n",
      "\n",
      "li=2*math.pi*r                              #mean circumference of ring\n",
      "\n",
      "B=phi/A                                 #flux density\n",
      "\n",
      "#for air gap\n",
      "\n",
      "Ha=B/(u0)                               #magnetic field for air gap\n",
      "\n",
      "#for iron ring\n",
      "\n",
      "Hi=B/(u0*ur)                            #magnetic field for iron ring\n",
      "\n",
      "#therefore, Amp turn in air gap\n",
      "\n",
      "Ata=Ha*la                               #Amp-turns required\n",
      "\n",
      "#therefore, Amp-turn in ring\n",
      "\n",
      "Ati=Hi*li                               #Amp-turns required\n",
      "\n",
      "#therrfore total mmf required\n",
      "\n",
      "mmf=Ata+Ati\n",
      "\n",
      "#Current required\n",
      "\n",
      "I=mmf/n                                  #current required\n",
      "\n",
      "print\"Current required =\",round(I,4),\"Amp\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Current required = 5.8986 Amp\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.13,Page number 3-40"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "n1=10                                   #no of turns per cm\n",
      "i=2                                     #current\n",
      "B=1                                     #flux density\n",
      "\n",
      "u0=4*math.pi*10**-7                     #permeability of free space\n",
      "\n",
      "n=n1*100                                #no turns per m\n",
      "\n",
      "H=n*i\n",
      "\n",
      "print\"1) magnetic intensity =\",round(H,4),\"Amp-turn/meter\"\n",
      "\n",
      "#calculation for magnetization\n",
      "\n",
      "I=B/u0-H\n",
      "\n",
      "print\"2) magnetization =\",\"{0:.3e}\".format(I),\"Amp-turn/meter\"\n",
      "\n",
      "#relative permeability\n",
      "\n",
      "ur=B/(u0*H)\n",
      "\n",
      "print\"3) Relative Permeability of the ring =\",(int(ur))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "1) magnetic intensity = 2000.0 Amp-turn/meter\n",
        "2) magnetization = 7.938e+05 Amp-turn/meter\n",
        "3) Relative Permeability of the ring = 397\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.14,Page number 3-40"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "m=40                                    #wt of the core\n",
      "d=7.5*10**3                              #density of iron\n",
      "n=100                                   #frequency\n",
      "\n",
      "V=m/d                                   #volume of the iron core\n",
      "\n",
      "E1=3800*10**-1                           #loss of energy in core per cycles/cc\n",
      "\n",
      "E2=E1*V                                 #loss of energy in core per cycles\n",
      "\n",
      "N=60*n                                  #no of cycles per minute\n",
      "\n",
      "E=E2*N                                  #loss of energy per minute\n",
      "\n",
      "print\"Loss of energy per minute =\",(E),\"Joule\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Loss of energy per minute = 12160.0 Joule\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.15,Page number 3-40"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "l=30*10**-2                             #length of ring\n",
      "A=1*10**-4                              #cross section area of ring\n",
      "i=0.032                                 #current\n",
      "\n",
      "phi=2*10**-6                             #magnetic flux\n",
      "\n",
      "u0=4*math.pi*10**-7                      #permeability of free space\n",
      "\n",
      "N=300                                    #no of turns in the coil\n",
      "\n",
      "#1) flux density\n",
      "\n",
      "B=phi/A                                 #flux density\n",
      "\n",
      "print\"1) Flux density in the ring =\",(B),\"Wb/m**2\"\n",
      "\n",
      "#2) magnetic intensity of ring\n",
      "\n",
      "n=N/l                                   #no of turns per unit length\n",
      "\n",
      "H=n*i                                   #magnetic intensity\n",
      "\n",
      "print\"2) magnetic intensity =\",(H),\"Amp-turn/meter\"\n",
      "\n",
      "#3) permeability and relative permeability of the ring\n",
      "\n",
      "u=B/H\n",
      "\n",
      "print\"3) Permeability of the ring =\",\"{0:.3e}\".format(u),\"Wb/A-m\"\n",
      "\n",
      "ur=u/u0\n",
      "\n",
      "print\"4) Relative Permeability of the ring =\",round(ur,4)\n",
      "\n",
      "#4)Susceptibility\n",
      "\n",
      "Xm=ur-1\n",
      "\n",
      "print\"5) magnetic Susceptibility of the ring =\",round(Xm,4)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "1) Flux density in the ring = 0.02 Wb/m**2\n",
        "2) magnetic intensity = 32.0 Amp-turn/meter\n",
        "3) Permeability of the ring = 6.250e-04 Wb/A-m\n",
        "4) Relative Permeability of the ring = 497.3592\n",
        "5) magnetic Susceptibility of the ring = 496.3592\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.16,Page number 3-41"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "E=3000                                  #loss of energy per cycle per cm**3\n",
      "m=12*10**3                               #wt of the core\n",
      "d=7.5                                   #density of iron\n",
      "n=50                                    #frequency\n",
      "\n",
      "V=m/d                                   #volume of the core\n",
      "\n",
      "El=E*V*n*60*60                          #loss of energy per hour\n",
      "\n",
      "print\"Loss of energy per hour =\",(El),\"Erg\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Loss of energy per hour = 8.64e+11 Erg\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.17,Page number 3-41"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "n=50                                    #frequency\n",
      "V=10**-3                                #volume of the specimen\n",
      "\n",
      "#Area of B-H loop\n",
      "\n",
      "A=0.5*10**3*1\n",
      "\n",
      "P=n*V*A\n",
      "\n",
      "print\"Hysteresis power loss =\",(P),\"Watt\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Hysteresis power loss = 25.0 Watt\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.18,Page number 3-42"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "phi=1.5*10**-4                           #magnetic flux\n",
      "\n",
      "ur=900                                  #relative permeability of material\n",
      "\n",
      "n=600                                   #number of turns\n",
      "\n",
      "u0=4*math.pi*10**-7                     #permeability of free space\n",
      "\n",
      "A=5.8*10**-4                             #cross section area of ring\n",
      "\n",
      "d=40*10**-2                              #mean diameter of ring\n",
      "\n",
      "li=math.pi*d                             #mean circumference of ring\n",
      "\n",
      "la=5*10**-3                              #air gap\n",
      "\n",
      "B=phi/A                                  #flux density\n",
      "\n",
      "#for air gap\n",
      "\n",
      "Ha=B/(u0)                               #magnetic field for air gap\n",
      "\n",
      "#for iron ring\n",
      "\n",
      "Hi=B/(u0*ur)                            #magnetic field for iron ring\n",
      "\n",
      "#therefore, Amp turn in air gap\n",
      "\n",
      "Ata=Ha*la                               #Amp-turns required\n",
      "\n",
      "#therefore, Amp-turn in ring\n",
      "\n",
      "Ati=Hi*li                               #Amp-turns required\n",
      "\n",
      "#therrfore total mmf required\n",
      "\n",
      "mmf=Ata+Ati\n",
      "\n",
      "#Current required\n",
      "\n",
      "I=mmf/n                                  #current required\n",
      "\n",
      "print\"Current required =\",round(I,4),\"Amp\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Current required = 2.194 Amp\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.19,Page number 3-42"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "la=1*10**-2                              #air gap\n",
      "r=0.5                                    #radius of ring\n",
      "A=5*10**-4                               #cross section area of ring\n",
      "i=5                                      #current\n",
      "u=6*10**-3                               #permeability of iron\n",
      "u0=4*math.pi*10**-7                      #permeability of free space\n",
      "N=900                                    #no of turns in the coil\n",
      "\n",
      "#let reluctance of iron ring with air gap be S\n",
      "\n",
      "S=la/(u0*A)+(2*math.pi*r-la)/(u*A)\n",
      "\n",
      "print\"1) Reluctance =\",\"{0:.3e}\".format(S),\"A-T/Wb\"\n",
      "\n",
      "mmf=N*i\n",
      "\n",
      "print\"2) m.m.f =\",(mmf),\"Amp-turn\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "1) Reluctance = 1.696e+07 A-T/Wb\n",
        "2) m.m.f = 4500 Amp-turn\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.20,Page number 3-43"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "#the magnetization force is given by,\n",
      "#H=NI/l\n",
      "\n",
      "H=5*10**3                                #coercivity of bar magnet\n",
      "l=10*10**-2                              #length of solenoid\n",
      "N=50                                     #number of turns\n",
      "\n",
      "I=l*H/N\n",
      "\n",
      "print\"current =\",(I),\"Ampere\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "current = 10.0 Ampere\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.21,Page number 3-43"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "ur=380                                  #relative permeability of air\n",
      "u0=4*math.pi*10**-7                     #permeability of free space\n",
      "A=5*10**-4                              #cross section area of ring\n",
      "n=200                                   #number of turns\n",
      "d=20*10**-2                             #mean diameter of ring\n",
      "\n",
      "l=math.pi*d                             #mean circumference of ring\n",
      "\n",
      "phi=2*10**-3                            #magnetic flux\n",
      "\n",
      "S=l/(u0*ur*A)                           #reluctance\n",
      "\n",
      "#using ohm's law for magnetic circuit\n",
      "\n",
      "#phi=N*I/S\n",
      "\n",
      "I=S*phi/n\n",
      "\n",
      "print\"1) Reluctance =\",\"{0:.3e}\".format(S),\"A-T/Wb\"\n",
      "print\"2) current =\",round(I,4),\"Ampere\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "1) Reluctance = 2.632e+06 A-T/Wb\n",
        "2) current = 26.3158 Ampere\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.22,Page number 3-43"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "ur=1                                    #relative permeability of air\n",
      "u0=4*math.pi*10**-7                     #permeability of free space\n",
      "A=6*10**-4                              #cross section area of torroid\n",
      "n=500                                   #number of turns\n",
      "r=15*10**-2                             #radius of torroid\n",
      "I=4                                     #current in coil\n",
      "l=2*math.pi*r                           #mean circumference of torroid\n",
      "MMF=n*I\n",
      "\n",
      "print\"1) MMF (NI) =\",(MMF),\"AT\"\n",
      "\n",
      "R=l/(u0*ur*A)                           #Reluctance\n",
      "\n",
      "print\"2) Reluctance (R) =\",\"{0:.3e}\".format(R),\"AT/Wb\"\n",
      "\n",
      "phi=MMF/R                               #flux\n",
      "\n",
      "print\"3) Magnetic flux =\",(phi),\"Wb\"\n",
      "\n",
      "B=phi/A                                 #flux density\n",
      "\n",
      "print\"4) Flux density =\",\"{0:.3e}\".format(B),\"Wb/m**2\"\n",
      "\n",
      "H=B/(u0*ur)                             #magnetic field intensity\n",
      "\n",
      "print\"5) Magnetic field intensity =\",round(H,4),\"A/m\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "1) MMF (NI) = 2000 AT\n",
        "2) Reluctance (R) = 1.250e+09 AT/Wb\n",
        "3) Magnetic flux = 1.6e-06 Wb\n",
        "4) Flux density = 2.667e-03 Wb/m**2\n",
        "5) Magnetic field intensity = 2122.0659 A/m\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.23,Page number 3-44"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "phi=10**-3                              #magnetic flux\n",
      "ur=1000                                 #relative permeability of iron\n",
      "u0=4*math.pi*10**-7                     #permeability of free space\n",
      "A=5*10**-4                              #cross section area of ring\n",
      "la=2*10**-3                             #air gap\n",
      "d=20*10**-3                             #mean diameter of ring\n",
      "\n",
      "li=math.pi*d-la                         #mean circumference of ring\n",
      "\n",
      "#using KVL for magnetic circuit\n",
      "\n",
      "#AT(total)=AT(iron)+AT(air gap)\n",
      "\n",
      "ATt=(phi/(u0*A))*((li/ur)+la)\n",
      "\n",
      "print\"Number of Ampere-Turns required =\",round(ATt,0)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of Ampere-Turns required = 3280.0\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17.24,Page number 3-44"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given data\n",
      "\n",
      "X=0.5*10**-5                            #susceptibility of material\n",
      "\n",
      "H=10**6                                 #magnetic field strength\n",
      "\n",
      "I=X*H                                   #intensity of magnetization\n",
      "\n",
      "u0=4*math.pi*10**-7                     #permeability of free space\n",
      "\n",
      "B=u0*(H+I)                              #flux density\n",
      "\n",
      "print\"1) intensity magnetization =\",(I),\"Amp/m\"\n",
      "\n",
      "print\"2) flux density in the material =\",round(B,4),\"wb/m**2\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "1) intensity magnetization = 5.0 Amp/m\n",
        "2) flux density in the material = 1.2566 wb/m**2\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}