pub enum SmrReaction {
Reforming,
WaterGasShift,
}Expand description
Which of the two independent reactions.
Variants§
Implementations§
Source§impl SmrReaction
impl SmrReaction
Sourcepub const BOTH: [SmrReaction; 2]
pub const BOTH: [SmrReaction; 2]
Both, in the order smr_reactions returns them.
Sourcepub fn stoichiometry(self) -> [(Species, f64); 4]
pub fn stoichiometry(self) -> [(Species, f64); 4]
Signed stoichiometry νᵢ — negative reactant, positive product.
Sourcepub fn base_reactant(self) -> Species
pub fn base_reactant(self) -> Species
The reaction’s base reactant — the species whose conversion normalises the extent.
Sourcepub fn delta_h(self) -> f64
pub fn delta_h(self) -> f64
Standard reaction enthalpy ΔH° at 298.15 K [J/mol of extent],
summed from crate::species formation enthalpies.
Positive is endothermic. Nothing here is a tabulated reaction
enthalpy — it is Σ νᵢ ΔH°f,ᵢ, so it cannot disagree with the species
table it is built from.
Sourcepub fn delta_s(self) -> f64
pub fn delta_s(self) -> f64
Standard reaction entropy ΔS° at 298.15 K [J/(mol·K)], summed from
absolute entropies as Σ νᵢ S°ᵢ.
Sourcepub fn delta_g(self, temperature_k: f64) -> f64
pub fn delta_g(self, temperature_k: f64) -> f64
Standard Gibbs energy of reaction at temperature_k [J/mol], on the
constant-ΔH°/ΔS° (van ’t Hoff) approximation: ΔG° = ΔH° − T ΔS°.
This is the model’s main thermodynamic approximation. Treating
ΔH° and ΔS° as temperature-independent ignores the ∫Cp dT and
∫Cp/T dT corrections, which over 298 K → 1200 K are not negligible.
It is the approximation EquilibriumConstant::GibbsVantHoff embodies,
and it is kept because the alternative — integrating heat capacities —
needs Cp(T) polynomials this crate would have to source and
catalogue. Stated so a reader does not mistake the equilibrium curve
for an exact one.
Sourcepub fn equilibrium_constant(self, temperature_k: f64) -> f64
pub fn equilibrium_constant(self, temperature_k: f64) -> f64
Equilibrium constant Kp(T) [-] on the standard-state partial
pressure basis: Kp = exp(−ΔG°(T)/(R T)), with each partial
pressure referred to P° = 1 bar.
This is the thermodynamic equilibrium constant. It is not the one
a concentration-basis rate law equilibrates to unless Δn = 0 — see
SmrReaction::kc.
Sourcepub fn delta_n(self) -> f64
pub fn delta_n(self) -> f64
Change in mole count, Δn = Σ νᵢ [-].
+2 for reforming (1 + 1 → 1 + 3) and 0 for the shift. It is the
whole reason kc exists.
Sourcepub fn kc(self, temperature_k: f64) -> f64
pub fn kc(self, temperature_k: f64) -> f64
Equilibrium constant on the molar concentration basis,
Kc = Π Cᵢ^νᵢ in (mol/m³)^Δn.
§Why this is not Kp, and why getting it wrong is expensive
Reaction::net_rate evaluates k_f·ΠC^d − k_r·ΠC^r in
concentrations, so the composition its rate law settles at
satisfies k_f/k_r = Kc, not Kp. For an ideal gas pᵢ = Cᵢ R T,
so
Kp = Kc · (R T / P°)^Δn => Kc = Kp · (P° / (R T))^ΔnFor the shift reaction Δn = 0 and the two coincide. For reforming
Δn = +2, and at 1123 K the factor (R T / P°)² is about 115 —
so using Kp where Kc belongs would put the reforming equilibrium
out by two orders of magnitude, in the direction of far too little
conversion. That is not a subtle error, but it is a silent one: the
reactor still converges, and still returns a plausible-looking number.
P° is 1 bar = 100 kPa, the standard state the formation data in
crate::species is tabulated at.
Trait Implementations§
Source§impl Clone for SmrReaction
impl Clone for SmrReaction
impl Copy for SmrReaction
Source§impl Debug for SmrReaction
impl Debug for SmrReaction
impl Eq for SmrReaction
Source§impl PartialEq for SmrReaction
impl PartialEq for SmrReaction
impl StructuralPartialEq for SmrReaction
Auto Trait Implementations§
impl Freeze for SmrReaction
impl RefUnwindSafe for SmrReaction
impl Send for SmrReaction
impl Sync for SmrReaction
impl Unpin for SmrReaction
impl UnsafeUnpin for SmrReaction
impl UnwindSafe for SmrReaction
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.