Like LineCode for Line objects, you can define transformer objects and use them simply by referring to them in the Transformer object definition using the XfmrCode property. The XfmrCode properties generally have the same name and definition as the Transformer object. Refer to the Transformer object definition.

An example use of an XfmrCode to define a bank of 1-phase transformers to make up a 3-winding Y-D-Y connection:

// The Transformer

// Model as 3 1-phase transformers so we can see the delta currents

New XfmrCode.YDY1Phase phases=1 windings=3

~ conns=[wye wye delta ]

~ kVs=[39.83, 7.62, 2.4]

~ kVAs=[5000 3333 1666] ! 15 MVA 3-phase

~ XHL=7.5 XHT=36 XLT=28

~ %Rs = [0.11 0.11 0.275]


To define the Transformers, only need to specify buses and any other

properties that are different.


// Connect up the three 1-ph transformer in YYD

New Transformer.YDYA XfmrCode=YDY1Phase ppm=0 !<--------neglect ppm

~ Buses=[B2.1.0 B3.1.0 B5.1.2]

New Transformer.YDYB XfmrCode=YDY1Phase ppm=0

~ Buses=[B2.2.0 B3.2.0 B5.2.3]

New Transformer.YDYC XfmrCode=YDY1Phase ppm=0

~ Buses=[B2.3.0 B3.3.0 B5.3.1]