Skip to main content

DiffusionLayer

Struct DiffusionLayer 

Source
pub struct DiffusionLayer {
    pub thickness: f64,
    pub diffusivity: f64,
    pub bulk_concentration: f64,
}
Expand description

Nernst diffusion layer model.

Models mass-transport limitations across a stagnant diffusion layer.

Fields§

§thickness: f64

Diffusion layer thickness δ (m)

§diffusivity: f64

Diffusivity D (m²/s)

§bulk_concentration: f64

Bulk concentration C_bulk (mol/m³)

Implementations§

Source§

impl DiffusionLayer

Source

pub fn new(thickness: f64, d: f64, c_bulk: f64) -> Self

Create a new DiffusionLayer.

Source

pub fn limiting_current(&self, n_electrons: u32, f_const: f64, area: f64) -> f64

Limiting current density.

j_L = n · F · D · C_bulk / δ

§Arguments
  • n_electrons — number of electrons transferred per mole of reactant
  • f_const — Faraday constant (C/mol)
  • area — electrode area (m²)
Source

pub fn concentration_at_surface( &self, current_density: f64, n_electrons: u32, f_const: f64, ) -> f64

Concentration at the electrode surface.

C_s = C_bulk − j · δ / (n · F · D)

§Arguments
  • current_density — current density (A/m²)
  • n_electrons — electrons per mole
  • f_const — Faraday constant (C/mol)
Source

pub fn diffusion_overpotential( &self, c_surface: f64, _temp: f64, f_over_rt: f64, ) -> f64

Diffusion overpotential.

η_d = (RT/F) · ln(C_s / C_bulk)

§Arguments
  • c_surface — surface concentration (mol/m³)
  • temp — temperature (K) — kept for API symmetry; used implicitly via f_over_rt
  • f_over_rt — F / (R·T) (1/V)

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> 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, 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.