pub struct BatteryAgingModel {
pub cycle_count: usize,
pub capacity_fade_rate: f64,
pub resistance_growth_rate: f64,
pub initial_capacity: f64,
}Expand description
Empirical cycle-life aging model for a battery cell.
Fields§
§cycle_count: usizeCurrent cycle count.
capacity_fade_rate: f64Fractional capacity fade per cycle (e.g., 0.0002 = 0.02 % per cycle).
resistance_growth_rate: f64Fractional resistance growth per cycle.
initial_capacity: f64Initial capacity [Ah].
Implementations§
Source§impl BatteryAgingModel
impl BatteryAgingModel
Sourcepub fn new(
initial_capacity: f64,
capacity_fade_rate: f64,
resistance_growth_rate: f64,
) -> Self
pub fn new( initial_capacity: f64, capacity_fade_rate: f64, resistance_growth_rate: f64, ) -> Self
Construct a new BatteryAgingModel.
Sourcepub fn capacity_at_cycle(&self, n: usize) -> f64
pub fn capacity_at_cycle(&self, n: usize) -> f64
Remaining capacity [Ah] at cycle number n.
Q(n) = Q₀ × (1 − rate × n) clamped to zero.
Sourcepub fn resistance_at_cycle(&self, n: usize) -> f64
pub fn resistance_at_cycle(&self, n: usize) -> f64
Internal resistance multiplier at cycle number n.
R(n) = R₀ × (1 + growth_rate × n).
Sourcepub fn cycle_life(&self, threshold: f64) -> usize
pub fn cycle_life(&self, threshold: f64) -> usize
Cycle number at which capacity falls below threshold fraction of initial.
Trait Implementations§
Source§impl Clone for BatteryAgingModel
impl Clone for BatteryAgingModel
Source§fn clone(&self) -> BatteryAgingModel
fn clone(&self) -> BatteryAgingModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BatteryAgingModel
impl RefUnwindSafe for BatteryAgingModel
impl Send for BatteryAgingModel
impl Sync for BatteryAgingModel
impl Unpin for BatteryAgingModel
impl UnsafeUnpin for BatteryAgingModel
impl UnwindSafe for BatteryAgingModel
Blanket Implementations§
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
Mutably borrows from an owned value. Read more