{
 "metadata": {
  "name": "",
  "signature": "sha256:b5ec70b1315e83508cbbaa862fbcda72e0e77064fa4119d5958d22263c60d4ca"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER 8 - DC MACHINES: OPERATION AND TESTING"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E2 - Pg 160"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption: Find the (a)current (b)voltage required\n",
      "#Exa:8.2\n",
      "import math \n",
      "r=1.#Resistance of series motor(in ohms)\n",
      "V=230.#Voltage of series motor(in volts)\n",
      "n_1=300.#Speed of motor(in r.p.m)\n",
      "i_1=15.#Current taken by motor(in A)\n",
      "n_2=375.#Speed of motor(in r.p.m)\n",
      "i_2=math.sqrt(((i_1**2.)*(n_2**2.))/(n_1**2.))\n",
      "print '%s %.2f' %('(a)Current(in A)=',i_2)\n",
      "V_2=(((V-(i_1*r))*(i_2*n_2))/(i_1*n_1))+(i_2*r)\n",
      "print '%s %.2f' %('(b)Voltage(in volts)=',V_2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Current(in A)= 18.75\n",
        "(b)Voltage(in volts)= 354.69\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E3 - Pg 161"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption: Find the resistance required #Exa:8.3\n",
      "import math\n",
      "I_1=40.#Current taken by series motor(in A)\n",
      "V=663.#Supplied voltage(in volts)\n",
      "n_1=100.#Initial speed(in%)\n",
      "n_2=80.#final speed(in%)\n",
      "I_2=math.sqrt(((I_1**2.)*(n_2**2.))/(n_1**2.))\n",
      "a=(I_1*(n_1/100.))/(I_2*(n_2/100.))\n",
      "R=((a*V)-V)/(a*I_2)\n",
      "print '%s %.2f' %('Resistance required(in ohms) is=',R)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resistance required(in ohms) is= 7.46\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E5 - Pg 166"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption: Find (a)Speed at full load torque (b)Speed at double full load torque (c)Stalling torque\n",
      "#Exa:8.5\n",
      "import math\n",
      "V=250.#Voltage of motor(in volts)\n",
      "R_a=0.5#Armature resistance(in ohms)\n",
      "n=400.#Speed of motor at full load(in r.p.m)\n",
      "i=30.#Current taken by motor(in A)\n",
      "R=1.#Series resistance with armature(in ohms)\n",
      "E_b1=V-(i*R_a)\n",
      "E_b2=V-((R_a+R)*i)\n",
      "N=n*(E_b2/E_b1)\n",
      "print '%s %.f' %('(a)Speed at full load torque(in r.p.m)=',N)\n",
      "I=2*i\n",
      "E_b=V-(I*(R+R_a))\n",
      "N_1=n*(E_b/E_b1)\n",
      "print '%s %.f' %('(b)Speed at double full load torque(in r.p.m)=',N_1)\n",
      "I_ft=V/(R+R_a)\n",
      "T_stalling=I_ft/i\n",
      "print '%s %.2f %s' %('(c)Stalling torque=',T_stalling,'times the full load torque')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Speed at full load torque(in r.p.m)= 349\n",
        "(b)Speed at double full load torque(in r.p.m)= 272\n",
        "(c)Stalling torque= 5.56 times the full load torque\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E6 - Pg 170"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption: Find (a)Input to generator from prime mover on full load (b)Efficiency on full load (c)Load current at which generator efficiency is maximum\n",
      "#Exa:8.6\n",
      "import math\n",
      "V=230.#Voltage of generator(in volts)\n",
      "I=150.#Full load current(in A)\n",
      "R_a=0.1#Armature resistance(in ohms)\n",
      "R_f=230.#Field resistance(in ohms)\n",
      "P_s=1500.#Stray losses(in watt)\n",
      "I_f=V/R_f\n",
      "I_a=I_f+I\n",
      "W_ac=(I_a**2.)*R_a\n",
      "W_fc=(I_f**2.)*R_f\n",
      "P_c=W_fc+P_s\n",
      "L_t=W_ac+P_c\n",
      "P_o=V*I\n",
      "P_i=P_o+L_t\n",
      "print '%s %.f' %('(a)Input to generator from prime mover on full load(in watt)=',P_i)\n",
      "Eff=(P_o/P_i)*100\n",
      "print '%s %.1f' %('(b)Efficiency on full load(in %)=',Eff)\n",
      "I_l=math.sqrt(P_c/R_a)\n",
      "print '%s %.1f' %('(c)Load current at which generator efficiency is maximum(in A)=',I_l)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Input to generator from prime mover on full load(in watt)= 38510\n",
        "(b)Efficiency on full load(in %)= 89.6\n",
        "(c)Load current at which generator efficiency is maximum(in A)= 131.5\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "Example E7 - Pg 170"
     ],
     "language": "python",
     "metadata": {},
     "outputs": []
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption: Calculate (a)Efficiency on full load (b)Efficiency on 40A input (c)Efficiency on 25A input (d)Full load speed regulation \n",
      "#Exa:8.7\n",
      "V=230.#Voltage of motor(in volts)\n",
      "i_l=50.#Full load current(in A)\n",
      "r_a=0.25#Armature resistance(in ohms)\n",
      "r_f=230.#Field resistance(in ohms)\n",
      "i_o=3.#No load current(in A)\n",
      "i_1=40.#Input current(in A)\n",
      "i_2=25.#Input current(in A)\n",
      "P_c=V*i_o\n",
      "P_i1=V*i_l\n",
      "i_f=V/r_f\n",
      "i_a1=i_l-i_f\n",
      "L_fl=((i_a1**2.)*r_a)+P_c\n",
      "Eff_1=((P_i1-L_fl)/P_i1)*100.\n",
      "print '%s %.2f' %('(a)Efficiency on full load(in%)=',Eff_1)\n",
      "P_i2=V*i_1\n",
      "i_a2=i_1-i_f\n",
      "L=((i_a2**2.)*r_a)+P_c\n",
      "Eff_2=((P_i2-L)/P_i2)*100.\n",
      "print '%s %.2f' %('(b)Efficiency on 40A input(in%)=',Eff_2)\n",
      "P_i3=V*i_2\n",
      "i_a3=i_2-i_f\n",
      "L_1=((i_a3**2.*r_a)+P_c)\n",
      "Eff_3=((P_i3-L_1)/P_i3)*100.\n",
      "print '%s %.1f' %('(c)Efficiency on 25A input(in%)=',Eff_3)\n",
      "I_ao=i_o-i_f\n",
      "E_bo=V-(I_ao*r_a)\n",
      "E_bl=V-(r_a*i_a1)\n",
      "Re=((E_bo-E_bl)/E_bo)*100.\n",
      "print '%s %.1f' %('(d)Full load speed regulation(in%)=',Re)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Efficiency on full load(in%)= 88.78\n",
        "(b)Efficiency on 40A input(in%)= 88.37\n",
        "(c)Efficiency on 25A input(in%)= 85.5\n",
        "(d)Full load speed regulation(in%)= 5.1\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E10 - Pg 179"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption: Calculate efficiency of (a)motor and (b)generator\n",
      "#Exa:8.10\n",
      "import math\n",
      "V=230.#Line voltage for both shunt machines(in volts)\n",
      "I=70.#Line current excluding field currents of both machines(in A)\n",
      "i_a=400.#Armature current(in A)\n",
      "i_f1=4.#Field current of first machine(in A)\n",
      "i_f2=3.#Field current of second machine(in A)\n",
      "r_a=0.03#Resistance of armature of each mchine(in ohms)\n",
      "P_acm=(i_a**2.)*r_a\n",
      "P_i=V*I\n",
      "I_g=i_a-I\n",
      "P_acg=(I_g**2.)*r_a\n",
      "P_f=(P_i-P_acm-P_acg)/2.\n",
      "P_m=(V*i_a)+(V*i_f2)\n",
      "P_fc=V*i_f2\n",
      "L_t=P_fc+P_acm+P_f\n",
      "P_o=P_m-L_t\n",
      "n_m=(P_o/P_m)*100.\n",
      "print '%s %.1f' %('(a)Efficiency of motor(in%)=',n_m)\n",
      "P_og=V*I_g\n",
      "P_fcu=V*i_f1\n",
      "L_t1=P_f+P_fcu+P_acg\n",
      "P_ig=P_og+L_t1\n",
      "n_g=(P_og/P_ig)*100.\n",
      "print '%s %.1f' %('(b)Efficiency of generator(in%)=',n_g)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Efficiency of motor(in%)= 89.7\n",
        "(b)Efficiency of generator(in%)= 90.2\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E11 - Pg 180"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption: Calculate efficiency of motor\n",
      "#Exa:8.11\n",
      "import math\n",
      "W=25.#Effective load on break drum(in kgf)\n",
      "d=50.#Diameter of drum(in cm)\n",
      "n=750.#Speed of the motor(in r.p.m)\n",
      "I=25.#Current taken by motor(in A)\n",
      "V=230.#Voltage of motor(in volts)\n",
      "P_o=(2.*math.pi*n*W*9.81*(d/2.))/(60.*100.)\n",
      "P_i=V*I\n",
      "Eff=(P_o/P_i)*100.\n",
      "print '%s %.2f' %('Efficiency of motor(in %)=',Eff)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Efficiency of motor(in %)= 83.75\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E12 - Pg 180"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Caption:Find efficiency of motor\n",
      "#Exa:8.12\n",
      "import math\n",
      "V=500.#Voltage of shunt motor(in volts)\n",
      "I=10.#.Current taken by motor on no load(inA)\n",
      "I_f=3.#Field Current(inA)\n",
      "r_a=0.1#Armature resistance(in ohms)\n",
      "P_i=100000.#Input power to motor(in watt)\n",
      "P_nl=V*I\n",
      "I_ao=I-I_f\n",
      "P_acn=(I_ao**2.)*r_a\n",
      "P_fcn=I_f*V\n",
      "P_c=(P_nl)-P_acn-P_fcn\n",
      "I_l=P_i/V\n",
      "I_al=I_l-I_f\n",
      "P_acl=(I_al**2.)*r_a\n",
      "P_fcl=V*I_f\n",
      "L_t=P_acl+P_fcl+P_c\n",
      "Eff=((P_i-L_t)/P_i)*100.\n",
      "print '%s %.2f' %('Efficiency of motor(in%) is=',Eff)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Efficiency of motor(in%) is= 91.12\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}