Skip to main content

PerPhase

Struct PerPhase 

Source
pub struct PerPhase<T> {
    pub l1: T,
    pub l2: T,
    pub l3: T,
}
Expand description

A value measured or commanded per outer conductor.

The unbalance rule of VDE-AR-N 4100 is stated per phase, so anything that has to satisfy it — a single-phase wallbox, a heating rod, the site as a whole — carries its numbers in here rather than as a scalar.

Fields§

§l1: T

Value on L1.

§l2: T

Value on L2.

§l3: T

Value on L3.

Implementations§

Source§

impl<T: Copy> PerPhase<T>

Source

pub const fn splat(value: T) -> Self

The same value on all three phases.

Source

pub const fn get(&self, phase: Phase) -> T

The value on one phase.

Source

pub const fn set(&mut self, phase: Phase, value: T)

Replace the value on one phase.

Source

pub const fn as_array(&self) -> [T; 3]

The three values, L1 first.

Source

pub fn map<U: Copy>(&self, f: impl FnMut(T) -> U) -> PerPhase<U>

Apply f to every phase.

Source

pub fn zip_with<U: Copy, V: Copy>( &self, other: &PerPhase<U>, f: impl FnMut(T, U) -> V, ) -> PerPhase<V>

Combine two per-phase values elementwise.

Source

pub fn iter(&self) -> impl Iterator<Item = (Phase, T)> + '_

Iterate over (phase, value) pairs.

Source§

impl PerPhase<Power>

Source

pub const ZERO: Self

All three phases at zero.

Source

pub fn total(&self) -> Power

The total across the three phases.

Source

pub fn unbalance(&self) -> ApparentPower

The Unsymmetrieleistung: the largest difference between any two outer conductors, expressed as apparent power.

VDE-AR-N 4100 Abschnitt 5.5.2 caps it at 4,6 kVA for a customer installation — the figure metering::power_quality::UNSYMMETRIE_LIMIT_KVA carries with its derivation, and the same limit as the 20 A per Außenleiter the VDE FNN Hinweis states it as.

Which devices count. The requirement reaches only equipment that can feed in or store — generation, storage, charge points — so the caller sums those and not the household’s own load. See Asset::symmetry_relevant.

kVA, not kW. The limit is apparent power, and an inverter at cos φ < 1 — which VDE-AR-N 4105 requires it to be capable of — moves more kVA than kW. This is computed from active power because that is what a household driver reports, so it understates the unbalance exactly when the grid has asked for reactive support. A meter that reports apparent power per conductor should be used as it stands.

Trait Implementations§

Source§

impl Add for PerPhase<Power>

Source§

type Output = PerPhase<Power>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self

Performs the + operation. Read more
Source§

impl<T: Clone> Clone for PerPhase<T>

Source§

fn clone(&self) -> PerPhase<T>

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<T: Copy> Copy for PerPhase<T>

Source§

impl<T: Debug> Debug for PerPhase<T>

Source§

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

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

impl<T: Default> Default for PerPhase<T>

Source§

fn default() -> PerPhase<T>

Returns the “default value” for a type. Read more
Source§

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

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<T: PartialEq> PartialEq for PerPhase<T>

Source§

fn eq(&self, other: &PerPhase<T>) -> bool

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

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

Inequality operator !=. Read more
Source§

impl<T> Serialize for PerPhase<T>
where T: Serialize,

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

impl<T: PartialEq> StructuralPartialEq for PerPhase<T>

Source§

impl Sub for PerPhase<Power>

Source§

type Output = PerPhase<Power>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self

Performs the - operation. Read more
Source§

impl Sum for PerPhase<Power>

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.

Auto Trait Implementations§

§

impl<T> Freeze for PerPhase<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for PerPhase<T>
where T: RefUnwindSafe,

§

impl<T> Send for PerPhase<T>
where T: Send,

§

impl<T> Sync for PerPhase<T>
where T: Sync,

§

impl<T> Unpin for PerPhase<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for PerPhase<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for PerPhase<T>
where T: UnwindSafe,

Blanket Implementations§

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> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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, <T as TryFrom<U>>::Error>

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.