Method
MFC (served with a stated COD) — polarization closure
Three MFC models are in use. The lab MFC tiles use mfc-butler-volmer-monod-v2. /api/ml/predict, the MCP server and the chat assistant use mfc-mechanistic-closure-v1 when a request states a COD and Enhanced_MFC_Experimental when it does not. For the same design they can differ. mfc-butler-volmer-monod-v2Enhanced_MFC_Experimental
What it predicts
Peak areal power, current and voltage and coulombic efficiency for a stated reactor, read from its polarization curve, plus the operating point under a stated external resistance. No COD removal.
Governing relations
Each relation is transcribed from the implementation. Where the code cites no source, the source line says so.
Polarization curve Source: Python reference services/ml-engine/simulator/mes_anodic_oxidation.py, kept parity-tested; constants calibrated to the Logan-group MFC anchors.
Symbol Meaning Unit cell voltage V current density after the substrate limit A/m² open-circuit voltage by cathode and culture V areal internal resistance Ω·cm² pH overhead across a membrane 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 anode carbon-cloth material cathode pt-c material temperatureC 30 °C ph 7 pH codMgL 1,000 mg/L anodeAreaCm2 7 cm² Output · powerOutput = 301.92 mW/m², within ±0.1 %
By hand · Mixed anaerobic culture, air cathode, no membrane: OCV 0.75 V, R_int 3100 Ω·cm², read off the curve maximum of a 20-point sweep. The closure is numerical; this pins its result, not a hand calculation.
Reproduce · Pinned by libs/shared/ml/src/predictions/mfc-mechanistic.test.ts. Run it from the repository root:
pnpm exec jest -c libs/shared/electrochemistry/jest.config.js mfc-mechanistic.test.ts -t "powerOutput"
Internal resistance Source: The scale-up rule was attributed to Logan 2008 §6.3; that section was not matched to the book in the 2026-10 citation audit, so it stands as unverified.
Symbol Meaning Unit base resistance for the stated reactor Ω·cm² membrane multiplier 1 anode area above 50 cm² cm² Operating point Source: Load line on the polarization curve. Within-design, the direction of current against R_ext is right 71–78 % of the time; the location of the power peak is not (apps/lab design-sensitivity.ts).
Symbol Meaning Unit external resistance Ω
Assumptions and constants
- Mixed anaerobic culture and an air cathode unless stated; the receipt names them as defaults.
- Reactor constants are calibrated on Logan-group anchors; scores on reactors they were not tuned on are in docs/evals/published-anchors.json.
- Materials the closure does not tell apart scale R_int by the material table ratio to carbon cloth with Pt, itself hand-calibrated.
Corrections applied
- Monod, pH and Arrhenius factors on the exchange current.
Not modelled
- COD removal.
- Electrode spacing.
Literature anchors in the source
- Liu & Logan 2004, Environ. Sci. Technol. 38:4040
- Logan et al. 2007, Environ. Sci. Technol. 41:3341
- Picioreanu et al. 2007, Water Res 41:2921
Implementation
libs/shared/electrochemistry/src/mechanistic/anode-model.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 | MFC | 602 | 172 | 88.5% |
| cod_removal | MFC|bioremediation | 46 | 8 | 56.5% |
| cod_removal | MFC|power_generation | 134 | 41 | 88.8% |
| cod_removal | MFC|unknown | 53 | 8 | 85.7% |
| cod_removal | MFC|wastewater_treatment | 360 | 113 | 87.8% |
| coulombic_efficiency | MFC | 301 | 97 | 89.7% |
| coulombic_efficiency | MFC|power_generation | 107 | 31 | 86.9% |
| coulombic_efficiency | MFC|unknown | 30 | 10 | 73.7% |
| coulombic_efficiency | MFC|wastewater_treatment | 135 | 48 | 77.0% |
| current_density_areal | MFC | 496 | 134 | 89.3% |
| current_density_areal | MFC|power_generation | 208 | 54 | 88.0% |
| current_density_areal | MFC|unknown | 49 | 14 | 83.7% |
| current_density_areal | MFC|wastewater_treatment | 201 | 57 | 85.6% |
| power_density_areal | MFC | 871 | 245 | 88.9% |
| power_density_areal | MFC|bioremediation | 49 | 9 | 69.4% |
| power_density_areal | MFC|power_generation | 343 | 114 | 89.5% |
| power_density_areal | MFC|unknown | 106 | 24 | 85.8% |
| power_density_areal | MFC|wastewater_treatment | 350 | 91 | 85.4% |
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 |
|---|---|---|---|---|
| power_density_areal | MFC | curated | 275 | weakly_informative |
| current_density_areal | MFC | curated | 150 | weakly_informative |
| coulombic_efficiency | MFC | curated | 96 | literature |
| cod_removal | MFC | calibrated | 183 | 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-28T19:44:43.057561+00:00.
| rule | baselined |
|---|---|
| gate-honestyNo parameter may pass a rounded-threshold gate read while converged=false | 0 |
| support-containmentBounded quantities must have ci95 (and pi95 when present) inside physical support, width <= range | 34 |
| 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 | 1 |
| 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 | 76 |
| effects-gap-completenesseffects.json is schema 2.0; every non-high effect has a gap per archetype; no gap is "high" | 0 |