First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
For dynamics simulation in Python my basic workflow is something like this:
Initializing
psspy.case(case file converted.cnv)
psspy.rstr(dynamics file.snp)
psspy.strt(outfile=file to save.out)
psspy.run(tpause=time_before fault)
Applying fault
psspy.dist_bus_fault(faulted bus number)
psspy.run(tpause=time when the fault ends)
Clearing fault, tripping equipment and finishing simulation
psspy.dist_branch_trip(ibus=frombus, jbus=tobus, id=busid)
psspy.dist_machine_trip(ibus=<machine bus, id=machine id)
psspy.dist_clear_fault(1)
psspy.run(tpause=end time)
Extra: If you're using custom models, you'll also need to load the custom models:
psspy.dropmodellibrary(user_model.dll)
psspy.addmodellibrary(user_model.dll)
Chapter 4 in the API manual has tons of commands if you need something more specific.