How to find zero impedance branch lists
Dear
I would like to find the zero impdedance branch lists (From bus number, To bus number and ID)
Only for using "psspy.brch_2" ????
First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
Dear
I would like to find the zero impdedance branch lists (From bus number, To bus number and ID)
Only for using "psspy.brch_2" ????
I didn't find any API returning ZILs so I wrote my own:
def get_zil(sid=-1):
""" Returns ibus, jbus and id for zero impedance lines in three lists
"""
ierr, thrshz = psspy.prmdat('THRSHZ')
ierr, iarray = psspy.abrnint(sid, string=['FROMNUMBER','TONUMBER'])
ierr, carray = psspy.abrnchar(sid,entry=1, string='ID')
ierr, cmplxarray = psspy.abrncplx(sid, string=['RX'])
ibl = []
jbl = []
idl = []
for ibus,jbus,id,z in zip(iarray[0],iarray[1],carray[0],cmplxarray[0]):
if z.real==0. and abs(z.imag)<=thrshz:
ibl.append(ibus)
jbl.append(jbus)
idl.append(id)
return ibl,jbl,idl
Create lists with:
ibusl,jbusl,idl = get_zil()
Asked: 2017-11-29 01:29:24 -0500
Seen: 630 times
Last updated: Nov 29 '17