Ask Your Question
0

How to get branch power flow and their bus numbers.

asked 2018-02-12 18:18:28 -0500

anonymous user

Anonymous

updated 2018-02-12 18:20:02 -0500

Hello,

I am using the API command psspy.aflowreal to get active power flow of branches in a subsystem. Problem is, using this command does not indicate which value belongs to which 'to and from' bus number.

For example, aflowreal returns:

[10, -9, 20, -21, 30, -29]

Where I'm trying to get:

[ [10, (bus1, bus2)], [-9, (bus2, bus1)], [20, (bus2, bus3)], .... ]

Does anybody have an idea of how I can implement this in my script??

Thanks!!

edit retag flag offensive close merge delete

4 answers

Sort by » oldest newest most voted
0

answered 2018-02-23 00:30:08 -0500

Ali gravatar image

You need to use aflowint and aflowreal as others mentioned. These two commands return line values in the same order so you should be able to match them. Once you have the output of these two API commands, you can convert them to the format you are asking. I would do something like this:

istrings = ['fromnumber', 'tonumber']
ierr, idata = psspy.aflowint(sid=-1, 1, 5, 1,istrings)

idata will contain the tuple you are looking for. Another call to aflowreal and a zip command will do the rest for you.

edit flag offensive delete link more

Comments

Thank you!!

camerond12 gravatar imagecamerond12 ( 2018-03-26 00:03:52 -0500 )edit
0

answered 2020-04-12 16:46:27 -0500

jialink gravatar image

updated 2020-04-12 16:48:11 -0500

You try the simple way:

  1. ierr, cmpval = brnflo(bus1,bus2,id)
  2. k1 = cmpval.real
  3. k2 = cmpval.imag...
edit flag offensive delete link more
0

answered 2018-02-13 09:56:53 -0500

jconto gravatar image

The script "pout_report.py" in the "example" folder of the PSSe installation directory, contains code showing the use of aflowint and aflowreal API calls.

I would add the ckt id to the branch identifier as [10, (bus1, bus2, ckt)]

edit flag offensive delete link more
0

answered 2018-02-13 02:01:56 -0500

perolofl gravatar image

API aflowreal only returns real values. Use aflowint to return from and to bus number.

edit flag offensive delete link more

Comments

Definitely agree with you. However, using aflowint to return from/to bus number's seems to give the bus numbers in a random order, i.e. using aflowreal will give you (1, 2, 3, 4) however the bus numbers returned from aflowint will be (d, c, a, b). Is there a way to appropriately link the two?

camerond12 gravatar imagecamerond12 ( 2018-02-13 04:36:27 -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

3 followers

Stats

Asked: 2018-02-12 18:18:28 -0500

Seen: 2,516 times

Last updated: Apr 12 '20