Skip to main content

Transformer3W

Struct Transformer3W 

Source
#[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
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.
§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: f64

Star-point voltage magnitude (p.u.) and angle (degrees), as solved.

§star_va: f64§mag_g: f64

Magnetizing 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

Source

pub fn new(windings: [Winding; 3], z: [Impedance; 3]) -> Transformer3W

Source

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.

Source

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.

Source

pub fn set_winding_in_service(&mut self, in_service: [bool; 3])

Source

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.

Source

pub fn set_winding_rating_sets( &mut self, winding: usize, rating_sets: Vec<BranchRatingSet>, )

Set winding_rating_sets for one winding.

§Panics

If winding is 3 or more.

Source

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.

Source

pub fn set_winding_impedance_correction( &mut self, winding: usize, correction: Option<ImpedanceCorrection>, )

Set or clear winding_impedance_correction for one winding.

§Panics

If winding is 3 or more.

Source

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

Source§

fn clone(&self) -> Transformer3W

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Transformer3W

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Transformer3W

Source§

fn deserialize<D>( deserializer: D, ) -> Result<Transformer3W, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<Transformer3WFields> for Transformer3W

Source§

fn from(fields: Transformer3WFields) -> Transformer3W

Converts to this type from the input type.
Source§

impl JsonSchema for Transformer3W

Available on crate feature schema only.
Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

impl PartialEq for Transformer3W

Source§

fn eq(&self, other: &Transformer3W) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Transformer3W

Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Transformer3W

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V