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

(1)\[\frac{\partial}{\partial t} \left(\phi\sum_\alpha S_\alpha\rho_\alpha w_{i\alpha}\right) + \nabla\cdot \left(\sum_\alpha \left[\rho_\alpha w_{i\alpha}\mathbf u_\alpha + \mathbf J_{i\alpha}\right]\right) = q_i + r_i .\]

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

(2)\[\rho_t=\sum_\alpha S_\alpha\rho_\alpha,\qquad W_i=\frac{\sum_\alpha S_\alpha\rho_\alpha w_{i\alpha}}{\rho_t}.\]

Then accumulation in (1) is \(\partial_t(\phi\rho_t W_i)\). The EOS instead uses the overall mole fraction

\[z_i=\frac{W_i/M_i}{\sum_k W_k/M_k}, \qquad W_i=\frac{z_i M_i}{\sum_k z_k M_k},\]

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,

(3)\[\mathbf u_\alpha = -\mathbf K\lambda_\alpha \left(\nabla p_\alpha-\rho_\alpha\mathbf g\right), \qquad \lambda_\alpha=\frac{k_{r\alpha}}{\mu_\alpha}.\]

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,

(4)\[S_l+S_g=1,\qquad p_g-p_l=p_c(S_l),\qquad \sum_i w_{i\alpha}=1.\]

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

(5)\[\mathbf j^*_{i\alpha} =-\rho_\alpha D^{\mathrm{eff}}_{i\alpha} \nabla w_{i\alpha},\qquad \mathbf J_{i\alpha} =\mathbf j^*_{i\alpha} -w_{i\alpha}\sum_k\mathbf j^*_{k\alpha}.\]

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:

(6)\[D^{\mathrm{eff}}_{i\alpha} =\phi S_\alpha \left(D^{\mathrm{mol}}_{i\alpha} +D^{\mathrm{disp}}_\alpha\right),\qquad D^{\mathrm{disp}}_\alpha =\frac{\alpha_{L,\alpha}+2\alpha_{T,\alpha}}{3} \lVert\mathbf u_\alpha\rVert .\]

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:

(7)\[\frac{\partial}{\partial t}(\phi S_l c_a) +\nabla\cdot\left(c_a\mathbf u_l+\mathbf J_a\right) =q_a+r_a,\qquad \mathbf J_a=-D_a^{\mathrm{eff}}\nabla c_a.\]

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

Continue with Phase behavior and fluid properties for constitutive closure and Discretization and coupling for the discrete fluxes and well equations.