Ask Your Question
0

Vector groups and two_winding_chng_4

asked 2015-08-03 14:07:29 -0500

ademuth93 gravatar image

updated 2015-08-04 12:52:12 -0500

I've got a bit of a head scratcher going on. Basically I want to turn a change some transformer's statuses to 0, which I've attempted to do with the following code:

psspy.two_winding_chng_4(i = bus1, j = bus2, ckt = circuitID, intgar1 = 0)

This code is looped many times for many transformers, and when run, the code gives this error (or similar):

Messages for api TWO_WINDING_CHNG_4
Messages for two-winding transformer circuit "1" from <removed> to <removed>:   (002015)
Error: Vector group "Dyn1" not found; set to "Dyn1"   (002073)

Could anyone tell me why I'm getting this error, or maybe a different way of changing the status of a transformer?

Thanks!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-08-03 21:58:44 -0500

jconto gravatar image

Use the recording function. Open PSSe, load your case with the target transformer online. Now click on the recording button to save the 'turn off a transformer' activity to a python script. On the two-winding transformer tab, select the target transformer, and set its status to off (=0). Click on the stop button to finish recording. Now you can run the saved script again on the original case to verify it works properly.

edit flag offensive delete link more
0

answered 2015-08-04 08:40:06 -0500

ademuth93 gravatar image

updated 2015-08-04 17:02:08 -0500

I have found a nice solution to the problem. I can use the "aTrnChar" function of the API to return a list of vector groups for a subsystem. I just initialized a two-bus subsystem and found the vector group (and name) of the transformer contained inside it:

psspy.bsysinit(9)
psspy.bsyso(9,bus1)
psspy.bsyso(9,bus2)

ierr, xfmrData = psspy.atrnchar(9,1,3,2,1,['XFRNAME','VECTORGROUP'])
xfmrName = xfmrData[0][0]
vectorGroup = xfmrData[1][0]

psspy.two_winding_chng_4(i=bus1,j=bus2,
                         ckt=circuitID,intgar1 = 0,
                         charar1 = xfmrName, charar2 = vectorGroup)

I think it's a bit silly that I have to create a subsystem just to find the vector group of a transformer, but that's Siemens for you!

@jconto

I appreciate your answer. However, I now see that I didn't make it clear that this code is a part of a loop that runs many times, and doesn't just affect a single transformer. The error above is a sample of a bunch of similar errors.

Therefore the code generated from the recording function doesn't help much.

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-08-03 14:07:29 -0500

Seen: 1,012 times

Last updated: Aug 04 '15