Skip to main content

DiffusionInElectrode

Struct DiffusionInElectrode 

Source
pub struct DiffusionInElectrode {
    pub diffusivity: f64,
    pub particle_radius: f64,
    pub c_surface: f64,
    pub c_bulk: f64,
    pub c_max: f64,
}
Expand description

Solid-state Li diffusion inside a spherical electrode particle.

Models concentration profiles and C-rate limitations using Fick’s second law in spherical coordinates.

Fields§

§diffusivity: f64

Solid-state diffusivity of Li⁺ [m²/s].

§particle_radius: f64

Particle radius [m].

§c_surface: f64

Surface concentration [mol/m³].

§c_bulk: f64

Bulk (centre) concentration [mol/m³].

§c_max: f64

Maximum Li concentration [mol/m³].

Implementations§

Source§

impl DiffusionInElectrode

Source

pub fn new( diffusivity: f64, particle_radius: f64, c_surface: f64, c_bulk: f64, ) -> Self

Construct a new DiffusionInElectrode with default c_max = 30_000.0.

Source

pub fn with_c_max( diffusivity: f64, particle_radius: f64, c_surface: f64, c_bulk: f64, c_max: f64, ) -> Self

Construct with explicit maximum concentration.

Source

pub fn concentration_profile(&self, r: f64) -> f64

Approximate radial concentration profile [mol/m³] at fractional radius r ∈ [0, 1].

Uses a parabolic (pseudo-steady-state) profile: c(r) = c_bulk + (c_surface − c_bulk) × r²

Source

pub fn diffusion_length(&self) -> f64

Characteristic diffusion length [m].

L_d = sqrt(D × t_ref) where t_ref = R² / D (time to diffuse across particle).

Source

pub fn diffusion_time_scale(&self) -> f64

Diffusion time scale [s]: τ = R² / D.

Source

pub fn max_c_rate(&self) -> f64

Maximum C-rate [1/h] at which the particle can be fully discharged.

Defined as C_max = 1 / τ_diff [h⁻¹] where τ_diff = R² / (π² D). Higher diffusivity or smaller particle → higher accessible C-rate.

Source

pub fn surface_concentration_gradient(&self) -> f64

Surface concentration gradient [mol/m⁴] approximation (linear).

dc/dr|_R ≈ (c_surface − c_bulk) / R

Source

pub fn soc_from_concentration(&self) -> f64

State of charge estimated from average concentration: SOC = c_avg / c_max.

Average concentration for parabolic profile: c_avg = c_bulk + 3/5 (c_surf - c_bulk).

Source

pub fn surface_flux(&self) -> f64

Flux at the surface [mol/(m²·s)] using Fick’s law.

J = −D × dc/dr|_R

Trait Implementations§

Source§

impl Clone for DiffusionInElectrode

Source§

fn clone(&self) -> DiffusionInElectrode

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 DiffusionInElectrode

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> 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 = Infallible

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.