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: f64Solid-state diffusivity of Li⁺ [m²/s].
particle_radius: f64Particle radius [m].
c_surface: f64Surface concentration [mol/m³].
c_bulk: f64Bulk (centre) concentration [mol/m³].
c_max: f64Maximum Li concentration [mol/m³].
Implementations§
Source§impl DiffusionInElectrode
impl DiffusionInElectrode
Sourcepub fn new(
diffusivity: f64,
particle_radius: f64,
c_surface: f64,
c_bulk: f64,
) -> Self
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.
Sourcepub fn with_c_max(
diffusivity: f64,
particle_radius: f64,
c_surface: f64,
c_bulk: f64,
c_max: f64,
) -> Self
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.
Sourcepub fn concentration_profile(&self, r: f64) -> f64
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²
Sourcepub fn diffusion_length(&self) -> f64
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).
Sourcepub fn diffusion_time_scale(&self) -> f64
pub fn diffusion_time_scale(&self) -> f64
Diffusion time scale [s]: τ = R² / D.
Sourcepub fn max_c_rate(&self) -> f64
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.
Sourcepub fn surface_concentration_gradient(&self) -> f64
pub fn surface_concentration_gradient(&self) -> f64
Surface concentration gradient [mol/m⁴] approximation (linear).
dc/dr|_R ≈ (c_surface − c_bulk) / R
Sourcepub fn soc_from_concentration(&self) -> f64
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).
Sourcepub fn surface_flux(&self) -> f64
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
impl Clone for DiffusionInElectrode
Source§fn clone(&self) -> DiffusionInElectrode
fn clone(&self) -> DiffusionInElectrode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more