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

Ask Your Question
0

How to add dynamic data to an existing dynamic data in PSSE through Python?

asked Jun 6 '19

ADP gravatar image

Hi! I am currently conducting a dynamic simulation in PSSE through Python. My concern is changing the dynamic data of one generator's governor from 5% droop to 0% droop (isochronous mode). In my Python file, I used the DYRE_ADD from API (Use this API to read a Dynamics Model Raw Data File and append the model references specified in its data records to the simulation data already contained in dynamics working memory).

ierr = dyre_add(startindx, dyrefile, conecfile, conetfile)

I'm having trouble with identifying the values for "startindx" (CON, STATE, VAR, ICON) to connect the .dyr that I will add to the existing .dyr

I tried using (1,1,1,1), but it just replaced the existing .dyr. psspy.dyreadd([1,1,1,1],dyrfileiso,"","")

I run the existing .dyr in PSSE and got (571,189,80,10), then I applied on the to be added .dyr. But the result showed that PSSE was not able to read the .dyr I added. psspy.dyreadd([571,189,80,10],dyrfileiso,"","")

I hope someone can help me :)

1 answer

Sort by » oldest newest most voted
0

answered Jun 6 '19

perolofl gravatar image

There is no need to enter the starting indices. Enter an empty list to use PSSE's default values:

psspy.dyre_add([],dyrfileiso)
link

Comments

Hello perolofl, I followed your advice but I still cannot successfully add the new dyr. May be my process of adding the dyr is wrong.

ADP gravatar imageADP (Jun 10 '19)

Here is the process I used in my Python Code: 1. load .sav 2. set-up load flow parameter 3. perform load flow 4. load .dyr 5. set up dynamic solution parameters 6. set up output channel 7. convert generators and loads 8. initialize dyn simulation 9. apply disturbance

ADP gravatar imageADP (Jun 10 '19)

10. run dyn simul 11. add new .dyr 12. run dyn simul

ADP gravatar imageADP (Jun 10 '19)

Point 11 is wrong. You shall not replace a dynamic model during a dynamic simulation. It is only allowed to change a parameter for a model. Just change the droop value, but don’t replace the model.

perolofl gravatar imageperolofl (Jun 10 '19)

Thank you for your help Sir. I am already able to change the dynamic data values through python using psspy.change_plmod_con

ADP gravatar imageADP (Jun 14 '19)

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

3 followers

Stats

Asked: Jun 6 '19

Seen: 1,673 times

Last updated: Jun 06 '19