Ask Your Question
1

How to get total charging for an area?

asked 2015-04-09 11:50:51 -0600

KyleA gravatar image

updated 2015-04-10 08:32:24 -0600

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.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-04-17 07:23:09 -0600

sheng gravatar image

updated 2015-04-20 00:51:56 -0600

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)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2015-04-09 11:50:51 -0600

Seen: 1,491 times

Last updated: Apr 20 '15