pub struct LithiumPack {
pub cells_series: u32,
pub cells_parallel: u32,
pub cell_internal_resistance_ohm: f64,
pub cell_capacity_ah: f64,
}Expand description
An off-grid lithium pack as an S×P array of prismatic cells, modelled as a
first-order equivalent circuit (OCV − I·R sag). Captures the “down to the internal
4-prismatic-cell architecture” requirement: terminal voltage and deliverable power
depend on the series/parallel topology, per-cell internal resistance, and SoC under
a fluctuating load.
Fields§
§cells_series: u32§cells_parallel: u32§cell_internal_resistance_ohm: f64§cell_capacity_ah: f64Implementations§
Source§impl LithiumPack
impl LithiumPack
Sourcepub fn cell_ocv(&self, soc: f64) -> f64
pub fn cell_ocv(&self, soc: f64) -> f64
Open-circuit voltage of ONE cell at a state-of-charge (0..1): a linearised Li-ion curve from ~3.0 V (empty) to ~4.2 V (full).
Sourcepub fn pack_resistance(&self) -> f64
pub fn pack_resistance(&self) -> f64
Pack internal resistance = R_cell × S / P (series adds, parallel divides).
Sourcepub fn terminal_voltage(&self, soc: f64, load_current_a: f64) -> f64
pub fn terminal_voltage(&self, soc: f64, load_current_a: f64) -> f64
Terminal voltage under a load current (A): OCV minus the internal-resistance sag.
Sourcepub fn deliverable_power(&self, soc: f64, load_current_a: f64) -> f64
pub fn deliverable_power(&self, soc: f64, load_current_a: f64) -> f64
Power (W) actually delivered to the load at a given SoC and current.
Sourcepub fn pack_capacity_ah(&self) -> f64
pub fn pack_capacity_ah(&self) -> f64
Total pack capacity (Ah) = per-cell capacity × parallel count.
Trait Implementations§
Source§impl Clone for LithiumPack
impl Clone for LithiumPack
Source§fn clone(&self) -> LithiumPack
fn clone(&self) -> LithiumPack
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 LithiumPack
impl Debug for LithiumPack
impl Copy for LithiumPack
Auto Trait Implementations§
impl Freeze for LithiumPack
impl RefUnwindSafe for LithiumPack
impl Send for LithiumPack
impl Sync for LithiumPack
impl Unpin for LithiumPack
impl UnsafeUnpin for LithiumPack
impl UnwindSafe for LithiumPack
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more