Ask Your Question
2

Load flow data from PSSE

asked 2014-08-07 02:26:50 -0500

fran_jo gravatar image

Hi, I asked this question some days ago:

I am new in PSSE for Python. My question is... after reading the .raw file with RDCH, then what? How to print this information? Is this information stored in memory, I guess, so how to access to the information we have just read?

And thanks to Eli Pack I got a proper answer. But I would like to go a little bit farther in this topic. I need this data to initialize a Modelica model (which is the same model from PSSE). So, I need more than just invoking save() function once I read the .raw file. For example, I would like to have .raw data inside an array and the get data from the array to set the values in the Modelica model.

Any suggestions? How can I get .raw data after reading the file?

Greetings!

edit retag flag offensive close merge delete

3 answers

Sort by Ā» oldest newest most voted
2

answered 2014-10-01 21:38:26 -0500

Eli Pack gravatar image

It sounds like you want to get a list of all the loads. To identify every load, you'll need the load IDs and bus numbers. The functions you'll need are aLoadChar and aLoadInt respectively. Use an SID of -1 to assume all buses and FLAG of 4 for all loads on those buses.

ierr, busIDs = psspy.aloadchar(sid=-1, flag=4, string="ID")
ierr, busNums = psspy.aloadint(sid=-1, flag=4, string="NUMBER")

Now that you have arrays of the bus IDs and bus numbers, you can step through them and use functions like load_data() to get more information for each load. For line data, look for the functions starting with "abrn". P.S. Remember to use the voting buttons to up-vote answers, and the tick button to mark as correct.

edit flag offensive delete link more
0

answered 2014-08-07 04:08:27 -0500

Katherine gravatar image

Depending on the format in which you need the data, you can either use the "subsystem data retrieval functions" in chapter 8 of the PSS/E API, or if you just want the actual text from the .raw file, you might just want to read the file directly:

with open("system.raw") as f:
for line in f:
    print line
edit flag offensive delete link more
0

answered 2014-10-01 04:54:06 -0500

fran_jo gravatar image

Hi,

Thanks Katherine for your answer. I deep look in the API helped me a lot. At this moment I am able to retrieve information from lines and buses. I works fine!

Following with this topic, what about retrieving information of Load components? First I want to get a list of the Loads ID. I have checked the functions dealing with Loads, that they need the Load ID as a parameter but, I "do not know" this ID.

Greetings!

edit flag offensive delete link more

Comments

Try aLoadChar. It seems to be able to retrieve 'ID' for loads.

Katherine gravatar imageKatherine ( 2014-12-15 05:03:08 -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-08-07 02:26:50 -0500

Seen: 4,142 times

Last updated: Oct 01 '14