1 # Copyright (C) 2010 Richard Lincoln
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, USA
17 from CIM14
.IEC61970
.Core
.ConductingEquipment
import ConductingEquipment
19 class EnergySource(ConductingEquipment
):
20 """A generic equivalent for an energy supplier on a transmission or distribution voltage level.
23 def __init__(self
, x
=0.0, activePower
=0.0, r
=0.0, nominalVoltage
=0.0, voltageMagnitude
=0.0, xn
=0.0, x0
=0.0, rn
=0.0, voltageAngle
=0.0, r0
=0.0, *args
, **kw_args
):
24 """Initialises a new 'EnergySource' instance.
26 @param x: Positive sequence Thevenin reactance.
27 @param activePower: High voltage source load
28 @param r: Positive sequence Thevenin resistance.
29 @param nominalVoltage: Phase-to-phase nominal voltage.
30 @param voltageMagnitude: Phase-to-phase open circuit voltage magnitude.
31 @param xn: Negative sequence Thevenin reactance.
32 @param x0: Zero sequence Thevenin reactance.
33 @param rn: Negative sequence Thevenin resistance.
34 @param voltageAngle: Phase angle of a-phase open circuit.
35 @param r0: Zero sequence Thevenin resistance.
37 #: Positive sequence Thevenin reactance.
40 #: High voltage source load
41 self
.activePower
= activePower
43 #: Positive sequence Thevenin resistance.
46 #: Phase-to-phase nominal voltage.
47 self
.nominalVoltage
= nominalVoltage
49 #: Phase-to-phase open circuit voltage magnitude.
50 self
.voltageMagnitude
= voltageMagnitude
52 #: Negative sequence Thevenin reactance.
55 #: Zero sequence Thevenin reactance.
58 #: Negative sequence Thevenin resistance.
61 #: Phase angle of a-phase open circuit.
62 self
.voltageAngle
= voltageAngle
64 #: Zero sequence Thevenin resistance.
67 super(EnergySource
, self
).__init
__(*args
, **kw_args
)
69 _attrs
= ["x", "activePower", "r", "nominalVoltage", "voltageMagnitude", "xn", "x0", "rn", "voltageAngle", "r0"]
70 _attr_types
= {"x": float, "activePower": float, "r": float, "nominalVoltage": float, "voltageMagnitude": float, "xn": float, "x0": float, "rn": float, "voltageAngle": float, "r0": float}
71 _defaults
= {"x": 0.0, "activePower": 0.0, "r": 0.0, "nominalVoltage": 0.0, "voltageMagnitude": 0.0, "xn": 0.0, "x0": 0.0, "rn": 0.0, "voltageAngle": 0.0, "r0": 0.0}