This is a diffusion-limited (shrinking-core) model of the same reaction as the 3D version, M + (x/2) H₂ ↔ MHx — but instead of treating the whole bed as one instantaneously well-mixed number, it resolves hydrogen concentration c(r,t) radially inside a single spherical grain by solving Fick's second law in spherical coordinates on a finite-volume grid:
∂c/∂t = D(T)·(1/r²)·∂/∂r( r²·∂c/∂r )
Surface (r=R): gas exchange only, no diffusive leak through the boundary
reaction rate = k·ln(P/P_eq·(1±hyst)) (same driving force as the 3D sim, applied only at the surface)
Center (r=0): symmetry, ∂c/∂r = 0
Diffusivity: D(T) = D₀·exp(−E_a / R·T) (Arrhenius, illustrative order-of-magnitude values)
The equilibrium plateau pressure Peq(T) still comes from the exact same van 't Hoff equation as the 3D sim (ΔH, ΔS per alloy), so the thermodynamics are identical — only the kinetics are modelled differently. Hydrogen enters or leaves at the grain surface first, then has to physically diffuse through the already-reacted shell to reach the untransformed core, so a real concentration front propagates inward (charging) or outward (discharging) instead of the whole bed changing at once.
- Surface vs. core occupancy — watch the surface respond almost immediately to a pressure change while the core lags behind; the gap between them is the diffusion front.
- Diffusivity D(T) — an Arrhenius law per alloy. MgH2's diffusivity is deliberately given a much higher activation energy: at 300 K it becomes almost zero, so the grain gets kinetically "frozen" — a real, well-known property of magnesium hydride that is exactly why practical Mg-H2 tanks must run hot, unlike room-temperature LaNi5 or TiFe beds.
- Volume-weighted average — the wt% bar integrates c(r) over the grain's volume (∝ r²), not a simple average across shells, so the outer (larger-volume) shells count for more — the same weighting used to verify mass conservation in this model.
Real-world relevance: diffusion through a growing/shrinking reacted layer is the textbook rate-limiting mechanism for many gas–solid reactions, and is specifically why magnesium-based hydrides — despite storing far more hydrogen by weight than LaNi5 — are much harder to charge and discharge quickly without added heat or nanostructuring to shorten the diffusion path.