pub struct ElectrolyzerStack {
pub n_cells: usize,
pub cell_area_cm2: f64,
pub temperature_c: f64,
pub pressure_bar: f64,
pub exchange_current_density: f64,
pub alpha: f64,
pub membrane_resistance_ohm_cm2: f64,
}Expand description
Electrolyzer stack model based on IV (current-voltage) curves.
Models the electrochemical cell behaviour using Butler-Volmer kinetics for activation overpotential, linear ohmic resistance for membrane loss, and a temperature-corrected reversible voltage.
Fields§
§n_cells: usizeNumber of cells in series
cell_area_cm2: f64Active cell area [cm²]
temperature_c: f64Operating temperature [°C]
pressure_bar: f64Operating pressure [bar]
exchange_current_density: f64Exchange current density [A/cm²] (Butler-Volmer parameter)
alpha: f64Charge transfer coefficient α (Butler-Volmer)
membrane_resistance_ohm_cm2: f64Membrane area-specific resistance [Ω·cm²]
Implementations§
Source§impl ElectrolyzerStack
impl ElectrolyzerStack
Sourcepub fn new(n_cells: usize, cell_area_cm2: f64) -> Self
pub fn new(n_cells: usize, cell_area_cm2: f64) -> Self
Create a new electrolyzer stack with default parameters for a PEM cell.
Sourcepub fn cell_voltage(&self, current_density_a_cm2: f64) -> f64
pub fn cell_voltage(&self, current_density_a_cm2: f64) -> f64
Compute single cell voltage at a given current density [A/cm²].
V_cell = V_rev + V_act + V_ohm
- V_rev: temperature- and pressure-corrected reversible voltage
- V_act: Butler-Volmer activation overpotential (anodic dominant)
- V_ohm: Ohmic overpotential from membrane resistance
Sourcepub fn operating_point(&self, current_density_a_cm2: f64) -> (f64, f64)
pub fn operating_point(&self, current_density_a_cm2: f64) -> (f64, f64)
Compute stack operating point at a given current density.
Returns (power_kw, h2_kg_per_h).
H2 production follows Faraday’s law: ṁ_H2 = (n_cells * I * M_H2) / (n_e * F) [g/s] → [kg/h]
Sourcepub fn efficiency(&self, current_density_a_cm2: f64) -> f64
pub fn efficiency(&self, current_density_a_cm2: f64) -> f64
Stack efficiency at given current density (LHV basis, using HHV here for consistency).
Auto Trait Implementations§
impl Freeze for ElectrolyzerStack
impl RefUnwindSafe for ElectrolyzerStack
impl Send for ElectrolyzerStack
impl Sync for ElectrolyzerStack
impl Unpin for ElectrolyzerStack
impl UnsafeUnpin for ElectrolyzerStack
impl UnwindSafe for ElectrolyzerStack
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.