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
.IEC61970
.Core
.IdentifiedObject
import IdentifiedObject
23 class WindingTest(IdentifiedObject
):
24 """Physical winding test data for the winding/tap pairs of a transformer (or phase shifter). This test data can be used to derive other attributes of specific transformer or phase shifter models.
27 def __init__(self
, fromTapStep
=0, leakageImpedance
=0.0, noLoadLoss
=0.0, phaseShift
=0.0, excitingCurrent
=0.0, loadLoss
=0.0, toTapStep
=0, voltage
=0.0, From_TransformerWinding
=None, To_TransformerWinding
=None, *args
, **kw_args
):
28 """Initialises a new 'WindingTest' instance.
30 @param fromTapStep: The tap step number for the 'from' winding of the test pair.
31 @param leakageImpedance: The leakage impedance measured at the 'from' winding with the 'to' winding short-circuited and all other windings open-circuited. Leakage impedance is expressed in units based on the apparent power and voltage ratings of the 'from' winding.
32 @param noLoadLoss: The no load loss kW 'to' winding open-circuited) from the test report.
33 @param phaseShift: The phase shift measured at the open-circuited 'to' winding, with the 'from' winding set to the 'from' winding's rated voltage and all other windings open-circuited.
34 @param excitingCurrent: The exciting current on open-circuit test, expressed as a percentage of rated current, at nominal voltage
35 @param loadLoss: The load loss kW ('to' winding short-circuited) from the test report.
36 @param toTapStep: The tap step number for the 'to' winding of the test pair.
37 @param voltage: The voltage measured at the open-circuited 'to' winding, with the 'from' winding set to the 'from' winding's rated voltage and all other windings open-circuited.
38 @param From_TransformerWinding: The winding from which the test was conducted
39 @param To_TransformerWinding: The winding to which the test was conducted. Note that although the 'from' side of the test is required, the 'to' side of a test is not always required.
41 #: The tap step number for the 'from' winding of the test pair.
42 self
.fromTapStep
= fromTapStep
44 #: The leakage impedance measured at the 'from' winding with the 'to' winding short-circuited and all other windings open-circuited. Leakage impedance is expressed in units based on the apparent power and voltage ratings of the 'from' winding.
45 self
.leakageImpedance
= leakageImpedance
47 #: The no load loss kW 'to' winding open-circuited) from the test report.
48 self
.noLoadLoss
= noLoadLoss
50 #: The phase shift measured at the open-circuited 'to' winding, with the 'from' winding set to the 'from' winding's rated voltage and all other windings open-circuited.
51 self
.phaseShift
= phaseShift
53 #: The exciting current on open-circuit test, expressed as a percentage of rated current, at nominal voltage
54 self
.excitingCurrent
= excitingCurrent
56 #: The load loss kW ('to' winding short-circuited) from the test report.
57 self
.loadLoss
= loadLoss
59 #: The tap step number for the 'to' winding of the test pair.
60 self
.toTapStep
= toTapStep
62 #: The voltage measured at the open-circuited 'to' winding, with the 'from' winding set to the 'from' winding's rated voltage and all other windings open-circuited.
63 self
.voltage
= voltage
65 self
._From
_TransformerWinding
= None
66 self
.From_TransformerWinding
= From_TransformerWinding
68 self
._To
_TransformerWinding
= None
69 self
.To_TransformerWinding
= To_TransformerWinding
71 super(WindingTest
, self
).__init
__(*args
, **kw_args
)
73 _attrs
= ["fromTapStep", "leakageImpedance", "noLoadLoss", "phaseShift", "excitingCurrent", "loadLoss", "toTapStep", "voltage"]
74 _attr_types
= {"fromTapStep": int, "leakageImpedance": float, "noLoadLoss": float, "phaseShift": float, "excitingCurrent": float, "loadLoss": float, "toTapStep": int, "voltage": float}
75 _defaults
= {"fromTapStep": 0, "leakageImpedance": 0.0, "noLoadLoss": 0.0, "phaseShift": 0.0, "excitingCurrent": 0.0, "loadLoss": 0.0, "toTapStep": 0, "voltage": 0.0}
77 _refs
= ["From_TransformerWinding", "To_TransformerWinding"]
80 def getFrom_TransformerWinding(self
):
81 """The winding from which the test was conducted
83 return self
._From
_TransformerWinding
85 def setFrom_TransformerWinding(self
, value
):
86 if self
._From
_TransformerWinding
is not None:
87 filtered
= [x
for x
in self
.From_TransformerWinding
.From_WindingTest
if x
!= self
]
88 self
._From
_TransformerWinding
._From
_WindingTest
= filtered
90 self
._From
_TransformerWinding
= value
91 if self
._From
_TransformerWinding
is not None:
92 if self
not in self
._From
_TransformerWinding
._From
_WindingTest
:
93 self
._From
_TransformerWinding
._From
_WindingTest
.append(self
)
95 From_TransformerWinding
= property(getFrom_TransformerWinding
, setFrom_TransformerWinding
)
97 def getTo_TransformerWinding(self
):
98 """The winding to which the test was conducted. Note that although the 'from' side of the test is required, the 'to' side of a test is not always required.
100 return self
._To
_TransformerWinding
102 def setTo_TransformerWinding(self
, value
):
103 if self
._To
_TransformerWinding
is not None:
104 filtered
= [x
for x
in self
.To_TransformerWinding
.To_WindingTest
if x
!= self
]
105 self
._To
_TransformerWinding
._To
_WindingTest
= filtered
107 self
._To
_TransformerWinding
= value
108 if self
._To
_TransformerWinding
is not None:
109 if self
not in self
._To
_TransformerWinding
._To
_WindingTest
:
110 self
._To
_TransformerWinding
._To
_WindingTest
.append(self
)
112 To_TransformerWinding
= property(getTo_TransformerWinding
, setTo_TransformerWinding
)