Ask Your Question
1

Retrieve MW and MVAR from Load

asked 2020-08-14 14:45:15 -0600

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).

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-08-14 16:35:40 -0600

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

Comments

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

QuinnP gravatar imageQuinnP ( 2023-08-06 21:33:36 -0600 )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

1 follower

Stats

Asked: 2020-08-14 14:45:15 -0600

Seen: 1,524 times

Last updated: Aug 14 '20