{
 "metadata": {
  "name": "",
  "signature": "sha256:f4786a8d4e332e45b481f4722e7d95d95012b5494845f02e4ba9a36e05b3e337"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 : Magnetic Circuits"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.1  Page No :  2.3"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "N = 200.;\t\t\t\t#turns\n",
      "c = 600.;\t\t\t\t#mm(circumference)\n",
      "A = 500.;\t\t\t\t#m**2(Cross section area)\n",
      "I = 4.;\t\t\t\t#A(Current through coil)\n",
      "\n",
      "# Calculations and Results\n",
      "H = I*N/(c*10**-3);\t\t\t\t#A/m(Magnetic field strength)\n",
      "print \"(a) Magnetic field strength(A/m) : %.2f\"%H\n",
      "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n",
      "FD = mu0*H*10**6;\t\t\t\t#micro T(Flux density)\n",
      "print \"(b) Flux density(micro T) : %.2f\"%FD\n",
      "Ft = FD*A*10**-6;\t\t\t\t#micro Wb(Total flux)\n",
      "print \"(c) Total flux(micro Wb) : %.2f\"%Ft\n",
      "#Answer in the book is wrong.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Magnetic field strength(A/m) : 1333.33\n",
        "(b) Flux density(micro T) : 1675.52\n",
        "(c) Total flux(micro Wb) : 0.84\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2  Page No :  2.4"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "fi = 0.015;\t\t\t\t#Wb(flux)\n",
      "ag = 2.5;\t\t\t\t#mm(airgap)\n",
      "Ae = 200;\t\t\t\t#cm**2(Effective area)\n",
      "\n",
      "# Calculations\n",
      "FD = fi/(Ae*10**-4);\t\t\t\t#T(Flux density)\n",
      "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n",
      "H = FD/mu0;\t\t\t\t#A/m(Magnetic field strength)\n",
      "mmf = H*ag*10**-3;\t\t\t\t#A(magnetomotive force required)\n",
      "\n",
      "# Results\n",
      "print \"Magnetomotive force required(A) : %.2f\"%mmf\n",
      "\n",
      "#Answer in the book is not accurate."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnetomotive force required(A) : 1492.08\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3  Page No :  2.7"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "A = 500.;\t\t\t\t#mm**2(Cross sectional area)\n",
      "c = 400.;\t\t\t\t#mm(circumference)\n",
      "N = 200.;\t\t\t\t#turns\n",
      "fi = 800.;\t\t\t\t#micro Wb(flux)\n",
      "\n",
      "# Calculations and Results\n",
      "B = fi*10**-6/(A*10**-6);\t\t\t\t#T(Flux density)\n",
      "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n",
      "mur = 380.;\t\t\t\t#relative permeability\n",
      "S = (c/1000)/(mur*mu0*A*10**-6);\t\t\t\t#A/Wb(Relucmath.tance)\n",
      "print \"(a) Relucmath.tance of the ring(A/Wb) :%.2e\"%S\n",
      "mmf = fi*10**-6*S;\t\t\t\t#A\n",
      "Im = mmf/N;\t\t\t\t#A(Magnetizing current)\n",
      "\n",
      "print \"(b) Required magnetizing current(A) :%.2f\"%Im\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Relucmath.tance of the ring(A/Wb) :1.68e+06\n",
        "(b) Required magnetizing current(A) :6.70\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4  Page No :  2.8"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "la = 80.;\t\t\t\t#mm\n",
      "Aa = 50.;\t\t\t\t#mm**2(Cross sectional area)\n",
      "lb = 60.;\t\t\t\t#mm\n",
      "Ab = 90.;\t\t\t\t#mm**2(Cross sectional area)\n",
      "lc = 0.5;\t\t\t\t#mm(airgap)\n",
      "Ac = 150.;\t\t\t\t#mm**2(Cross sectional area)\n",
      "N = 4000.;\t\t\t\t#turns\n",
      "Bc = 0.30;\t\t\t\t#T(Flux density in airgap)\n",
      "\n",
      "# Calculations\n",
      "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n",
      "mur = 1300;\t\t\t\t#relative permeability\n",
      "fi = Bc*Ac*10**-6;\t\t\t\t#Wb(flux)\n",
      "Fa = fi*la*10**-3/(mu0*mur*Aa*10**-6);\t\t\t\t#At\n",
      "Fb = fi*lb*10**-3/(mu0*mur*Ab*10**-6);\t\t\t\t#At\n",
      "Fc = fi*lc*10**-3/(mu0*1*Ac*10**-6);\t\t\t\t#At\n",
      "F = Fa+Fb+Fc;\t\t\t\t#At\n",
      "I = F/N*1000;\t\t\t\t#mA\n",
      "\n",
      "# Results\n",
      "print \"Coil current(mA) : %.2f\"%I\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Coil current(mA) : 45.45\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5  Page No :  2.12"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "L = 0.5;\t\t\t\t#H\n",
      "deltaI = 2-5;\t\t\t\t#A\n",
      "deltaT = 0.05;\t\t\t\t#sec\n",
      "\n",
      "# Calculations\n",
      "dIBYdT = deltaI/deltaT;\t\t\t\t#A/s\n",
      "emf = L*dIBYdT;\t\t\t\t#V\n",
      "\n",
      "# Results\n",
      "print \"emf induced(V) : %.2f\"%emf\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "emf induced(V) : -30.00\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.6  Page No :  2.14"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "N = 300;\t\t\t\t#turns\n",
      "L = 10.;\t\t\t\t#mH\n",
      "I = 5;\t\t\t\t#A\n",
      "\n",
      "# Calculations and Results\n",
      "fi = L*10**-3/N*I*10**6;\t\t\t\t#micro Wb\n",
      "print \"(a) Flux produced(micro Wb) : %.f\"%fi\n",
      "#on reverse the current\n",
      "delta_fi = 2*fi;\t\t\t\t#micro Wb\n",
      "#(as it goes to zero and increase to same value in reverse direction)\n",
      "deltaT = 8*10**-3;\t\t\t\t#seconds\n",
      "dfiBYdT = delta_fi*10**-6/deltaT;\t\t\t\t#Wb/s\n",
      "emf = N*dfiBYdT;\t\t\t\t#V(Average emf induced)\n",
      "print \"(b) Average emf induced(V) : %.2f\"%emf\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Flux produced(micro Wb) : 167\n",
        "(b) Average emf induced(V) : 12.50\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.7  Page No :  2.16"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "c = 400.;\t\t\t\t#mm(circumference)\n",
      "A = 500.;\t\t\t\t#mm**2(Cross sectional area)\n",
      "N = 200.;\t\t\t\t#turns\n",
      "\n",
      "# Calculations and Results\n",
      "#Part (a)\n",
      "I = 2;\t\t\t\t#A\n",
      "H = N*I/(c*10**-3);\t\t\t\t#A/m\n",
      "B = 1.13;\t\t\t\t#T(Corresponding Flux density)\n",
      "fi = B*A*10**-6;\t\t\t\t#Wb(total flux)\n",
      "L = N*fi/I*1000;\t\t\t\t#mH\n",
      "print \"(a) Inductance of coil(mH) : %.2f\"%L\n",
      "\n",
      "#Part (a)\n",
      "I = 10;\t\t\t\t#A\n",
      "H = N*I/(c*10**-3);\t\t\t\t#A/m\n",
      "B = 1.63;\t\t\t\t#T(Corresponding Flux density)\n",
      "fi = B*A*10**-6;\t\t\t\t#Wb(total flux)\n",
      "L = N*fi/I*1000;\t\t\t\t#mH\n",
      "print \"(b) Inductance of coil(mH) : %.2f\"%L \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) Inductance of coil(mH) : 56.50\n",
        "(b) Inductance of coil(mH) : 16.30\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.8  Page No :  2.16"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "c = 400;\t\t\t\t#mm(circumference)\n",
      "A = 500;\t\t\t\t#mm**2(Cross sectional area)\n",
      "N = 200;\t\t\t\t#turns\n",
      "\n",
      "# Calculations\n",
      "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n",
      "L = mu0*A*10**-6*(N**2)/(c*10**-3)*10**6;\t\t\t\t#micro H\n",
      "\n",
      "# Results\n",
      "print \"Inductance(micro H) : %.2f\"%L\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Inductance(micro H) : 62.83\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.10  Page No :  2.23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "A = 800;\t\t\t\t#mm**2(Cross sectional area)\n",
      "r = 170;\t\t\t\t#mm(radius)\n",
      "N1 = 500;\t\t\t\t#turns\n",
      "N2 = 700;\t\t\t\t#turns\n",
      "mur = 1200;\t\t\t\t#relative permeability\n",
      "\n",
      "# Calculations and Results\n",
      "mu0 = 4*math.pi*10**-7;\t\t\t\t#constant\n",
      "S = 2*math.pi*r*10**-3/(mu0*mur*A*10**-6);\t\t\t\t#H\n",
      "L1 = N1**2/S;\t\t\t\t#H\n",
      "print \"Self Inductance of coil 1(H) : %.2f\"%L1\n",
      "\n",
      "L2 = N2**2/S;\t\t\t\t#H\n",
      "print \"Self Inductance of coil 2(H) : %.2f\"%L2\n",
      "\n",
      "k = 1;\t\t\t\t#constant\n",
      "M = k*math.sqrt(L1*L2);\t\t\t\t#H\n",
      "print \"Mutual Inductance(H) : %.2f\"%M\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Self Inductance of coil 1(H) : 0.28\n",
        "Self Inductance of coil 2(H) : 0.55\n",
        "Mutual Inductance(H) : 0.40\n"
       ]
      }
     ],
     "prompt_number": 9
    }
   ],
   "metadata": {}
  }
 ]
}