Adding CDPSM package.
[PyCIM.git] / CDPSM / Asset / IEC61968 / AssetModels / WireType.py
blobd184ec0e820dda2433d73ffeaa1794427d70a3af
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 CDPSM.Asset.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.
25 """
27 def __init__(self, rDC20=0.0, coreRadius=0.0, rAC75=0.0, material="aluminum", ratedCurrent=0.0, strandCount=0, rAC25=0.0, rAC50=0.0, radius=0.0, gmr=0.0, coreStrandCount=0, sizeDescription='', WireArrangements=None, *args, **kw_args):
28 """Initialises a new 'WireType' instance.
30 @param rDC20: DC resistance per unit length of the conductor at 20 °C.
31 @param coreRadius: (if there is a different core material) Radius of the central core.
32 @param rAC75: AC resistance per unit length of the conductor at 75 °C.
33 @param material: Wire material. Values are: "aluminum", "copper", "other", "steel", "acsr"
34 @param ratedCurrent: Current carrying capacity of the wire under stated thermal conditions.
35 @param strandCount: Number of strands in the wire.
36 @param rAC25: AC resistance per unit length of the conductor at 25 °C.
37 @param rAC50: AC resistance per unit length of the conductor at 50 °C.
38 @param radius: Outside radius of the wire.
39 @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.
40 @param coreStrandCount: (if used) Number of strands in the steel core.
41 @param sizeDescription: Describes the wire guage or cross section (e.g., 4/0, #2, 336.5).
42 @param WireArrangements: All wire arrangements using this wire type.
43 """
44 #: DC resistance per unit length of the conductor at 20 °C.
45 self.rDC20 = rDC20
47 #: (if there is a different core material) Radius of the central core.
48 self.coreRadius = coreRadius
50 #: AC resistance per unit length of the conductor at 75 °C.
51 self.rAC75 = rAC75
53 #: Wire material. Values are: "aluminum", "copper", "other", "steel", "acsr"
54 self.material = material
56 #: Current carrying capacity of the wire under stated thermal conditions.
57 self.ratedCurrent = ratedCurrent
59 #: Number of strands in the wire.
60 self.strandCount = strandCount
62 #: AC resistance per unit length of the conductor at 25 °C.
63 self.rAC25 = rAC25
65 #: AC resistance per unit length of the conductor at 50 °C.
66 self.rAC50 = rAC50
68 #: Outside radius of the wire.
69 self.radius = radius
71 #: 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.
72 self.gmr = gmr
74 #: (if used) Number of strands in the steel core.
75 self.coreStrandCount = coreStrandCount
77 #: Describes the wire guage or cross section (e.g., 4/0, #2, 336.5).
78 self.sizeDescription = sizeDescription
80 self._WireArrangements = []
81 self.WireArrangements = [] if WireArrangements is None else WireArrangements
83 super(WireType, self).__init__(*args, **kw_args)
85 _attrs = ["rDC20", "coreRadius", "rAC75", "material", "ratedCurrent", "strandCount", "rAC25", "rAC50", "radius", "gmr", "coreStrandCount", "sizeDescription"]
86 _attr_types = {"rDC20": float, "coreRadius": float, "rAC75": float, "material": str, "ratedCurrent": float, "strandCount": int, "rAC25": float, "rAC50": float, "radius": float, "gmr": float, "coreStrandCount": int, "sizeDescription": str}
87 _defaults = {"rDC20": 0.0, "coreRadius": 0.0, "rAC75": 0.0, "material": "aluminum", "ratedCurrent": 0.0, "strandCount": 0, "rAC25": 0.0, "rAC50": 0.0, "radius": 0.0, "gmr": 0.0, "coreStrandCount": 0, "sizeDescription": ''}
88 _enums = {"material": "ConductorMaterialKind"}
89 _refs = ["WireArrangements"]
90 _many_refs = ["WireArrangements"]
92 def getWireArrangements(self):
93 """All wire arrangements using this wire type.
94 """
95 return self._WireArrangements
97 def setWireArrangements(self, value):
98 for x in self._WireArrangements:
99 x.WireType = None
100 for y in value:
101 y._WireType = self
102 self._WireArrangements = value
104 WireArrangements = property(getWireArrangements, setWireArrangements)
106 def addWireArrangements(self, *WireArrangements):
107 for obj in WireArrangements:
108 obj.WireType = self
110 def removeWireArrangements(self, *WireArrangements):
111 for obj in WireArrangements:
112 obj.WireType = None