"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"rv = 40;# in volts\n",
"thetav = 0;# in degrees\n",
"ZA = 10j;# in ohm\n",
"ZB = 15j;# in ohm\n",
"ZC = 25j;# in ohm\n",
"ZD = -8j;# in ohm\n",
"ZE = 10;# in ohm\n",
"\n",
" #calculation: \n",
" #voltage\n",
"V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180)\n",
" #The network of Figure 34.7 is redrawn, as in Figure 34.8, \n",
" #showing more clearly the part of the network 1, 2, 3 forming a delta connection \n",
" #This may he transformed into a star connection as shown in Figure 34.9.\n",
"Z1 = ZA*ZB/(ZA + ZB + ZC)\n",
"Z2 = ZC*ZB/(ZA + ZB + ZC)\n",
"Z3 = ZA*ZC/(ZA + ZB + ZC)\n",
" #The equivalent network is shown in Figure 34.10 and is further simplified in Figure 34.11\n",
" #(ZE + Z3) in parallel with (Z1 + ZD) gives an equivalent impedance of\n",
"z = (ZE + Z3)*(Z1 + ZD)/(Z1 + ZD + ZE + Z3)\n",
" #Hence the total circuit equivalent impedance across terminals AB is given by\n",
"Zab = z + Z2\n",
" #Supply current I\n",
"I = V/Zab\n",
"I1 = ((Z1 + ZD)/(Z1 + ZD + ZE + Z3))*I\n",
"I1mag = abs(I1)\n",
" #Power P dissipated in the 10 ohm resistance of Figure 34.7 is given by\n",
"Pr10 = ZE*I1mag**2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)the equivalent circuit impedance across terminals AB is \",round(Zab.real,2),\" + (\",round(Zab.imag,2),\")i ohm\"\n",
"print \"\\n (b)supply current I is \",round(I.real,2),\" + (\",round(I.imag,2),\")i A\"\n",
"print \"\\n (c)power P dissipated in the 10 ohm resistor is \",round(Pr10,2),\" W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)the equivalent circuit impedance across terminals AB is 2.5 + ( 2.5 )i ohm\n",
"\n",
" (b)supply current I is 8.0 + ( -8.0 )i A\n",
"\n",
" (c)power P dissipated in the 10 ohm resistor is 320.0 W\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 3, page no. 607
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"V = 52;# in volts\n",
"ZA = 8;# in ohm\n",
"ZB = 16;# in ohm\n",
"ZC = 40;# in ohm\n",
"ZD = 1;# in ohm\n",
"ZE = 4;# in ohm\n",
"\n",
" #calculation: \n",
" #In Figure 34.12, no resistances are directly in parallel or directly in series with each other. \n",
" #However, ACD and BCD are both delta connections and either may be converted into an equivalent star connection. The delta network BCD is redrawn in Figure 34.13(a) and is transformed into an equivalent star connection as shown in Figure 34.13(b), where\n",
"Z1 = ZA*ZB/(ZA + ZB + ZC)\n",
"Z2 = ZC*ZB/(ZA + ZB + ZC)\n",
"Z3 = ZA*ZC/(ZA + ZB + ZC)\n",
" #The network of Figure 34.12 may thus be redrawn as shown in Figure 34.14. \n",
" #The Z1 and ZE are in series with each other, as are the ZD and Z3 resistors. \n",
" #Hence the equivalent network is as shown in Figure 34.15. \n",
" #The total equivalent resistance across terminals A and B is given by\n",
"Zab = (Z1 + ZE)*(ZD + Z3)/(Z1 + ZE + ZD + Z3) + Z2\n",
" #Current supplied by the source, i.e., current I in Figure 34.15, is given by\n",
"I = V/Zab\n",
" #From Figure 34.15, current I1\n",
"I1 = ((ZD + Z3)/(Z1 + ZE + ZD + Z3))*I\n",
" #current I2\n",
"I2 = I - I1\n",
" #From Figure 34.14, p.d. across AC,\n",
"Vac = I1*ZE\n",
" #p.d. across AD\n",
"Vad = I2*ZD\n",
" #Hence p.d. between C and D is given\n",
"Vcd = Vac - Vad\n",
" #current in the 8 ohm resistance\n",
"Ir8 = Vcd/ZA\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)the equivalent circuit impedance across terminals AB is \",round(Zab,2),\"ohm\"\n",
"print \"\\n (b)the current supplied by the 52 V source is \",round(I,2),\" A\"\n",
"print \"\\n (c)the current flowing in the 8 ohm resistance is \",round(Ir8,2),\" A\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)the equivalent circuit impedance across terminals AB is 13.0 ohm\n",
"\n",
" (b)the current supplied by the 52 V source is 4.0 A\n",
"\n",
" (c)the current flowing in the 8 ohm resistance is 0.75 A"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 4, page no. 608
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"R2 = 1000;# in ohm\n",
"R3 = 1000;# in ohm\n",
"R4 = 500;# in ohm\n",
"R5 = 200;# in ohm\n",
"C = 2E-6; # in Farad\n",
"\n",
"#calculation:\n",
"Rx = R2*R4/R3\n",
"Lx = R2*C*(R4 + R5 + R4*R5/R3)\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (b)Rx is \",round(Rx,2),\"ohm, Lx is \",round(Lx,2),\"H\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (b)Rx is 500.0 ohm, Lx is 1.6 H"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 5, page no. 610
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"rv = 120;# in volts\n",
"thetav = 0;# in degrees\n",
"ZA = 25 - 5j;# in ohm\n",
"ZB = 15 + 10j;# in ohm\n",
"ZC = 20 - 30j;# in ohm\n",
"ZD = 20 + 0j;# in ohm\n",
"ZE = 0 + 10j;# in ohm\n",
"ZF = 2.5 - 5j;# in ohm\n",
"\n",
"#calculation: \n",
" #voltage\n",
"V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180)\n",
" #The network may initially be simplified by transforming the delta PQR to its equivalent star connection \n",
" #as represented by impedances Z1, Z2 and Z3 in Figure 34.21. From equation (34.7),\n",
"Z1 = ZA*ZB/(ZA + ZB + ZC)\n",
"Z2 = ZC*ZB/(ZA + ZB + ZC)\n",
"Z3 = ZA*ZC/(ZA + ZB + ZC)\n",
" #The network is shown redrawn in Figure 34.22 and further simplified in Figure 34.23, from which,\n",
"Zab = ((Z3 + ZE)*(ZD + Z2)/(Z2 + ZE + ZD + Z3)) + (Z1 + ZF)\n",
" #Current I1\n",
"I1 = V/Zab\n",
" #current I2\n",
"I2 = ((ZE + Z3)/(Z2 + ZE + ZD + Z3))*I1\n",
" #current I3\n",
"I3 = I1 - I2\n",
" #The power P dissipated in the ZD impedance of Figure 34.20 is given by\n",
"Pzd = ZD*I2**2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)the current flowing in the (0+i10) ohm impedance is \",round(abs(I3),2),\" A\"\n",
"print \"\\n (b) the power dissipated in the (20 + i0) ohm impedance is \",round(abs(Pzd),2),\" W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)the current flowing in the (0+i10) ohm impedance is 6.0 A\n",
"\n",
" (b) the power dissipated in the (20 + i0) ohm impedance is 80.0 W\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"