Adding CIM15 package.
[PyCIM.git] / CIM15 / IEC61968 / AssetModels / WireType.py
blob4a559145b9603a17c0ccbbd96317d212ea472a5c
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
19 # IN THE SOFTWARE.
21 from CIM15.IEC61970.Core.IdentifiedObject import IdentifiedObject
23 class WireType(IdentifiedObject):
24 """Wire conductor (per IEEE specs). A specific type of wire or combination of wires, not insulated from each other, suitable for carrying electrical current.Wire conductor (per IEEE specs). A specific type of wire or combination of wires, not insulated from each other, suitable for carrying electrical current.
25 """
27 def __init__(self, coreRadius=0.0, rAC50=0.0, coreStrandCount=0, radius=0.0, material="aluminum", rDC20=0.0, sizeDescription='', rAC75=0.0, gmr=0.0, ratedCurrent=0.0, strandCount=0, rAC25=0.0, WireArrangements=None, ConcentricNeutralCableInfos=None, *args, **kw_args):
28 """Initialises a new 'WireType' instance.
30 @param coreRadius: (if there is a different core material) Radius of the central core.
31 @param rAC50: AC resistance per unit length of the conductor at 50 °C.
32 @param coreStrandCount: (if used) Number of strands in the steel core.
33 @param radius: Outside radius of the wire.
34 @param material: Wire material. Values are: "aluminum", "copper", "other", "steel", "acsr"
35 @param rDC20: DC resistance per unit length of the conductor at 20 °C.
36 @param sizeDescription: Describes the wire guage or cross section (e.g., 4/0, #2, 336.5).
37 @param rAC75: AC resistance per unit length of the conductor at 75 °C.
38 @param gmr: Geometric mean radius. If we replace the conductor by a thin walled tube of radius GMR, then its reactance is identical to the reactance of the actual conductor.
39 @param ratedCurrent: Current carrying capacity of the wire under stated thermal conditions.
40 @param strandCount: Number of strands in the wire.
41 @param rAC25: AC resistance per unit length of the conductor at 25 °C.
42 @param WireArrangements: All wire arrangements using this wire type.
43 @param ConcentricNeutralCableInfos: All concentric neutral cables using this wire type.
44 """
45 #: (if there is a different core material) Radius of the central core.
46 self.coreRadius = coreRadius
48 #: AC resistance per unit length of the conductor at 50 °C.
49 self.rAC50 = rAC50
51 #: (if used) Number of strands in the steel core.
52 self.coreStrandCount = coreStrandCount
54 #: Outside radius of the wire.
55 self.radius = radius
57 #: Wire material. Values are: "aluminum", "copper", "other", "steel", "acsr"
58 self.material = material
60 #: DC resistance per unit length of the conductor at 20 °C.
61 self.rDC20 = rDC20
63 #: Describes the wire guage or cross section (e.g., 4/0, #2, 336.5).
64 self.sizeDescription = sizeDescription
66 #: AC resistance per unit length of the conductor at 75 °C.
67 self.rAC75 = rAC75
69 #: Geometric mean radius. If we replace the conductor by a thin walled tube of radius GMR, then its reactance is identical to the reactance of the actual conductor.
70 self.gmr = gmr
72 #: Current carrying capacity of the wire under stated thermal conditions.
73 self.ratedCurrent = ratedCurrent
75 #: Number of strands in the wire.
76 self.strandCount = strandCount
78 #: AC resistance per unit length of the conductor at 25 °C.
79 self.rAC25 = rAC25
81 self._WireArrangements = []
82 self.WireArrangements = [] if WireArrangements is None else WireArrangements
84 self._ConcentricNeutralCableInfos = []
85 self.ConcentricNeutralCableInfos = [] if ConcentricNeutralCableInfos is None else ConcentricNeutralCableInfos
87 super(WireType, self).__init__(*args, **kw_args)
89 _attrs = ["coreRadius", "rAC50", "coreStrandCount", "radius", "material", "rDC20", "sizeDescription", "rAC75", "gmr", "ratedCurrent", "strandCount", "rAC25"]
90 _attr_types = {"coreRadius": float, "rAC50": float, "coreStrandCount": int, "radius": float, "material": str, "rDC20": float, "sizeDescription": str, "rAC75": float, "gmr": float, "ratedCurrent": float, "strandCount": int, "rAC25": float}
91 _defaults = {"coreRadius": 0.0, "rAC50": 0.0, "coreStrandCount": 0, "radius": 0.0, "material": "aluminum", "rDC20": 0.0, "sizeDescription": '', "rAC75": 0.0, "gmr": 0.0, "ratedCurrent": 0.0, "strandCount": 0, "rAC25": 0.0}
92 _enums = {"material": "ConductorMaterialKind"}
93 _refs = ["WireArrangements", "ConcentricNeutralCableInfos"]
94 _many_refs = ["WireArrangements", "ConcentricNeutralCableInfos"]
96 def getWireArrangements(self):
97 """All wire arrangements using this wire type.
98 """
99 return self._WireArrangements
101 def setWireArrangements(self, value):
102 for x in self._WireArrangements:
103 x.WireType = None
104 for y in value:
105 y._WireType = self
106 self._WireArrangements = value
108 WireArrangements = property(getWireArrangements, setWireArrangements)
110 def addWireArrangements(self, *WireArrangements):
111 for obj in WireArrangements:
112 obj.WireType = self
114 def removeWireArrangements(self, *WireArrangements):
115 for obj in WireArrangements:
116 obj.WireType = None
118 def getConcentricNeutralCableInfos(self):
119 """All concentric neutral cables using this wire type.
121 return self._ConcentricNeutralCableInfos
123 def setConcentricNeutralCableInfos(self, value):
124 for x in self._ConcentricNeutralCableInfos:
125 x.WireType = None
126 for y in value:
127 y._WireType = self
128 self._ConcentricNeutralCableInfos = value
130 ConcentricNeutralCableInfos = property(getConcentricNeutralCableInfos, setConcentricNeutralCableInfos)
132 def addConcentricNeutralCableInfos(self, *ConcentricNeutralCableInfos):
133 for obj in ConcentricNeutralCableInfos:
134 obj.WireType = self
136 def removeConcentricNeutralCableInfos(self, *ConcentricNeutralCableInfos):
137 for obj in ConcentricNeutralCableInfos:
138 obj.WireType = None