diff options
Diffstat (limited to 'sample_notebooks/HimanshuRajput/chapter3.ipynb')
-rwxr-xr-x | sample_notebooks/HimanshuRajput/chapter3.ipynb | 798 |
1 files changed, 798 insertions, 0 deletions
diff --git a/sample_notebooks/HimanshuRajput/chapter3.ipynb b/sample_notebooks/HimanshuRajput/chapter3.ipynb new file mode 100755 index 00000000..16142135 --- /dev/null +++ b/sample_notebooks/HimanshuRajput/chapter3.ipynb @@ -0,0 +1,798 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f5ac69af9ae1d841a7df309d87210c9fa6bb22448fba66aee7e2b96f7445f61f"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter3:THREE PHASE CIRCUITS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.1:pg-286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "f=50.0; #Assigning values to parameters\n",
+ "Vl=400.0;\n",
+ "Rph=20.0;\n",
+ "L=0.5;\n",
+ "Xl=2*math.pi*f*L;\n",
+ "Zph=20+1j*157;\n",
+ "[r,t]=cmath.polar(Zph);\n",
+ "Vph=Vl/sqrt(3); #Star connection\n",
+ "Iph=Vph/r;\n",
+ "Il=Iph;\n",
+ "P=sqrt(3)*Vl*Il*cos(t);\n",
+ "print\"The line current for Star connection is Il=\",round(Il,2),\"Amperes\"\n",
+ "print\"The total power absorbed in Star connection is P=\",round(P,3),\"Watts\"\n",
+ "Vph=Vl; #Delta connection\n",
+ "Iph=Vph/r;\n",
+ "Il=sqrt(3)*Iph;\n",
+ "P=sqrt(3)*Vl*Il*cos(t);\n",
+ "print\"The line current for Delta connection is Il=\",round(Il,2),\"Amperes\"\n",
+ "print\"The total power absorbed in Delta connection is P=\",round(P,2),\"Watts\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The line current for Star connection is Il= 1.46 Amperes\n",
+ "The total power absorbed in Star connection is P= 127.75 Watts\n",
+ "The line current for Delta connection is Il= 4.38 Amperes\n",
+ "The total power absorbed in Delta connection is P= 383.25 Watts\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.2:pg-288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "f=50 #Assigning values to parameters\n",
+ "rph=8\n",
+ "l=0.02\n",
+ "xl=2*math.pi*f*l\n",
+ "vl=230\n",
+ "f=50\n",
+ "vph=vl/sqrt(3)\n",
+ "zph=8+1j*6.28\n",
+ "[r,t]=cmath.polar(zph)\n",
+ "iph=vph/r\n",
+ "il=iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "q=sqrt(3)*vl*il*sin(t)\n",
+ "s=sqrt(3)*vl*il\n",
+ "print\"The line current is il=\",round(il,2),\"Amperes\"\n",
+ "print\"The total Power absorbed is P=\",round(P,2),\"Watts\"\n",
+ "print\"The reactive volt amperes is q=\",round(q,2),\"VAR\"\n",
+ "print\"The Volt amperes is s=\",round(s,2),\"Volt Ampere\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The line current is il= 13.06 Amperes\n",
+ "The total Power absorbed is P= 383.25 Watts\n",
+ "The reactive volt amperes is q= 3211.69 VAR\n",
+ "The Volt amperes is s= 5201.33 Volt Ampere\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.3:pg-289"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "Vl=230; #Assigning values to parameters\n",
+ "f=50;\n",
+ "Rph=15;\n",
+ "L=0.03;\n",
+ "Xl=2*math.pi*f*L;\n",
+ "Zph=15+1j*9.42;\n",
+ "[r,t]=cmath.polar(Zph)\n",
+ "Vph=Vl;\n",
+ "Iph=Vph/r;\n",
+ "Il=sqrt(3)*Iph;\n",
+ "P=sqrt(3)*Vl*Il*cos(t);\n",
+ "print\"Phase current is Iph=\",round(Iph,2),\"Amperes\"\n",
+ "print\"Line current is Il=\",round(Il,1),\"Amperes\"\n",
+ "print\"Power absorbed is=\",round(P/1000,2),\"KW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Phase current is Iph= 12.99 Amperes\n",
+ "Line current is Il= 22.5 Amperes\n",
+ "Power absorbed is= 7.59 KW\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.4:pg-290"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "f=50#assigning values to the parameters\n",
+ "xc=200\n",
+ "vph=400\n",
+ "vl=vph\n",
+ "zph=14.151-1j*200\n",
+ "[r,t]=cmath.polar(zph)\n",
+ "iph=vph/r\n",
+ "il=sqrt(3)*iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "pwr=vph*iph*cos(t)\n",
+ "c=1.0/(2*math.pi*f*xc)\n",
+ "print\"power consumed in each branch of delta is pwr=\",round(pwr,2),\"Watts\"\n",
+ "print\"capacitive reactance is c=\"\"{:.2e}\".format(c),\"Farads\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "power consumed in each branch of delta is pwr= 56.32 Watts\n",
+ "capacitive reactance is c=1.59e-05 Farads\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.5:pg-290"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "l=50 #Assigning values to parameters\n",
+ "w=800\n",
+ "c=50\n",
+ "xl=w*l\n",
+ "xc=1/(w*c)\n",
+ "z1=0+1j*40\n",
+ "z2=50\n",
+ "z3=0-1j*25\n",
+ "zph=z1+z2*z3/(z2+z3)\n",
+ "[r,t]=cmath.polar(zph)\n",
+ "vl=550\n",
+ "vph=vl\n",
+ "iph=vph/r\n",
+ "il=sqrt(3)*iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "pf=cos(t)\n",
+ "q=sqrt(3)*vl*il*sin(t)\n",
+ "s=sqrt(3)*vl*il\n",
+ "print\"The phase current is\",round(iph,2),\"Amperes\"\n",
+ "print\"The line current is\",round(il,2),\"Amperes\"\n",
+ "print\"The power drawn is\",round(p/1000,2),\"kw\"\n",
+ "print\"The power factor is\",round(pf,2)\n",
+ "print\"The reactive power is\",round(q/1000,2),\"kw\"\n",
+ "print\"The kva rating of load is\",round(s/1000,2),\"KVA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The phase current is 24.6 Amperes\n",
+ "The line current is 42.6 Amperes\n",
+ "The power drawn is 18.15 kw\n",
+ "The power factor is 0.45\n",
+ "The reactive power is 36.3 kw\n",
+ "The kva rating of load is 40.58 KVA\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.7:pg-294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "p=10000 #Assigning values to parameters\n",
+ "t=math.acos(0.6)\n",
+ "vl=440\n",
+ "vph=vl\n",
+ "il=p/(sqrt(3)*vl*cos(t))\n",
+ "iph=il/sqrt(3)\n",
+ "zph=vph/iph\n",
+ "zph1=20.9-1j*27.87\n",
+ "res=zph1.real\n",
+ "xc=zph1.imag\n",
+ "q=sqrt(3)*vl*il*sin(t)\n",
+ "print\"The resistance value of circuit element is\",round(res,2),\"ohms\"\n",
+ "print\"The capacitive value of circuit element is\",round(-xc,2),\"ohms\"\n",
+ "print\"The reactive volt-ampere\",round(-q/1000,2),\"KVAR\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance value of circuit element is 20.9 ohms\n",
+ "The capacitive value of circuit element is 27.87 ohms\n",
+ "The reactive volt-ampere -13.33 KVAR\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.8:pg-295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "f=50 #Assigning values to parameters\n",
+ "vl=440\n",
+ "p=1500\n",
+ "t=math.acos(0.2)\n",
+ "vph=vl/sqrt(3)\n",
+ "il=p/(sqrt(3)*vl*p*cos(t))\n",
+ "iph=il\n",
+ "zph=vph/iph\n",
+ "zph1=5.17+1j*25.3\n",
+ "res=zph1.real\n",
+ "xl=zph1.imag\n",
+ "l=xl/(2*math.pi*f)\n",
+ "print\"The resistive circuit constant is\",round(res,2),\"ohms\"\n",
+ "print\"The inductive circuit constant is\",round(l,2),\"H\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistive circuit constant is 5.17 ohms\n",
+ "The inductive circuit constant is 0.08 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.9:pg-296"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "p=100000 #Assigning values to parameters\n",
+ "il=80\n",
+ "vl=1100\n",
+ "f=50\n",
+ "vph=vl/sqrt(3)\n",
+ "iph=il\n",
+ "zph=vph/iph\n",
+ "t=math.acos(p/(sqrt(3)*vl*il))\n",
+ "zph1=5.21-1j*6\n",
+ "r=zph1.real\n",
+ "xc=zph1.imag\n",
+ "c=1/(2*math.pi*f*xc)\n",
+ "print\"The resistive circuit constant is\",round(r,2),\"ohms\"\n",
+ "print\"The capacitive circuit constant is\",round(-xc,2),\"ohms\"\n",
+ "print\"The capacitance is\",\"{:.2e}\".format(-c),\"farads\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistive circuit constant is 5.21 ohms\n",
+ "The capacitive circuit constant is 6.0 ohms\n",
+ "The capacitance is 5.31e-04 farads\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.10:pg-296"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "Vl=400; #Assigning values to parameters\n",
+ "Il=34.65;\n",
+ "P=14.4*10**3;\n",
+ "Vph=Vl;\n",
+ "Iph=Il/sqrt(3);\n",
+ "Zph=Vph/Iph;\n",
+ "t=math.acos(P/(sqrt(3)*Vl*Il))\n",
+ "Z=complex(Zph,t);\n",
+ "a=cmath.rect(Zph,t)\n",
+ "print\"Impedance\",a,\"ohms\"\n",
+ "print \"Resistance\",round(a.real),\"ohms\"\n",
+ "print \"Reactance\",round(a.imag),\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Impedance (11.9937782275+15.9981840036j) ohms\n",
+ "Resistance 12.0 ohms\n",
+ "Reactance 16.0 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.11:pg-297"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "vl=415 #assigning values to the parameters\n",
+ "r=15\n",
+ "l=0.1\n",
+ "c=177*10**-6\n",
+ "f=50\n",
+ "vph=vl/sqrt(3)\n",
+ "xl=2*math.pi*f*l\n",
+ "xc=1.0/(2*math.pi*f*c)\n",
+ "a=xl-xc\n",
+ "zph=r+1j*a\n",
+ "[r1,t]=cmath.polar(zph)\n",
+ "iph=vph/r1\n",
+ "il=iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "q=sqrt(3)*vl*il*sin(t)\n",
+ "s=sqrt(3)*vl*il\n",
+ "print\"The phase current is\",round(iph,1),\"Amperes\"\n",
+ "print\"The line current is\",round(il,2),\"Amperes\"\n",
+ "print\"The power drawn is\",round(p/1000,2),\"KW\"\n",
+ "print\"The reactive power is\",round(q/1000,2),\"KVAR\"\n",
+ "print\"The total kVA is\",round(s/1000,2),\"KVA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The phase current is 11.9 Amperes\n",
+ "The line current is 11.9 Amperes\n",
+ "The power drawn is 6.37 KW\n",
+ "The reactive power is 5.71 KVAR\n",
+ "The total kVA is 8.55 KVA\n"
+ ]
+ }
+ ],
+ "prompt_number": 102
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.12:pg-299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "vl=400 #assigning values to the parameters\n",
+ "t=0\n",
+ "zph=50\n",
+ "vph=vl/sqrt(3)\n",
+ "iph=vph/zph\n",
+ "il=iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "print\"Power taken is\",round(p,2),\"Watts\"\n",
+ "iph=4\n",
+ "il=iph\n",
+ "p=vl*il*cos(t)\n",
+ "print\"Power taken after disconecting one of the resistor is\",round(p,2),\"Watts\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power taken is 3200.0 Watts\n",
+ "Power taken after disconecting one of the resistor is 1600.0 Watts\n"
+ ]
+ }
+ ],
+ "prompt_number": 103
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.13:pg-300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "vl=400 #Assigning values to parameters\n",
+ "vph=vl\n",
+ "r=40\n",
+ "t=0\n",
+ "iph=vph/r\n",
+ "il=sqrt(3)*iph\n",
+ "p=sqrt(3)*vl*il*cos(t)\n",
+ "print\"Power taken is\",round(p,2),\"Watts\"\n",
+ "i=10\n",
+ "p=2*i*i*r\n",
+ "print\"Power taken after diconnecting one resistor is\",round(p,2),\"Watts\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power taken is 12000.0 Watts\n",
+ "Power taken after diconnecting one resistor is 8000.0 Watts\n"
+ ]
+ }
+ ],
+ "prompt_number": 104
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.16:pg-310"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "w1=500 #Assigning values to parameters\n",
+ "w2=2500\n",
+ "p=w1+w2\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "print\"Total Power supplied is\",round(p,2),\"Watts\"\n",
+ "print\"Power factor is\",round(pf,3)\n",
+ "w2=2500\n",
+ "w1=-500\n",
+ "p=w1+w2\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "print\"Total Power supplied after reversing the connections to the current coil is\",round(p,2),\"Watts\"\n",
+ "print\"Power factor after reversing the connections to the current coil is\",round(pf,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total Power supplied is 3000.0 Watts\n",
+ "Power factor is 0.655\n",
+ "Total Power supplied after reversing the connections to the current coil is 2000.0 Watts\n",
+ "Power factor after reversing the connections to the current coil is 0.359\n"
+ ]
+ }
+ ],
+ "prompt_number": 117
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3.17:pg-311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "w1=3000 #Assigning values to parameters\n",
+ "w2=5000\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "p=w1+w2\n",
+ "il=p/(sqrt(3)*vl*cos(t))\n",
+ "print\"Watts\",p,\"Total Power supplied is\",round(p,2),\"Watts\"\n",
+ "print\"Power factor is\",round(pf,2)\n",
+ "print\"The line current is\",round(il,2),\"Amperes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Watts 8000 Total Power supplied is 8000.0 Watts\n",
+ "Power factor is 0.92\n",
+ "The line current is 12.58 Amperes\n"
+ ]
+ }
+ ],
+ "prompt_number": 112
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Ex3.18:pg-311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "w1=-1000 #Assigning values to parameters\n",
+ "w2=3000\n",
+ "vl=400\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "p=w1+w2\n",
+ "il=p/(sqrt(3)*vl*cos(t))\n",
+ "print\"Total Power supplied is\",round(p,2),\"Watts\"\n",
+ "print\"Power factor is\",round(pf,3)\n",
+ "print\"The line current is\",round(il,2),\"Amperes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total Power supplied is 2000.0 Watts\n",
+ "Power factor is 0.277\n",
+ "The line current is 10.41 Amperes\n"
+ ]
+ }
+ ],
+ "prompt_number": 119
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Ex3.19:pg-312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "w1=100000 #Assigning values to parameters\n",
+ "w2=300000\n",
+ "vl=2000\n",
+ "n=0.9\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "p=w1+w2\n",
+ "il=p/(sqrt(3)*vl*cos(t))\n",
+ "print\"Total Power supplied is\",round(p,2),\"Watts\"\n",
+ "print\"Power factor is\",round(pf,2)\n",
+ "print\"The line current is\",round(il,2),\"Amperes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total Power supplied is 400000.0 Watts\n",
+ "Power factor is 0.76\n",
+ "The line current is 152.75 Amperes\n"
+ ]
+ }
+ ],
+ "prompt_number": 121
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Ex3.20:pg-312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "vl=220 #Assigning values to parameters\n",
+ "il=38\n",
+ "n=0.88\n",
+ "p=11200\n",
+ "ip=p/n\n",
+ "t=math.acos(ip/(sqrt(3)*vl*il))\n",
+ "a=math.degrees(t)\n",
+ "w2=vl*il*cos(30-a)\n",
+ "w1=vl*il*cos(30+a)\n",
+ "print\"The wattmeter reading is w2=\",round(w2,2),\"Watts\"\n",
+ "print\"The wattmeter reading is w1=\",round(w1,2),\"Watts\"\n",
+ "# the answer of w2,w1 are wrong in the book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The wattmeter reading is w2= 449.52 Watts\n",
+ "The wattmeter reading is w1= -2972.66 Watts\n"
+ ]
+ }
+ ],
+ "prompt_number": 138
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Ex3.21:pg-313"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "w1=1 #Assigning values to parameters\n",
+ "w2=2*w1\n",
+ "t=math.atan(sqrt(3)*(w2-w1)/(w1+w2))\n",
+ "pf=cos(t)\n",
+ "print\"Power factor is\",round(pf,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power factor is 0.866\n"
+ ]
+ }
+ ],
+ "prompt_number": 127
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |