In [48]:

```
from __future__ import division
#Variable declaration:
kVAa = 15000
kVAb = 20000
V = 12000
kVA_base = 35000
Xa = 30 #%reactance of alternator A(%)
Xb = 50 #%reactance of alternator B(%)
#Calculation:
Xa1 = kVA_base/kVAa*Xa #% Reactance of alternator A at the base kVA
Xb1 = kVA_base/kVAb*Xb #% Reactance of alternator B at the base kVA
I = kVA_base*1000/(3**0.5*V) #Line current corresponding to 35000 kVA at 12 kV
X = Xa1*Xb1/(Xa1+Xb1) #Total % reactance from generator neutral up to fault point
Isc = I*100/X #Short-circuit current(A)
#Result:
print "The short-circuit current is",round(Isc),"A"
```

In [49]:

```
from __future__ import division
#Variable declaration:
kVA = 20000 #kVA rating of alternator
V = 10000 #voltage rating of alternator
Xa = 5 # % reactance of alternator(ohm)
#Calculation:
I = kVA*1000/(3**0.5*V) #full load current(A)
Vp = V/3**0.5 #phase voltage(A)
#As the short-circuit current is to be 8 times the full-load current,
Xr = 1/8*100
Xe = Xr-Xa #External % reactance required
X = Xe*Vp/(I*100) #per phase external reactance required(ohm)
#Result:
print "Per phase external reactance required is",X,"ohm"
```

In [50]:

```
from __future__ import division
#Variable declaration:
Vl = 10 #transmission line voltage(kV)
Rl = 1 #line resistance(ohm)
Xl = 4 #line reactance(ohm)
MVAtf = 5 #transformer rating(MVA)
Xtf = 5 #reactance of transformer(%)
MVAal = 10 #rating of alternator(MVA)
Xal = 10 #reactance of alternator(%)
#Calculation:
#Let 10,000 kVA be the base kVA
kVAb = 10000 #base kVA
Xalb = kVAb/(MVAal*1000)*Xal #% reactance of alternator on base kVA
Xtfb = kVAb/(MVAtf*1000)*Xtf #% reactance of transformer on base kVA
Xl1 = kVAb*Xl/(10*Vl**2) #% reactance of transmission line
Rl1 = kVAb*Rl/(10*Vl**2) #% resistance of transmission line
#(i)For a fault at the end of a transmission line (point F2),
Xt = Xalb+Xtfb+Xl1 #Total % reactance
Z = (Xt**2+Rl1**2)**0.5 #% impedance from generator neutral upto fault point F2
SCkVA1 = kVAb*100/Z #Short-circuit kVA
#(ii)For a fault at the high voltage terminals of the transformer (point F1),
#Total % reactance from generator neutral upto fault point F1:
Xt1 = Xalb+Xtfb
SCkVA2 = kVAb*100/Xt1 #Short-circuit kVA
#Result:
print "(i) SC kVA for 1st case = ",round(SCkVA1),"kVA"
print "(ii)SC kVA for 2nd case = ",round(SCkVA2),"kVA"
```

In [3]:

```
from __future__ import division
#Variable declaration:
kVAb = 10000 #kVA base
Xt = 5 #reactance of each transformer(%)
kVAt = 5000 #kVA rating of each transformer
kVA1 = 10000 #kVA of generator A & B each
kVA3 = 5000 #kVA of generator C
Xa = 12 #reactance of generator A & B each(%)
Xc = 18 #reactance of generator c(%)
#Calculation:
#The % reactance of generators A, B and C and that of
#each transformer on the selected base kVA will be:
XA = Xa*kVAb/kVA1
XB = Xa*kVAb/kVA1
XC = Xc*kVAb/kVA3
XT = Xt*kVAb/kVAt
#(i) When the fault occurs on the low voltage side of the
#transformer,
#Total % reactance from generator neutral upto fault point F1
XT1 = XA/2*XC/(XA/2+XC) #%
MVAf1 = kVAb*100/XT1/1000 #Fault MVA
#(i) When the fault occurs on the high voltage side of the
#transformer
#Total % reactance from generator neutral upto fault point F2
XT2 = XT1+XT #%
MVAf2 = kVAb*100/XT2/1000 #Fault MVA
#Result:
print "Maximum fault MVA which the circuit breakers on:"
print "(i) low voltage side is",round(MVAf1,1),"MVA"
print "(ii)high voltage side is",round(MVAf2),"MVA"
```

In [4]:

```
from __future__ import division
#Variable declaration:
X1 = 10 #reactance of generator 1 & 2 each(%)
X3 = 12 #reactance of generator 3 & 4 each(%)
kVA1 = 10000 #kVA rating of generator 1 & 2 each
kVA3 = 8000 #kVA rating of generator 3 & 4 each
Xr = 10 #reactance of reactor(%)
kVAr = 5000 #kVA of reactor
#Calculation:
#Fig. above shows the single line diagram of the network.
kVAb = 10000 #base kVA
X1b = X1*kVAb/kVA1 #% Reactance of generator 1 or 2 on the base kVA
X3b = X3*kVAb/kVA3 #% Reactance of generator 3 or 4 on the base kVA
Xrb = Xr*kVAb/kVAr #% Reactance of bus-bar reactor on the base kVA
#After the fault occurs,
Xt = ((X1b/2+Xrb)*X3b/2)/(X1b/2+Xrb+X3b/2)
kVAf = kVAb*100/Xt
#Result:
print "Required fault MVA is",round(kVAf/1000,2),"MVA"
```

In [53]:

```
from __future__ import division
from sympy import *
#Variable declaration:
kVAa = 3000 #kVA rating of generator A
kVAb = 4500 #kVA rating of generator B
Xa = 7 #% reactance of gen A
Xb = 8 #% reactance of gen A
kVAt = 7500 #kVA rating of transformer
Xt = 7.5 #% reactance of transformer
Vb = 3.3 #bus voltage(kV)
#Calculation:
kVAbs = 7500 #base kVA(say)
XA = Xa*kVAbs/kVAa #% Reactance of generator A on the base kVA
XB = Xb*kVAbs/kVAb #% Reactance of generator B on the base kVA
XT = Xt*kVAbs/kVAt #% Reactance of transformer on the base kVA
X = symbols('X') #percentage reactance of the bus-bar reactor
Xt1 = (XA*XB/(XA+XB))*(X+XT)/((XA*XB/(XA+XB))+(X+XT))
SCkVA = kVAt*100*Xt1 #Short-circuit kVA
#But the short-circuit kVA should not exceed 150 * 10**3 kVA,
#the rupturing capacity of the breaker.
X1 = abs(solve(SCkVA-150*1000,X)[0])
x = X1*10*Vb**2/kVAt #reactance of the reactor(ohm)
#Result:
print "Reactance of the reactor per phase is",round(x,3),"ohm"
```

In [5]:

```
from __future__ import division
#Variable declaratioon:
MVAbase = 100 #base MVA
MVAa = 1500 #estimated short-circuit MVA at busbar A
MVAb = 1200 #estimated short-circuit MVA at busbar B
kV = 33 #generated voltage at each station(kV)
x = 1 #transmission line reactance(ohm)
#Calculation:
Xa = MVAbase/MVAa*100 #% Reactance of station A on the base MVA
Xb = MVAbase/MVAb*100 #% Reactance of station B on the base MVA
Xt = MVAbase*1000*x/(10*kV**2)
#Fault on station A.
Xt1 = (Xb+Xt)*Xa/(Xa+Xb+Xt) #Total % reactance upto fault point F1
SCMVA1 = MVAbase*100/Xt1 #Short-circuit MVA
#Fault on station B.
Xt2 = (Xa+Xt)*Xb/(Xb+Xa+Xt) #Total % reactance upto fault point F2
SCMVA2 = MVAbase*100/Xt2 #Short-circuit MVA
#Result:
print "Fault on station A, the short circuit MVA is",round(SCMVA1),"MVA"
print "Fault on station B, the short circuit MVA is",round(SCMVA2),"MVA"
```

In [6]:

```
from __future__ import division
#Variable declaration:
kVAbase = 5000 #base kVA
Xr = 6 #% reactance of reactor
Xg = 12 #% reactance of each generator
kVAg = 5000 #given generator rating(kVA)
kVAr = 5000 #given reactor rating(kVA)
#Calculation:
#(i) With reactors:
#Suppose a 3-phase short-circuit fault occurs on section 3 of the bus-bar.
Xt1 = round(((Xr+Xg)/2+Xr)*Xg/(((Xr+Xg)/2+Xr)+Xg),2) #% reactance from gen. neutral upto fault point F
SCkVA1 = kVAbase*100/Xt1 #Short-circuit input
#(ii) Without reactors:
Xt2 = Xg/3 #Total % reactance upto fault point F
SCkVA2 = kVAbase*100/Xt2
#Result:
print "(i) With reactors, short circuit MVA",round(SCkVA1/1000,3),"MVA"
print "(ii) With reactors, short circuit MVA",SCkVA2/1000,"MVA"
```

In [7]:

```
from __future__ import division
#Variable declaration:
MVAbase = 5 #base MVA
MVAg = 10 #MVA of generator
MVAr = 10 #MVA of reactor
MVAtr = 5 #MVA of transformer
xr = 10 #% reactance of each reactor
xg = 30 #% reactance of each generator
xtr = 5 #% reactance of each transformer
#Calculation:
Xg = xg*MVAbase/MVAg #%age reactance of each generator on the base MVA
Xr = xr*MVAbase/MVAr #%age reactance of each reactor on the base MVA
Xtr = xtr*MVAbase/MVAtr #%age reactance of each transformer on the base MVA
#Total %age reactance from generator neutral upto fault point F
Xt = ((Xg+Xr)/2+Xtr)*Xg/(((Xg+Xr)/2+Xtr)+Xg)+Xr
SCMVA = MVAbase*100/Xt #short circuit MVA
#Result:
print "Short circuit MVA is",SCMVA,"MVA"
```

In [8]:

```
from __future__ import division
from sympy import *
#Variable declaration:
#Let N = no. of section in bus bar
#Q = kVA rating of generator
#x = reactance of reactance
#b = bus reactances.
N,Q,x,b = symbols('N Q x b')
#Calculation:
X1 = (b+(x+b)/(N-1))*x/(b+(x+b)/(N-1)+x) # %
SCkVA = Q*100/X1 #short circuit kVA
#Now putting values:
Q = 50000 #kVA
x = 20 # %
b = 10 # %
#(i) With 3 sections
N1 = 3
X1 = (b+(x+b)/(N1-1))*x/(b+(x+b)/(N1-1)+x)
SCkVA1 = Q*100/X1
#(ii) With 9 sections
N2 = 9
X2 = (b+(x+b)/(N2-1))*x/(b+(x+b)/(N2-1)+x)
SCkVA2 = Q*100/X2
#(ii) When N is very large
N3 = 9999999999999 #say
X3 = (b+(x+b)/(N3-1))*x/(b+(x+b)/(N3-1)+x)
SCkVA3 = Q*100/X3
#Result:
print "Short circuit kVA"
print "(i) For 3 sections is",SCkVA1,"kVA"
print "(ii) For 9 sections is",round(SCkVA2),"kVA"
print "(iii)For large N is",round(SCkVA3),"kVA"
```

In [2]:

```
from __future__ import division
from sympy import *
#Variable declaration:
MVAbs = 50 #base MVA
MVAg = 10 #MVA of each generators
xg = 20 #% reactance
xt = 10 #reactance of transformer(%)
MVAt = 50 #MVA of transformer
kV = 33 #bus voltage
#Calculation:
Xg = MVAbs/MVAg*xg #% reactance of each of the generator on base MVA
Xt = MVAbs/MVAt*xt #% reactance of the transformer on base MVA
#Suppose the required reactance of the reactor is X % on 50 MVA base.
X = symbols('X')
#The reactances of the four generators are in parallel
#& their equivalent reactance = 100/4 = 25%.
Xtt = (Xg/4*(X+10))/(Xg/4+(X+10))
#Now fault MVA at F is not to exceed 500 MVA.
Xreq = MVAbs*100/500 #required reactance(%)
X1 = solve(Xtt-Xreq,X)[0]
Xrt = 10*kV**2*X1/(MVAbs*10**3) #Reactance of the reactor(ohm)
#Result:
print "Reactance of the reactor is",round(Xrt,3),"ohm"
```

In [4]:

```
from __future__ import division
from sympy import *
#Variable declaration:
kVAg = 5000 #kVA rating of generator
V = 6600 #voltage rating(V)
x = 6 #reactance of generator(%)
#Calculation:
X = symbols('X') #% reactance of the reactor
kVAbs = 5000 #base kVA
#The short-circuit kVA is not to exceed 5 × 5000 kVA.
X1 = solve(kVAbs*100/(X+x)-5*kVAg)[0]
X11 = X1*10*(V/1000)**2/kVAg #reactance in ohm
#Result:
print "The required reactance is",round(X11,2),"ohm"
```

In [9]:

```
from __future__ import division
#Variable declaration:
MVAg1 = 15 #MVA rating of A & B generators
x1 = 12 #reactance of A & B(%)
MVAg3 = 8 #MVA rating of generator C
x3 = 10 #reactance of C(%)
MVAt = 5 #MVA rating of each transformer
xt = 4 #reactance of each transformer(%)
MVAr = 10 #MVA of reactor
xr = 15 #reactance of reactor(%)
#Calculation:
#Let 10 MVA be the base MVA.
MVAbs = 10
#The percentage reactance of various elements on the selected
#base MVA will be :
Xa = MVAbs/MVAg1*x1
Xb = MVAbs/MVAg1*x1
Xc = MVAbs/MVAg3*x3
Xt = MVAbs/MVAt*xt
#After the fault occurs,
#The reactances of generators A and B are in parallel & their
#equivalent reactance is 8%/2 = 4%.
#Total reactance upto fault point F:
XT = ((Xa*Xb)/(Xa+Xb)+Xt)*(Xc+xr)/(((Xa*Xb)/(Xa+Xb)+Xt)+(Xc+xr))
MVA = MVAbs*100/XT #Fault MVA
#Result:
print "Total reactance upto fault point F is",round(MVA,2),"%"
```

In [1]:

```
from __future__ import division
import math
#Variable declaration:
MVAa = 10 #MVA ratng of alterator
xa = 20 #reactance of alterator(%)
MVAt = 5 #MVA of tranformer
xt = 10 #reactance of transformer(%)
V1 = 6.6 #voltage on alterator side(kV)
V2 = 33 #voltage on transmission line side(kV)
xl = 50 #line reactance(ohm)
rl = 10 #line resistance(ohm)
#Calculation:
MVAbs = 10 #base MVA
Xa = MVAbs/MVAa*xa #% reactance of the alternator on base MVA
Xt = MVAbs/MVAt*xt #% reactance of the transformer on base MVA
Xl = MVAbs*1000*xl/(10*V2**2) #% reactance of the transmission line
Rl = MVAbs*1000*rl/(10*V2**2) #% resistance of the transmission line
#When the symmetrical fault occurs at point F on the transmission line (50 km away), then
XT = Xa+Xt+Xl #Total % reactance upto the point of fault F
Z = math.sqrt(XT**2+Rl**2) #% impedance from generator neutral upto fault point F
SCMVA = MVAbs*100/Z #Short-circuit MVA
Isc = SCMVA*10**6/(3**0.5*V1*1000) #Short-circuit current fed to the fault by the alternator
#Result:
print "Short-circuit current fed to the fault by the alternator is",round(Isc),"A"
```

In [62]:

```
from __future__ import division
#Variable declaration:
#the ratings of the machines and equipments are shown in fig above.
MVAbs = 10
#Calculation:
X1 = MVAbs/10*12 #% reactance of each generator (A, B, C and D) on the base MVA
X2 = MVAbs/10*24 #% reactance of the reactor on the base MVA
X3 = MVAbs/6*3 #% reactance of the transformer on the base MVA
#When fault occurs at point F,
XT = (30*6/(30+6))+5 #% reactance from generator neutral upto fault point F
MVAf = MVAbs*100/XT #Fault MVA
Isc = 100*10**6/(3**0.5*66000) #Short-circuit current
#Result:
print "The fault current is",round(Isc),"A"
```