roseau.load_flow.models.lines.lines#

Module Contents#

Classes#

Switch

A general purpose switch branch.

Line

An electrical line PI model with series impedance and optional shunt admittance.

class Switch(id: Id, bus1: Bus, bus2: Bus, *, phases: str | None = None, geometry: shapely.geometry.base.BaseGeometry | None = None)#

Bases: roseau.load_flow.models.branches.AbstractBranch

A general purpose switch branch.

Switch constructor.

Parameters:
  • id – A unique ID of the switch in the network branches.

  • bus1 – Bus to connect to the switch.

  • bus2 – Bus to connect to the switch.

  • phases – The phases of the switch. A string like "abc" or "an" etc. The order of the phases is important. For a full list of supported phases, see the class attribute allowed_phases. All phases of the switch must be present in the phases of both connected buses. By default, the phases common to both buses are used.

  • geometry – The geometry of the switch.

property phases: str#

The phases of the switch. This is an alias for phases1 and phases2.

allowed_phases: Final#

The allowed phases for a switch are:

  • P-P-P or P-P-P-N: "abc", "abcn"

  • P-P or P-P-N: "ab", "bc", "ca", "abn", "bcn", "can"

  • P or P-N: "a", "b", "c", "an", "bn", "cn"

  • N: "n"

class Line(id: Id, bus1: Bus, bus2: Bus, *, parameters: LineParameters, length: float | Q_[float], phases: str | None = None, ground: Ground | None = None, geometry: shapely.geometry.base.BaseGeometry | None = None)#

Bases: roseau.load_flow.models.branches.AbstractBranch

An electrical line PI model with series impedance and optional shunt admittance.

Line constructor.

Parameters:
  • id – A unique ID of the line in the network branches.

  • bus1 – The first bus (aka “from_bus”) to connect to the line.

  • bus2 – The second bus (aka “to_bus”) to connect to the line.

  • parameters – Parameters defining the electric model of the line using its impedance and shunt admittance matrices. This is an instance of the LineParameters class and can be used by multiple lines.

  • length – The length of the line (in km).

  • phases – The phases of the line. A string like "abc" or "an" etc. The order of the phases is important. For a full list of supported phases, see the class attribute allowed_phases. All phases of the line must be present in the phases of both connected buses. By default, the phases common to both buses are used.

  • ground – The ground element attached to the line if it has shunt admittance.

  • geometry – The geometry of the line i.e. the linestring.

property phases: str#

The phases of the line. This is an alias for phases1 and phases2.

property length: Q_[float]#

The length of the line (in km).

property parameters: LineParameters#

The parameters defining the impedance and shunt admittance matrices of line model.

property z_line: Q_[ComplexArray]#

Impedance of the line (in Ohm).

property y_shunt: Q_[ComplexArray]#

Shunt admittance of the line (in Siemens).

property max_current: Q_[float] | None#

The maximum current loading of the line (in A).

property res_series_currents: Q_[ComplexArray]#

Get the current in the series elements of the line (in A).

property res_series_power_losses: Q_[ComplexArray]#

Get the power losses in the series elements of the line (in VA).

property res_shunt_currents: tuple[Q_[ComplexArray], Q_[ComplexArray]]#

Get the currents in the shunt elements of the line (in A).

property res_shunt_power_losses: Q_[ComplexArray]#

Get the power losses in the shunt elements of the line (in VA).

property res_power_losses: Q_[ComplexArray]#

Get the power losses in the line (in VA).

property res_violated: bool | None#

Whether the line current exceeds the maximum current (loading > 100%).

Returns None if the maximum current is not set.

allowed_phases: Final#

The allowed phases for a line are:

  • P-P-P or P-P-P-N: "abc", "abcn"

  • P-P or P-P-N: "ab", "bc", "ca", "abn", "bcn", "can"

  • P or P-N: "a", "b", "c", "an", "bn", "cn"

  • N: "n"