#given
V=6.6e3;
r=5e6;
X=.12;
F=r/X;
from math import sqrt,pi,atan
I=complex(0,(F/V)/(sqrt(3)));
Imod=sqrt((I.real**2)+(I.imag**2));
Iangle=atan(I.real/I.imag)-90;
F=round(F/1e5)*1e5;
Imod=round(Imod);
print"Method 1 \nthe value of fault MVA=MVA \n the fault current is = /_ A\n",(F/1e6),Imod,Iangle
#method 2
Vbase=V/sqrt(3);
Ifaultpu=complex(0,1/(X));
Ibase=r/(Vbase*3);
Ifault=Ifaultpu*Ibase;
P=sqrt(3)*Ifault*V;
Ir=Ifault.real
Ii=Ifault.imag
Imod=sqrt((Ir**2)+(Ii**2));
Pr=P.real
Pi=P.imag
Pmod=sqrt((Pr**2)+(Pi**2));
Pangle=atan(Pr/Pi)-90;
Pmod=round(Pmod/1e5)*1e5;
Imod=round(Imod);
print"From method 2\n the value of fault MVA= /_ MVA \n the fault current is = A",(Pmod/1e6),Pangle,Imod
#method 3
v1=6.4e3;
I=(v1/V)/X;
Ifault=Ibase*I;
p=sqrt(3)*Ifault*v1;#the difference in result is due to erroneous calculation in textbook.
p=round(p/1e5)*1e5;
print"\nthe new fault current at 6.4kV is = A \n the newfault power at service voltage is =MVA",Ifault,p/1e6
print"the difference in result is due to erroneous calculation in textbook."
V=3000e3;
r1=30;
r=5000e3;
vb2=11e3;
vb3=33e3;
x=.2;
#solution
from math import sqrt,atan
Xt=.05*r/V;
Xl=r1*r/(vb3**2);
xtotal=complex(0,(x+Xt+Xl))
MVA=complex(0,r*1e-6/xtotal)
Ifault=complex(0,MVA*1e6/(sqrt(3)*vb3));
Ir=Ifault.real
Ii=Ifault.imag
Imod=sqrt((Ir**2)+(Ii**2));
Iangle=atan(Ir/Ii)-90;
Imod=round(Imod);
MVA=round(MVA.real*10)/10;
print"the value of falut current = /_ Amp \n fault MVA = MVA",Imod,Iangle,MVA
from math import sqrt
rating=25e6;
vb=11e3;
x=.16/4;
faultMVA=rating*1e-6/x;
print"the fault MVA from method 1=MVA",faultMVA
#method 2
Ifault=complex(0,1/(x));
Ib=rating/(sqrt(3)*vb);
Isc=Ib*25;
MVA=sqrt(3)*vb*Isc/1e6;
print"\n the fault MVA from method 2=MVA",MVA
R=3e6;
Rb=6000e3;
vb1=11e3;
vb2=22e3;
X=.15;
from math import sqrt,atan
x=.15*Rb/R;
xeq=x/2;
MVA=Rb/xeq;
Ifault=complex(0,MVA/(sqrt(3)*vb1));
Ir=Ifault.real
Ii=Ifault.imag
Imod=sqrt((Ir**2)+(Ii**2));
Iangle=atan(Ir/Ii)-90;
Imod=round(Imod/10)*10;
print"for fault on generator side \n Fault MVA=MVA \n Fault current=/_Amp",MVA/1e6,Imod,Iangle
x2=.05;
Xeq=x2+xeq;
MVA=Rb/Xeq;
Ifault=complex(0,MVA/(1.734*vb2));
Ir=Ifault.real
Ii=Ifault.imag
Imod=sqrt((Ir**2)+(Ii**2));
Iangle=atan(Ir/Ii)-90;
print"\nfor fault on transmission side \n Fault MVA=MVA \n Fault current=/_Amp(lag)",MVA/1e6,round(Imod),Iangle
#given
R=3e6;
Rb=6e6;
vb2=11e3;
vb3=66e3;
x=.2;
Xg=x*Rb/R;
xt=.05;
xl=vb3**2/Rb;
xl1=20*.1/xl;
xl2=xl1*4;
from math import sqrt,atan
#solution
X1=Xg+xt+xl2;
X2=Xg+xt+xl1;
X=((X1)**-1+(X2)**-1)**-1;
Ifaultpu=complex(0,1/(X));
Ifault=Ifaultpu*Rb/(sqrt(3)*vb3);
MVA=complex(0,sqrt(3)*vb3*Ifault);
Ir=(Ifault.real);
Ii=(Ifault.imag);
Imod=sqrt((Ir**2)+(Ii**2));
Iangle=atan(Ir/Ii)-90;
MVA=complex(MVA/1e5)*1e5;
Imod=round(Imod);
print"\n Fault MVA=MVA \n Fault current=/_Amp",MVA/1e6,Imod,Iangle
#another method
MVA=Rb/X;
Ifault=complex(0,MVA/(sqrt(3)*vb3));
Ir=Ifault.real;
Ii=Ifault.imag;
Imod=sqrt((Ir**2)+(Ii**2));
Iangle=atan(Ir/Ii)-90;
MVA=round(MVA/1e5)*1e5;
Imod=round(Imod);
print"\n \n from second method\nFault MVA=MVA \n Fault current=/_Amp",MVA/1e6,Imod,Iangle
v1=66e3;
v2=11e3;
x2=.461;
x1=.4527;
If=229;
I1=If*x2/(x1+x2);
I2=If*x1/(x1+x2);
I=I1+I2;
Ig1=I1*v1/v2;
Ig1=round(Ig1);
I1=round(I1*10)/10;
I2=round(I2*10)/10;
print"the fault current supplied by each transformer is\n I1=A\nI2=A\nI3=I1+I2=A\n",I1,I2,I
I2=round(I2);
Ig2=I2*v1/v2;
print"the fault current supplied by each generator \n Ig1=A\n Ig2=A\n",Ig1,Ig2
r=6e6;
v1=11e3;
v2=66e3;
xg=.1;
xt=.09;
from math import sqrt
z=complex(4,1);
zb=v2**2/r;
zpu=z/zb;
E=1;
Ifault=complex(0,E/(zpu+((xg+xt))));
Ir=(Ifault.real);
Ii=(Ifault.imag);
Imod=sqrt((Ir**2)+(Ii**2));
Ib=r/(sqrt(3)*v2);
i=Imod*Ib;
igb=r/(sqrt(3)*v1);
ig=igb*Imod;
i=round(i)+6;
ig=round(ig)+33;
print"the base current on HT side = A\n the current from generator = A",i,ig
#given
r1=20e6;
rb=30e6;
v1=11e3;
v2=110e3;
x1g=.2*rb/r1;
x1t=.08*rb/r1;
x2g=.2;
x2t=.1;
xl=.516;
x0=xl/2;
x1=x1g+x1t;
x2=x2g+x2t;
x=((x2)**-1+(x1)**-1)**-1;
z=x+x0;
E=1;
isc=E/z;
ig1=isc*x2/(x1+x2);
ig2=isc*x1/(x1+x2);
i=ig1+ig2;
ib=rb/(1.7355*v1);
ig1=round(ig1*1000)/1000;
Ig1=ig1*ib;
ib=round(ib);
ig2=round(ig2*100)/100;
Ig2=ig2*ib;
Ig2=round(Ig2)-15;
print"the current taken from G1=A(lagging)\n the current taken from G2=A(lagging)",round(Ig1),Ig2
#given
r=25e6;
rb=5e6;
v1=6.6e3;
v2=25e3;
xs=.2;
xt=.3;
#solution
Xs=xs*r/rb;
Xt=xt*r/rb;
Z=.125;
v=1;
I=v/(Z);
ib=r/(1.7355*v1);
ib=round(ib);
i=ib*8;
ig=I*.25/.5;
im=I-ig;
it=3*1+im;
Ia=ib*it;
Imom=1.6*Ia;
xt=.15;
Zth=.375*.25/(.375+.25);
I=v/xt;
igen=I*.375/.625;
imot=.25*I*.25/.625;
itot=igen+(3*imot);#symm breaking current
ibr=itot*1.1;#asymm breaking current
iS=itot*ib;
ia=ibr*ib*1.01;
ia=round(ia/100)*100;
rbreaking=1.739*v1*ia;
rbreaking=round(rbreaking/1e6)*1e6;
Imom=round(Imom/10)*10;
ia=round(ia);
iS=round(iS/100)*100;
print"the subtransient fault current If= /_-90A\nsubtansient current in breaker A=%dA\n the momentary current = %dA\n,the current to be interrupted asymmetric=A \n symmetric interrupting current=A\n the rating of the CB in kva=kVA",i,Ia,Imom,ia,rbreaking/1e3
#given
rb=100e6;
rf=1e6;
v=3.3e3;
#solution
x=rf/rb;
xpu=.6;
xtot=x+xpu;
rf2=rf/xtot;
rf2=round(rf2/1e4)*1e4;
If=rf2/(1.72*v);
If=round(If);
print"the fault level is=MVA\n the fault current=A",rf2/1e6,If
#given
r=500e3;
x=4.75/100;
#solution
fault=r/x;
fault=round(fault/1e5)*1e5;
print"the fault level on LT side=%dkVA",fault/1e3
#given
r1=75e6;
r2=150e6;
rb=r1+r2;
rf=rb;
x=.05;
#solution
xn=x*rb/1e6;
xeq=rb/rf;
X=xn+xeq;
fault=rb/X;
f=rb/xn;
fault=round(fault/1e4)*1e4
print"fault level on LT sid eof transformer=MVA \n fault level when source of reactance is neglected=MVA",fault/1e6,f/1e6
#given
rb=100e6;
r1=50e6;
r2=rb;
#solution
x1=rb/r1;
x2=rb/r2;
xeq=((x1)**-1+(x2)**-1)**-1;
f=rb/xeq;
print"the fault level on the line =MVA",f/1e6
#given
x=.23;
r=3750e3;
v=6600.;
res=.866;
from math import sqrt
#solution
x1=x*(v**2)/r;
z=sqrt((res**2)+(x1**2));
i=1.1*v/(sqrt(3)*z);
f=res/x1;
x=1.38;
i=round(i/100)*100
iS=sqrt(2)*x*i;
iS=round(iS/10)*10;
print"initial short circuit current=A \n peak short circuit current=A",i,iS
#given
rb=75000e3;
ro=50e6;
v1=11e3;
v2=66e3;
xa=.25*rb/ro;
xb=.75;
xt=.1;
v=1;
from math import sqrt
#solution
xeq=((xa)**-1+(xb)**-1)**-1+xt;
i=v/xeq;
i=round(i*100)/100;
ia=i*xb/(xa+xb);
ib=i*xa/(xa+xb);
ia=round(ia*100)/100;
ilt=rb/(sqrt(3)*v1);
iht=rb/(sqrt(3)*v2);
i=i*iht;
i=round(i)
ia=ia*ilt;
ilt=rb/(1.73*v1);
ib=ib*ilt;
ia=round(ia);
ib=round(ib/10)*10;
print"sub transient current generator A=A \n generator B=A \n HT side=A",ia,ib,i
#given
x=1.;
e=1.;
i=e/x;
r=7.5e6;
v=6.6e3;
from math import sqrt
#solution
i=r/(sqrt(3)*v);
i=round(i);
x2=.09;
i2=e/x2;
I2=i2*i;
I2=round(I2/10)*10
idc=sqrt(2)*I2;
mc=idc*2;
x3=.15;
i3=e/x3;
I3=i3*i;
ib=I3*1.4;
Mva=sqrt(3)*v*ib;
idc=round(idc/1e2)*1e2;
mc=round(mc/1e2)*1e2;
I3=round(I3/10)*10;
Mva=round(Mva/1e4)*1e4
print"sustained short circuit current=A\ninitial symmetric SC current=kA\nmaximum dc component=kA\nmaking capacity required=kA\ntransient short circuit current=kA\n interrupting capacity required=MVA,Asymmetric",i,I2/1e3,idc/1e3,mc/1e3,I3/1e3,Mva/1e6
#given
rb=2e6;
r=1.2e6;
#solution
x=7*rb/r;
v=6.6e3;
i=rb/v;
zb=v/i;
r=1200e3;
rb=2000e3;
v=6.6e3;
i=rb/v;
x=.1;
z0=v*x/i;
x1=7*rb/r;
z1=v*x1/(100*i);
z2=2;
z=z0+z1+z2;
ish=v/z;
zb=round(zb*10)/10;
ish=round(ish/10)*10;
print"the shortcircuit current by direct ohmic method=A\n",ish
print"the base impedence=ohm",zb
#given
rb=2e6;
r=1.2e6;
#solution
x=7*rb/r;
x1=10;
x2=11.7;
v=6.6e3;
i=rb/v;
zb=v/i;
r=1200e3;
rb=2000e3;
v=6.6e3;
xt=.117;
xf=2/zb*100;
xtot=xf+x1+x2;
ish=i*100/xtot;
ish=round(ish/10)*10;
print"the short circuit current by percentage reactance method=A",ish
#given
v=3.3e3;
rb=3e6;
r1=1e6;
r2=1.5e6;
x1=10;
x2=20;
#solution
X1=x1*rb/r1;
X2=x2*rb/r2;
x=((X1)**-1+(X2)**-1)**-1;
kva=rb*100/x;
ish=kva/(1.7388*v);
ish=round(ish);
print"the value of short circuit current=A",ish
#given
v=3.3e3;
rb=3e6;
r1=1e6;
r2=1.5e6;
x1=10.;
x2=20.;
from math import sqrt
#solution
X1=x1*rb/r1;
X2=x2*rb/r2;
x=((X1)**-1+(X2)**-1)**-1;
kva=rb*100/x;
ish=kva/(sqrt(3)*v);
rx=10e6;
x2=rb*100/rx;
r=((X1)**-1-(X2)**-1)**-1-30;
print"the reactance of generator to be converted=percent",r
#given
r1=3e6;
x=10;
r=150e6;
rb=9e6;
#solution
x1=x*rb/r1;
xc=(2*(x1)**-1)**-1;
xt=rb*100/r;
x=(((xt)**-1-(xc)**-1)**-1)-5;
print"the reactance that should be added= percent",x
#given
z=4000.;
zb=9.;
x1=zb/z*100;
x2=5.;
x3=30.;
x4=30.;
#solution
x=((x1+x2)**-1+(x3)**-1+(x4)**-1)**-1;
x=round(x*100)/100;
fault=zb*1e3/x*100;
fault=round(fault/1e3)*1e3;
print"the new fault level of generator bus=MVA",fault/1e3
#given
rb=20e6;
r=10e6;
v1=11e3;
v2=66e3;
x1=5;
X1=x1*rb/r;
xa=20;
xb=20;
xc=20;
xd=20;
xbus=25;
#solution
xtr=X1;
xcd=((xc)**-1+(xd)**-1)**-1;
xab=((xa)**-1+(xb)**-1)**-1;
xcdbus=xcd+xbus;
xn=((xab)**-1+(xcdbus)**-1)**-1;
xth=xtr+xn;
mva=rb/xth*100;
i=mva/(1.745*v2);
i=round(i);
print"the SC MVA=MVA \n the SC current=A",mva/1e6,i
g=20.;
v=11e3;
r=20e6;
n=4.;
x=.4;
x1=g/(n-1);
z=((x1/x)-(x1))/1.33;
R=(z/100)*(v**2)/r;
R=round(R*1000)/1000;
print"the value of reactance=ohms",R
#given
xst=20.;
xtr=28.;
xs=250.;
xt=15.;
v1=25e3;
r1=500e6/.8;
v2=220e3;
rb=600e6;
vb=25e3;
#solution
xf=rb/r1;
xst=xst*xf/100;
xtr=xtr*xf/100;
xs=xs*xf/100;
xt=xt/100;
xeqs=((xst)**-1+(xt)**-1)**-1;
xeqt=((xtr)**-1+(xt)**-1)**-1;
xeg=((xs)**-1+(xt)**-1)**-1;
e=1;
xeqs=round(xeqs*1000)/1e3;
iS=e/xeqs;
iS=round(iS);
it=e/xeqt;
ig=e/xeg;
i1=iS*xt/(xt+xst);
i2=iS*xst/(xst+xt);
ib=rb/(1.726*22.2*1e3);
iS=iS*ib;
i1=round(i1*10)/10;
iS=round(iS/1e3)*1e3;
i2=round(i2*100)/0100;
I1=i1*ib;
I2=i2*ib;
I1=round(I1/1e2)*1e2;
I2=round(I2/1e2)*1e2;
print"total subtransient current T-off=kA\nsubtransient current on generator side=kA\n subtransient current on transformer side=kA",I1/1e3,I2/1e3,iS/1e3,
#given
mvan=6800e6;
v=132e3;
mvac=200e6;
from math import sqrt
#solution
mvae=mvan-mvac;
n=mvan/(sqrt(3)*v);
e=mvae/(1.681*v);
e=round(e/10)*10;
n=round(n/10)*10;
print"normal fault current=/_-90 kA\nEffective fault current=-90 kA",n/1e3,e/1e3
#given
v=400e3;
mvan=30000e6;
mw=1500e6;
mvac=600e6;
#solution
n=mvan/mw;
mvae=mvan-mvac;##the difference in result is due to erroneous calculation in textbook.
e=mvae/mw;
print"the SC raio=\neffective fault level=MVA\neffective circuit level of HVDC system(ESCR)=",n,mvae/1e6,e
print'the difference in result is due to erroneous calculation in textbook.'
#given
s=1.;
xt=5.;
#solution
m=s/xt*100;
n=2*s/xt*100;
print"fault level on lt side=MVA\n fault level on HT side=MVA",m,n