{
 "metadata": {
  "name": "",
  "signature": "sha256:a058a43eb8f17e03501b9b96349ed2d08d5db7b72234021ac10c6272f4188cf4"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 12: Polyphase System"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.1: page 248:"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given data:\n",
      "L=30  #load  in  kW\n",
      "pf=0.8#power  factor\n",
      "Vl=250#line  voltage  in  volts\n",
      "\n",
      "#calculations:\n",
      "I=((L*10**3)/(Vl*pf*math.sqrt(3)))#line  current  in  ampers\n",
      "Ip1=I  #  in  star  connection\n",
      "Ip2=I/(math.sqrt(3))#phase  current\n",
      "Il=math.sqrt(3)*Ip2#line  current  in  amperes\n",
      "\n",
      "#Results\n",
      "print  \"(a)line  current  (star  connection)  in  amperes  is\",round(I,2)\n",
      "print  \"phase  current  (start  connection)  in  amperes  is\",round(Ip1,2)\n",
      "print  \"(b)phase  current  in  ampere  is\",round(Ip2,2)\n",
      "print  \"line  current  (delta  connection  )  in  amperes  is\",round(Il,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)line  current  (star  connection)  in  amperes  is 86.6\n",
        "phase  current  (start  connection)  in  amperes  is 86.6\n",
        "(b)phase  current  in  ampere  is 50.0\n",
        "line  current  (delta  connection  )  in  amperes  is 86.6\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.2: page 248:"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given data:\n",
      "R=11.88#coil  resistance  in  ohms\n",
      "L=0.07#inductance  in  henry\n",
      "f=50  #  in  hertz\n",
      "pf=0.48#power  factor\n",
      "Vl=433#line  voltage  in  volts\n",
      "\n",
      "#calculations:\n",
      "Vp1=  Vl/(math.sqrt(3))#phase  voltage\n",
      "Xl1=(2*math.pi*f*L)#in  ohms\n",
      "Zb1=math.sqrt(R**2+Xl1**2)#  in  ohms\n",
      "Ie1=Vp1/Zb1#current  in  each  winding  in  amperes\n",
      "Il1=Ie1#line  current  in  amperes\n",
      "W1=math.sqrt(3)*Vl*Il1*pf#power  in  watts\n",
      "\n",
      "Vp2=  Vl#phase  voltage\n",
      "Xl2=(2*math.pi*f*L)#in  ohms\n",
      "Zb2=math.sqrt(R**2+Xl2**2)#  in  ohms\n",
      "Ie2=Vp2/Zb2#current  in  each  winding  in  amperes\n",
      "Il2=math.sqrt(3)*Ie2#line  current  in  amperes\n",
      "W2=math.sqrt(3)*Vl*Il2*pf#power  in  watts\n",
      "\n",
      "#Results\n",
      "print  \"(a)line  current  in  ampere  is\",round(Il1)\n",
      "print  \"power  taken  in  connection  in  kW is\",round(W1*10**-3,1)\n",
      "print  \"(b)line  current  in  ampere  is\",round(Il2)\n",
      "print  \"power  taken  in  connection  in  kW is\",round(W2*10**-3,1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)line  current  in  ampere  is 10.0\n",
        "power  taken  in  connection  in  kW is 3.6\n",
        "(b)line  current  in  ampere  is 30.0\n",
        "power  taken  in  connection  in  kW is 10.8\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.3: page 250:"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "\n",
      "#given data:\n",
      "Vl=1100#line  voltage  in  volts\n",
      "n=99  #motor  efficiency  in  percentage\n",
      "pf=  0.8#power  factor\n",
      "\n",
      "#calculations:\n",
      "Mo=n*735.5#output  of  the  motor\n",
      "Mi=(Mo*100)/75#  INPUT  OF  THE  MOTOR  IN  WATTS\n",
      "Il=(Mi)/(math.sqrt(3)*Vl*pf)#line  current  in  amperes\n",
      "Ip=Il/(math.sqrt(3))#phase  current  in  amperes\n",
      "Ipm=Il#phase  curent  of  the  motor\n",
      "Ac1=Ip*pf#active  component  of  phase  current  in  the  motor\n",
      "Rc1=Ip*(math.sqrt(1-pf**2))#reactive  component  of  phase  current  of  motor\n",
      "Ac2=Ipm*pf#active  component  of  phase  current  in  the  generator\n",
      "Rc2=Ipm*(math.sqrt(1-pf**2))#reactive  component  of  phase  current  of  generator\n",
      "#Results\n",
      "print  \"(a)phase  current  of  motor  in  amperes  is\",round(Ip,2)\n",
      "print  \"active  component  of  phase  current  in  the  motor  in  amperes\",round(Ac1,2)\n",
      "print  \"reactive  component  of  phase  current  in  the  motor  in  amperes\",round(Rc1,2)\n",
      "print  \"(b)phase  current  of  generator  in  amperes  is\",round(Ipm,2)\n",
      "print  \"active  component  of  phase  current  in  the  generator  in  amperes\",round(Ac2,3)\n",
      "print  \"reactive  component  of  phase  current  in  the  generator  in  amperes\",round(Rc2,3)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)phase  current  of  motor  in  amperes  is 36.77\n",
        "active  component  of  phase  current  in  the  motor  in  amperes 29.42\n",
        "reactive  component  of  phase  current  in  the  motor  in  amperes 22.06\n",
        "(b)phase  current  of  generator  in  amperes  is 63.7\n",
        "active  component  of  phase  current  in  the  generator  in  amperes 50.957\n",
        "reactive  component  of  phase  current  in  the  generator  in  amperes 38.218\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.4: Page 253:"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given data:\n",
      "ni=74.6#efficiency\n",
      "Mo=40#HP  OF  MOTOR\n",
      "tw=40#total  in  kW\n",
      "pf=0.8#power  factor\n",
      "\n",
      "#calculations:\n",
      "mo=Mo*ni#output  of  motor  in  watts\n",
      "mi=(mo*100)/(ni*1000)#input  of  motor  in  kW\n",
      "theta=math.acos(pf)#in  degree\n",
      "v=math.tan(theta)#\n",
      "dw=(v*tw)/(3**0.5)#\n",
      "w1=(tw+dw)/2#FIRST  READING  IN  kW\n",
      "w2=tw-w1#second  reading  in  kW\n",
      "\n",
      "#Results\n",
      "print  \"first  reading  in  kW is\",round(w1,2)\n",
      "print  \"second  reading  in  kW is\",round(w2,2) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "first  reading  in  kW is 28.66\n",
        "second  reading  in  kW is 11.34\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.5: page 253:"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from __future__ import division\n",
      "import math\n",
      "\n",
      "#given data:\n",
      "w1=4.5#first  reading  in  kW\n",
      "w2=3  #second  reading  in  kW  ,  this  value  is  given  wrong  in  question\n",
      "\n",
      "#calculations:\n",
      "tw1=w1+w2#in  kW\n",
      "dw1=w1-w2#in  kW\n",
      "pfa1=math.atan(math.sqrt(3)*(dw1/tw1));\n",
      "pf1=math.cos(pfa1)#//power  factor  when  both  the  eadings  are  positive\n",
      "\n",
      "tw2=w1-w2#in  kW\n",
      "dw2=w1+w2#in  kW\n",
      "pfa2=math.atan(math.sqrt(3)*(dw2/tw2));\n",
      "pf2=math.cos(pfa2)#//power  factor  when  second  reading  is  obtained  by  reversing  the  connection\n",
      "#Results\n",
      "print  \"(a)power  factor  when  both  the  readings  are  positive\", round(pf1,3)\n",
      "print  \"(b)power  factor  when  second  reading  is  obtained  by  reversing  the  connections  \",round(pf2,3) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)power  factor  when  both  the  readings  are  positive 0.945\n",
        "(b)power  factor  when  second  reading  is  obtained  by  reversing  the  connections   0.115\n"
       ]
      }
     ],
     "prompt_number": 5
    }
   ],
   "metadata": {}
  }
 ]
}