0

Vector groups and two_winding_chng_4

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!

acd1's avatar
63
acd1
asked 2015-08-03 14:07:29 -0500, updated 2015-08-04 12:52:12 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

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.

acd1's avatar
63
acd1
answered 2015-08-04 08:40:06 -0500, updated 2015-08-04 17:02:08 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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.

jconto's avatar
2.9k
jconto
answered 2015-08-03 21:58:44 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer