Version: dev

EqConst

Equilibrium constant parameterized by Equation 5 of Fountoukis and Nenes (2007): log K(T) = log K(T0) + H_coeff*(T0/T - 1) + C_coeff*(1 + ln(T0/T) - T0/T), where T0 = 298.15 K. Migrated from Aerosol.jl@c8c640bb src/isorropia/equilibria.jl:5 (`EqConst` @component). Parameters logK0, H_coeff, and C_coeff are reaction-specific values from Table 2 of Fountoukis and Nenes (2007). T is an input (driven by parent EquilibriumConstants in the coupled system); logK_eq is an algebraically observed output.

.esm schema
1.0.0
Source
components/aerosol/isorropia/eq_const.esm

Description

Equilibrium constant parameterized by Equation 5 of Fountoukis and Nenes (2007): log K(T) = log K(T0) + H_coeff*(T0/T - 1) + C_coeff*(1 + ln(T0/T) - T0/T), where T0 = 298.15 K. Migrated from Aerosol.jl@c8c640bb src/isorropia/equilibria.jl:5 (EqConst @component). Parameters logK0, H_coeff, and C_coeff are reaction-specific values from Table 2 of Fountoukis and Nenes (2007). T is an input (driven by parent EquilibriumConstants in the coupled system); logK_eq is an algebraically observed output.

Reference

_source_ref: Aerosol.jl@c8c640bb:src/isorropia/equilibria.jl:5

Upstream EqConst is an MTK @component parameterized by three compile-time @constants (logK0, H_coeff=H+, C_coeff=C+) and the reference temperature T0=298.15 K. It has two @variables: T(t) (temperature input, driven by parent EquilibriumConstants) and logK_eq(t) (the observed equilibrium-constant output). After MTK structural_simplify, logK_eq becomes a pure algebraic observed because it depends only on T and the constants. There are no ODE states in the compiled system.

Standalone serialization: T is declared as a parameter (not a state) so the component is well-posed in isolation. logK0, H_coeff, C_coeff, and T0 are also parameters. The default values correspond to reaction r1 from EquilibriumConstants (NH4HSO4 dissolution, Fountoukis & Nenes Table 2).

Equation: logK_eq = logK0 + H_coeff*(T0/T - 1) + C_coeff*(1 + log(T0/T) - T0/T) where log is the natural logarithm. At T = T0 = 298.15 K, the two temperature-correction terms vanish and logK_eq = logK0 exactly.

Tolerance rationale (rel=1e-8): observed-only algebraic system with no ODE integration; 1e-8 covers float64 roundoff in the two chained temperature-correction terms across the atmospheric T range (250-330 K)._

Parameters

NameUnitsDefaultDescription
TK298.15Temperature
logK0113.31578971393039Log of the equilibrium constant at 298.15 K (dimensionless). Default is log(6.067e5) = r1 in Fountoukis & Nenes (2007) Table 2.
H_coeff1-11.299Enthalpy correction coefficient ΔH⁰/(R·T₀) (dimensionless). Default is r1 in Fountoukis & Nenes (2007) Table 2.
C_coeff10.0Heat-capacity correction coefficient ΔC⁰ₚ/R (dimensionless). Default is r1 in Fountoukis & Nenes (2007) Table 2 (zero for many reactions).
T0K298.15Standard (reference) temperature

Observed

NameUnitsDefaultDescription
logK_eq1Log of the equilibrium constant at temperature T (dimensionless). Computed via Equation 5 of Fountoukis & Nenes (2007).

Observed expressions

$$ logK_{eq} = logK0 + H_{coeff} \cdot \left(\frac{T0}{T} + -1\right) + C_{coeff} \cdot \left(1 + \ln\left(\frac{T0}{T}\right) + \left(-1\right) \cdot \frac{T0}{T}\right) $$

Log of the equilibrium constant at temperature T (dimensionless). Computed via Equation 5 of Fountoukis & Nenes (2007).

Analyses

logK_vs_temperature_r1

logK_eq as a function of temperature for r1 parameters (H_coeff = -11.299, C_coeff = 0). The curve is linear in T0/T - 1 and monotonically decreasing as T falls, since H_coeff < 0. This is the simplest EqConst case (no heat-capacity correction).

Time span: 0.0 → 1.0

Swept over: T

log K_eq as a function of temperature for r1 parameters.

logK_vs_temperature_r4

logK_eq as a function of temperature for r4 parameters (H_coeff = -9.589, C_coeff = 45.807). The nonzero C_coeff introduces curvature relative to the r1 linear case.

Time span: 0.0 → 1.0

Swept over: T

log K_eq as a function of temperature for r4 parameters (H and C both active).

Raw .esm

Raw .esm JSON (this component)
{
  "reference": {
    "notes": "source_ref: Aerosol.jl@c8c640bb:src/isorropia/equilibria.jl:5\n\nUpstream `EqConst` is an MTK `@component` parameterized by three compile-time @constants (logK0, H_coeff=H+, C_coeff=C+) and the reference temperature T0=298.15 K. It has two @variables: T(t) (temperature input, driven by parent EquilibriumConstants) and logK_eq(t) (the observed equilibrium-constant output). After MTK structural_simplify, logK_eq becomes a pure algebraic observed because it depends only on T and the constants. There are no ODE states in the compiled system.\n\nStandalone serialization: T is declared as a parameter (not a state) so the component is well-posed in isolation. logK0, H_coeff, C_coeff, and T0 are also parameters. The default values correspond to reaction r1 from EquilibriumConstants (NH4HSO4 dissolution, Fountoukis & Nenes Table 2).\n\nEquation: logK_eq = logK0 + H_coeff*(T0/T - 1) + C_coeff*(1 + log(T0/T) - T0/T) where log is the natural logarithm. At T = T0 = 298.15 K, the two temperature-correction terms vanish and logK_eq = logK0 exactly.\n\nTolerance rationale (rel=1e-8): observed-only algebraic system with no ODE integration; 1e-8 covers float64 roundoff in the two chained temperature-correction terms across the atmospheric T range (250-330 K)."
  },
  "tolerance": {
    "rel": 1e-08
  },
  "variables": {
    "T": {
      "type": "parameter",
      "units": "K",
      "default": 298.15,
      "description": "Temperature"
    },
    "logK0": {
      "type": "parameter",
      "units": "1",
      "default": 13.31578971393039,
      "description": "Log of the equilibrium constant at 298.15 K (dimensionless). Default is log(6.067e5) = r1 in Fountoukis & Nenes (2007) Table 2."
    },
    "H_coeff": {
      "type": "parameter",
      "units": "1",
      "default": -11.299,
      "description": "Enthalpy correction coefficient ΔH⁰/(R·T₀) (dimensionless). Default is r1 in Fountoukis & Nenes (2007) Table 2."
    },
    "C_coeff": {
      "type": "parameter",
      "units": "1",
      "default": 0.0,
      "description": "Heat-capacity correction coefficient ΔC⁰ₚ/R (dimensionless). Default is r1 in Fountoukis & Nenes (2007) Table 2 (zero for many reactions)."
    },
    "T0": {
      "type": "parameter",
      "units": "K",
      "default": 298.15,
      "description": "Standard (reference) temperature"
    },
    "logK_eq": {
      "type": "unknown",
      "units": "1",
      "description": "Log of the equilibrium constant at temperature T (dimensionless). Computed via Equation 5 of Fountoukis & Nenes (2007)."
    }
  },
  "equations": [
    {
      "lhs": "logK_eq",
      "rhs": {
        "op": "+",
        "args": [
          "logK0",
          {
            "op": "*",
            "args": [
              "H_coeff",
              {
                "op": "+",
                "args": [
                  {
                    "op": "/",
                    "args": [
                      "T0",
                      "T"
                    ]
                  },
                  -1
                ]
              }
            ]
          },
          {
            "op": "*",
            "args": [
              "C_coeff",
              {
                "op": "+",
                "args": [
                  1,
                  {
                    "op": "log",
                    "args": [
                      {
                        "op": "/",
                        "args": [
                          "T0",
                          "T"
                        ]
                      }
                    ]
                  },
                  {
                    "op": "*",
                    "args": [
                      -1,
                      {
                        "op": "/",
                        "args": [
                          "T0",
                          "T"
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    }
  ],
  "tests": [
    {
      "id": "r1_identity_at_T0",
      "description": "At T = T0 = 298.15 K, both temperature-correction terms vanish and logK_eq = logK0 exactly. Uses r1 parameters (Fountoukis & Nenes Table 2: NH4HSO4 dissolution). Verifies the T=T0 identity for C_coeff=0.",
      "parameter_overrides": {
        "T": 298.15,
        "logK0": 13.31578971393039,
        "H_coeff": -11.299,
        "C_coeff": 0.0
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "logK_eq",
          "time": 0.0,
          "expected": 13.31578971393039
        },
        {
          "variable": "logK_eq",
          "time": 1.0,
          "expected": 13.31578971393039
        }
      ]
    },
    {
      "id": "r1_cold_250K",
      "description": "r1 parameters at T = 250 K. H_coeff = -11.299 < 0 drives logK_eq down (more negative correction) as T drops below T0. C_coeff = 0 so only the H term acts.",
      "parameter_overrides": {
        "T": 250.0,
        "logK0": 13.31578971393039,
        "H_coeff": -11.299,
        "C_coeff": 0.0
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "logK_eq",
          "time": 0.0,
          "expected": 11.139602313930391
        }
      ]
    },
    {
      "id": "r1_cold_273K",
      "description": "r1 parameters at T = 273.15 K (standard ice-point). Tests the H-only (C=0) temperature correction at a typical cold-cloud temperature.",
      "parameter_overrides": {
        "T": 273.15,
        "logK0": 13.31578971393039,
        "H_coeff": -11.299,
        "C_coeff": 0.0
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "logK_eq",
          "time": 0.0,
          "expected": 12.281650962328705
        }
      ]
    },
    {
      "id": "r1_warm_310K",
      "description": "r1 parameters at T = 310 K. H_coeff < 0 and T > T0 gives a positive correction, increasing logK_eq.",
      "parameter_overrides": {
        "T": 310.0,
        "logK0": 13.31578971393039,
        "H_coeff": -11.299,
        "C_coeff": 0.0
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "logK_eq",
          "time": 0.0,
          "expected": 13.747703101027165
        }
      ]
    },
    {
      "id": "r4_identity_at_T0",
      "description": "At T = T0 = 298.15 K, logK_eq = logK0 regardless of H_coeff and C_coeff. Uses r4 parameters (Fountoukis & Nenes Table 2: C_coeff = 45.807, nonzero). Verifies the identity holds for the general (H,C) case.",
      "parameter_overrides": {
        "T": 298.15,
        "logK0": -4.154731712237196,
        "H_coeff": -9.589,
        "C_coeff": 45.807
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "logK_eq",
          "time": 0.0,
          "expected": -4.154731712237196
        }
      ]
    },
    {
      "id": "r4_cold_250K",
      "description": "r4 parameters at T = 250 K. Both H and C terms are active. C_coeff = 45.807 > 0 adds a significant extra correction at low T. Combined effect shifts logK_eq from -4.155 to -6.756.",
      "parameter_overrides": {
        "T": 250.0,
        "logK0": -4.154731712237196,
        "H_coeff": -9.589,
        "C_coeff": 45.807
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "logK_eq",
          "time": 0.0,
          "expected": -6.755748826678665
        }
      ]
    },
    {
      "id": "r4_cold_273K",
      "description": "r4 parameters at T = 273.15 K. Both H and C correction terms are exercised at a typical cold-cloud temperature.",
      "parameter_overrides": {
        "T": 273.15,
        "logK0": -4.154731712237196,
        "H_coeff": -9.589,
        "C_coeff": 45.807
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "logK_eq",
          "time": 0.0,
          "expected": -5.213263252845522
        }
      ]
    },
    {
      "id": "r4_warm_310K",
      "description": "r4 parameters at T = 310 K. T > T0, both corrections are active. C_coeff > 0 partially counteracts the negative H correction.",
      "parameter_overrides": {
        "T": 310.0,
        "logK0": -4.154731712237196,
        "H_coeff": -9.589,
        "C_coeff": 45.807
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "logK_eq",
          "time": 0.0,
          "expected": -3.822529418598545
        }
      ]
    },
    {
      "id": "r8_positive_H_273K",
      "description": "r8 parameters (Fountoukis & Nenes Table 2: H_coeff = 36.798, C_coeff = 0). H_coeff > 0 means logK_eq increases as T drops below T0. Tests the sign-flip relative to r1/r4.",
      "parameter_overrides": {
        "T": 273.15,
        "logK0": 11.588960151246226,
        "H_coeff": 36.798,
        "C_coeff": 0.0
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "logK_eq",
          "time": 0.0,
          "expected": 14.956889860197354
        }
      ]
    },
    {
      "id": "r8_positive_H_310K",
      "description": "r8 parameters at T = 310 K. H_coeff > 0 and T > T0 gives a negative correction, decreasing logK_eq below logK0.",
      "parameter_overrides": {
        "T": 310.0,
        "logK0": 11.588960151246226,
        "H_coeff": 36.798,
        "C_coeff": 0.0
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "logK_eq",
          "time": 0.0,
          "expected": 10.18232692543977
        }
      ]
    }
  ],
  "analyses": [
    {
      "id": "logK_vs_temperature_r1",
      "description": "logK_eq as a function of temperature for r1 parameters (H_coeff = -11.299, C_coeff = 0). The curve is linear in T0/T - 1 and monotonically decreasing as T falls, since H_coeff < 0. This is the simplest EqConst case (no heat-capacity correction).",
      "parameters": {
        "logK0": 13.31578971393039,
        "H_coeff": -11.299,
        "C_coeff": 0.0
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "parameter_sweep": {
        "type": "cartesian",
        "dimensions": [
          {
            "parameter": "T",
            "range": {
              "start": 250.0,
              "stop": 330.0,
              "count": 40,
              "scale": "linear"
            }
          }
        ]
      },
      "plots": [
        {
          "id": "logK_vs_T_r1",
          "type": "line",
          "description": "log K_eq as a function of temperature for r1 parameters.",
          "x": {
            "variable": "T",
            "label": "Temperature (K)"
          },
          "y": {
            "variable": "logK_eq",
            "label": "log K_eq (dimensionless)"
          }
        }
      ]
    },
    {
      "id": "logK_vs_temperature_r4",
      "description": "logK_eq as a function of temperature for r4 parameters (H_coeff = -9.589, C_coeff = 45.807). The nonzero C_coeff introduces curvature relative to the r1 linear case.",
      "parameters": {
        "logK0": -4.154731712237196,
        "H_coeff": -9.589,
        "C_coeff": 45.807
      },
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "parameter_sweep": {
        "type": "cartesian",
        "dimensions": [
          {
            "parameter": "T",
            "range": {
              "start": 250.0,
              "stop": 330.0,
              "count": 40,
              "scale": "linear"
            }
          }
        ]
      },
      "plots": [
        {
          "id": "logK_vs_T_r4",
          "type": "line",
          "description": "log K_eq as a function of temperature for r4 parameters (H and C both active).",
          "x": {
            "variable": "T",
            "label": "Temperature (K)"
          },
          "y": {
            "variable": "logK_eq",
            "label": "log K_eq (dimensionless)"
          }
        }
      ]
    }
  ]
}