A hydrogen-storage alloy (LaNi₅, TiFe, MgH₂, …) reacts reversibly with H₂ gas: M + (x/2) H₂ ↔ MHx. Absorption is exothermic (releases heat); desorption is endothermic (needs heat input) — the same reaction, run in reverse.
At a fixed bed temperature T, the plateau (equilibrium) pressure Peq is set by the van 't Hoff equation, using the reaction's desorption enthalpy ΔH and entropy ΔS:
ln(P_eq / 1 bar) = -ΔH / (R·T) + ΔS / R
R = 8.314 J·mol⁻¹·K⁻¹
ΔH > 0 (endothermic desorption)
ΔS ≈ 130 J·mol⁻¹·K⁻¹ (entropy of releasing H₂ gas)
Whether the bed charges or discharges depends only on how the applied pressure P compares to Peq(T):
- P > Peq — hydrogen is driven into the lattice (absorption / charging), releasing heat that must be removed to sustain the reaction.
- P < Peq — hydrogen leaves the lattice (desorption / discharging), consuming heat that must be supplied.
- P ≈ Peq — the bed sits on the flat plateau of the PCT (pressure–composition–temperature) isotherm, where composition can change at nearly constant pressure.
Real beds also show hysteresis: the absorption plateau sits slightly above the desorption plateau, so a small pressure gap does nothing — visible here as a dead zone around Peq. This simulator integrates a simple rate law dθ/dt ∝ (P − Peq) for the hydrided fraction θ and tracks the resulting heat flow, storage capacity (wt% H₂) and H/M occupancy in real time.
Real-world relevance: this is the operating principle of metal-hydride hydrogen tanks used in forklifts, submarines and stationary storage — safer and denser than compressed gas, at the cost of the alloy's own weight and the need to manage the heat of reaction.