roseau.load_flow.models.loads.loads
#
Module Contents#
Classes#
An abstract class of an electric load. |
|
A constant power load. |
|
A constant current load. |
|
A constant impedance load. |
- class AbstractLoad(id: Id, bus: Bus, *, phases: str | None = None)#
Bases:
roseau.load_flow.models.core.Element
,abc.ABC
An abstract class of an electric load.
- The subclasses of this class can be used to depict:
star-connected loads using a phases constructor argument containing “n”
delta-connected loads using a phases constructor argument not containing “n”
AbstractLoad constructor.
- Parameters:
id – A unique ID of the load in the network loads.
bus – The bus to connect the load to.
phases – The phases of the load. A string like
"abc"
or"an"
etc. The order of the phases is important. For a full list of supported phases, see the class attributeallowed_phases
. All phases of the load, except"n"
, must be present in the phases of the connected bus. By default, the phases of the bus are used.
- property res_currents: Q_[ComplexArray]#
The load flow result of the load currents (A).
- property res_potentials: Q_[ComplexArray]#
The load flow result of the load potentials (V).
- property res_voltages: Q_[ComplexArray]#
The load flow result of the load voltages (V).
- property res_powers: Q_[ComplexArray]#
The load flow result of the “line powers” flowing into the load (VA).
- allowed_phases: Final#
The allowed phases for a load are the same as for a
bus
.
- classmethod from_dict(data: JsonDict, *, include_results: bool = True) AbstractLoad #
Create an element from a dictionary created with
to_dict()
.Note
This method does not work on all classes that define it as some of them require additional information to be constructed. It can only be safely used on the ElectricNetwork, LineParameters and TransformerParameters classes.
- Parameters:
data – The dictionary containing the element’s data.
include_results – If True (default) and the results of the load flow are included in the dictionary, the results are also loaded into the element.
- Returns:
The constructed element.
- class PowerLoad(id: Id, bus: Bus, *, powers: ComplexArrayLike1D, phases: str | None = None, flexible_params: list[FlexibleParameter] | None = None)#
Bases:
AbstractLoad
A constant power load.
PowerLoad constructor.
- Parameters:
id – A unique ID of the load in the network loads.
bus – The bus to connect the load to.
powers – An array-like of the powers for each phase component. Either complex values (VA) or a
Quantity
of complex values.phases – The phases of the load. A string like
"abc"
or"an"
etc. The order of the phases is important. For a full list of supported phases, see the class attributeallowed_phases
. All phases of the load, except"n"
, must be present in the phases of the connected bus. By default, the phases of the bus are used.flexible_params – A list of
FlexibleParameters
object, one for each phase. When provided, the load is considered as flexible (or controllable) and the parameters are used to compute the flexible power of the load.
- property powers: Q_[ComplexArray]#
The powers of the load (VA).
- property res_flexible_powers: Q_[ComplexArray]#
The load flow result of the load flexible powers (VA).
This property is only available for flexible loads.
It returns the powers actually consumed or produced by each component of the load instead of the “line powers” flowing into the load connection points (as the
res_powers()
property does). The two properties are the same for Wye-connected loads but are different for Delta-connected loads.
- classmethod from_dict(data: JsonDict, *, include_results: bool = True) AbstractLoad #
Create an element from a dictionary created with
to_dict()
.Note
This method does not work on all classes that define it as some of them require additional information to be constructed. It can only be safely used on the ElectricNetwork, LineParameters and TransformerParameters classes.
- Parameters:
data – The dictionary containing the element’s data.
include_results – If True (default) and the results of the load flow are included in the dictionary, the results are also loaded into the element.
- Returns:
The constructed element.
- class CurrentLoad(id: Id, bus: Bus, *, currents: ComplexArrayLike1D, phases: str | None = None)#
Bases:
AbstractLoad
A constant current load.
CurrentLoad constructor.
- Parameters:
id – A unique ID of the load in the network loads.
bus – The bus to connect the load to.
currents – An array-like of the currents for each phase component. Either complex values (A) or a
Quantity
of complex values.phases – The phases of the load. A string like
"abc"
or"an"
etc. The order of the phases is important. For a full list of supported phases, see the class attributeallowed_phases
. All phases of the load, except"n"
, must be present in the phases of the connected bus. By default, the phases of the bus are used.
- property currents: Q_[ComplexArray]#
The currents of the load (Amps).
- class ImpedanceLoad(id: Id, bus: Bus, *, impedances: ComplexArrayLike1D, phases: str | None = None)#
Bases:
AbstractLoad
A constant impedance load.
ImpedanceLoad constructor.
- Parameters:
id – A unique ID of the load in the network loads.
bus – The bus to connect the load to.
impedances – An array-like of the impedances for each phase component. Either complex values (Ohms) or a
Quantity
of complex values.phases – The phases of the load. A string like
"abc"
or"an"
etc. The order of the phases is important. For a full list of supported phases, see the class attributeallowed_phases
. All phases of the load, except"n"
, must be present in the phases of the connected bus. By default, the phases of the bus are used.
- property impedances: Q_[ComplexArray]#
The impedances of the load (Ohms).