#[non_exhaustive]pub struct Transformer3W {
pub windings: [Winding; 3],
pub z: [Impedance; 3],
pub star_vm: f64,
pub star_va: f64,
pub mag_g: f64,
pub mag_b: f64,
pub in_service: bool,
pub name: Option<String>,
pub uid: Option<String>,
pub extras: BTreeMap<String, Value>,
}Expand description
A three winding transformer with three terminal buses joined at a star point.
Series impedance is stored for winding pairs 1-2, 2-3, and 3-1. The record
also retains star point voltage and per winding control data. PSS/E three
winding records and PSLF tertiary winding records map to this type.
to_star_expansion turns it into the synthetic
star bus plus three branches for a consumer that works in the bus-branch model;
IndexedNetwork applies it before building any matrix,
so a 3-winding transformer contributes to Y_bus and connectivity.
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.windings: [Winding; 3]The three windings, in order (primary, secondary, tertiary).
z: [Impedance; 3]Pairwise series impedance [z12, z23, z31] (primary-secondary,
secondary-tertiary, tertiary-primary), each per unit on the system base
with its declared MVA base.
star_vm: f64Star-point voltage magnitude (p.u.) and angle (degrees), as solved.
star_va: f64§mag_g: f64Magnetizing shunt referred to the star point (p.u. on the system base).
mag_b: f64§in_service: bool§name: Option<String>§uid: Option<String>Stable row identity; see Bus::uid.
extras: BTreeMap<String, Value>Implementations§
Source§impl Transformer3W
impl Transformer3W
pub fn new(windings: [Winding; 3], z: [Impedance; 3]) -> Transformer3W
Sourcepub fn calc_star_impedances(&self) -> [(f64, f64); 3]
pub fn calc_star_impedances(&self) -> [(f64, f64); 3]
The per-winding star impedances (r, x) — winding k to the star point —
from the pairwise values, per unit on the system base.
Standard pairwise→star conversion: z1 = (z12 + z31 - z23) / 2, and so on.
Because the impedances are already on a common base, the split is linear in
r and x separately.
Sourcepub fn winding_in_service(&self) -> [bool; 3]
pub fn winding_in_service(&self) -> [bool; 3]
Whether each winding is connected while the transformer is in service,
in winding order. in_service takes the whole
transformer out; a winding that is out leaves the other two coupled
through the star point.
The status is kept as three booleans under
extras["winding_in_service"], absent while every winding is in
service. An absent or malformed entry reads as every winding in service.
Sourcepub fn set_winding_in_service(&mut self, in_service: [bool; 3])
pub fn set_winding_in_service(&mut self, in_service: [bool; 3])
Set winding_in_service.
Sourcepub fn winding_rating_sets(&self, winding: usize) -> Vec<BranchRatingSet>
pub fn winding_rating_sets(&self, winding: usize) -> Vec<BranchRatingSet>
The MVA rating sets of winding winding (0, 1, or 2) beyond rate_a,
rate_b, and rate_c, named as on Branch::rating_sets: PSS/E
states RATE4 to RATE12.
The sets are kept under extras["winding_rating_sets"] as three arrays
of {name, rate_mva} objects in winding order, absent while no winding
has one. An absent or malformed entry reads as no sets.
§Panics
If winding is 3 or more.
Sourcepub fn set_winding_rating_sets(
&mut self,
winding: usize,
rating_sets: Vec<BranchRatingSet>,
)
pub fn set_winding_rating_sets( &mut self, winding: usize, rating_sets: Vec<BranchRatingSet>, )
Sourcepub fn winding_impedance_correction(
&self,
winding: usize,
) -> Option<ImpedanceCorrection>
pub fn winding_impedance_correction( &self, winding: usize, ) -> Option<ImpedanceCorrection>
The impedance correction table winding winding (0, 1, or 2) follows:
it scales that winding’s star impedance, except with PSS/E ZCOD=1,
where entries 0/1/2 scale Z12/Z23/Z31 at the sole adjustable winding.
The tables are kept under
extras["impedance_correction"] as three entries in winding order, each
a table or null; an absent or malformed entry reads as none.
§Panics
If winding is 3 or more.
Sourcepub fn set_winding_impedance_correction(
&mut self,
winding: usize,
correction: Option<ImpedanceCorrection>,
)
pub fn set_winding_impedance_correction( &mut self, winding: usize, correction: Option<ImpedanceCorrection>, )
Sourcepub fn to_star_expansion(&self, star_id: BusId) -> (Bus, [Branch; 3])
pub fn to_star_expansion(&self, star_id: BusId) -> (Bus, [Branch; 3])
Expand into a synthetic star Bus (id star_id) plus three Branches,
one per winding, for a consumer that works in the bus-branch model.
IndexedNetwork calls this via
BalancedNetwork::expand_transformers_3w when assembling matrix inputs. The star
bus carries the stored star voltage and the magnetizing shunt is left to the
caller; each branch takes its winding’s tap, phase shift, ratings, and
status, so a winding out of service gives an out of service branch.
Trait Implementations§
Source§impl Clone for Transformer3W
impl Clone for Transformer3W
Source§fn clone(&self) -> Transformer3W
fn clone(&self) -> Transformer3W
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Transformer3W
impl Debug for Transformer3W
Source§impl<'de> Deserialize<'de> for Transformer3W
impl<'de> Deserialize<'de> for Transformer3W
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Transformer3W, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Transformer3W, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl From<Transformer3WFields> for Transformer3W
impl From<Transformer3WFields> for Transformer3W
Source§fn from(fields: Transformer3WFields) -> Transformer3W
fn from(fields: Transformer3WFields) -> Transformer3W
Source§impl JsonSchema for Transformer3W
Available on crate feature schema only.
impl JsonSchema for Transformer3W
schema only.Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more