{
 "metadata": {
  "name": "",
  "signature": "sha256:bba21646340635cd25e22fb5f80c8550eb87632b564d8cf0b5f47b826da1d6e4"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 : Forces in a Electromagnetic System"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.1  Page No : 5"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "\n",
      "# GIVEN DATA\n",
      "A = 0.0001;                # The Cross-sectional area of core in metre-square \n",
      "Mo = 4*math.pi*(10)**(-7);      # Permeability of air in Henre/metre\n",
      "Mr = 1000;                 # Relative permeability of core\n",
      "N1 = 10;N2=20;N3=10;       # Number of turns\n",
      "I1 = 1.0;I2=0.5;I3=1.5;    # Currents in Amphere\n",
      "d = 2.5;                   # Dimension of inner window in centimetre\n",
      "w = 1.0;                   # Each limb wide in centimeter\n",
      "\n",
      "\n",
      "# CALCULATIONS\n",
      "F = (N1*I1)+(N2*I2)-(N3*I3);          # MMF in Amphere-turns (minus because third coil produces the flux in opposite direction to that of other to coils)\n",
      "L = ((d*4)+(I2*2*4))*10**-2;           # Length of the Magnetic path in metre (4-is sides of the windows)(2-Going and returning of current I2)\n",
      "R = L/(Mr*Mo*A);                      # Relucmath.tance of the Magnetic path in MKS unit of Relucmath.tance\n",
      "phi = (F*10**3)/R;                     # Flux in milli-Weber\n",
      "B = phi/A;                            # Flux Density in Weber/metre Square\n",
      "H = F/L;                              # Magnetic Field Intensity in Amphere-turns/Metre\n",
      "\n",
      "\n",
      "# DISPLAY RESULTS\n",
      "\n",
      "print (\"EXAMPLE : 2.1 : SOLUTION :-\") ;\n",
      "print \" a) Flux in the core, phi = %.6f mWb \"%(phi);\n",
      "print \" b) Flux Density in the core, B = %.2f Wb/metre square  \"%(B);\n",
      "print \" c) Magnetic Field Intensity in the core, H = %.2f At/m  \"%(H);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "EXAMPLE : 2.1 : SOLUTION :-\n",
        " a) Flux in the core, phi = 0.004488 mWb \n",
        " b) Flux Density in the core, B = 44.88 Wb/metre square  \n",
        " c) Magnetic Field Intensity in the core, H = 35.71 At/m  \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2  Page No : 9"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "\n",
      "# GIVEN DATA\n",
      "\n",
      "N = 100;               # Number of turns\n",
      "La = 0.3;              # Mean arc length of material \"a\" is a Nickel-iron alloy in Metre\n",
      "Lb = 0.2;              # Mean arc length of material \"b\" is a Steel in Metre\n",
      "Lc = 0.1;              # Mean arc length of material \"c\" is a Cast Steel in Metre\n",
      "a = 0.001;             # Area of the all Materials \"a,b,c\" in Metre-Square\n",
      "phi = 6*10**-4;         # Magnetic Flux in Weber\n",
      "mue_0 = 4*math.pi*10** -7;  # Permeability of the air in Henry/Meter\n",
      "\n",
      "\n",
      "# CALCULATIONS\n",
      "\n",
      "B = phi/a;                      # Flux Density in Telsa (Here Flux Density same for all the Materials \"a,b,c\" because Area of Cross Section is Same)\n",
      "Ha = 10;                        # Fileld Intensity in Amphere-Turn/Meter Correspounding to Flux density (B) of material \"a\" obtained from the Smath.degrees(math.atanard B-H curve\n",
      "Hb = 77;                        # Fileld Intensity in Amphere-Turn/Meter Correspounding to Flux density (B) of material \"b\" obtained from the Smath.degrees(math.atanard B-H curve\n",
      "Hc = 270;                       # Fileld Intensity in Amphere-Turn/Meter Correspounding to Flux density (B) of material \"c\" obtained from the Smath.degrees(math.atanard B-H curve\n",
      "F = (Ha*La)+(Hb*Lb)+(Hc*Lc);    # The Total MMF Required in Amphere-Turns\n",
      "I = F/N;                        # Current flowing through the Coil in Amphere\n",
      "mue_r_a = B/(Ha*mue_0);        # Relatative permeability of the Material \"a\"\n",
      "mue_r_b = B/(Hb*mue_0);        # Relatative permeability of the Material \"a\"\n",
      "mue_r_c = B/(Hc*mue_0);        # Relatative permeability of the Material \"a\"\n",
      "Ra = (Ha*La)/phi;              # Relucatnce of the Material \"a\" in MKS unit\n",
      "Rb = (Hb*Lb)/phi;              # Relucatnce of the Material \"b\" in MKS unit\n",
      "Rc = (Hc*Lc)/phi;              # Relucatnce of the Material \"c\" in MKS unit\n",
      "L = (N*phi)/I;                 # Inducmath.tance of the Coil in Henry\n",
      "\n",
      "\n",
      "# DISPLAY RESULTS\n",
      "print (\"EXAMPLE : 2.2 : SOLUTION :-\") ;\n",
      "print \" a)   The Total MMF , F = %.1f At  \"%(F);\n",
      "print \" b)   Current flowing through the Coil , I = %.3f A \"%(I);\n",
      "print \" c.1) Relatative permeability of the Material a, mue_r_a = %.f  \"%(mue_r_a);\n",
      "print \" c.2) Relatative permeability of the Material b, mue_r_b = %.f  \"%(mue_r_b);\n",
      "print \" c.3) Relatative permeability of the Material c, mue_r_c = %.f  \"%(mue_r_c);\n",
      "print \" c.4) Relucatnce of the Material a, Ra= %.f MKS unit \"%(Ra);\n",
      "print \" c.5) Relucatnce of the Material b, Rb= %.1f MKS unit \"%(Rb);\n",
      "print \" c.6) Relucatnce of the Material c, Rc= %.f MKS unit \"%(Rc);\n",
      "print \" d)   Inductance of the Coil , L = %.4f H \"%(L);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "EXAMPLE : 2.2 : SOLUTION :-\n",
        " a)   The Total MMF , F = 45.4 At  \n",
        " b)   Current flowing through the Coil , I = 0.454 A \n",
        " c.1) Relatative permeability of the Material a, mue_r_a = 47746  \n",
        " c.2) Relatative permeability of the Material b, mue_r_b = 6201  \n",
        " c.3) Relatative permeability of the Material c, mue_r_c = 1768  \n",
        " c.4) Relucatnce of the Material a, Ra= 5000 MKS unit \n",
        " c.5) Relucatnce of the Material b, Rb= 25666.7 MKS unit \n",
        " c.6) Relucatnce of the Material c, Rc= 45000 MKS unit \n",
        " d)   Inductance of the Coil , L = 0.1322 H \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3  Page No : 11"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# GIVEN DATA\n",
      "F = 35;                # Total MMF in Amphere-Turns\n",
      "Lc = 0.1;              # Inducmath.tance of The Material \"c\" in Henry \n",
      "a = 0.001;             # Area of the all Materials \"a,b,c\" in Metre-Square\n",
      "\n",
      "\n",
      "# CALCULATIONS\n",
      "Hc = F/Lc;              # Field Intensity in Amphere-Turns/Meter (Given that entire MMf apperas on Material \"c\" Because of the highest relucmath.tance about 45000 MKS unit From Example 2.2)\n",
      "Bc = 0.65;              # Flux density of material \"c\" in in Telsa obtained from the Smath.degrees(math.atanard B-H curve\n",
      "phi = Bc*a;             # Flux in the core in Weber\n",
      "Ba = Bc;                # Flux density of material \"a\" in in Telsa Same because Area of Cross Section is Same\n",
      "Bb = Bc;                # Flux density of material \"b\" in in Telsabecause Area of Cross Section is Same\n",
      "\n",
      "\n",
      "# DISPLAY RESULTS\n",
      "print (\"EXAMPLE : 2.3 : SOLUTION :-\") ;\n",
      "print \" a) Flux in the core , phi = %.5f Wb  \"%(phi);\n",
      "print \" b) Flux density of material a,b, c , Ba = Bb = Bc %.2f T \"%(Ba);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "EXAMPLE : 2.3 : SOLUTION :-\n",
        " a) Flux in the core , phi = 0.00065 Wb  \n",
        " b) Flux density of material a,b, c , Ba = Bb = Bc 0.65 T \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4  Page No : 12"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# GIVEN DATA\n",
      "# Refer figure 2.7:- Page no. 41\n",
      "a = 0.0001;                # Cross Sectional Area of the Core in Meter-Square\n",
      "Li = 0.158;                # Total length of the Path abcdef in Meter (4.0*4.0 - 0.2 = 15.8cm = 0.158m)\n",
      "Lg = 0.002;                # Length of the air gap in Meter\n",
      "mue_0 = 4*math.pi*10**-7;       # Permeability of the air in Henry/Meter\n",
      "mue_r = 10000;             # Permeability of the core\n",
      "N = 10;                    # Number of Turns\n",
      "I = 1.0;                   # Current in the Coil in Amphere\n",
      "v = 50;                    # hall effect sensor generates volatge produces in milli volt per 1 Telsa\n",
      "Li_new = 0.16;              # Length of the Flux path in Absence of the Air gap in Meter\n",
      "\n",
      "\n",
      "# CALCUALTIONS\n",
      "F = N*I;                         # MMF of the Coil in Amphere-turn\n",
      "Ri = Li/(mue_0*mue_r*a);         # Relucatnce of the Iron Coil in MKS unit\n",
      "Rg = Lg/(mue_0*a);               # Relucatnce of air gap in MKS unit\n",
      "R = Ri+Rg;                       # Total Relucmath.tance in MKS unit\n",
      "phi = F/R;                       # Flux in the Core in Weber\n",
      "B = phi/a;                       # FLux density in the core(Presence of the Air gap) in Weber/Meter-Square\n",
      "HEV = B*50;                      # Output of the Hall effect Sensor device in Milli-Volt\n",
      "R_new = Li_new/(mue_0*mue_r*a)   # Relucamath.tance of the Magnetic Circuit in Absence of the Air gap\n",
      "phi_new = F/R_new;               # New Flux in the Core in Weber\n",
      "B_new = phi_new/a;               # New FLux density in the core in Weber/Meter-Square\n",
      "Ratio = B_new/B;                 # Ratio of the Flux Density in Absence of the Air gap and in the presence of the Air gap \n",
      "\n",
      "\n",
      "# DISPLAY RESULTS\n",
      "print (\"EXAMPLE : 2.4 : SOLUTION :-\") ;\n",
      "print \" a) Flux density in the corePresence of the Air gap) , B = %.8f Wb/Meter-Square  \"%(B);\n",
      "print \" b) Output of the Hall effect Sensor device , HEV = %.7f mV \"%(HEV);\n",
      "print \" c) Ratio of the Flux Density in Absence of the Air gap and in the presence of the Air gap , Ratio = %.2f  \"%(Ratio);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "EXAMPLE : 2.4 : SOLUTION :-\n",
        " a) Flux density in the corePresence of the Air gap) , B = 0.00623394 Wb/Meter-Square  \n",
        " b) Output of the Hall effect Sensor device , HEV = 0.3116969 mV \n",
        " c) Ratio of the Flux Density in Absence of the Air gap and in the presence of the Air gap , Ratio = 125.99  \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5  Page No : 13"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "\n",
      "# GIVEN DATA\n",
      "# Refer figure 2.3(a):- Page no. 36\n",
      "B = 1.0;                    # Flux Density in the Core in Weber/Meter-Square\n",
      "Liron = 0.55;               # Mean length of the flux path of Iron in Meter\n",
      "Lair = 0.002;               # Mean length of the flux path of Air Gap in Meter\n",
      "I = 20;                     # Coil Current in Amphere\n",
      "H = 200;                    # Field Intensity in Amphere-Turns/Meter\n",
      "mue_r = 20000;              # Relative permeability of Ferrite core\n",
      "mue_0 = 4*math.pi*10**-7;        # Permeability of the air in Henry/Meter\n",
      "a = 0.0025;                 # Area of the Cross sectional of the core oin Metre-Square\n",
      "\n",
      "\n",
      "# CALCULATIONS \n",
      "phi = B*a;                             # Toatl Flux in the core in Weber\n",
      "Rair = Lair/(mue_0*a);                 # Relucatnce in the Air gap\n",
      "Fair = Rair*phi;                       # MMf in the Air gap in Amphere-Turns\n",
      "Firon = H*Liron;                       # MMf in the Iron core in Amphere-Turns\n",
      "F = Firon+Fair;                        # Total MMF in Amphere-Turns\n",
      "N = F/I;                               # Number of turns in the Coil\n",
      "F_new = B/(mue_0*mue_r);               # Field Intensity in Amphere-Turns/Meter\n",
      "F_new_total = (Fair+F_new);            # Total MMF in Amphere-Turns\n",
      "N_new = F_new_total/I;                 # Number of turns in the Coil\n",
      "\n",
      "\n",
      "# DISPLAY RESULTS\n",
      "print (\"EXAMPLE : 2.5 : SOLUTION :-\") ;\n",
      "print \" a) Number of turns in the Coil in air gap made of Silicon Steel having an field intensity \\\n",
      "\\n200At/m corresounds to 1.0 T Flux Density , N = %.2f appoximately 85  \"%(N);\n",
      "print \" b) Number of turns in the Coil for a ferrite core of having Relative premeability of 20000 and\\\n",
      "\\n magnetic Field Density corresponnds to 1.0 T , N_new = %.2f appoximately 82  \"%(N_new);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "EXAMPLE : 2.5 : SOLUTION :-\n",
        " a) Number of turns in the Coil in air gap made of Silicon Steel having an field intensity \n",
        "200At/m corresounds to 1.0 T Flux Density , N = 85.08 appoximately 85  \n",
        " b) Number of turns in the Coil for a ferrite core of having Relative premeability of 20000 and\n",
        " magnetic Field Density corresponnds to 1.0 T , N_new = 81.57 appoximately 82  \n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}