First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Hello,
I have successfully built a script in Python that executes a bump test on a steady-state model and am now building code to run dynamic simulations. Specifically, I would like to adjust the Vref parameter in a REGCA1 model that is attached to one of my IBR generators. Here is what I have written so far:
''' psspy.case(CASE) psspy.fdns([0,0,0,1,1,0,99,0]) # apply fixed-slop Newton-Raphson powerflow
psspy.cong()
psspy.ordr() psspy.fact() psspy.tysl()
caseroot = os.path.splitext(CASE) [0] psspy.save(caseroot + "_C.sav")
psspy.dyre_new([1, 1, 1, 1],DYR, '', '', '')
psspy.branchmvachannel([-1,-1,-1,200,100],'1') psspy.branchpandqchannel([-1,-1,-1,200,100],'1')
psspy.strt(0, OUTFILE) psspy.run(tpause=10)
psspy.changeplmodvar(1000,1,REGCA1,1,115) psspy.run(tpause=20) ''' However, when I run this I receive the following error:
"NameError: name 'REGCA1' is not defined"
If I open PSS/E I can see that the model is, in fact, there. Perhaps I am doing something wrong on the initialization? Any help would be appreciated.
I should also note that I do have the code for the DMView; however, I do not have the code that changes the V and F (only other examples such as SCMVA and SCR2, etc.).
Thank you much!
2 | No.2 Revision |
Hello,
I have successfully built a script in Python that executes a bump test on a steady-state model and am now building code to run dynamic simulations. Specifically, I would like to adjust the Vref parameter in a REGCA1 model that is attached to one of my IBR generators. Here is what I have written so far:
''' psspy.case(CASE)
psspy.fdns([0,0,0,1,1,0,99,0])psspy.case(CASE)
psspy.cong()
psspy.ordr() psspy.fact()
psspy.ordr()
psspy.fact()
psspy.tysl()caseroot
case_root
= os.path.splitext(CASE)psspy.dyre_new([1, 1, 1, 1],DYR, '', '', '')
psspy.branchmvachannel([-1,-1,-1,200,100],'1')
channel([-1,-1,-1,200,100],'1')
psspy.branchpandqchannel([-1,-1,-1,200,100],'1')
psspy.strt(0, OUTFILE)
OUTFILE)
psspy.run(tpause=10)
psspy.changeplmodvar(1000,1,REGCA1,1,115)
psspy.run(tpause=20)
'''
var(1000,1,REGCA1,1,115)
psspy.run(tpause=20)
However, when I run this I receive the following error:
"NameError: name 'REGCA1' is not defined"
If I open PSS/E I can see that the model is, in fact, there. Perhaps I am doing something wrong on the initialization? Any help would be appreciated.
I should also note that I do have the code for the DMView; however, I do not have the code that changes the V and F (only other examples such as SCMVA and SCR2, etc.).
Thank you much!