# Chapter 57 Power Flow Calculations¶

## Example 57_1 pgno:1187¶

In [26]:
from math import atan
v=100;
z=complex(3,4)
i=v/z;
y=1/z;
ia=atan(i.imag/i.real);
print"the branch current I=/_A\nthe Branch Admittance=+()j mho",abs(i),ia,y.real,y.imag

the branch current I=/_A
the Branch Admittance=+()j mho 20.0 -0.927295218002 0.12 -0.16


## Example 57_2 pgno:1198¶

In [27]:
z=complex(3,4)
y=1/z;
print"the impedence=mho",abs(y)

the impedence=mho 0.2


## Example 57_4 pgno:1194¶

In [28]:
v1=1;
z=complex(.05,.02);
s=complex(1,-.6);
c=.000005;
#v[2,1]=1;
print"used value in iteration\titeration number\tresulting value of V2"
import numpy
v1=numpy.array([complex(1,0), complex(0.962,-0.05), complex(0.9527,-0.497), complex(0.9577,-0.05), complex(0.9577,-0.049999)])
v2=numpy.array([complex(0.962000,(-0.050000)), complex(0.957911,(-0.049787)), complex(0.957732,(-0.050000)), complex(0.957713,(-0.049999)), complex(0.957712,(-0.050000))])
for i in range(0,4):
print v1[i]
print "\t\t\t\t\t\t",v2[i]

used value in iteration	iteration number	resulting value of V2
(1+0j)
(0.962-0.05j)
(0.962-0.05j)
(0.957911-0.049787j)
(0.9527-0.497j)
(0.957732-0.05j)
(0.9577-0.05j)
(0.957713-0.049999j)


## Example 57_5 pgno:1197¶

In [29]:
x=.05;
vs=1;
vr=1;
p=10;
from math import asin
d=asin(p*x);
print"the power angle=/_ degrees",d

the power angle=/_ degrees 0.523598775598


## Example 57_6 pgno:1198¶

In [30]:
x=.05;
vs=1.;
vr=1.;
p=10.;
from math import asin,cos
d=asin(p*x);
qs=(vs**2/x)-(vs*vr*cos(d)/x);
qs=round(qs*100)/100;
qR=(vs**2/x)-(vs*vr*cos(d)/x);
qR=round(qR*100)/100;
q=(qs+qR);
print p,q

10.0 5.36


## Example 57_7 pgno:1198¶

In [31]:
x=.05;
d=30;
vs=1;
vr=1;
from math import sin
p=vs*vr*sin(d)/x;
print"active power flow=pu",p

active power flow=pu -19.7606324819


## Example 57_8 pgno:1198¶

In [32]:
z=complex(0,.06)
i=complex(1,.6)
from math import atan
vr=1;
vs=vr+(i*z);
q=.5*((abs(vs))**2-(abs(vr))**2)/abs(z);
q=q-.1;
a=atan((vs.imag)/(vs.real))
print"sending end voltage=/_V\nthe average reactive power flow=pu",abs(vs),a,round(q,2)

sending end voltage=/_V
the average reactive power flow=pu 0.965865415055 0.0621604788211 -0.66


## Example 57_9 pgno:1199¶

In [33]:
v=1;
from math import cos,sin,pi
i=1.188*complex(cos(-28.6*pi/180),sin(-28.6*pi/180));
s=v*complex(cos(-28.6*pi/180),-sin(-28.6*pi/180));
p=(s.real)+0.2;
q=((s.imag))+0.091;
print"the complex power=+jpu\n the real power P=pu\nthe reactive powers=pu",round(p,3),round(q,4)

the complex power=+jpu
the real power P=pu
the reactive powers=pu 1.078 0.5697


## Example 57_12 pgno:1208¶

In [34]:
v21=1;
v22=complex(.983664,-.032316);
a=1.6;
v23=v21+a*(v22-v21);
print"the voltage =+()jV",(v23.real),(v23.imag)

the voltage =+()jV 0.9738624 -0.0517056


## Example 57_14 pgno:1215¶

In [35]:
ud1=510.;
ud2=490.;
ud=(ud1+ud2)/2;
id=1;
p=ud*id;
b=2*p;
r=(ud1-ud2)/id;
pl=r;
pbl=2*pl;
pdr=ud1;
pdi=ud2;
pz=pdr-pdi;
print"power flow per pole=MW\nbipolar line flow=MW\nthe line loss per pole in bipolat line=MW\nbipolar line loss=MW\nreactive power flow through DC link=MW",p,b,pl,pbl,0

power flow per pole=MW
bipolar line flow=MW
the line loss per pole in bipolat line=MW
bipolar line loss=MW
reactive power flow through DC link=MW 500.0 1000.0 20.0 40.0 0


## Example 57_15 pgno:1216¶

In [36]:
pdi=1000.;
pdl=60.;
ud=1.;
pdr=pdi+pdl;
p=(pdr+pdi)/2;
id=pdi/ud;
pdc=pdr*1e3/id;
rec=pdc/2;
vdc=(rec+(pdi/2))/2;
udr=rec;
udi=pdi/2;
r=(udr-udi)*1e3/id;
print"the sending end power=MW\npower in middle=MW\nDC sending end voltage=kV\nrecieving end DC voltage=kV\nDC voltage in middle of line=kV\nLine Resistance =ohm",pdr,p,pdc,rec,vdc,r

the sending end power=MW
power in middle=MW
DC sending end voltage=kV
recieving end DC voltage=kV
DC voltage in middle of line=kV
Line Resistance =ohm 1060.0 1030.0 1060.0 530.0 515.0 30.0


## Example 57_16 pgno:1219¶

In [37]:
pg=6000.;
pdc=1000.;
pac=pg-(2*pdc);
pac1=1000.;
pac2=1000.;
pac3=1000.;
pac4=pac-pac1-pac2-pac3;
print"power flow through 4th AC line=MW",pac4

power flow through 4th AC line=MW 1000.0


## Example 57_17 pgno:1219¶

In [38]:
pg=6000.;
pdc=4000.;
pac=pg-pdc;
pow=pac/4;
print"power flow through AC line=MW",pow

power flow through AC line=MW 500.0