In [1]:

```
from __future__ import division
import math
import cmath
#initializing the variables:
ZA = 20;# in ohm
ZB = 10 + 10j;# in ohm
ZC = -20j;# in ohm
#calculation:
Z1 = ZA*ZB/(ZA+ZB+ZC)
Z2 = ZB*ZC/(ZA+ZB+ZC)
Z3 = ZA*ZC/(ZA+ZB+ZC)
#Results
print "\n\n Result \n\n"
print "\n the Resistances of equivalent star connection are, Z1 =",round(Z1.real,2)," + (",round(Z1.imag,2),")i ohmn, Z2 =",round(Z2.real,2)," + (",round(Z2.imag,2),")i Ohm and Z3 =",round(Z3.real,2)," + (",round(Z3.imag,2),")i Ohm"
```

In [1]:

```
from __future__ import division
import math
import cmath
#initializing the variables:
rv = 40;# in volts
thetav = 0;# in degrees
ZA = 10j;# in ohm
ZB = 15j;# in ohm
ZC = 25j;# in ohm
ZD = -8j;# in ohm
ZE = 10;# in ohm
#calculation:
#voltage
V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180)
#The network of Figure 34.7 is redrawn, as in Figure 34.8,
#showing more clearly the part of the network 1, 2, 3 forming a delta connection
#This may he transformed into a star connection as shown in Figure 34.9.
Z1 = ZA*ZB/(ZA + ZB + ZC)
Z2 = ZC*ZB/(ZA + ZB + ZC)
Z3 = ZA*ZC/(ZA + ZB + ZC)
#The equivalent network is shown in Figure 34.10 and is further simplified in Figure 34.11
#(ZE + Z3) in parallel with (Z1 + ZD) gives an equivalent impedance of
z = (ZE + Z3)*(Z1 + ZD)/(Z1 + ZD + ZE + Z3)
#Hence the total circuit equivalent impedance across terminals AB is given by
Zab = z + Z2
#Supply current I
I = V/Zab
I1 = ((Z1 + ZD)/(Z1 + ZD + ZE + Z3))*I
I1mag = abs(I1)
#Power P dissipated in the 10 ohm resistance of Figure 34.7 is given by
Pr10 = ZE*I1mag**2
#Results
print "\n\n Result \n\n"
print "\n (a)the equivalent circuit impedance across terminals AB is ",round(Zab.real,2)," + (",round(Zab.imag,2),")i ohm"
print "\n (b)supply current I is ",round(I.real,2)," + (",round(I.imag,2),")i A"
print "\n (c)power P dissipated in the 10 ohm resistor is ",round(Pr10,2)," W"
```

In [2]:

```
from __future__ import division
import math
import cmath
#initializing the variables:
V = 52;# in volts
ZA = 8;# in ohm
ZB = 16;# in ohm
ZC = 40;# in ohm
ZD = 1;# in ohm
ZE = 4;# in ohm
#calculation:
#In Figure 34.12, no resistances are directly in parallel or directly in series with each other.
#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
Z1 = ZA*ZB/(ZA + ZB + ZC)
Z2 = ZC*ZB/(ZA + ZB + ZC)
Z3 = ZA*ZC/(ZA + ZB + ZC)
#The network of Figure 34.12 may thus be redrawn as shown in Figure 34.14.
#The Z1 and ZE are in series with each other, as are the ZD and Z3 resistors.
#Hence the equivalent network is as shown in Figure 34.15.
#The total equivalent resistance across terminals A and B is given by
Zab = (Z1 + ZE)*(ZD + Z3)/(Z1 + ZE + ZD + Z3) + Z2
#Current supplied by the source, i.e., current I in Figure 34.15, is given by
I = V/Zab
#From Figure 34.15, current I1
I1 = ((ZD + Z3)/(Z1 + ZE + ZD + Z3))*I
#current I2
I2 = I - I1
#From Figure 34.14, p.d. across AC,
Vac = I1*ZE
#p.d. across AD
Vad = I2*ZD
#Hence p.d. between C and D is given
Vcd = Vac - Vad
#current in the 8 ohm resistance
Ir8 = Vcd/ZA
#Results
print "\n\n Result \n\n"
print "\n (a)the equivalent circuit impedance across terminals AB is ",round(Zab,2),"ohm"
print "\n (b)the current supplied by the 52 V source is ",round(I,2)," A"
print "\n (c)the current flowing in the 8 ohm resistance is ",round(Ir8,2)," A"
```

In [2]:

```
from __future__ import division
import math
import cmath
#initializing the variables:
R2 = 1000;# in ohm
R3 = 1000;# in ohm
R4 = 500;# in ohm
R5 = 200;# in ohm
C = 2E-6; # in Farad
#calculation:
Rx = R2*R4/R3
Lx = R2*C*(R4 + R5 + R4*R5/R3)
#Results
print "\n\n Result \n\n"
print "\n (b)Rx is ",round(Rx,2),"ohm, Lx is ",round(Lx,2),"H"
```

In [2]:

```
from __future__ import division
import math
import cmath
#initializing the variables:
rv = 120;# in volts
thetav = 0;# in degrees
ZA = 25 - 5j;# in ohm
ZB = 15 + 10j;# in ohm
ZC = 20 - 30j;# in ohm
ZD = 20 + 0j;# in ohm
ZE = 0 + 10j;# in ohm
ZF = 2.5 - 5j;# in ohm
#calculation:
#voltage
V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180)
#The network may initially be simplified by transforming the delta PQR to its equivalent star connection
#as represented by impedances Z1, Z2 and Z3 in Figure 34.21. From equation (34.7),
Z1 = ZA*ZB/(ZA + ZB + ZC)
Z2 = ZC*ZB/(ZA + ZB + ZC)
Z3 = ZA*ZC/(ZA + ZB + ZC)
#The network is shown redrawn in Figure 34.22 and further simplified in Figure 34.23, from which,
Zab = ((Z3 + ZE)*(ZD + Z2)/(Z2 + ZE + ZD + Z3)) + (Z1 + ZF)
#Current I1
I1 = V/Zab
#current I2
I2 = ((ZE + Z3)/(Z2 + ZE + ZD + Z3))*I1
#current I3
I3 = I1 - I2
#The power P dissipated in the ZD impedance of Figure 34.20 is given by
Pzd = ZD*I2**2
#Results
print "\n\n Result \n\n"
print "\n (a)the current flowing in the (0+i10) ohm impedance is ",round(abs(I3),2)," A"
print "\n (b) the power dissipated in the (20 + i0) ohm impedance is ",round(abs(Pzd),2)," W"
```

In [4]:

```
from __future__ import division
import math
import cmath
#initializing the variables:
Z1 = 10;# in ohm
Z2 = 20;# in ohm
Z3 = 5j;# in ohm
#calculation:
ZA = (Z1*Z2 + Z2*Z3 + Z3*Z1)/Z2
ZB = (Z1*Z2 + Z2*Z3 + Z3*Z1)/Z3
ZC = (Z1*Z2 + Z2*Z3 + Z3*Z1)/Z1
#Results
print "\n\n Result \n\n"
print "\n the Resistances of equivalent Delta connection are, ZA =",round(ZA.real,2)," + (",round(ZA.imag,2),")i ohmn, ZB =",round(ZB.real,2)," + (",round(ZB.imag,2),")i Ohm and ZC =",round(ZC.real,2)," + (",round(ZC.imag,2),")i Ohm"
```

In [3]:

```
from __future__ import division
import math
import cmath
#initializing the variables:
Z1r = 100;# in ohm
Z1a = 0; # in Deg
Z2r = 63.25;# in ohm
Z2a = 18.43; # in Deg
Z3r = 100;# in ohm
Z3a = -90; # in Deg
#calculation
Z1 = Z1r*math.cos(Z1a*math.pi/180) + 1j*Z1r*math.sin(Z1a*math.pi/180)
Z2 = Z2r*math.cos(Z2a*math.pi/180) + 1j*Z2r*math.sin(Z2a*math.pi/180)
Z3 = Z3r*math.cos(Z3a*math.pi/180) + 1j*Z3r*math.sin(Z3a*math.pi/180)
ZA = (Z1*Z2 + Z2*Z3 + Z3*Z1)/Z2
ZB = (Z1*Z2 + Z2*Z3 + Z3*Z1)/Z3
ZC = (Z1*Z2 + Z2*Z3 + Z3*Z1)/Z1
#Results
print "\n\n Result \n\n"
print "\n the Resistances of equivalent Delta connection are, ZA =",round(ZA.real,0)," + (",round(ZA.imag,0),")i ohmn, ZB =",round(ZB.real,0)," + (",round(ZB.imag,0),")i Ohm and ZC =",round(ZC.real,0)," - (",round(ZC.imag,0),")i Ohm"
```