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

Ask Your Question
0

whats wrong with this fvsi program?

asked Jul 22 '14

anonymous user

Anonymous

updated Apr 2 '0

jconto gravatar image
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())

2 answers

Sort by » oldest newest most voted
1

answered Aug 5 '14

jconto gravatar image

updated Apr 2 '0

A fvsi python script is posted at my google drive. It is set to run on the savnw.sav but a new case name can be updated at line 56 [to download it, visit my google site, enter the folder "python code" and download "fvsi1.py"]

Tested in v.32 & v.33. Output something like:

FRMBUS,     FROMBUSEXNAME, TOBUS,       TOBUSEXNAME,CKT,   R(pu),   X(pu),   Z(pu),  Vs(pu),      Pj,      Qj,    FVSI

   151,NUCPANT     500.00,   152,MID500      500.00, 1 ,0.002600,0.046000,0.046073,  1.0119,  465.95, -167.99,  0.3028

   151,NUCPANT     500.00,   152,MID500      500.00, 2 ,0.002600,0.046000,0.046073,  1.0119,  465.95, -167.99,  0.3028

   151,NUCPANT     500.00,   201,HYDRO       500.00, 1 ,0.001000,0.015000,0.015033,  1.0119,  564.82, -264.79, 0.1558
link
0

answered Sep 29 '14

JAZBA gravatar image

hey hi brother I couldn't open this link too see your gif (py file= C:\fakepath\t11.gif (once downloaded, rename its extension from .gif to .py)

link

Comments

I have updated the instructions for downloading: ... click on the link, and then right-click on the icon that appear on the upper left corner, and select "save image as" to save to your pc. Once downloaded, rename its extension from .gif to .py

jconto gravatar imagejconto (Sep 30 '14)

tnx brother I could solve the previous problem but what about psspy.halt( ) . the message I got Traceback (most recent call last): File "C:\Documents and Settings\Administrator\Desktop\FVSI.py", line 76, in <module> psspy.halt() AttributeError: 'module' object has no attribute 'halt'

JAZBA gravatar imageJAZBA (Oct 1 '14)

replace with "psspy.pssehalt_2()"

jconto gravatar imagejconto (Apr 2 '0)

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

Stats

Asked: Jul 22 '14

Seen: 1,052 times

Last updated: Apr 01 '20