1 # Copyright (C) 2010-2011 Richard Lincoln
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to
5 # deal in the Software without restriction, including without limitation the
6 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 # sell copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 from CIM14
.CDPSM
.Balanced
.IEC61970
.Core
.IdentifiedObject
import IdentifiedObject
23 class WindingPiImpedance(IdentifiedObject
):
24 """Transformer Pi-model impedance that accurately reflects impedance for transformers with 2 or 3 windings. For transformers with 4 or more windings, you must use TransformerInfo.
27 def __init__(self
, x
=0.0, g
=0.0, r0
=0.0, r
=0.0, b
=0.0, g0
=0.0, x0
=0.0, b0
=0.0, Windings
=None, *args
, **kw_args
):
28 """Initialises a new 'WindingPiImpedance' instance.
30 @param x: Positive sequence series reactance of the winding. For a two winding transformer, the full reactance of the transformer should be entered on the primary (high voltage) winding.
31 @param g: Magnetizing branch conductance (G mag).
32 @param r0: Zero sequence series resistance of the winding.
33 @param r: DC resistance of the winding.
34 @param b: Magnetizing branch susceptance (B mag). The value can be positive or negative.
35 @param g0: Zero sequence magnetizing branch conductance.
36 @param x0: Zero sequence series reactance of the winding.
37 @param b0: Zero sequence magnetizing branch susceptance.
38 @param Windings: All windings having this Pi impedance.
40 #: Positive sequence series reactance of the winding. For a two winding transformer, the full reactance of the transformer should be entered on the primary (high voltage) winding.
43 #: Magnetizing branch conductance (G mag).
46 #: Zero sequence series resistance of the winding.
49 #: DC resistance of the winding.
52 #: Magnetizing branch susceptance (B mag). The value can be positive or negative.
55 #: Zero sequence magnetizing branch conductance.
58 #: Zero sequence series reactance of the winding.
61 #: Zero sequence magnetizing branch susceptance.
65 self
.Windings
= [] if Windings
is None else Windings
67 super(WindingPiImpedance
, self
).__init
__(*args
, **kw_args
)
69 _attrs
= ["x", "g", "r0", "r", "b", "g0", "x0", "b0"]
70 _attr_types
= {"x": float, "g": float, "r0": float, "r": float, "b": float, "g0": float, "x0": float, "b0": float}
71 _defaults
= {"x": 0.0, "g": 0.0, "r0": 0.0, "r": 0.0, "b": 0.0, "g0": 0.0, "x0": 0.0, "b0": 0.0}
74 _many_refs
= ["Windings"]
76 def getWindings(self
):
77 """All windings having this Pi impedance.
81 def setWindings(self
, value
):
82 for x
in self
._Windings
:
86 self
._Windings
= value
88 Windings
= property(getWindings
, setWindings
)
90 def addWindings(self
, *Windings
):
92 obj
.PiImpedance
= self
94 def removeWindings(self
, *Windings
):
96 obj
.PiImpedance
= None