roseau.load_flow.models.lines.parameters
#
Module Contents#
Classes#
Parameters that define electrical models of lines. |
- class LineParameters(id: Id, z_line: ComplexArrayLike2D, y_shunt: ComplexArrayLike2D | None = None, max_current: float | None = None, line_type: LineType | None = None, conductor_type: ConductorType | None = None, insulator_type: InsulatorType | None = None, section: float | Q_[float] | None = None)#
Bases:
roseau.load_flow.utils.Identifiable
,roseau.load_flow.utils.JsonMixin
,roseau.load_flow.utils.CatalogueMixin
[pandas.DataFrame
]Parameters that define electrical models of lines.
LineParameters constructor.
- Parameters:
id – A unique ID of the line parameters, typically its canonical name.
z_line – The Z matrix of the line (Ohm/km).
y_shunt – The Y matrix of the line (Siemens/km). This field is optional if the line has no shunt part.
max_current – The maximum current loading of the line (A). The maximum current is optional, it is not used in the load flow but can be used to check for overloading. See also
Line.res_violated
.line_type – The type of the line (overhead, underground, twisted). The line type is optional, it is informative only and is not used in the load flow. This field gets automatically filled when the line parameters are created from a geometric model or from the catalogue.
conductor_type – The type of the conductor material (Aluminum, Copper, …). The conductor type is optional, it is informative only and is not used in the load flow. This field gets automatically filled when the line parameters are created from a geometric model or from the catalogue.
insulator_type – The type of the cable insulator (PVC, XLPE, …). The insulator type is optional, it is informative only and is not used in the load flow. This field gets automatically filled when the line parameters are created from a geometric model or from the catalogue.
- property line_type: LineType | None#
The type of the line. Informative only, it has no impact on the load flow.
- property conductor_type: ConductorType | None#
The type of the conductor material. Informative only, it has no impact on the load flow.
- property insulator_type: InsulatorType | None#
The type of the cable insulator. Informative only, it has no impact on the load flow.
- property section: Q_[float] | None#
The cross section area of the cable (in mm²). Informative only, it has no impact on the load flow.
- classmethod from_sym(id: Id, z0: complex | Q_[complex], z1: complex | Q_[complex], y0: complex | Q_[complex], y1: complex | Q_[complex], zn: complex | Q_[complex] | None = None, xpn: float | Q_[float] | None = None, bn: float | Q_[float] | None = None, bpn: float | Q_[float] | None = None, max_current: float | Q_[float] | None = None) typing_extensions.Self #
Create line parameters from a symmetric model.
- Parameters:
id – A unique ID of the line parameters, typically its canonical name.
z0 – Impedance - zero sequence - \(r_0+x_0\cdot j\) (ohms/km)
z1 – Impedance - direct sequence - \(r_1+x_1\cdot j\) (ohms/km)
y0 – Admittance - zero sequence - \(g_0+b_0\cdot j\) (Siemens/km)
y1 – Conductance - direct sequence - \(g_1+b_1\cdot j\) (Siemens/km)
zn – Neutral impedance - \(r_{\mathrm{n}}+x_{\mathrm{n}}\cdot j\) (ohms/km)
xpn – Phase to neutral reactance (ohms/km)
bn – Neutral susceptance (siemens/km)
bpn – Phase to neutral susceptance (siemens/km)
max_current – An optional maximum current loading of the line (A). It is not used in the load flow.
- Returns:
The created line parameters.
Notes
As explained in the Line parameters alternative constructor documentation, the model may be “degraded” if the computed impedance matrix is not invertible.
- classmethod from_geometry(id: Id, *, line_type: LineType, conductor_type: ConductorType | None = None, insulator_type: InsulatorType | None = None, section: float | Q_[float], section_neutral: float | Q_[float] | None = None, height: float | Q_[float], external_diameter: float | Q_[float], max_current: float | Q_[float] | None = None) typing_extensions.Self #
Create line parameters from its geometry.
- Parameters:
id – The id of the line parameters type.
line_type – Overhead or underground. See also
LineType
.conductor_type – Type of the conductor. If
None
,ACSR
is used for overhead lines andAL
for underground or twisted lines. See alsoConductorType
.insulator_type – Type of insulator. If
None
,XLPE
is used for twisted lines andPVC
for underground lines. See alsoInsulatorType
.section – Cross-section surface area of the phases (mm²).
section_neutral – Cross-section surface area of the neutral (mm²). If None it will be the same as the section of the other phases.
height – Height of the line (m). It must be positive for overhead lines and negative for underground lines.
external_diameter – External diameter of the cable (m).
max_current – An optional maximum current loading of the line (A). It is not used in the load flow.
- Returns:
The created line parameters.
- classmethod from_name_lv(name: str, section_neutral: float | Q_[float] | None = None, height: float | Q_[float] | None = None, external_diameter: float | Q_[float] | None = None, max_current: float | Q_[float] | None = None) typing_extensions.Self #
Method to get the electrical parameters of a LV line from its canonical name. Some hypothesis will be made: the section of the neutral is the same as the other sections, the height and external diameter are pre-defined, and the insulator is PVC.
- Parameters:
name – The name of the line the parameters must be computed. E.g. “U_AL_150”.
section_neutral – Surface of the neutral (mm²). If None it will be the same as the section of the other phases.
height – Height of the line (m). If None a default value will be used.
external_diameter – External diameter of the wire (mm). If None a default value will be used.
max_current – An optional maximum current loading of the line (A). It is not used in the load flow.
- Returns:
The corresponding line parameters.
Deprecated since version 0.6.0: Use
LineParameters.from_geometry()
instead.
- classmethod from_name_mv(name: str, max_current: float | Q_[float] | None = None) typing_extensions.Self #
Get the electrical parameters of a MV line from its canonical name (France specific model)
- Parameters:
name – The canonical name of the line parameters. It must be in the format lineType_conductorType_crossSection. E.g. “U_AL_150”.
max_current – An optional maximum current loading of the line (A). It is not used in the load flow.
- Returns:
The corresponding line parameters.
- classmethod from_catalogue(name: str | Pattern[str] | None = None, line_type: str | None = None, conductor_type: str | None = None, insulator_type: str | None = None, section: float | Q_[float] | None = None, id: Id | None = None) typing_extensions.Self #
Create line parameters from a catalogue.
- Parameters:
name – The name of the line parameters to get from the catalogue. It can be a regular expression.
line_type – The type of the line parameters to get. It can be
"overhead"
,"twisted"
, or"underground"
. See alsoLineType
.conductor_type – The type of the conductor material (Al, Cu, …). See also
ConductorType
.insulator_type – The type of insulator. See also
InsulatorType
.section – The cross-section surface area of the phases (mm²).
id – A unique ID for the created line parameters object (optional). If
None
(default), the id of the created object will be its name in the catalogue.
- Returns:
The created line parameters.
- classmethod get_catalogue(name: str | Pattern[str] | None = None, line_type: str | None = None, conductor_type: str | None = None, insulator_type: str | None = None, section: float | Q_[float] | None = None) DataFrame #
Get the catalogue of available lines.
You can use the parameters below to filter the catalogue. If you do not specify any parameter, all the catalogue will be returned.
- Parameters:
name – The name of the line parameters to get from the catalogue. It can be a regular expression.
line_type – The type of the line parameters to get. It can be
"overhead"
,"twisted"
, or"underground"
. See alsoLineType
.conductor_type – The type of the conductor material (Al, Cu, …). See also
ConductorType
.insulator_type – The type of insulator. See also
InsulatorType
.section – The cross-section surface area of the phases (mm²).
- Returns:
The catalogue data as a dataframe.