Method
MEC — Volmer-Heyrovsky hydrogen evolution
What it predicts
Volumetric H₂ production rate, cathodic hydrogen recovery and applied-voltage energy efficiency for a driven MEC.
Governing relations
Each relation is transcribed from the implementation. Where the code cites no source, the source line says so.
Voltage budget solved for the current Source: Voltage budget with R_int = 0.04 Ω·m² per cm; mec.ts cites no source for it.
Symbol Meaning Unit applied cell voltage (default 0.6) V acetate-anode / H₂-cathode equilibrium voltage, −0.13 V anode and cathode overpotentials at current j V kinetic current density A/m² internal resistance Ω·m² electrode spacing, floor 0.1 cm Anode Tafel term Source: j₀ = 1.0 A/m² for a Geobacter biofilm on graphite brush, attributed in mec.ts to Logan 2008 Table 4.1 and not re-checked against the book (2026-10 citation audit).
The MEC anode is a Tafel term, not the Butler-Volmer solve the MFC predictor uses; both share the Arrhenius and Monod factors from anode-kinetics.ts.
Symbol Meaning Unit anode overpotential V Geobacter anode Tafel slope V/dec anode exchange current density after temperature and substrate factors A/m² activation energy, 25 000 J/mol influent COD and its half-saturation constant mg/L Cathode HER overpotential (Tafel form) Source: Approximate HER exchange-current table and Tafel slopes; mec.ts cites no source for it.
The j₀ table is labelled approximate in the code; the spread is wide.
Symbol Meaning Unit cathode hydrogen-evolution overpotential V Tafel slope V/dec slope multiplier: 1 for a Pt cathode, 4 for carbon, 2 otherwise 1 HER exchange current density: 10 on Pt/C, 0.02 on stainless steel, 0.005 on plain carbon, 0.05 default A/m² Substrate-electron ceiling on the current Source: COD stoichiometry, 1 mol O₂ = 32 g COD = 4 mol e⁻ (electron-supply.ts).
An absolute ceiling: it assumes 100 % COD removal and 100 % coulombic efficiency, so it errs toward permitting too much current.
Symbol Meaning Unit current the voltage budget can drive A/m² influent COD (g/m³ equals mg/L) g/m³ hydraulic retention time h chamber volume (default 28 mL) m³ anode area (default 0.024) m² grams COD per mole of electrons (32 g O₂ per 4 e⁻) g/mol H₂ rate from Faraday Source: Faraday's law; magnitude anchor Cheng & Logan 2007, PNAS 104:18871 (1.1 m³ H₂/m³·day at 0.6 V). · doi:10.1073/pnas.0706379104
Symbol Meaning Unit volumetric hydrogen production rate at STP m³ H₂/m³·day operating current density A/m² anode area m² molar gas volume at 0 °C and 1 atm, 22.414 L/mol cathodic hydrogen recovery (default 0.85) 1 chamber volume m³ Applied-voltage energy efficiency Source: Logan et al. 2008, Environ. Sci. Technol. 42:8630. · doi:10.1021/es801553z
With coulombic efficiency taken as 100 %, current cancels and η_E depends on V_app alone. The code flags it `appliedVoltageEfficiencyIsIdentity`: a thermodynamic ceiling, not a modelled result.
Symbol Meaning Unit electrical energy efficiency; above 100 % is expected because the substrate supplies the balance 1 hydrogen recovered over time t mol higher heating value of H₂, 285 800 J/mol cathodic hydrogen recovery 1 applied cell voltage V Worked example
These inputs, passed to the predictor, return the output below. A test re-runs the example on every change, so this number is the one the code produces.
input value unit temperatureC 25 °C ph 7 pH electrodeSpacingCm 2 cm hrtHours 24 h codMgL 1,000 mg/L cellVoltageV 0.6 V Output · mec.appliedVoltageEfficiency = 209.8 %, within ±0.1 %
By hand · r_H₂ = 0.85 (default). η_E = 0.85 × 285 800 / (2 × 96 485.33 × 0.6) = 242 930 / 115 782.4 = 2.098, i.e. 209.8 %. The current (0.163 A/m², substrate-limited) cancels.
Reproduce · Pinned by libs/shared/electrochemistry/src/predictors/worked-examples.test.ts. Run it from the repository root:
pnpm exec jest -c libs/shared/electrochemistry/jest.config.js worked-examples.test.ts -t "mec.appliedVoltageEfficiency"
Assumptions and constants
- Anode: Tafel term with a 45 mV/dec slope and j₀ = 1 A/m² at 25 °C and saturating substrate, scaled by the shared Arrhenius and Monod factors (anode-kinetics.ts).
- b_HER = 30 mV/dec on Pt, ×4 on carbon, ×2 otherwise; j₀_HER = 10 A/m² on Pt/C, 0.02 on stainless steel, 0.005 on plain carbon, 0.05 by default.
- Coulombic-to-hydrogen recovery r_H₂ defaults to 0.85 (range 0.6–0.95; lower with active methanogens).
- Defaults when not supplied: V_app = 0.6 V, chamber 28 mL, anode area 0.024 m².
- H₂ volume reported at STP (0 °C, 1 atm).
Corrections applied
- Substrate-limited current cap from the COD supply (`substrateLimited`).
Not modelled
- COD removal and coulombic efficiency: both need a substrate mass balance the snapshot solver does not have, so they are returned as not computed.
Literature anchors in the source
- Liu, Grot & Logan 2005, Environ. Sci. Technol. 39:4317
- Cheng & Logan 2007, PNAS 104:18871 · doi:10.1073/pnas.0706379104
- Call & Logan 2008, Environ. Sci. Technol. 42:3401
- Logan et al. 2008, Environ. Sci. Technol. 42:8630 · doi:10.1021/es801553z
- Logan & Rabaey 2012
Implementation
libs/shared/electrochemistry/src/predictors/mec.ts
Interval the predictor ships
heuristic_fixed_fraction — A fixed ±25 % placeholder band. It is NOT a calibrated interval; when served through /api/ml/predict it is replaced by the benchmark band below, or withheld. How served intervals are built
Calibration artifacts used when served
- Benchmark out-of-fold residual quantiles: bes-benchmark-v1 · gkf5 · generated 2026-09-09
- Split-conformal calibration: split-conformal · generated 2026-05-21
- Hierarchical-priors v2 trust snapshot: populated · generated 2026-05-16
Benchmark cells for this predictor’s systems
Each row is a stratum with n ≥ 30 residuals at nominal level 90%. Coverage is the cross-validated share of held-out points inside the band.
| target | stratum | n | papers | coverageCV |
|---|---|---|---|---|
| cod_removal | MEC | 122 | 30 | 85.2% |
| cod_removal | MEC|wastewater_treatment | 65 | 14 | 83.1% |
| coulombic_efficiency | MEC | 107 | 24 | 88.8% |
| coulombic_efficiency | MEC|resource_recovery | 66 | 10 | 84.8% |
| current_density_areal | MEC | 107 | 23 | 86.0% |
| current_density_areal | MEC|resource_recovery | 30 | 8 | 100.0% |
| current_density_areal | MEC|wastewater_treatment | 56 | 9 | 76.8% |
Prior trust by served parameter
The state the lab badge shows for each served parameter and system, from the v2 priors fit.
| parameter | system | state | papers | prior |
|---|---|---|---|---|
| current_density_areal | MEC | modeled | 21 | weakly_informative |
| coulombic_efficiency | MEC | curated | 23 | literature |
| cod_removal | MEC | curated | 29 | weakly_informative |
Scientific-rigor gates
pnpm verify:science runs these rules over the committed priors and validation artifacts in pre-commit. Known violations are baselined per rule and slug; a new one blocks the commit. Baseline from hierarchical-priors-v2.json@2026-10-26T00:10:47.721880+00:00.
| rule | baselined |
|---|---|
| gate-honestyNo parameter may pass a rounded-threshold gate read while converged=false | 1 |
| support-containmentBounded quantities must have ci95 inside physical support, width <= range | 3 |
| magnitude-sanityNo ci95 bound may exceed the plausibility ceiling (1.0e+6) | 0 |
| slug-uniquenessNo two slugs may share a spelling-independent identity; scale must agree | 2 |
| secondary-source-purityNo fitted prior may carry a REVIEW (secondary-source) stratum | 0 |
| artifact-pairingEach fit must have its own coverage evidence; the served fit must have some | 0 |
| coverage-sharpnessAny coverage figure must ship its interval width alongside | 0 |
| interval-calibrationHeld-out interval coverage per parameter may not newly degrade | 128 |
| effects-gap-completenesseffects.json is schema 2.0; every non-high effect has a gap per archetype; no gap is "high" | 0 |