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

Ask Your Question
1

Retrieve MW and MVAR from Load

asked Aug 14 '0

georgc gravatar image

Sorry to ask a simple question that I hope has not been asked already. I have tried searching for it but am unable. I would like to gather the load values, MW and MVAR for a particular load.

Checking the api is seems like LODDT1 would do it, but I can only seem to get the MVA values. I can use LODDT2 to get them in a complex way, but wanted to avoid then digging into that with more code to get what I want. Unless that is the only option.

Does anyone have a simple like of code to retrieve load values from a particular load? psspy.loddt1(65818, '1' ,'MVA', 'ACT') - is where I am starting.

I have a script that reads in load values and sets them via csv, but I wanted to first scrap all the existing loads from the same bus and write them to a file for comparison later on (like to see % change from before to after).

1 answer

Sort by » oldest newest most voted
1

answered Aug 14 '0

georgc gravatar image

So I decided to just make extra code to make it work, so here is how I did it, but I hope there is a single line/more elegant manner to complete it.

exist_load = psspy.busdt2(int(bus[0]),'MVA','ACT')
#gets returned as a list [0,MW+MVARj]
Y = exist_load[1]
Z = (Y.real, Y.imag)
MW = Y.real
MVAR = Y.imag
link

Comments

Thanks, I had the same issue and this was really helpful

QuinnP gravatar imageQuinnP (Aug 7 '3)

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

1 follower

Stats

Asked: Aug 14 '0

Seen: 1,550 times

Last updated: Aug 14 '20