First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version | asked 2014-07-21 20:42:48 -0500 Anonymous |
report("steadystate30-6-14: %s\n\n"%savfile) clnttls = "%6s,%18s,%6s,%18s,%3s,%8s,%8s,%8s,%8s,%8s,%8s,%8s,%8s,%8s,%8s\n"%('FRMBUS','FROMBUSEXNAME','TOBUS','TOBUSEXNAME','CKT','R(pu)','X(pu)','Z(pu)','ZZ','Vs(pu)','VsVs','Pj','Qj','Qj(pu)','FVSI')
report(clnttls)
for i in range(len(ibuses['number'])): bus = ibuses['number'][i]
flowfrombusidxes = busindexes(bus,ibranch['fromnumber'])
for idx in flowfrombusidxes:
b = ibranch['fromnumber'][idx]
fbn = cbranch['fromexname'][idx]
tb = ibranch['tonumber'][idx]
tbn = cbranch['toexname'][idx]
ckt = cbranch['id'][idx]
r = abs(xbranch['rx'][idx].real)
x = xbranch['rx'][idx].imag
frombusidx = busindexes(ibranch['fromnumber'][idx],ibusesall['number'])
vs = rbusesall['pu'][frombusidx[0]]
ps = rbranch['p'][idx]
qs = rbranch['q'][idx]
from math import sqrt
z = sqrt(r*r+x*x)
z2 = pow(z,2)
vs2 = pow(vs,2)
qsj = abs(qs/100)
fvsi = (4*z2*qsj)/(vs2*x)
report("%(b)6d,%(fbn)18s,%(tb)6d,%(tbn)18s,%(ckt)3s,%(r)8.6f,%(x)8.6f,%(z2)8.6f,%(vs)8.4f,%(ps)8.2f,%(qs)8.2f,%(qsj)8.2f,%(fvsi)8.4f\n"%vars())
2 | code format |
report("steadystate30-6-14: %s\n\n"%savfile)
clnttls = report(clnttls)
3 | No.3 Revision |
report("steadystate30-6-14: %s\n\n"%savfile)
clnttls = "%6s,%18s,%6s,%18s,%3s,%8s,%8s,%8s,%8s,%8s,%8s,%8s,%8s,%8s,%8s\n"%('FRMBUS','FROMBUSEXNAME','TOBUS','TOBUSEXNAME','CKT','R(pu)','X(pu)','Z(pu)','Z*Z','Vs(pu)','Vs*Vs','Pj','Qj','Qj(pu)','FVSI')
report(clnttls)
for i in range(len(ibuses['number'])):
bus = ibuses['number'][i]
flowfrombusidxes = busindexes(bus,ibranch['fromnumber'])
for idx in flowfrombusidxes:
b = ibranch['fromnumber'][idx]
fbn = cbranch['fromexname'][idx]
tb = ibranch['tonumber'][idx]
tbn = cbranch['toexname'][idx]
ckt = cbranch['id'][idx]
r = abs(xbranch['rx'][idx].real)
x = xbranch['rx'][idx].imag
frombusidx = busindexes(ibranch['fromnumber'][idx],ibusesall['number'])
vs = rbusesall['pu'][frombusidx[0]]
ps = rbranch['p'][idx]
qs = rbranch['q'][idx]
from math import sqrt
z = sqrt(r*r+x*x)
z2 = pow(z,2)
vs2 = pow(vs,2)
qsj = abs(qs/100)
fvsi = (4*z2*qsj)/(vs2*x)
report("%(b)6d,%(fbn)18s,%(tb)6d,%(tbn)18s,%(ckt)3s,%(r)8.6f,%(x)8.6f,%(z2)8.6f,%(vs)8.4f,%(ps)8.2f,%(qs)8.2f,%(qsj)8.2f,%(fvsi)8.4f\n"%vars())