1

How to get total charging for an area?

Using the AREA command, totals for an area are tabulated and sent to the report output. One of values is total line charging for an area. My question is, how can I retrieve that value, or how do I calculate it?

So far I've attempted to add up all the line charging quantities for all branches in the area:

 psspy.asys(1, 1, [10]) 

 ierr, xArry = psspy.abrnreal(1,1,1,1,1,['CHARGING'])

 lineCharging = sum(xArry[0])

This provides a ballpark value but not the same value as is produced by the AREA command.

KyleA's avatar
87
KyleA
asked 2015-04-09 11:50:51 -0500, updated 2015-04-10 08:32:24 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

Line charging quantities are defined as per unit capacitance whereas the total charging from AREA total is reactive power (VAr) resulting from line charge. I don't think there is any API that would return VAr due to line charge as a variable. You could either parse the output of SUBS API or calculate and sum up VAr charge per branch.

# get details of all branches in defined subsystem ID
ierr, buses = psspy.abrnint(sid=subsysid,ties=3,string=['FROMNUMBER','TONUMBER'])
fbuses = buses[0]
tbuses = buses[1]
ierr, (cktids,) = psspy.abrnchar(sid=subsysid,ties=3,string='ID')
ierr, (charging,) = psspy.abrnreal(sid=subsysid,ties=3,string='CHARGING')
mvabase = psspy.sysmva()

# iterate every branch in defined subsystem and calculate charging vars
total_charge=0
for fbus,tbus,ckt,charge in zip(fbuses,tbuses,cktids,charging):
    ierr, fbus_puvolt = psspy.busdat(ibus=fbus,string='PU')
    ierr, tbus_puvolt = psspy.busdat(ibus=tbus,string='PU')
    total_charge += charge*mvabase/2 * (fbus_puvolt**2 + tbus_puvolt**2)
sheng's avatar
141
sheng
answered 2015-04-17 07:23:09 -0500, updated 2015-04-20 00:51:56 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer