#[non_exhaustive]pub struct LoadVoltageTerm {
pub reactive: bool,
pub coefficient: f64,
pub v_nom: f64,
pub exponent: f64,
}Expand description
One voltage dependent part of a load: coefficient · (vm / v_nom)^exponent
in the load’s power unit.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.reactive: boolReactive (true) or active (false) power.
coefficient: f64The part’s power at the nominal voltage.
v_nom: f64The nominal voltage, per unit on the bus base, positive.
exponent: f64The voltage exponent (1 constant current, 2 constant impedance).
Implementations§
Source§impl LoadVoltageTerm
impl LoadVoltageTerm
Sourcepub const fn new(
reactive: bool,
coefficient: f64,
v_nom: f64,
exponent: f64,
) -> Self
pub const fn new( reactive: bool, coefficient: f64, v_nom: f64, exponent: f64, ) -> Self
A term from its parts.
Sourcepub fn calc_power(&self, vm: f64) -> (f64, f64)
pub fn calc_power(&self, vm: f64) -> (f64, f64)
The term’s power at magnitude vm (per unit) and its derivative with
respect to vm: with x = vm / v_nom, (c x^γ, γ c x^(γ−1) / v_nom),
the one power law term
(powerio_core::electrical::calc_voltage_power_term, which follows
the tangent at LOAD_VOLTAGE_RATIO_FLOOR for γ < 1).
Sourcepub fn is_below_floor(&self, vm: f64) -> bool
pub fn is_below_floor(&self, vm: f64) -> bool
Whether vm lies below the term’s ratio floor: a collapsed voltage
rather than an operating point.
Trait Implementations§
Source§impl Clone for LoadVoltageTerm
impl Clone for LoadVoltageTerm
impl Copy for LoadVoltageTerm
Source§impl Debug for LoadVoltageTerm
impl Debug for LoadVoltageTerm
Source§impl PartialEq for LoadVoltageTerm
impl PartialEq for LoadVoltageTerm
impl StructuralPartialEq for LoadVoltageTerm
Auto Trait Implementations§
impl Freeze for LoadVoltageTerm
impl RefUnwindSafe for LoadVoltageTerm
impl Send for LoadVoltageTerm
impl Sync for LoadVoltageTerm
impl Unpin for LoadVoltageTerm
impl UnsafeUnpin for LoadVoltageTerm
impl UnwindSafe for LoadVoltageTerm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more