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 don't 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!
You can use psspy.macdat()
as follows to store the value in a new variable mbase
:
ierr, mbase = psspy.macdat(
ibus=bus_number, # bus number where machine is connected as an `int` object
id=id_, # machine ID as a `str` object
string='MBASE',
)
You will of course need to have already defined bus_number
and id_
.
You may see the other options by reading the docstring:
import psse34
import psspy
help(psspy.macdat)