Ask Your Question
0

whats wrong with this fvsi program?

asked 2014-07-21 20:42:48 -0500

anonymous user

Anonymous

updated 2020-04-01 19:57:09 -0500

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())
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-08-04 21:46:04 -0500

jconto gravatar image

updated 2020-04-01 19:52:55 -0500

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
edit flag offensive delete link more
0

answered 2014-09-29 06:54:47 -0500

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)

edit flag offensive delete link more

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 ( 2014-09-29 21:00:39 -0500 )edit

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 ( 2014-10-01 03:11:53 -0500 )edit

replace with "psspy.pssehalt_2()"

jconto gravatar imagejconto ( 2020-04-01 19:55:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2014-07-21 20:42:48 -0500

Seen: 954 times

Last updated: Apr 01 '20