Function calc_voltage_power_term
pub fn calc_voltage_power_term(
coefficient: f64,
exponent: f64,
ratio: f64,
) -> (f64, f64)Expand description
One voltage power law term c x^γ at the voltage ratio x = |V| / V_nom
and its derivative γ c x^(γ−1) with respect to x. Exponents 0, 1 and 2
(constant power, current and impedance) are evaluated without powf. For
any other γ < 1 and x below LOAD_VOLTAGE_RATIO_FLOOR the term
follows its tangent at the floor, c (f₀ + f₀' (x − x₀)), so value and
slope stay finite and consistent as a voltage approaches zero.
The one voltage dependent load law evaluation: the balanced load terms, the distribution ZIP, exponential, constant current and impedance laws, and the multiconductor OPF load law read it.