First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Running a short circuit analysis is difficult with the PSSE API. It is one of the most difficult things to do. Here is how to do it:
ascc_2
API to run the short circuit analysis and store the results to a results (.sc
) file.sc
file with the pssarrays.ascc_currents
ASCC_2
# create a subsystem of buses you will apply the fault to.
DOWNTOWN_SID = 1
scfilename = "kolkata-fault.sc"
psspy.bsys(sid=DOWNTOWN_SID, numbus=2, buses=[2001, 2002])
ierr = psspy.ascc_2(sid=DOWNTOWN_SID,
all=0, # only process buses inside DOWNTOWN_SID
status1=1,# single line to ground fault.
scfile=scfilename)
This code will run a line to ground fault on two buses 2001
and 2002
and store the result in the scfilename
file. We don't use flat start conditions, so the pre-fault voltage is the same as the one in the solved case.
ASCC_CURRENTS
ascc_currents
in the pssarrays
module will return the short circuit results as Python data that we can use.
import pssarrays
results = pssarrays.ascc_currents(sid=DOWNTOWN_SID,
2 | Updated to use ascc_currents |
Running a short circuit analysis is difficult with the PSSE API. It is one of the most difficult things to do. Here is how to do it:
ascc_2
API to ASCC_CURRENTS
ascc_currents
in the pssarrays
module will
.sc
) file .sc
file with the pssarrays.ascc_currents
ASCC_2
rlst
. import pssarrays
# create a subsystem of buses you will apply the fault to.
DOWNTOWN_SID = 1
scfilename = "kolkata-fault.sc"
psspy.bsys(sid=DOWNTOWN_SID, numbus=2, buses=[2001, 2002])
ierr
results = psspy.ascc_2(sid=DOWNTOWN_SID,
all=0, pssarrays.ascc_currents(sid=DOWNTOWN_SID,
all=0,
fltlg=1, # only process buses inside DOWNTOWN_SID
status1=1,# single report on line to ground fault.
scfile=scfilename)
faults.
flat=0) # use prefault voltage from working case
This code will run a line to ground fault on two buses 2001
and 2002
and store the result in the scfilename
file. We don't use flat start conditions, so the pre-fault voltage is the same as the one in the solved case.
ASCC_CURRENTS
ascc_currents
Lets unpack the results variable to see what is inside:
# get the phase A current for this line to ground fault
phase_a = [i.ia for i in the pssarrays
module results.fltlg]
# and match the phase currents up against the faulted buses
fault_currents = zip(results.fltbus, phase_a)
print fault_currents
That final print statement should show something like this:
[(2001, (30.4 + 12.j) ),
(2002, (30.1 + 11j) ]
You asked about how to find the maximum. There are a number of things that contribute to a maximum fault level:
There are a few other things to watch for that will return the increase your fault currents unrealistically. If you model your SVC units as a synchronous condensor (like we do) then you need to replace it with an equivalent capacitor bank. SVC units behave like a capacitor during short circuit results as Python data circuits, not like a spinning machine.
I don't have a copy of PSSE here with me (and I wont for a few months). You should check that we the code to get phase_a
works. Let me know if it doesn't so I can use.
import pssarrays
results = pssarrays.ascc_currents(sid=DOWNTOWN_SID,
update the answer with working code! 3 | No.3 Revision |
Running a short circuit analysis is and getting the results back can be difficult with the PSSE API. It The documentation doesn't have any examples, and the API is one of the most difficult things to do. a bit confusing. Here is how to do it:
ASCC_CURRENTS
ascc_currents
in the pssarrays
module will run the short circuit analysis and return the results in a custom made Python type that PSSE refers to as rlst
.
# this script assumes you have already initalised PSSE and loaded a saved case.
import pssarrays
# create a subsystem of buses you will apply the fault to.
DOWNTOWN_SID = 1
psspy.bsys(sid=DOWNTOWN_SID, numbus=2, buses=[2001, 2002])
results = pssarrays.ascc_currents(sid=DOWNTOWN_SID,
all=0,
fltlg=1, # report on line to ground faults.
flat=0) # use prefault voltage from working case
This code will run a line to ground fault on two buses 2001
and 2002
and store the result in the scfilename
file. We don't use flat start conditions, so the pre-fault voltage is the same as the one in the solved case.
Lets unpack the results variable to see what is inside:
# get the phase A current for this line to ground fault
phase_a = [i.ia for i in results.fltlg]
# and match the phase currents up against the faulted buses
fault_currents = zip(results.fltbus, phase_a)
print fault_currents
That final print statement should show something like this:
[(2001, (30.4 + 12.j) ),
(2002, (30.1 + 11j) ]
You asked about how to find the maximum. There are a number of things that contribute to a maximum fault level:
There are a few other things to watch for that will increase your fault currents unrealistically. If you model your SVC units as a synchronous condensor (like we do) then you need to replace it with an equivalent capacitor bank. SVC units behave like a capacitor during short circuits, not like a spinning machine.
I don't have a copy of PSSE here with me (and I wont for a few months). You should check that the code to get phase_a
works. Let me know if it doesn't so I can update the answer with working code!