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

Ask Your Question
0

Get Mbase (MVA) of Machine from PSSE for Python code

asked Jul 18 '19

annht gravatar image

updated Jul 20 '19

Hi all,

Please help me to get Mbase (MVA) of Machine from PSSE for Python.

I would like to use this to calculate with inertia (H) value.

Although I can get H as syntax below, I dont know how to get Mbase (MVA).

ierr = psspy.rwdy(option1=2,option2=0,out=0,ofile="C:\Program Files (x86)\PTI\PSSE34\EXAMPLE\python_test1.out")

21421 'GENROU' 1     11.000      0.47000E-01  0.67000      0.50000E-01
          6.2300       0.0000       2.1000       1.5500      0.21000
         0.40000      0.16000      0.13000      0.36100      0.69300

Thanks!

1 answer

Sort by » oldest newest most voted
0

answered Jul 19 '19

jconto gravatar image

updated Jul 24 '19

[For a working code to calculate inertia of entire power system, check my post "Inertia of a Power System"]

Use the following API function [chapter 7]:

ibus = 2141
id = '1'
ierr, mbase = psspy.macdat(ibus, id, 'MBASE')
link

Comments

Thank you for your support. I used your code, I can get data. If I need to get power from all these machines, please give me some advice. I tried to use for loop, in my opinion, this is not the best way.

annht gravatar imageannht (Jul 19 '19)

A"for loop" should work OK. The API manual is part of the documents, installed at "C:\Program Files (x86)\PTI\PSSE33". Search Chap. 7 or other for the python functions you need for your project.

jconto gravatar imagejconto (Jul 20 '19)

Thank you for your suggestion.

annht gravatar imageannht (Jul 21 '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

1 follower

Stats

Asked: Jul 18 '19

Seen: 597 times

Last updated: Jul 24 '19