Methods

Method

MFC (served by the API) — calibrated material table

Enhanced_MFC_Experimental · anodic_oxidation · MFC

Two 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 Enhanced_MFC_Experimental. For the same design they can differ. Whether to unify them is an open decision for the maintainers. mfc-butler-volmer-monod-v2

What it predicts

Areal power density, coulombic efficiency, cell voltage and current density for an MFC as served by /api/ml/predict, the MCP server and the chat assistant. An empirical lookup over anode and cathode materials, not an electrochemical model.

Governing relations

Each relation is transcribed from the implementation. Where the code cites no source, the source line says so.

  1. Areal power (mW/m²)
    P=min⁡ ⁣(30000, max⁡ ⁣(50, Panodemin⁡ ⁣(1+0.3 PcathodePanode, 2)s fT fpH))P = \min\!\left(30000,\ \max\!\left(50,\ P_{\mathrm{anode}} \min\!\left(1 + 0.3\,\frac{P_{\mathrm{cathode}}}{P_{\mathrm{anode}}},\ 2\right) s\, f_T\, f_{\mathrm{pH}}\right)\right)

    Source: Hand-calibrated material table, cathode-enhancement and synergy multipliers in enhanced-performance-models.ts; the file cites no source (calibration note 2026-07).

    SymbolMeaningUnit
    PPareal power density, clamped to the MFC rangemW/m²
    Panode, PcathodeP_{\mathrm{anode}},\ P_{\mathrm{cathode}}per-material base power from the hand-calibrated table; the catalog peak power for a material with no entrymW/m²
    ssanode × cathode synergy multiplier from a pair table; 1.0 for a pair not listed1
    fT, fpHf_T,\ f_{\mathrm{pH}}temperature and pH factors below1

    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.

    inputvalueunit
    anodecarbon-feltmaterial
    cathodept-cmaterial
    temperatureC25°C
    ph7pH

    Output · powerOutput = 3,172 mW/m², within ±0.1 %

    By hand · Carbon felt 2600 and Pt/C 3800 mW/m² base power: 2600 × min(1 + 0.3 × 3800/2600, 2) = 2600 + 1140 = 3740. Synergy 1.1 gives 4114. f_T = exp(−|25 − 30| / 20) = exp(−0.25) = 0.7788; pH_opt = (7.2 + 7.0)/2 = 7.1, so f_pH = exp(−0.01) = 0.9900. P = 4114 × 0.7788 × 0.9900 = 3172 mW/m², inside [50, 30000].

    Reproduce · Pinned by libs/shared/ml/src/__tests__/served-mfc-registry.test.ts. Run it from the repository root:

    pnpm exec jest -c libs/shared/electrochemistry/jest.config.js served-mfc-registry.test.ts -t "powerOutput"
  2. Temperature factor
    fT=exp⁡ ⁣(−∣T−Topt∣20),Topt=30 ∘Cf_T = \exp\!\left(-\frac{\lvert T - T_{\mathrm{opt}}\rvert}{20}\right), \qquad T_{\mathrm{opt}} = 30\,^{\circ}\mathrm{C}

    Source: Exponential decay in enhanced-performance-models.ts (calculateTemperatureFactor); no source cited.

    SymbolMeaningUnit
    TToperating temperature°C
    ToptT_{\mathrm{opt}}the MFC profile’s optimum temperature°C
  3. pH factor
    fpH=exp⁡ ⁣[−(pH−pHopt1.0)2]f_{\mathrm{pH}} = \exp\!\left[-\left(\frac{\mathrm{pH} - \mathrm{pH}_{\mathrm{opt}}}{1.0}\right)^{2}\right]

    Source: Gaussian factor in enhanced-performance-models.ts (calculatePHFactor); no source cited.

    SymbolMeaningUnit
    pH\mathrm{pH}operating pHpH
    pHopt\mathrm{pH}_{\mathrm{opt}}mean of the anode and cathode table optima; 7.0 for a material with no entrypH
  4. Coulombic efficiency (%)
    CE=min⁡ ⁣(95, max⁡ ⁣(10, 65.2 min⁡ ⁣(1, σanode2000)e−(T−3215)2e−(pH−71.5)2))CE = \min\!\left(95,\ \max\!\left(10,\ 65.2\,\min\!\left(1,\ \frac{\sigma_{\mathrm{anode}}}{2000}\right) e^{-\left(\frac{T - 32}{15}\right)^{2}} e^{-\left(\frac{\mathrm{pH} - 7}{1.5}\right)^{2}}\right)\right)

    Source: Base CE 65.2 % ("average from experimental data") and Gaussian factors in enhanced-performance-models.ts (predictCoulombicEfficiency); no source cited.

    SymbolMeaningUnit
    CECEcoulombic efficiency, clamped to [10, 95]%
    σanode\sigma_{\mathrm{anode}}catalog conductivity of the anode; above 2,000 S/m it no longer limits CES/m
    TToperating temperature°C
    pH\mathrm{pH}operating pHpH
  5. Cell voltage heuristic (V)
    V=min⁡ ⁣(0.8, max⁡ ⁣(0.2, 0.45+0.1 log⁡10 ⁣(P1000+1)))V = \min\!\left(0.8,\ \max\!\left(0.2,\ 0.45 + 0.1\,\log_{10}\!\left(\frac{P}{1000} + 1\right)\right)\right)

    Source: Heuristic in serverless-predictor.ts ("typical MFC: 0.2–0.8 V"); no source cited.

    SymbolMeaningUnit
    VVcell voltage, a heuristic of power, not a polarisation solveV
    PPareal power density from the first relationmW/m²
  6. Current density (mA/m²)
    j=PVj = \frac{P}{V}

    Source: Definition of electrical power, P = j·V.

    SymbolMeaningUnit
    jjcurrent densitymA/m²
    PPareal power densitymW/m²
    VVcell voltage heuristicV

Assumptions and constants

  • P_anode and P_cathode are per-material base powers from a hand-calibrated table. Calibration note (2026-07): they are the TYPICAL areal power a cell on that material reaches, rescaled from record values (one 636 W/m² novel-electrode paper) to the literature-typical 0.1–2 W/m² band; the material ordering and the temperature, pH and synergy multipliers were kept.
  • s(anode, cathode) is a synergy multiplier from a small pair table; a pair not listed is 1.0.
  • A catalog material with no table entry uses the catalog peak power density as its base power, pH optimum 7.0 and a paper count of 1.
  • σ_anode is the catalog conductivity in S/m.
  • Power confidence = min(0.95, (papers_anode + papers_cathode) / 30 + 0.5) from the table paper counts; CE confidence is the anode table reliability (0.7 for a material with no entry); voltage and current carry a fixed 0.9.

Corrections applied

None stated in the source.

The predictor’s source file declares nothing in this section, so nothing is hidden here. Add it to the registry entry to show it.

Not modelled

  • No electrode kinetics: power does not depend on overpotential, substrate, COD, HRT or geometry.
  • The anode surface area is accepted but unused (area factor 1.0).
  • Voltage and current are a heuristic of power, not a polarisation solve.
  • The table carries a per-material temperatureCoeff that no calculation reads; temperature acts only through f_T.

Literature anchors in the source

None stated in the source.

The predictor’s source file declares nothing in this section, so nothing is hidden here. Add it to the registry entry to show it.

Implementation

libs/shared/ml/src/enhanced-performance-models.ts

Interval the predictor ships

none — The predictor ships no band of its own. Served through /api/ml/predict, power, current, coulombic efficiency and COD removal get the benchmark out-of-fold band below, or no interval when no benchmark cell is large enough. Voltage gets no interval. How served intervals are built

Calibrated material table

The base powers and pH optima the served number is computed from, as the code holds them.

Anodes

materialbase powermW/m²pH optimumpapersreliability
copper-cathode2800750.85
carbon-felt26007.2120.95
graphite-plate1700780.9
carbon-cloth15007.1150.9
cnt-mat4200760.8
nickel-foam13006.830.85

Cathodes

materialbase powermW/m²pH optimumpapersreliability
pt-c38007180.95
fe-n-c24007.280.8
copper-cathode2000740.85
plain-carbon12007.1100.9
activated-carbon16007.570.85

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.

targetstratumnpaperscoverageCV
cod_removalMFC60217288.5%
cod_removalMFC|bioremediation46856.5%
cod_removalMFC|power_generation1344188.8%
cod_removalMFC|unknown53885.7%
cod_removalMFC|wastewater_treatment36011387.8%
coulombic_efficiencyMFC3019789.7%
coulombic_efficiencyMFC|power_generation1073186.9%
coulombic_efficiencyMFC|unknown301073.7%
coulombic_efficiencyMFC|wastewater_treatment1354877.0%
current_density_arealMFC49613489.3%
current_density_arealMFC|power_generation2085488.0%
current_density_arealMFC|unknown491483.7%
current_density_arealMFC|wastewater_treatment2015785.6%
power_density_arealMFC87124588.9%
power_density_arealMFC|bioremediation49969.4%
power_density_arealMFC|power_generation34311489.5%
power_density_arealMFC|unknown1062485.8%
power_density_arealMFC|wastewater_treatment3509185.4%

Prior trust by served parameter

The state the lab badge shows for each served parameter and system, from the v2 priors fit.

parametersystemstatepapersprior
power_density_arealMFCcurated275weakly_informative
current_density_arealMFCcurated150weakly_informative
coulombic_efficiencyMFCcurated96literature
cod_removalMFCcalibrated183weakly_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.

rulebaselined
gate-honestyNo parameter may pass a rounded-threshold gate read while converged=false1
support-containmentBounded quantities must have ci95 inside physical support, width <= range3
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 agree2
secondary-source-purityNo fitted prior may carry a REVIEW (secondary-source) stratum0
artifact-pairingEach fit must have its own coverage evidence; the served fit must have some0
coverage-sharpnessAny coverage figure must ship its interval width alongside0
interval-calibrationHeld-out interval coverage per parameter may not newly degrade128
effects-gap-completenesseffects.json is schema 2.0; every non-high effect has a gap per archetype; no gap is "high"0