Skip to main content

FuelCellStack

Struct FuelCellStack 

Source
pub struct FuelCellStack {
    pub e_rev: f64,
    pub i0: f64,
    pub tafel_slope: f64,
    pub r_ohmic: f64,
    pub i_lim: f64,
    pub m_conc: f64,
    pub n_conc: f64,
}
Expand description

Hydrogen PEM fuel cell polarisation curve model.

Total overpotential = activation loss + ohmic loss + concentration loss.

Fields§

§e_rev: f64

Reversible (Nernst) cell voltage [V]

§i0: f64

Exchange current density i₀ [A/m²]

§tafel_slope: f64

Tafel slope for activation loss [V/decade] (positive value)

§r_ohmic: f64

Ohmic area-specific resistance [Ω·m²]

§i_lim: f64

Limiting current density i_L [A/m²]

§m_conc: f64

Concentration loss empirical coefficient m [V]

§n_conc: f64

Concentration loss empirical coefficient n [m²/A]

Implementations§

Source§

impl FuelCellStack

Source

pub fn new( e_rev: f64, i0: f64, tafel_slope: f64, r_ohmic: f64, i_lim: f64, m_conc: f64, n_conc: f64, ) -> Self

Create a new fuel cell stack model.

Source

pub fn activation_loss(&self, j: f64) -> f64

Activation overpotential [V] at current density j [A/m²].

η_act = tafel_slope · log10(j / i0)

Source

pub fn ohmic_loss(&self, j: f64) -> f64

Ohmic overpotential [V] at current density j [A/m²].

η_ohm = R_ohmic · j

Source

pub fn concentration_loss(&self, j: f64) -> f64

Concentration overpotential [V] at current density j [A/m²].

η_conc = m · exp(n · j)

Source

pub fn cell_voltage(&self, j: f64) -> f64

Cell terminal voltage [V] at current density j [A/m²].

V = E_rev − η_act − η_ohm − η_conc

Returns 0.0 if j ≥ i_lim (cell has stalled).

Source

pub fn power_density(&self, j: f64) -> f64

Power density [W/m²] at current density j [A/m²].

Source

pub fn efficiency(&self, j: f64) -> f64

Efficiency relative to reversible voltage.

η = V_cell / E_rev

Trait Implementations§

Source§

impl Clone for FuelCellStack

Source§

fn clone(&self) -> FuelCellStack

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 FuelCellStack

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.