## Three-Phase Circuits :example 6.8 :(pg 6.14)
VL=440.;
import math
P=50*10**3;
IL=90.;
Iph=IL/math.sqrt(3);
pf=(P/(math.sqrt(3)*VL*IL));
S=math.sqrt(3)*VL*IL;
print("\nVL=440 V \nP=50kW \nIL=90 A");
print"%s %.2f %s"%("\nVL=Vph=",VL," V");##For delta-connected load
print"%s %.2f %s"%("\nIph=IL/sqrt(3)=",Iph," A");
print("\nP=sqrt(3)*VL*IL*cos(phi)");
print"%s %.2f %s"%("\ncos(phi)=",pf," (lagging)");
print"%s %.2f %s"%("\nS=sqrt(3)*VL*IL =",S," VA");
## Three-Phase Circuits :example 6.9 :(pg 6.15)
IL=15.;
import math
P=11.*10**3;
S=15.*10**3;
VL=S/(math.sqrt(3.)*IL);
Vph=VL/math.sqrt(3.);
x=(P/S)*57.3;
phi=math.acos(P/S);
Q=math.sqrt(3.)*VL*IL*math.sin(phi/57.3);
Iph=IL;
Zph=Vph/Iph;
R=Zph*math.cos(phi/57.3);
XL=Zph*math.sin(phi/57.3);
Vph1=VL;
Iph1=(Vph1/Zph);
IL1=math.sqrt(3.)*Iph1;
P1=math.sqrt(3.)*VL*IL1*math.cos(phi/57.3);
Q1=math.sqrt(3.)*VL*IL1*math.sin(phi/57.3);
print("\nIL=15 A \nP=11kW \nS=15kVA ");
##For a star-connected load
print"%s %.2f %s"%("\nS=sqrt(3)*VL*IL \nVL=",Vph," V");
print"%s %.2f %s"%("\ncos(phi)=P/S =",x,"");
print"%s %.3f %s"%("\nphi=",phi," degrees");
print"%s %.2f %s"%("\nQ=sqrt(3).VL.IL.sin(phi) = ",Q," VAR");
print"%s %.2f %s"%("\nIph=IL = ",IL," A");
print"%s %.2f %s"%("\nZph=Vph/Iph = ",Zph," Ohm");
print"%s %.2f %s"%("\nR= Zph*cos(phi) =",R," Ohm");
print"%s %.2f %s"%("\nXL=Zph*sin(phi)= ",XL," Ohm");
##If these coils are connected in Delta
print"%s %.2f %s"%("\nCph =VL =",VL," V");
print"%s %.2f %s"%("\nZph= ",Zph," Ohm");
print"%s %.2f %s"%("\nIph=Vph/Zph =",Iph1," A ");
print"%s %.2f %s"%("\nIL=sqrt(3)*Iph =",IL1," A");
print"%s %.2f %s"%("\nP=sqrt(3)*VL*IL*cos(phi) =",P1," W");
print"%s %.2f %s"%("\nQ=sqrt(3)*VL*IL*sin(phi) =",Q1," VAR");
## Three-Phase Circuits :example 6.10 :(pg 6.16)
P=1500.*10**3;
import math
pf=0.85;
VL=2.2*10**3;
phi=math.acos(pf)*57.3;
IL=P/(math.sqrt(3.)*VL*pf);
Iph=IL/math.sqrt(3.);
AC=Iph*pf;
RC=Iph*math.sin(phi/57.3);
IAC=IL*pf;
IRC=IL*math.sin(phi/57.3);
print("\nP=1500kW \npf=0.85 (lagging) \nVL=2.2kV");
##For Delta-connected load
print"%s %.2f %s"%("\nP=sqrt(3)*VL*IL*cos(phi) \nIL=",IL," A");
print"%s %.2f %s"%("\nIph=IL/sqrt(3)= ",Iph," A");
##AC=Active Component
print"%s %.2f %s"%("\nAC=Iph*cos(phi) = ",AC," A"); ##in each phase of load
##RC=Reactive Component
print"%s %.2f %s"%("\nRC=Iph*sin(phi) = ",RC," A"); ##in each phase of load
##For star-connected source
print"%s %.2f %s"%("\nIAC = ",IAC," A"); ## current of AC in each phase of source
print"%s %.2f %s"%("\nIRC = ",IRC,"A"); ## current of RC in each phase of source
## Three-Phase Circuits :example 6.11 :(pg 6.16)
import math
VL=208.;
P=1800.;
IL=10.;
Vph=VL/math.sqrt(3.);
Zph=(Vph/IL);
pf=P/(math.sqrt(3.)*VL*IL);
phi=math.acos(pf)*57.3;
Rph=Zph*pf;
Xph=Zph*math.sin(phi/57.3);
print("\nVL=208 V \nP=1800 W \nIL= 10 A");
##For a Wye-connected load,
print"%s %.2f %s"%("\nVph = VL/sqrt(3) = ",Vph," V");
print"%s %.2f %s"%("\nIph = IL = ",IL," A");
print"%s %.2f %s"%("\nZph=Vph/Iph = ",Zph," Ohm");
print("\nP=sqrt(3)*VL*IL*cos(phi)");
print"%s %.2f %s"%("\ncos(phi)= ",pf," degrees");
print"%s %.2f %s"%("\nphi= ",phi," degrees");
print"%s %.2f %s"%("\nRph=Zph*cos(phi) = ",Rph," Ohm");
print"%s %.2f %s"%("\nXph=Zph*sin(phi) = ",Xph," Ohm");
## Three-Phase Circuits :example 6.12 :(pg 6.17)
P=100.*10**3;
import math
IL=80.;
VL=1100.;
f=50.;
Vph=(VL/math.sqrt(3.));
Iph=IL;
Zph=(Vph/Iph);
pf=(P/(math.sqrt(3.)*VL*IL));
phi=math.acos(pf)*57.3;
Rph=Zph*pf;
Xph=Zph*math.sin(phi/57.3);
C=(1./(2.*math.pi*f*Xph));
print("\nP=100kW \nIL=80 A \nVL=1100 V \nf=50 Hz");
##For a star-connected load
print"%s %.2f %s"%("\nIph=IL = ",Iph," A");
## as current is leading,reactance will be capacitive in nature
print("\nXC=(1/2*pi*C)");
print"%s %.2e %s"%("\nC= ",C," F");
print"%s %.2f %s"%("\nVph = VL/sqrt(3) = ",Vph," V");
print"%s %.2f %s"%("\nZph=Vph/Iph = ",Zph," Ohm");
print("\nP=sqrt(3)*VL*IL*cos(phi)");
print"%s %.2f %s"%("\ncos(phi)= ",pf," degrees");
print"%s %.2f %s"%("\nphi= ",phi," degrees");
print"%s %.2f %s"%("\nRph=Zph*cos(phi) = ",Rph," Ohm");
print"%s %.2f %s"%("\nXph=Zph*sin(phi) = ",Xph," Ohm");
## Three-Phase Circuits :example 6.13 :(pg 6.17 & 6.18)
import math
VL=400.;
IL=34.65;
P=14.4*10**3;
Iph=(IL/math.sqrt(3.));
Zph=(VL/Iph);
pf=(P/(math.sqrt(3.)*VL*IL));
phi=math.acos(pf)*57.3;
Rph=(Zph*pf);
Xph=(Zph*math.sin(phi/57.3));
print("\nVL=400 V \nIL=34.65 A \nP=14.4kW");
##For a Delta-connected load
print"%s %.2f %s"%("\nVL=Vph= ",VL," V");
print"%s %.2f %s"%("\nIph=IL/sqrt(3)= ",Iph," A");
print"%s %.2f %s"%("\nZph=Vph/Iph = ",Zph," Ohm");
print("\nP=sqrt(3)*VL*IL*cos(phi)");
print"%s %.2f %s"%("\ncos(phi)= ",pf," degrees");
print"%s %.2f %s"%("\nphi= ",phi," degrees");
print"%s %.2f %s"%("\nRph=Zph*cos(phi) = ",Rph," Ohm");
print"%s %.2f %s"%("\nXph=Zph*sin(phi) = ",Xph," Ohm");
## Three-Phase Circuits :example 6.14 :(pg 6.18)
P=10.44*10**3;
import math
VL=200.;
pf=0.5;
x=math.acos(pf)*57.3;
IL=(P/(math.sqrt(3.)*VL*pf));
Iph=(IL/math.sqrt(3.));
Zph=(VL/Iph);
Rph=(Zph*pf);
Xph=(Zph*math.sin(x/57.3));
Q=(math.sqrt(3.)*VL*IL*math.sin(x/57.3));
print("\nP=10.44kW \nVL=200 V \npf=0.5(leading)");
## For a delta-connected load,
print"%s %.2f %s"%("\nP=qrt(3)*VL*IL*cos(phi) \nIL= ",IL," A");
print"%s %.2f %s"%("\nQ=sqrt(3)*VL*IL*sin(phi) = ",Q," VAR");
print"%s %.2f %s"%("\nVL=Vph= ",VL," V");
print"%s %.2f %s"%("\nIph=IL/sqrt(3)= ",Iph," A");
print"%s %.2f %s"%("\nZph=Vph/Iph = ",Zph," Ohm");
print"%s %.2f %s"%("\nRph=Zph*cos(phi) = ",Rph," Ohm");
print"%s %.2f %s"%("\nXph=Zph*sin(phi) = ",Xph," Ohm");
## Three-Phase Circuits :example 6.17 :(pg 6.20)
import math
Po=200.*10**3;
f=50.;
VL=440.;
N=0.91;
pf=0.86;
phi=math.acos(pf)*57.3;
Pi=(Po/N);
IL=(Pi/(math.sqrt(3.)*VL*pf));
Iph=(IL/math.sqrt(3.));
AC=(Iph*pf);
RC=(Iph*math.sin(phi/57.3));
print("\nPo=200 kW \nf=50Hz \nVL= 440 V \nN=0.91 \npf=0.86");
##For a delta connected load (induction motor)
print"%s %.2f %s"%("\nVph =VL = ",VL,"");
print("\nN=(Po/Pi)");##efficiency
print"%s %.2f %s"%("\nPi= ",Pi," W");##Input power
print"%s %.2f %s"%("\nPi=sqrt(3)*VL*IL*cos(phi) \nIL= ",IL," A");
print"%s %.2f %s"%("\nAC = (Iph*cos(phi))= ",AC," A");##Active component of phase current
print"%s %.2f %s"%("\nRC=(Iph*sin(phi)) = ",RC," A");##Reactive component of phase current
## Three-Phase Circuits :example 6.18 :(pg 6.20)
VL=400.;
import math
Po=112.*10**3;
pf=0.86;
phi=(math.acos(pf)*57.3);
N=0.88; ##Efficiency
Pi=(Po/N);
IL=(Pi/(math.sqrt(3.)*VL*pf));
Iph=(IL/math.sqrt(3.));
AC=(Iph*pf);
RC=(Iph*math.sin(phi/57.3));
Aac=(IL*pf);
Arc=(IL*math.sin(phi/57.3));
print("\nVL=400 V \nPo=112kW \npf=0.86 \nN=0.88");
##For a mesh-connected load (induction motor)
print"%s %.2f %s"%("\nVph=VL= ",VL," V");
print"%s %.2f %s"%("\nN=Po/Pi \nPi= ",Pi," W");##Input power
print"%s %.2f %s"%("\nPi=sqrt(3)*VL*IL*cos(phi) \nIL= ",IL," A");
print"%s %.2f %s"%("\nIph=IL/sqrt(3) = ",Iph," A");
##current in star-connected load=line current drawn by motor
print"%s %.2f %s"%("\nIA= ",IL," A");##current in alternate phase
print"%s %.2f %s"%("\nAC=Iph*cos(phi) = ",AC," A");##active component in each phase of motor
print"%s %.2f %s"%("\nRC=Iph*sin(phi) = ",RC," A");##Reactive component in each phase of motor
print"%s %.2f %s"%("\nAac= ",Aac," A");##active component in each alternate phase
print"%s %.2f %s"%("\nArc= ",Arc," A");##reactive component in each alternate phase
## Three-Phase Circuits :example 6.19 :(pg 6.21 & 6.22)
import math
VL=400.;
IL=5.;
Vph=(VL/math.sqrt(3.));
Zph=(Vph/IL);
Iph=(IL/math.sqrt(3));
Vph1=(Iph*Zph);
print("\nVl=400 V \nIL=5 A");
##For a star-connected load
print"%s %.2f %s"%("\nVph=VL/sqrt(3) = ",Vph," V");
print"%s %.2f %s"%("\nIph=IL= ",IL," A");
print"%s %.2f %s"%("\nZph=Rph=Vph/Iph = ",Zph," Ohm");
##For a delta connected load
print"%s %.2f %s"%("\nIL=5 A \nRph= ",Zph," Ohm");
print"%s %.2f %s"%("\nIph=IL/sqrt(3)= ",Iph," A");
print"%s %.2f %s"%("\nVph=Iph*Rph \n= ",Vph1," V");
##Voltage needed is 1/3 of the star value
## Three-Phase Circuits :example 6.20 :(pg 6.22 & 6.23)
VL=400;
import math
Zph=100.;
Vph=(VL/math.sqrt(3.));
Iph=(Vph/Zph);
pf=1.;
P=(math.sqrt(3.)*VL*Iph*pf);
Iph1=(VL/Zph);
IL1=(math.sqrt(3.)*Iph1);
P1=(math.sqrt(3.)*VL*IL1*pf);
I1=(VL/200.);
Pa=(VL*I1);
I2=(VL/100.);
Pb=(VL*I1*I2);
print("\nVL=400 V \nZph = 100 Ohm");
##For a star connected load
print"%s %.2f %s"%("\nVph=VL/sqrt(3) = ",Vph," V");
print"%s %.2f %s"%("\nIph = VL/Zph = ",Iph," A");
print"%s %.2f %s"%("\nIL=Iph = ",Iph," A");
print"%s %.2f %s"%("\ncos(phi)=1 \nP=sqrt(3).VL.IL.cos(phi) = ",P," W");
##For a delta connected load
print"%s %.2f %s"%("\nVph=VL= ",VL," V");
print"%s %.2f %s"%("\nIph=Vph/Zph = ",Iph1," A");
print"%s %.2f %s"%("\nIL=sqrt(3)*Iph = ",IL1," A");
print"%s %.2f %s"%("\nP=sqrt(3)*VL*IL*cos(phi) = ",P1," W");
##When resistors are open circuited
##(i)Star connection
print"%s %.2f %s"%("\nI= ",I1," A");##Current in lines
print"%s %.2f %s"%("\nP= ",Pa," W");##Power taken from mains
##(ii)Delta connection
print"%s %.2f %s"%("\nI= ",I2,"A");##Current in each phase
print"%s %.2f %s"%("\nP= ",Pb," W");##Power taken from mains
## Three-Phase Circuits :example 6.27 :(pg 6.30 & 6.31)
import math
W1=2000.;
W2=500.;
W3=-500.;
x=(math.sqrt(3.)*((W1-W2)/(W1+W2)));
phi=math.atan(x)*57.3;
pf=math.cos(phi/57.3);
y=(math.sqrt(3.)*((W1-W3)/(W1+W3)));
phi1=math.atan(y)*57.3;
pf1=math.cos(phi1/57.3);
print("\nW1 = 2000W \nW2 = 500 W");
##(i) When both readings are same
print("\nWhen W1 &W2 are same \nW1 = 2000W \nW2 = 500 W");
print"%s %.2f %s"%("\ntan(phi)= sqrt(3).(W1-W2/W1+W2) = ",x,"");
print"%s %.2f %s"%("\nphi= ",phi," degrees");
print"%s %.2f %s"%("\npf=cos(phi)=",pf,"");##Power factor
##(ii) When the latter reading is obtained after reversing the connection to the current coil of 1 instrument
print("\nWhen W2 is reversed \nW1= 2000 W \nW2= -500 W");
print"%s %.2f %s"%("\ntan(phi)= sqrt(3).(W1-W2/W1+W2) =",y,"");
print"%s %.2f %s"%("\nphi= ",phi1," degrees");
print"%s %.2f %s"%("\npf=cos(phi)= ",pf1,"");##Power factor
## Three-Phase Circuits :example 6.28 :(pg 6.31)
W1=5.*10**3;
import math
W2=-(0.5*10**3);
P=(W1+W2);
x=(math.sqrt(3.)*((W1-W2)/(W1+W2)));
phi=math.atan(x)*57.3;
pf=math.cos(phi/57.3);
print("\nW1=5kW \W2=0.5kW");
## When the latter readings are obtained after the reversal of the current coil terminals of the wattmeter
print("\nWhen W2 is reversed \nW1=5kW \nW2=-0.5kW");
print"%s %.2f %s"%("\nP=W1+W2 = ",P," W");##Power
print"%s %.2f %s"%("\ntan(phi)=sqrt(3)*(W1-W2/W1+W2) =",x,"");
print"%s %.2f %s"%("\nphi= ",phi," degrees ");
print"%s %.2f %s"%("\npf=cos(phi) =",pf,"");##Power factor
## Three-Phase Circuits :example 6.29 :(pg 6.31)
import math
S=10*10**3;
pf=0.342;
x=(S/math.sqrt(3.));
phi=math.acos(pf)*57.3;
W1=x*math.cos(30+phi)/(57.3);
W2=x*math.cos(30-phi)/(57.3);
print("\nS=10kVA \npf=0.342 \nS=sqrt(3)*VL*IL");
print"%s %.2f %s"%("\nVL*IL= ",x,"VA");
print"%s %.2f %s"%("\ncos(phi)=",pf,"");
print"%s %.2f %s"%("\nphi= ",phi," degrees");
##(i)when power factor is leading
print"%s %.2f %s"%("\npf leading \nW1=VL.IL.cos(30+phi)= ",W1," W");
print"%s %.2f %s"%("\n \nW2=VL.IL.cos(30-phi)= ",W2," W");
##(i)when power factor is lagging
print"%s %.2f %s"%("\npf lagging \nW1=VL.IL.cos(30-phi)= ",W2," W");
print"%s %.2f %s"%("\n \nW2=VL.IL.cos(30+phi)=",W1," W");
## Three-Phase Circuits :example 6.30 :(pg 6.31 & 6.32)
VL=2000.;
import math
N=0.9;##efficiency
W1=300.*10**3;
W2=100.*10**3;
P=W1+W2;
x=(math.sqrt(3.)*((W1-W2)/(W1+W2)));
phi=math.atan(x)*57.3;
pf=math.cos(phi/57.3);
IL=(P/(math.sqrt(3.)*VL*pf));
print("\nVL=2000 V \nN=0.9 \nW1=300kW \nW2=100kW");
print"%s %.2f %s"%("\nP=W1+W2 = ",P," W");##Input Power
print"%s %.2f %s"%("\ntan(phi)=(sqrt(3)*(W1-W2/W1+W2)) =",x,"");
print"%s %.2f %s"%("\nphi= ",phi," degrees ");
print"%s %.2f %s"%("\ncos(phi)=",pf,"");##Power factor
print"%s %.2f %s"%("\nP=sqrt(3)*VL*IL*cos(phi) \nIL= ",IL," A");
## Three-Phase Circuits :example 6.31 :(pg 6.32)
import math
VL=220.;
Po=11.2*10**3;
N=0.88;##efficiency
IL=38.;
Pi=(Po/N);
x=(Pi/(math.sqrt(3.)*VL*IL));
phi=math.acos(x)*57.3;
W1=(VL*IL*math.cos(30-phi)/57.3);
W2=(VL*IL*math.cos(30+phi)/57.3);
print"%s %.2f %s"%("\nVL=220 V \nPo=11.2kW \nN=0.88 \nIL=38A \N=(Po/Pi)= ",Pi," W");
print"%s %.2f %s"%("\nPi=sqrt(3)*VL*IL*cos(phi) \ncos(phi)= ",x," lagging");
print"%s %.2f %s"%("\nphi=",phi," degrees");
print"%s %.2f %s"%("\nW1 =VL*IL*cos(30-phi) = ",W1," W");
print"%s %.2f %s"%("\nW2 =VL*IL*cos(30+phi) = ",W2," W");