Skip to main content

McOpfTransformer

Struct McOpfTransformer 

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

Canonical 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: f64

Physical nominal tap used to recover a physical tap from the multiplier.

§tap_inverse: bool

True 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

Source

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.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for McOpfTransformer

Source§

fn clone(&self) -> Self

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 McOpfTransformer

Source§

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

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

impl<'de> Deserialize<'de> for McOpfTransformer

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

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

impl Serialize for McOpfTransformer

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

§

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
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

§

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

§

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.

§

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.

§

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.
§

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

§

fn vzip(self) -> V