Compositional model¶
Hydrogen may occupy a gas phase, dissolve in brine, mix with residual gases and undergo chemical conversion. The equations conserve components across phases: dissolution alone is not a sink of total hydrogen. Notation and model scope are defined in Mathematical models.
The overall-composition formulation follows the compositional model in [AAC+25], with pressure and independent overall mole fractions as flow primary variables. The conserved quantities below are component masses. Phase and overall mass fractions must therefore be distinguished from the mole fractions used by the flash.
Component conservation¶
For component \(i\), the mass balance is
The phases present in the selected model are indexed by \(\alpha\). \(\mathbf J_{i\alpha}\) is a non-advective mass flux (\(\mathrm{kg/(m^2\,s)}\)); it is zero when diffusion and dispersion are disabled. Wells and imposed boundary/source terms contribute to \(q_i\). Microbial conversion contributes to \(r_i\), using the normalization described in Biochemistry. An abiotic, non-reactive case has \(r_i=0\).
Phase transfer changes \(S_\alpha\) and \(w_{i\alpha}\), not the total component inventory. Local gas-liquid equilibrium supplies the partition between phases, as described in Phase behavior and fluid properties.
Overall composition¶
Define mixture mass density and overall mass fraction by
Then accumulation in (1) is \(\partial_t(\phi\rho_t W_i)\). The EOS instead uses the overall mole fraction
where \(M_i\) is component molar mass. Using \(\rho_t z_i\) as a component mass density without this conversion would mix molar and mass bases.
Darcy flow and saturation closure¶
Each mobile phase follows Darcy’s law,
Here \(k_{r\alpha}\) is relative permeability and \(\mathbf g\) is the gravity-acceleration vector. Writing gravity as a vector avoids assuming that a particular grid coordinate is depth: the aquifer section uses elevation increasing upward, whereas some other setups use depth. Hydrostatic equilibrium satisfies \(\nabla p_\alpha=\rho_\alpha\mathbf g\).
For a liquid-gas system,
Capillary pressure \(p_c\) and relative-permeability curves come from the configured fluid/saturation functions and rock regions. Setting \(p_c=0\) is a setup choice, not a universal H2sim assumption. Likewise, residual saturations and any hysteresis treatment must be established from the selected input; they are not implied by the balance law.
Compositional diffusion and dispersion¶
When enabled in BiochemistryModel, component diffusion uses phase
mass-fraction gradients. In continuum notation, the implemented
flux construction is
The correction enforces \(\sum_i\mathbf J_{i\alpha}=0\) so that diffusion redistributes components without creating a net phase mass flux. This is a corrected Fickian approximation, not a full Maxwell-Stefan diffusion model.
The effective coefficient includes porosity and phase saturation:
The dispersion term is the implementation’s isotropic approximation, using reconstructed Darcy speed and longitudinal/transverse dispersivities \(\alpha_L,\alpha_T\) in metres. \(D^{\mathrm{mol}}\) includes the configured molecular correlation and tortuosity treatment. Numerical porosity, saturation and diffusivity floors are detailed in Code reference. The Hydrogen–methane mixing example instead supplies its own constant binary diffusivity; that coefficient is not the default correlation for other models.
Aqueous tracers¶
Non-volatile species such as sulfate and the non-EOS sulfide pool are carried as liquid-only tracers, rather than EOS components:
Tracer fluxes are molar, and have no liquid-density multiplier because \(c_a\) is already in mol per liquid volume. In the discrete accumulation, the liquid saturation is floored at \(10^{-8}\). Additional transported aqueous totals depend on the chemistry setup. The diffusion/dispersion switches also control the non-advective tracer fluxes where supported.
Initial and boundary conditions¶
A simulation specifies initial pressure, saturations, composition and any population/tracer fields. Boundaries may prescribe pressure with an inflow composition, impose a flux, or remain closed. The selected aquifer case has hydrostatic lateral pressure boundaries; the hydrogen-methane mixing case is sealed. Boundary exchange must therefore be included when checking an open-domain inventory.
Implementation¶
BiochemistryModel and BiochemicalFlowDiscretization: component, population and tracer residual assembly.
ComponentPhaseDispFlux and DispersiveDiffusivity: corrected component fluxes and effective coefficients.
Continue with Phase behavior and fluid properties for constitutive closure and Discretization and coupling for the discrete fluxes and well equations.