First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

How to find zero impedance branch lists

asked Nov 29 '17

Song gravatar image

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" ????

1 answer

Sort by » oldest newest most voted
0

answered Nov 29 '17

perolofl gravatar image

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()
link

Comments

Oh~thank you very much!!!

Song gravatar imageSong (Nov 30 '17)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: Nov 29 '17

Seen: 648 times

Last updated: Nov 29 '17