Skip to main content

Module linear

Module linear 

Source
Expand description

Linearized power-flow methods: the two different things the literature and the reference tools both call “linear power flow”.

  • btheta is the DC approximation: real-valued, B θ = P, voltage magnitudes asserted to 1 p.u. and resistance discarded. It answers “how does active power divide between these paths”, exactly, in one factorization and no iterations. This is what lightsim2grid, powsybl-open-loadflow and pandapower’s rundcpp mean by DC power flow.
  • impedance is the constant-admittance linearization: complex, Y' U = I, every load replaced by the admittance that would draw its rated power at |V| = 1. It keeps resistance and produces voltage magnitudes, which Bθ cannot. This is what power-grid-model means by CalculationMethod.linear.

Neither approximates the other. Bθ is the transmission tool: on a meshed network with small angle differences and r << x its flows are close to the AC answer, and its exactness under linearity is what makes the sensitivity factors in sensitivity meaningful. The constant-admittance form is the distribution tool: it tracks the voltage drop along a feeder, which is the quantity that actually matters there and the one Bθ throws away by construction.

Not to be confused with crate::dc, which despite the name is not an approximation at all — it is the genuine HVDC network solver (DcBus/DcLine/solve_dc_network) that crate::cgmes uses to resolve converter stations. That module models real DC hardware; this one approximates AC.

Re-exports§

pub use batch::DcBatchResult;
pub use batch::DcBatchSolver;
pub use btheta::DcBranch;
pub use btheta::DcIslandReport;
pub use btheta::DcIslandStatus;
pub use btheta::DcSolution;
pub use btheta::dc_branches;
pub use btheta::dc_power_flow;
pub use impedance::LinearIslandReport;
pub use impedance::LinearIslandStatus;
pub use impedance::LinearReport;
pub use impedance::linear_power_flow;
pub use sensitivity::DcSensitivity;
pub use sensitivity::DenseMatrix;

Modules§

batch
Batched DC power flow: many scenarios over one topology, one factorization in total.
btheta
The DC approximation to AC power flow: B θ = P.
impedance
The constant-admittance linearization: replace every load by the admittance that would draw its rated power at |V| = 1, and what is left is a linear circuit.
sensitivity
DC sensitivity factors: PTDF and LODF.

Structs§

DcOptions
Configuration for the DC (Bθ) solver and for sensitivity::DcSensitivity.

Enums§

DcApproximation
Which terms the DC susceptance keeps.