β’ Three Biogeochemistry Engines
Section 01: NATIVE_BGC_FLEX
β’ Kinetic Reactions
β’ Host Model Variables
β’ JSON Configuration
Section 02: Thermodynamic Extension
β’ FT Factor Theory
β’ Gibbs Energy Constraints
β’ Redox Ladder
Section 03: PHREEQC
β’ Equilibrium Geochemistry
β’ Input Files (.pqi + .dat)
β’ Integration with OpenWQ
β’ Selected Outputs
β’ Comparison & When to Use
β’ Available Templates
Each transformation is defined by four elements:
ββββββββββ nitrification ββββββββββ
β NHββΊ β ββββββββββββββββΆ β NOββ» β
ββββββββββ ββββββββββ
Rate = k Γ [NHβ] Γ f(Oβ) Γ f(T)
ββββββββββ denitrification ββββββββββ
β NOββ» β ββββββββββββββββΆ β Nβ β
ββββββββββ ββββββββββ
Rate = k Γ [NOβ] Γ f(DOC) Γ g(Oβ)
| Math | exp, log, sqrt, abs, pow |
| Trig | sin, cos, tan |
| Compare | min, max, clamp |
| Logic | if(cond, true, false) |
T β Temperature (Β°C)[species] β Any defined species// Define chemical species "CHEMICAL_SPECIES": { "list": { "1": "NO3_N", "2": "NH4_N", "3": "DOC", "4": "DO" }, "BGC_GENERAL_MOBILE_SPECIES": ["NO3_N", "NH4_N", "DOC", "DO"] } // Define transformation "CYCLING_FRAMEWORKS": { "NITROGEN_CYCLE": { "1": { "_name": "nitrification", "consumed": "NH4_N", "produced": "NO3_N", "kinetics": ["k_nitrif * NH4_N * (DO/(Km_DO+DO)) * 1.047^(T-20)", "mg-N/L/day"], "parameter_values": { "k_nitrif": 0.1, "Km_DO": 0.5 } } } }
Uses inhibition terms (Ki) to suppress reactions:
β οΈ Empirical β requires calibration of Ki
Microbes use electron acceptors in order of energy yield:
β The "redox ladder" β thermodynamically controlled
| Symbol | Description | Value |
|---|---|---|
| ΞGavail | Free energy from reaction | Varies by reaction |
| ΞGmin | Min. for ATP synthesis | ~45 kJ/mol |
| Ο | Stoichiometric number | 1-4 |
| R | Gas constant | 0.008314 kJ/molΒ·K |
FT automatically enforces electron acceptor sequence based on energy yield
* Requires concentration-dependent ΞG adjustment to proceed
Simply append the FT term to your kinetic expression β no code changes!
// Standard kinetic expression: "kinetics": ["k_denit * NO3_N * (DOC/(Km+DOC)) * (Ki/(Ki+DO))"] // With thermodynamic constraint (add F_T term): "kinetics": [ "k_denit * NO3_N * (DOC/(Km+DOC)) * (Ki/(Ki+DO)) * (1 - exp(-((119-45)/(2*0.008314*(T+273)))))" ] // F_T breakdown: // 119 = ΞGΒ° for denitrification [kJ/mol] // 45 = ΞG_min (ATP synthesis) [kJ/mol] // 2 = Ο (stoichiometric number) // 0.008314 = R [kJ/molΒ·K] // T+273 = temperature in Kelvin
A different paradigm: compute speciation based on thermodynamic equilibrium
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Each Timestep β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βββββββββββββββββββ βββββββββββββββββββ β
β β OpenWQ β Convert β PhreeqcRM β β
β β chemass [g] ββββββββββββΆβ conc [mol/kgw] β β
β β T, volume β Units β T, P, volume β β
β βββββββββββββββββββ ββββββββββ¬βββββββββ β
β β β
β βΌ β
β βββββββββββββββββββββββ β
β β RunCells() β β
β β β’ Equilibrate β β
β β β’ React β β
β β β’ Speciate β β
β ββββββββββ¬βββββββββββββ β
β β β
β βββββββββββββββββββ ββββββββΌβββββββββββ β
β β OpenWQ βββββββββββββ PhreeqcRM β β
β β Ξmass = new-old β Convert β updated conc β β
β βββββββββββββββββββ Units βββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SOLUTION 1 Surface Water temp 20.0 pH 7.5 pe 12.0 # Redox (high=oxic) units mg/L # Elements (NOT species!) N(5) 5.0 # Nitrate N(-3) 0.2 # Ammonium Ca 40.0 C(4) 100 as HCO3 EQUILIBRIUM_PHASES 1 O2(g) -0.7 10.0 Calcite 0.0 10.0
| SOLUTION | Initial chemistry |
| EQUILIBRIUM_PHASES | Minerals/gases |
| KINETICS | User kinetics (optional) |
| RATES | Rate expressions |
| Feature | BGC_FLEX (Kinetic) | BGC_FLEX + FT | PHREEQC |
|---|---|---|---|
| Approach | User-defined kinetics | Kinetics + ΞG constraint | Thermodynamic equilibrium |
| Speciation | Manual | Manual | Automatic |
| Minerals | Not supported | Not supported | Full database |
| Redox | Manual Ki terms | Automatic via FT | Automatic via pe |
| Parameters | Many (calibrate) | Fewer (ΞGΒ° known) | Fewest (database) |
| Best for | Watersheds, SWAT-style | Sediment diagenesis | Groundwater, AMD |
Flexible kinetic expressions for any reaction. JSON-based, no recompilation.
FT factor enforces redox ladder. Fewer parameters, more mechanistic.
Full equilibrium geochemistry. Automatic speciation and mineral reactions.