Version: dev

WaterEquilibrium

Water autoionization equilibrium with van't Hoff temperature dependence. Migrated from Aerosol.jl@c8c640bb src/aqueous_equilibria.jl:76 (`WaterEquilibrium` @component). Serialized via EarthSciAST.mtk2esm. Implements Seinfeld & Pandis Ch 7 Eq 7.10–7.13 and Table 7.4. Parameterized as observed-only: T and [H+] are inputs, K_w/[OH-]/pH are algebraic outputs.

.esm schema
1.0.0
Source
components/aerosol/aq_eq/water.esm

Description

Water autoionization equilibrium with van’t Hoff temperature dependence. Migrated from Aerosol.jl@c8c640bb src/aqueous_equilibria.jl:76 (WaterEquilibrium @component). Serialized via EarthSciAST.mtk2esm. Implements Seinfeld & Pandis Ch 7 Eq 7.10–7.13 and Table 7.4. Parameterized as observed-only: T and [H+] are inputs, K_w/[OH-]/pH are algebraic outputs.

Reference

_source_ref: Aerosol.jl@c8c640bb:src/aqueous_equilibria.jl:76 Standalone MTK module used to generate this file lives at scripts/_archive/migrations/water_equilibrium.jl in the EarthSciModels repo. Upstream WaterEquilibrium is an MTK @component where T and H_plus are @variables driven by a parent AqueousEquilibria system. For standalone serialization (and to make the component well-posed in isolation), T and H_plus are declared as parameters here — matching the bead’s (S, observed-only) classification. Upstream writes the ion product as K_w ~ H_plus * OH_minus, a second definition of K_w that leaves OH_minus implicit; with H_plus an input it is the same relation solved for the one unknown it determines, so it is written here as OH_minus = K_w / H_plus. The other two equations are unchanged from upstream.

Tolerance rationale (model-level rel=1e-6): observed-only algebraic system (no ODE integration); 1e-6 covers float64 roundoff in the chained exp/log10/multiplications of the van’t Hoff K_w(T) and pH(H+) closed-form expressions across the atmospheric T range (273–318 K) and 9-decade [H+] sweep._

Parameters

NameUnitsDefaultDescription
TK298.0Temperature
H_plusmol/m^30.0001Hydrogen ion concentration (1e-4 mol/m³ = pH 7 in pure water at 298 K)
R_gasJ/mol/K8.314Gas constant
T_refK298.0Reference temperature
K_w_298mol^2/m^61e-08K_w at 298 K (1.0e-14 M² converted to mol²/m⁶)
dH_KwJ/mol55856.4Enthalpy for K_w (13.35 kcal/mol converted to J/mol; Seinfeld & Pandis Table 7.4)
C_refmol/m^31000.0Reference concentration (1 mol/L = 1000 mol/m³) used to convert [H+] from SI to molarity for pH

Observed

NameUnitsDefaultDescription
K_wmol^2/m^6Water dissociation constant at temperature T
OH_minusmol/m^3Hydroxide ion concentration
pH1pH value (dimensionless)

Observed expressions

$$ K_{w} = K_{w\,298} \cdot e^{\frac{\left(-1\right) \cdot \left(\frac{1}{T} + \frac{-1}{T_{ref}}\right) \cdot dH_{Kw}}{R_{gas}}} $$

Water dissociation constant at temperature T

$$ OH_{minus} = \frac{K_{w}}{H_{plus}} $$

Hydroxide ion concentration

$$ pH = \left(-1\right) \cdot \log_{10}\left(\frac{H_{plus}}{C_{ref}}\right) $$

pH value (dimensionless)

Analyses

kw_vs_temperature

Reproduces the classical K_w(T) curve (cf. Seinfeld & Pandis Table 7.4 / Figure 7.1 row for H2O): K_w climbs from ~1.3e-9 mol²/m⁶ at 0°C to ~4.1e-8 mol²/m⁶ at 45°C — a 30× range over the atmospheric temperature range. Sweep T in the atmospheric range holding [H+] fixed; the reported K_w / [OH-] curves are the canonical aqueous-phase atmospheric-chemistry reference.

Time span: 0.0 → 1.0

Swept over: T

K_w as a function of temperature (van’t Hoff).

(OH-) in neutral water (H+ = 1e-4 mol/m³) as a function of temperature.

ph_vs_H_plus

pH calibration curve: scan [H+] over six orders of magnitude (1e-7 to 10 mol/m³) at 298 K and verify pH varies linearly with log10([H+]) from pH 10 down to pH 2 (Seinfeld & Pandis Eq 7.13). [OH-] = K_w / [H+] is shown on the same sweep for completeness.

Time span: 0.0 → 1.0

Swept over: H_plus

pH as a function of (H+) — straight line on log-x (Eq 7.13).

(OH-) = K_w / (H+) at 298 K — inverse relationship.

coupled_T_and_pH_sweep

Two-dimensional sweep over T (freezing-to-warm cloud range) and [H+] (polluted-acidic to cleanrain-basic). Surfaces the joint dependence of [OH-] on temperature and acidity that drives aqueous-phase oxidant kinetics.

Time span: 0.0 → 1.0

Swept over: T, H_plus

(OH-) as a function of T and (H+).

Raw .esm

Raw .esm JSON (this component)
{
  "reference": {
    "notes": "source_ref: Aerosol.jl@c8c640bb:src/aqueous_equilibria.jl:76\nStandalone MTK module used to generate this file lives at `scripts/_archive/migrations/water_equilibrium.jl` in the EarthSciModels repo.\nUpstream `WaterEquilibrium` is an MTK `@component` where T and H_plus are `@variables` driven by a parent `AqueousEquilibria` system. For standalone serialization (and to make the component well-posed in isolation), T and H_plus are declared as parameters here — matching the bead's `(S, observed-only)` classification. Upstream writes the ion product as `K_w ~ H_plus * OH_minus`, a second definition of K_w that leaves OH_minus implicit; with H_plus an input it is the same relation solved for the one unknown it determines, so it is written here as `OH_minus = K_w / H_plus`. The other two equations are unchanged from upstream.\n\nTolerance rationale (model-level rel=1e-6): observed-only algebraic system (no ODE integration); 1e-6 covers float64 roundoff in the chained exp/log10/multiplications of the van't Hoff K_w(T) and pH(H+) closed-form expressions across the atmospheric T range (273–318 K) and 9-decade [H+] sweep."
  },
  "tolerance": {
    "rel": 1e-06
  },
  "variables": {
    "T": {
      "type": "parameter",
      "units": "K",
      "default": 298.0,
      "description": "Temperature"
    },
    "H_plus": {
      "type": "parameter",
      "units": "mol/m^3",
      "default": 0.0001,
      "description": "Hydrogen ion concentration (1e-4 mol/m³ = pH 7 in pure water at 298 K)"
    },
    "R_gas": {
      "type": "parameter",
      "units": "J/mol/K",
      "default": 8.314,
      "description": "Gas constant"
    },
    "T_ref": {
      "type": "parameter",
      "units": "K",
      "default": 298.0,
      "description": "Reference temperature"
    },
    "K_w_298": {
      "type": "parameter",
      "units": "mol^2/m^6",
      "default": 1e-08,
      "description": "K_w at 298 K (1.0e-14 M² converted to mol²/m⁶)"
    },
    "dH_Kw": {
      "type": "parameter",
      "units": "J/mol",
      "default": 55856.4,
      "description": "Enthalpy for K_w (13.35 kcal/mol converted to J/mol; Seinfeld & Pandis Table 7.4)"
    },
    "C_ref": {
      "type": "parameter",
      "units": "mol/m^3",
      "default": 1000.0,
      "description": "Reference concentration (1 mol/L = 1000 mol/m³) used to convert [H+] from SI to molarity for pH"
    },
    "K_w": {
      "type": "unknown",
      "units": "mol^2/m^6",
      "description": "Water dissociation constant at temperature T"
    },
    "OH_minus": {
      "type": "unknown",
      "units": "mol/m^3",
      "description": "Hydroxide ion concentration"
    },
    "pH": {
      "type": "unknown",
      "units": "1",
      "description": "pH value (dimensionless)"
    }
  },
  "equations": [
    {
      "lhs": "K_w",
      "rhs": {
        "op": "*",
        "args": [
          "K_w_298",
          {
            "op": "exp",
            "args": [
              {
                "op": "/",
                "args": [
                  {
                    "op": "*",
                    "args": [
                      -1,
                      {
                        "op": "+",
                        "args": [
                          {
                            "op": "/",
                            "args": [
                              1,
                              "T"
                            ]
                          },
                          {
                            "op": "/",
                            "args": [
                              -1,
                              "T_ref"
                            ]
                          }
                        ]
                      },
                      "dH_Kw"
                    ]
                  },
                  "R_gas"
                ]
              }
            ]
          }
        ]
      }
    },
    {
      "lhs": "OH_minus",
      "rhs": {
        "op": "/",
        "args": [
          "K_w",
          "H_plus"
        ]
      }
    },
    {
      "lhs": "pH",
      "rhs": {
        "op": "*",
        "args": [
          -1,
          {
            "op": "log10",
            "args": [
              {
                "op": "/",
                "args": [
                  "H_plus",
                  "C_ref"
                ]
              }
            ]
          }
        ]
      }
    }
  ],
  "tests": [
    {
      "id": "self_consistency_298K",
      "description": "Pure water at 298 K (Seinfeld & Pandis §7.3.1). With K_w(298) = 1.0e-14 M² = 1.0e-8 mol²/m⁶, neutral water has [H+] = [OH-] = 1.0e-4 mol/m³ and pH = 7. Checks all three observed quantities.",
      "parameter_overrides": {
        "T": 298.0,
        "H_plus": 0.0001
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "K_w",
          "time": 0.0,
          "expected": 1e-08
        },
        {
          "variable": "OH_minus",
          "time": 0.0,
          "expected": 9.999999999999999e-05
        },
        {
          "variable": "pH",
          "time": 0.0,
          "expected": 7.0
        }
      ]
    },
    {
      "id": "vant_hoff_273K",
      "description": "K_w at 273.15 K per the van't Hoff equation with ΔH = 13.35 kcal/mol (Seinfeld & Pandis Table 7.4). K_w decreases with cooling for endothermic dissociation.",
      "parameter_overrides": {
        "T": 273.15,
        "H_plus": 0.0001
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "K_w",
          "time": 0.0,
          "expected": 1.2860247646167109e-09
        },
        {
          "variable": "OH_minus",
          "time": 0.0,
          "expected": 1.2860247646167108e-05
        },
        {
          "variable": "pH",
          "time": 0.0,
          "expected": 7.0
        }
      ]
    },
    {
      "id": "vant_hoff_280K",
      "description": "K_w at 280 K — intermediate cold-water reference point.",
      "parameter_overrides": {
        "T": 280.0,
        "H_plus": 0.0001
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "K_w",
          "time": 0.0,
          "expected": 2.3473232097928894e-09
        },
        {
          "variable": "OH_minus",
          "time": 0.0,
          "expected": 2.3473232097928893e-05
        }
      ]
    },
    {
      "id": "vant_hoff_310K",
      "description": "K_w at 310 K — warm-cloud/body-temperature reference point. K_w increases with warming.",
      "parameter_overrides": {
        "T": 310.0,
        "H_plus": 0.0001
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "K_w",
          "time": 0.0,
          "expected": 2.3933701536339305e-08
        },
        {
          "variable": "OH_minus",
          "time": 0.0,
          "expected": 0.00023933701536339304
        }
      ]
    },
    {
      "id": "vant_hoff_318K",
      "description": "K_w at 318 K (45°C) — upper-range reference for aqueous-phase cloud chemistry.",
      "parameter_overrides": {
        "T": 318.0,
        "H_plus": 0.0001
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "K_w",
          "time": 0.0,
          "expected": 4.128494581583288e-08
        },
        {
          "variable": "OH_minus",
          "time": 0.0,
          "expected": 0.0004128494581583288
        }
      ]
    },
    {
      "id": "acidic_pH4",
      "description": "Acidic cloud water at pH 4 (typical polluted rain, 298 K). [H+] = 0.1 mol/m³ (= 1e-4 M). [OH-] is suppressed to K_w / [H+] = 1e-7 mol/m³.",
      "parameter_overrides": {
        "T": 298.0,
        "H_plus": 0.1
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "K_w",
          "time": 0.0,
          "expected": 1e-08
        },
        {
          "variable": "OH_minus",
          "time": 0.0,
          "expected": 1e-07
        },
        {
          "variable": "pH",
          "time": 0.0,
          "expected": 4.0
        }
      ]
    },
    {
      "id": "acidic_pH2",
      "description": "Strongly acidic solution at pH 2 (298 K). [H+] = 10 mol/m³ (= 1e-2 M). Exercises the far-right tail of the pH range where [OH-] is vanishingly small.",
      "parameter_overrides": {
        "T": 298.0,
        "H_plus": 10.0
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "K_w",
          "time": 0.0,
          "expected": 1e-08
        },
        {
          "variable": "OH_minus",
          "time": 0.0,
          "expected": 1e-09
        },
        {
          "variable": "pH",
          "time": 0.0,
          "expected": 2.0
        }
      ]
    },
    {
      "id": "basic_pH9",
      "description": "Mildly basic solution at pH 9 (298 K). [H+] = 1e-6 mol/m³. [OH-] = 0.01 mol/m³.",
      "parameter_overrides": {
        "T": 298.0,
        "H_plus": 1e-06
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "K_w",
          "time": 0.0,
          "expected": 1e-08
        },
        {
          "variable": "OH_minus",
          "time": 0.0,
          "expected": 0.01
        },
        {
          "variable": "pH",
          "time": 0.0,
          "expected": 9.0
        }
      ]
    },
    {
      "id": "basic_pH10",
      "description": "Basic solution at pH 10 (298 K). [H+] = 1e-7 mol/m³; [OH-] = 0.1 mol/m³. Covers the high-pH extreme of the atmospheric range.",
      "parameter_overrides": {
        "T": 298.0,
        "H_plus": 1e-07
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "K_w",
          "time": 0.0,
          "expected": 1e-08
        },
        {
          "variable": "OH_minus",
          "time": 0.0,
          "expected": 0.1
        },
        {
          "variable": "pH",
          "time": 0.0,
          "expected": 10.0
        }
      ]
    },
    {
      "id": "coupled_cold_acidic",
      "description": "Cross-check: T=273.15 K AND pH=4 acidic regime. Combines the van't Hoff temperature shift with the acidic [H+] sweep to exercise both coefficient paths at once. K_w is the 273 K value; [OH-] is K_w / [H+] = 1.286e-9 / 0.1 = 1.286e-8 mol/m³.",
      "parameter_overrides": {
        "T": 273.15,
        "H_plus": 0.1
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "K_w",
          "time": 0.0,
          "expected": 1.2860247646167109e-09
        },
        {
          "variable": "OH_minus",
          "time": 0.0,
          "expected": 1.2860247646167107e-08
        },
        {
          "variable": "pH",
          "time": 0.0,
          "expected": 4.0
        }
      ]
    },
    {
      "id": "coupled_warm_basic",
      "description": "Cross-check: T=310 K AND pH=9 basic regime. [OH-] = 2.393e-8 / 1e-6 = 0.02393 mol/m³.",
      "parameter_overrides": {
        "T": 310.0,
        "H_plus": 1e-06
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "K_w",
          "time": 0.0,
          "expected": 2.3933701536339305e-08
        },
        {
          "variable": "OH_minus",
          "time": 0.0,
          "expected": 0.023933701536339308
        },
        {
          "variable": "pH",
          "time": 0.0,
          "expected": 9.0
        }
      ]
    }
  ],
  "analyses": [
    {
      "id": "kw_vs_temperature",
      "description": "Reproduces the classical K_w(T) curve (cf. Seinfeld & Pandis Table 7.4 / Figure 7.1 row for H2O): K_w climbs from ~1.3e-9 mol²/m⁶ at 0°C to ~4.1e-8 mol²/m⁶ at 45°C — a 30× range over the atmospheric temperature range. Sweep T in the atmospheric range holding [H+] fixed; the reported K_w / [OH-] curves are the canonical aqueous-phase atmospheric-chemistry reference.",
      "initial_state": {},
      "parameters": {
        "H_plus": 0.0001
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "parameter_sweep": {
        "type": "cartesian",
        "dimensions": [
          {
            "parameter": "T",
            "range": {
              "start": 273.15,
              "stop": 318.0,
              "count": 20,
              "scale": "linear"
            }
          }
        ]
      },
      "plots": [
        {
          "id": "Kw_curve",
          "type": "line",
          "description": "K_w as a function of temperature (van't Hoff).",
          "x": {
            "variable": "T",
            "label": "Temperature (K)"
          },
          "y": {
            "variable": "K_w",
            "label": "K_w (mol²/m⁶, log scale)"
          }
        },
        {
          "id": "OH_curve",
          "type": "line",
          "description": "[OH-] in neutral water (H+ = 1e-4 mol/m³) as a function of temperature.",
          "x": {
            "variable": "T",
            "label": "Temperature (K)"
          },
          "y": {
            "variable": "OH_minus",
            "label": "[OH⁻] (mol/m³, log scale)"
          }
        }
      ]
    },
    {
      "id": "ph_vs_H_plus",
      "description": "pH calibration curve: scan [H+] over six orders of magnitude (1e-7 to 10 mol/m³) at 298 K and verify pH varies linearly with log10([H+]) from pH 10 down to pH 2 (Seinfeld & Pandis Eq 7.13). [OH-] = K_w / [H+] is shown on the same sweep for completeness.",
      "initial_state": {},
      "parameters": {
        "T": 298.0
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "parameter_sweep": {
        "type": "cartesian",
        "dimensions": [
          {
            "parameter": "H_plus",
            "range": {
              "start": 1e-07,
              "stop": 10.0,
              "count": 25,
              "scale": "log"
            }
          }
        ]
      },
      "plots": [
        {
          "id": "pH_vs_Hplus",
          "type": "line",
          "description": "pH as a function of [H+] — straight line on log-x (Eq 7.13).",
          "x": {
            "variable": "H_plus",
            "label": "[H⁺] (mol/m³, log scale)"
          },
          "y": {
            "variable": "pH",
            "label": "pH"
          }
        },
        {
          "id": "OH_vs_Hplus",
          "type": "line",
          "description": "[OH-] = K_w / [H+] at 298 K — inverse relationship.",
          "x": {
            "variable": "H_plus",
            "label": "[H⁺] (mol/m³, log scale)"
          },
          "y": {
            "variable": "OH_minus",
            "label": "[OH⁻] (mol/m³, log scale)"
          }
        }
      ]
    },
    {
      "id": "coupled_T_and_pH_sweep",
      "description": "Two-dimensional sweep over T (freezing-to-warm cloud range) and [H+] (polluted-acidic to cleanrain-basic). Surfaces the joint dependence of [OH-] on temperature and acidity that drives aqueous-phase oxidant kinetics.",
      "initial_state": {},
      "parameters": {},
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "parameter_sweep": {
        "type": "cartesian",
        "dimensions": [
          {
            "parameter": "T",
            "range": {
              "start": 273.15,
              "stop": 318.0,
              "count": 10,
              "scale": "linear"
            }
          },
          {
            "parameter": "H_plus",
            "range": {
              "start": 1e-07,
              "stop": 1.0,
              "count": 15,
              "scale": "log"
            }
          }
        ]
      },
      "plots": [
        {
          "id": "OH_heatmap",
          "type": "heatmap",
          "description": "[OH-] as a function of T and [H+].",
          "x": {
            "variable": "T",
            "label": "Temperature (K)"
          },
          "y": {
            "variable": "H_plus",
            "label": "[H⁺] (mol/m³, log scale)"
          },
          "value": {
            "variable": "OH_minus",
            "reduce": "final"
          }
        }
      ]
    }
  ]
}