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

Ask Your Question
2

Load flow data from PSSE

asked Aug 7 '14

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!

3 answers

Sort by » oldest newest most voted
2

answered Oct 2 '14

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.

link
0

answered Aug 7 '14

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
link
0

answered Oct 1 '14

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!

link

Comments

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

Katherine gravatar imageKatherine (Dec 15 '14)

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: Aug 7 '14

Seen: 4,469 times

Last updated: Oct 01 '14