#[non_exhaustive]pub struct McOpfTransformer {
pub identity: String,
pub coils: Vec<McOpfTransformerCoil>,
pub equations: Vec<McOpfComplexRow>,
pub ports: Vec<McOpfTransformerPort>,
pub tap_bounds: Option<[f64; 2]>,
pub tap_nominal: f64,
pub tap_inverse: bool,
pub tap_equations: Vec<McOpfComplexRow>,
}Expand description
Winding-current equations, ports and optional continuous tap parameter.
Each row is equations[k] + t * tap_equations[k] = 0, where t is a
dimensionless multiplier with nominal value one. The physical tap is
tap_nominal * t, or tap_nominal / t when tap_inverse is true.
An empty tap_equations vector means the descriptor is fixed.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.identity: StringCanonical transformer name.
coils: Vec<McOpfTransformerCoil>Local winding-current axis and terminal incidence; these currents enter network KCL.
equations: Vec<McOpfComplexRow>Complex zero-residual rows using global voltages and local winding currents.
ports: Vec<McOpfTransformerPort>Physical rated ports, with axes distinct from the internal coil axis.
tap_bounds: Option<[f64; 2]>Optional multiplier on the nominal tap coefficient (start = 1).
tap_nominal: f64Physical nominal tap used to recover a physical tap from the multiplier.
tap_inverse: boolTrue for regulators, of either ANSI type, whose tap is the regulated over source voltage ratio.
tap_equations: Vec<McOpfComplexRow>Rows multiplied by the tap multiplier, aligned with equations; empty for fixed taps.
Implementations§
Source§impl McOpfTransformer
impl McOpfTransformer
Sourcepub fn calc_physical_tap(&self, multiplier: f64) -> f64
pub fn calc_physical_tap(&self, multiplier: f64) -> f64
The physical tap at a tap multiplier t: tap_nominal * t, or
tap_nominal / t for a regulator (tap_inverse). The one tap
convention, with its inverse Self::calc_tap_multiplier and the
derivatives below.
Sourcepub fn calc_tap_multiplier(&self, physical: f64) -> f64
pub fn calc_tap_multiplier(&self, physical: f64) -> f64
The tap multiplier of a physical tap: physical / tap_nominal, or
tap_nominal / physical for a regulator. The preparation maps its
physical tap bounds through it.
Sourcepub fn calc_physical_tap_derivative(&self, multiplier: f64) -> f64
pub fn calc_physical_tap_derivative(&self, multiplier: f64) -> f64
d physical / d t at the multiplier t: tap_nominal, or
-tap_nominal / t² for a regulator.
Sourcepub fn calc_tap_multiplier_derivative(&self, physical: f64) -> f64
pub fn calc_tap_multiplier_derivative(&self, physical: f64) -> f64
d t / d physical at a physical tap: 1 / tap_nominal, or
-tap_nominal / physical² for a regulator.