1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! 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.
pub use ;
pub use ;
pub use ;
pub use ;
/// Which terms the DC susceptance keeps.
///
/// Both variants are powsybl-open-loadflow's `DcApproximationType`
/// (`dc/equations/AbstractClosedBranchDcFlowEquationTerm.computePower`); no
/// other reference tool offers the choice, and every one of them uses what is
/// spelled [`IgnoreR`](Self::IgnoreR) here.
/// Configuration for the DC (Bθ) solver and for [`sensitivity::DcSensitivity`].
///
/// Deliberately small: DC has no tolerance and no iteration limit, because it
/// is a direct solve. The only real choices are which susceptance to use and
/// whether transformer ratios participate.