1 Introduction

Gas–gas mixing in porous media is a complex process mainly governed by molecular diffusion and mechanical dispersion. Molecular diffusion can be defined as the flux caused by the general tendency of balancing concentration differences due to the Brownian motion of the molecules (Brown 1828; Fick 1855). sIn contrast, mechanical dispersion originates from the complexity of a porous medium and the resulting different lengths of flow paths and varying flow velocities. From the modelling background, the overall two-component flow can be expressed by the advection–diffusion term:

$$\begin{aligned} \frac{\partial c}{\partial t} = \underbrace{\nabla \cdot \left( D\nabla c\right) }_\text {diffusive/dispersive term} - \underbrace{\nabla \cdot \left( {\textbf{v}} c\right) }_\text {advection term} + R \end{aligned}$$
(1)

where c is the concentration, D is the diffusivity/dispersivity, \({\textbf{v}}\) is the velocity field, and R is the source term. Focusing on the isothermal fluid flow, the flow velocity in porous media \({\textbf{v}}\) is pressure controlled and typically expressed by Darcy’s Law (Darcy 1856). Contrarily, the molecular diffusive term is governed by concentration gradients, which reasonably reflects the natural tendency to balance the concentrations. This phenomenon of molecular diffusion is described by Fick’s first law (Fick 1855):

$$\begin{aligned} J_\textrm{D}^\kappa = -\rho D^\kappa \nabla c^\kappa _g \end{aligned}$$
(2)

where \(J_\textrm{D}^\kappa\) is the diffusive flux of component \(\kappa\) in \(\mathrm {mol/\left( m^2\cdot s\right) }\), \(\rho\) is the molar density in \(\mathrm {mol/m^3}\), \(D^\kappa\) is the diffusion coefficient in \(\mathrm {m^2/s}\), and \(\nabla c^\kappa _g\) the concentration gradient (mole fraction) in the gaseous phase in \(\mathrm {1/m}\).

In the simplest case, a binary system can be considered. Here, it is evident that each component’s flux must be balanced to conserve the material balance (Bear 2018).

$$\begin{aligned} \sum _\kappa J_D^\kappa = 0 \end{aligned}$$
(3)

Fulfilling this condition, the diffusion coefficients of both components have to be identical:

$$\begin{aligned} D^\textrm{A} = D^\textrm{B} = D^{\textrm{AB}} \end{aligned}$$
(4)

A recent approach of measuring bulk diffusion coefficients at higher temperatures (\(T =\) 19.4 to 59.7 \(^\circ\)C) and pressures (\(p =\) 90 bar to 147 bar) for the binary system methane–carbon dioxide was shown in Guevara-Carrion et al. (2019), where diffusion coefficients in the range of 1.46–\(3.7\cdot 10^{-8}\) \(\mathrm {m^2/s}\) were observed. To estimate gas–gas diffusion coefficients numerous correlations (e.g. Fuller’s method (Fuller et al. 1966) or Wilke’s method (Wilke and Lee 1955)) have been developed in the past, whereby they are typically limited to low pressure and temperature ranges. Therefore, these models have limited applicability to the conditions during the storage of gases in the porous subsurface. Furthermore, diffusion can only occur within the pores in porous media and is therefore decelerated compared to the open flow due to the reduced space for exchange. For the one-dimensional system, the flow pathway through the rock is extended due to the tortuosity of the pore structure. This reduction can be expressed as follows (Helmig 1997):

$$\begin{aligned} D_\textrm{pm}^{\textrm{AB}} = \phi \tau S_g D^{\textrm{AB}}_\textrm{bulk} \end{aligned}$$
(5)

where \(D_\textrm{pm}^{\textrm{AB}}\) is the effective binary diffusion coefficient of the porous media in \(\mathrm {m^2/s}\), \(\phi\) is the porosity, \(\tau\) is the tortuosity factor of the porous medium, \(S_g\) is the gas saturation, and \(D^{\textrm{AB}}_\textrm{bulk}\) is the binary diffusion coefficient for the bulk medium in \(\mathrm {m^2/s}\).

So far, only few measurements of effective diffusion coefficients in porous media have been conducted. Pandey et al. (1974) and Chen et al. (1977) performed steady state and unsteady state measurements at pressures up to 5 bar. Pandey et al. (1974) used a steady state method for dry samples, while for saturated and low permeable samples an unsteady state measurement method was selected. Here, effective diffusion coefficients for the binary system \(\textrm{He}\)-\(\mathrm {N_2}\) in the range of 2.14\(\cdot 10^{-6}\) \(\mathrm {m^2/s}\) to \(1.19\cdot 10^{-4}\) \(\mathrm {m^2/s}\) (steady state method) and \(1.67\cdot 10^{-8}\) \(\mathrm {m^2/s}\) to \(1.88\cdot 10^{-5}\) \(\mathrm {m^2/s}\) (unsteady state method) were measured. Chen et al. (1977) observed higher diffusion coefficients (\(2.59\cdot 10^{-5}\) to \(2.00\cdot 10^{-3}\) \(\mathrm {m^2/s}\)) for \(\mathrm {CH_4}\)-\(\mathrm {N_2}\) at a pressure of \(p=\) 1 bar and a temperature of \(T =\) 35 \(^\circ\)C.

Overall, the lack of experimental data and insufficient characterisation of molecular diffusion at storage conditions leads to a knowledge gap which is addressed within this work. The goal of the present study is the development of a combination of correlations in the form of Eq. 6 representing the process of molecular diffusion between the two components hydrogen and methane as the main component of natural gas.

$$\begin{aligned} D^{\textrm{AB}}_\textrm{pm} = \phi \tau \left( \phi , S_g, k\right) S_g D^{\textrm{AB}}_\textrm{bulk}\left( p,T\right) \end{aligned}$$
(6)

where p corresponds to the pore pressure in bar and T is the temperature in K.

Afterwards, the model is implemented in the open-source simulator DuMux to calibrate the numerical model with respect to the forecast of UHS scenarios.

2 Empirical Correlation of Binary Diffusion Coefficients of H2–CH4 at High-Pressure and High-Temperature Conditions

To gain data on molecular diffusion coefficients, a total of 32 experiments have been conducted. The one-chamber method allows the measurement of effective binary diffusion coefficients of two gaseous components. In the following, the experimental procedure used to gain data for the modelling approach is briefly described. A more extensive description can be found in Michelsen et al. (2023).

2.1 Experimental Procedure of Measuring Gas–Gas Molecular Diffusion in the Laboratory

To measure molecular diffusion, a binary diffusion setup was used, which was adapted from the work of Wicke and Kallenbach (1941). The measurements were performed with a quasi-stationary one-chamber method.

The main component of the setup is a core holder, which is developed for rock samples with a length of up to 6 cm and a diameter of 3 cm, as depicted in Fig. 1. Before each experiment, the core samples are stored in the oven (\(T =\) 65 \(^\circ\)C) to ensure that the samples do not contain any water. For the measurements involving gas saturations smaller unity, the sample is firstly fully water saturated, followed by the injection of nitrogen to displace the water partially and establish the two-phase saturation. The saturation in place is determined by weighting the partially and fully saturated sample.

Fig. 1
figure 1

Schematic representation of the diffusion cell

The core holder, also known as the diffusion cell, consists of a hollow cylinder which contains a rock sample, one gas distribution element, one gas injection element, and two end pieces. The hollow cylinder serves as a large chamber and is located on one side of the rock sample. It must have a volume that is a multiple of the rock sample’s volume. Before placing these components into the diffusion cell, they are inserted into a Viton sleeve. On the other side of the rock sample is the gas distribution element with an inlet and an outlet. Prior to the experiment, the water-filled annulus surrounding the Viton sleeve is slowly pressurised to build up a certain radial pressure on the core specimen. This radial pressure is greater than the measurement pore pressure of the gas. Simultaneously, the diffusion cell is filled and pressurised with hydrogen step-wise along with the radial pressure. During the experiment, methane is injected into the diffusion cell through the inlet, controlled by a syringe pump that drives a floating piston chamber. A backpressure regulator is installed at the outlet of the target to maintain a constant pressure in the diffusion cell during the measurement. The injection is continued until a clear trend (straight line) in the gas composition is identifiable. A gas chromatograph is situated behind the backpressure regulator which continuously analyses the gas composition.

The effective diffusion coefficients were determined by matching the measurement results with a one-dimensional numerical simulation model, which was implemented in COMSOL Multiphysics. The model solves the partial differential equation which corresponds to Fick’s second law including the modification where the volume is reduced to the pore space. The one-dimensional domain representing the rock sample is discretised by 100 elements. The boundaries are defined as solution-dependent Dirichlet boundaries where the concentration of the chambers changes over time in dependency on the boundary fluxes. For chamber 1, the flushing of methane is considered additionally within the boundary condition. The matching of the simulated and measured hydrogen concentrations is done manually by changing the effective diffusion coefficient. A more extensive description can be found in Michelsen et al. (2023), Michelsen et al. (2023) and an example of the COMSOL simulation can be found in the repository (Hogeweg et al. 2023).

2.2 Development of a Correlation for Molecular Diffusion in Porous Media

To develop a mathematical model characterising the diffusive flux of the binary system H2-CH4 in the subsurface, three data sets (Michelsen et al. 2023) of experiments are investigated. While a first set (see Table 1) contains various samples from actual storage formations (samples B to H) at the reference temperature and pore pressure conditions of \(T =\) 40 \(^\circ\)C and \(p =\) 100 bar isolating the dependency of the petrophysical properties of the porous media, the second set (cf. Table 2) is composed of the measurements performed on the reference sample A (Bentheimer Sandstone) at various thermodynamic conditions to establish the dependency of the diffusion coefficient on pressure and temperature. A final extended data set is used to validate and assess the accuracy of the developed correlation (see Tables 3 and 4).

Overall, the laboratory measurements show a dependency on the thermodynamic conditions and the influence of the petrophysical properties on the strength of the molecular diffusion. In general, the experimental observations indicate that the effective diffusion coefficient decreases with increasing temperature. In low-pressure ranges (< 75 bar), the coefficient decreases with increasing pressure, followed by an increasing trend for higher pressures. Higher porosities, low water saturations, and higher permeabilities show a higher effective molecular diffusion coefficient.

2.2.1 Modelling of the Tortuosity Factor Representing the Influence of the Porous Medium

In the first step, the dependency of the diffusion coefficient on the properties of the porous media is analysed. Here, the data from Table 1 are used. The intention is to develop a correlation for the tortuosity factor in dependency of porosity, permeability, and gas saturation, as these parameters are typically already determined on investigations such as well logging, routine core analysis (RCAL), and operation history. A straightforward trial and error approach leads to a satisfying result as depicted in Fig. 2. Merely one measurement point (sample D) deviates from the developed correlation. Here, diverging pore connectivity and topology of the sample on pore scale could explain the deviation. Nevertheless, the best match has the following form:

$$\begin{aligned} D_\textrm{pm}^\textrm{AB} = \phi ^2 S_g^2 k_\textrm{eff}^{1/5} \cdot 3.785\cdot 10^{-4} \end{aligned}$$
(7)

where \(D_\textrm{pm}^\textrm{AB}\) is the binary diffusion coefficient between \(\mathrm {H_2}\)-\(\mathrm {CH_4}\) in \(\mathrm {m^2/s}\), \(\phi\) is the porosity, \(S_g\) is the gas saturation, and \(k_\textrm{eff}\) is the effective permeability in \(\mathrm {m^2}\).

Table 1 Data Set 1 - Measurements at \(T =\) 40 \(^\circ\)C and \(p =\) 100 bar
Fig. 2
figure 2

Developed correlation \(\mathrm {HMHG_{poro}}\) of the effective diffusion coefficient based on various rock samples varying in petrophysical properties and saturation

To isolate the tortuosity factor of the porous medium, the Fuller method (Fuller et al. 1966; Fuller and Giddings 1965; Fuller et al. 1969) is selected due to its reported good accuracy at low pressures and temperatures to describe the bulk diffusion coefficient. Evaluating Fuller’s method at \(T =\) 40 \(^\circ\)C and \(p =\) 10 bar (\(D^\textrm{AB}_\textrm{bulk}= 2.1395 \times 10^{-6}\) \(\mathrm {m^2/s}\)) allows us to determine the tortuosity factor of the Bentheimer sample (\(\tau _A = 0.208\)). In the general form, the first part of the correlation can be expressed as follows:

$$\begin{aligned}&D\mathrm {_{pm}^{AB}} = \phi S_g \tau D^\textrm{AB}_\textrm{bulk} \end{aligned}$$
(8)
$$\begin{aligned}&\mathrm {HMHG_{poro}}: \quad \tau = \phi S_g k_\textrm{eff}^{1/5} \cdot 176.916 \mathrm {m^{-2/5}} \end{aligned}$$
(9)

2.2.2 Modelling the Impact of Pressure and Temperature on the Process of Molecular Diffusion

Table 2 Data Set 2 - Measurements with constant petrophysical properties (\(\phi =\) 0.247, k = 2500 mD, and Sg = 1)
Fig. 3
figure 3

Effective diffusion coefficient as function of pressure and temperature of the Bentheimer Sandstone sample (sample A)

A mathematical model to describe the bulk diffusion coefficient in dependency on pressure and temperature is developed based on the correlation for the tortuosity factor. Here, a second degree (2x2y) polynomial regression of the second data set (see Table 2) is used to predict the effective diffusion coefficient (see Fig. 3). The impact of the porous medium can be eliminated with Eqs. (89). The best fit for the bulk diffusion coefficients in dependency of temperature and pressure is achieved with the following coefficients:

$$\begin{aligned} \mathrm {HMHG_{thermo}} : \quad D^\textrm{AB}_\textrm{bulk} (T,p)&=\beta _1 + \beta _2 T + \beta _3 p + \beta _4 T^2 + \beta _5 T p + \beta _6 p^2 \end{aligned}$$
(10)
$$\begin{aligned} \beta _1&= 3.61069 \times 10 ^ {- 5} \text { } \mathrm {{m} ^ {2} /s} \end{aligned}$$
(11)
$$\begin{aligned} \beta _2&= -1.46672 \times 10^{-7} \text { }\mathrm {m^2/(K\; s)} \end{aligned}$$
(12)
$$\begin{aligned} \beta _3&= -1.74842 \times 10^{-12} \text { }\mathrm {m^2/(Pa\; s)} \end{aligned}$$
(13)
$$\begin{aligned} \beta _4&= 1.67793 \times 10^{-10} \text { }\mathrm {m^2/(K^2 \; s)} \end{aligned}$$
(14)
$$\begin{aligned} \beta _5&= 2.95155 \times 10^{-15} \text { }\mathrm {m^2/(Pa \; K \; s)} \end{aligned}$$
(15)
$$\begin{aligned} \beta _6&= 3.71863 \times 10^{-20} \text { }\mathrm {m^2/(Pa^2 s)} \end{aligned}$$
(16)

Afterwards, the developed correlations (Eqs. 9, 1016) can be merged into its final form of:

$$\begin{aligned} D^{\textrm{AB}}_\textrm{pm}&= \phi \tau \left( \phi , S_g, k\right) S_g D^{\textrm{AB}}_\textrm{bulk}\left( p,T\right) \end{aligned}$$
(17)

in terms of the new correlation:

$$\begin{aligned} D^{\textrm{AB}}_\textrm{pm}&= \phi \mathrm {HMHG_{poro}}(\phi ,S_g,k) S_g \mathrm {HMHG_{thermo}}(p,T) \end{aligned}$$
(18)

2.3 Comparison to Existing Correlations and Estimation of Relative Error

The developed correlations (Eqs. 9, 10, and 18) are compared with existing models. Correlations for the tortuosity factor and the bulk diffusion coefficient are examined independently. Afterwards, the relative error of the developed and existing correlation sets is estimated and compared.

2.3.1 Bulk Binary Diffusion Coefficient

The difficulty of accurately measuring gas–gas bulk diffusion coefficients at higher temperatures and pressures leads to a limited number of correlations describing this parameter. A typical correlation is Fuller’s method (cf. Eq. 19) (Fuller and Giddings 1965; Fuller et al. 1966, 1969), which shows good accuracies in low-pressure range (< 10 bar) according to literature (Poling et al. 2001). An advantage of this correlation is the general formulation which enables the prediction of various binary combinations of components:

$$\begin{aligned}&D^{\textrm{AB}}_\textrm{bulk} = \frac{0.0143 T^{1.75}}{p M_{\textrm{AB}}^{0.5} \left( \left( \Sigma _v\right) _A^{1/3}+\left( \Sigma _v\right) _B^{1/3}\right) ^2} \end{aligned}$$
(19)
$$\begin{aligned}&M_{\textrm{AB}} = \frac{2}{\frac{1}{M_\textrm{A}} + \frac{1}{M_\textrm{B}}} \end{aligned}$$
(20)

where \(D^{\textrm{AB}}_\textrm{bulk}\) is the bulk binary diffusion coefficient in \(\mathrm {m^2/s}\), T is the temperature in K, p is the pressure in Pa, \(M_{\textrm{AB}}\) is the harmonic mean of the molecular weight of components A and B in g/mol, and \(\Sigma _v\) is the atomic diffusion volume.

Figure 4 depicts the trend of the bulk diffusion coefficient versus pressure according to Fuller’s method and the developed correlation. While Fuller’s method leads to a strongly monotonic decreasing diffusion coefficient with increasing pressure, the developed correlation leads to an initial decrease followed by an increasing diffusion coefficient. This yields consistent results at low-medium pressures (\(\approx\) 25 bar), but the deviation between both models grows with increasing pressure. Based on the experimental investigations and developed correlation, the bulk diffusion coefficients seem to be higher than expected. According to the theory (Einstein 1905; Von Smoluchowski 1906), the behaviour as predicted by Fuller’s method is more reasonable than the correlation in the present study. However, Guevara-Carrion et al. (2019) described a similar trend as observed in the presented experiments. Guevara-Carrion et al. (2019) concluded that this phenomenon is caused by the transition between liquid-like to gas-like state within the supercritical region, which could also be applicable in the present study. Nevertheless, the measurement of the bulk diffusion coefficient in a similar experimental approach without a core specimen is recommended to determine experimentally the data point (see Sect. 2.2.1), which is currently based on Fuller’s method.

Fig. 4
figure 4

Comparison of bulk diffusion coefficients determined with Fuller’s method and the proposed correlation as function of pressure

2.3.2 Tortuosity Factor

The commonly used model of Millington and Quirk (1961) is compared with the developed correlation for the tortuosity factor. The model of Millington & Quirk estimates the tortuosity factor of a porous medium based on its porosity and gas saturation (cf. Eq. 21). This leads to the situation that rock samples with large pores and tiny pore throats can possess the same tortuosity as specimens with comparatively small pores and big pore throats. Figure 5 compares the developed correlation for two different porosities. Both correlations generally show an increasing tortuosity factor with increasing petrophysical properties and gas saturation. This is physically reasonable as the higher the tortuosity factor, the more it behaves as a bulk volume (\(\tau _\textrm{bulk} =1\)). Furthermore, with increasing saturation, the deviation between both models increases so that at high gas saturations, the tortuosity factor in the correlation is approximately 3 to 4 times lower than the result of the model of Millington & Quirk.

$$\begin{aligned} \tau = \phi ^{1/3} S_g^{7/3} \end{aligned}$$
(21)
Fig. 5
figure 5

Comparison of tortuosity factor determined with Millington & Quirk and the proposed correlation as function of gas saturation, porosity, and absolute permeability. To determine the impact of relative permeability, the Brooks–Corey model (Brooks and Corey 1964) is used, parameterised with \(S_{wc} = 0.2\) and \(\lambda = 2\)

2.3.3 Overview of Correlated Effective Diffusion Coefficients and Error Analysis

Fig. 6
figure 6

Comparison of correlated (model HMHG and FMQ) and measured effective diffusion coefficient of the porous media (sample A)

With respect to the accuracy of the correlations, the correlated results of the proposed model (HMHG) and the established combination of Fuller’s method and Millington & Quirk (FMQ) to the laboratory observations are compared. Specifically, for the reference sample A, the comparison is depicted in Fig. 6. Regarding the pressure trend, the observations are analogous to Sect. 2.3.1 as it is only scaled by the product of the porosity, gas saturation, and the tortuosity factor of sample A. More interesting is the diverging trend of the diffusion coefficient with increasing temperatures. Here, the results of model FMQ shows an increasing quasilinear behaviour; while, the experimental observations indicate a decreasing trend. The general trend is reproduced by model HMHG, although at high temperatures, the deviation between measured and correlated coefficients is increasing. As an additional parameter of the accuracy of the models, the relative error is determined:

$$\begin{aligned} \delta _{D_\textrm{pm}^\textrm{AB}} = \frac{D_\textrm{pm}^\textrm{measured}- D_\textrm{pm}^\textrm{correlated}}{D_\textrm{pm}^\textrm{measured}} \end{aligned}$$
(22)

An overview of the corresponding results is listed in Tables 3 and 4. The suggested model shows good results mimicking and predicting the measured effective diffusion coefficients with relative errors of less than 50%. Only four experiments showed higher relative errors for which the correlation shows insufficient accuracy. The high error with the saturated samples is subject to stronger uncertainties in the experimental procedure and, therefore, the relative error may not be representative. The remaining remarkable deviations were samples measured at the experimental matrix’s higher boundaries and exceeding these conditions. Furthermore, the binary diffusion coefficient is overestimated for these cases; therefore, the coefficient is higher than observed. Regarding the significant deviation of 615% for sample H, the temperature is located at the upper boundary, the pressure exceeds the upper limit, and the permeability is the lowest of the entire measurement series. In this region, the model reaches its limitations. In these circumstances, additional experiments could lead to improved tuning within this region. Nevertheless, the correlation shows promising results for typical storage conditions within the European Union regarding temperature, pressure, and petrophysical properties.

In comparison with the developed correlation, model FMQ indicates higher relative errors. Here, deviations of more than 100 % can be regularly observed. Therefore, the developed correlation seems to give more accurate results. Remarkable are high errors within model FMQ’s low temperature and pressure region. Within this region, Fuller’s method is stated to be accurate, which could indicate inaccurate modelling of the tortuosity factor of the investigated rock samples with Millington & Quirk.

Table 3 Overview of the correlated diffusion coefficients—Model HMHG corresponds to proposed correlation of this study; while, model FMQ represents the combination of Fuller’s method and Millington & Quirk
Table 4 Overview of the correlated diffusion coefficients—Model HMHG corresponds to proposed correlation of this study; while, model FMQ represents the combination of Fuller’s method and Millington & Quirk

3 Validation of Numerical Implementation by Reproduction of Experimental Results

To predict the mixing effects governed by molecular diffusion on larger scales, the experiments are reproduced within numerical simulations of the transport process in porous media. Here, the open-source simulator DuMux is used, which has been in development by the University of Stuttgart (Institute of Modelling Hydraulic and Environmental Systems) since 2007 (Koch et al. 2020; Flemisch et al. 2011). It is based on the numeric framework DUNE (Bastian et al. 2021; Sander 2021) and is provided as an additional module to model the reactive fluid flow in porous media. DuMux is the abbreviation for ’DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media’. In the past, the simulator has provided good results reproducing investigations on the lab scale (Feldmann et al. 2020), but also the simulation on field-scale, such as UHS scenarios, led to promising outcomes (Hagemann 2018; Hogeweg et al. 2022).

3.1 Simulation Model

In this study, the model considers the two-phase n-component flow, including advective and diffusive transport in porous media. The simulation model is developed to describe unique processes during hydrogen storage in the subsurface. Adaptations are considered, such as within the fluid system and implementing geo- and biochemical reactions (Hogeweg and Hagemann 2022) caused by the insertion of hydrogen. However, these reactions do not occur in the present study. Here, only a calibration of the diffusive flux was done for consecutive field-scale simulations.

3.1.1 Fluid System

The fluid system is composed of one phase (gas) with two components (H2 and CH4), which can be expanded by additional phases and components with respect to potential UHS scenarios. The gas density is modelled by Peng and Robinson (1976) to consider the compressibility of the gaseous phase in dependency of pressure and temperature. Furthermore, the dynamic viscosity of the gaseous phase is described by a combination of Stiel and Thodos (1961) and Lohrenz et al. (1964), whereby the impact of viscosity differences is expected to be small due to the minuscule pressure gradients in this study. To integrate the observations from the laboratory into the fluid system, the developed correlation of the bulk diffusion coefficient (Eq. 10-16) is implemented and, additionally, the diffusivity (fluid-matrix-interactions) is adapted to the corresponding one of the tortuosity factor (Eq. 89).

3.1.2 Spatial Discretisation

For the spatial discretisation, representing the core sample (\(\approx\) 6 cm) between the two chambers, a one-dimensional grid with 100 equidistant elements is defined. While the first chamber possesses a relative large volume, the second chamber represents only the gas distribution element. An extrusion factor corresponding to its area is introduced to consider the axial cross section of the rock specimen. For the discretisation method, the box method (control volume finite element method) is selected due to its versatile possibilities of evaluating gradients locally. The porosity and permeability of the domain are defined homogeneously and parameterised with the measured values from the laboratory.

3.1.3 Initialisation and Boundary Conditions

With respect to the initialisation of the system, all elements contain only gas, which is composed entirely of hydrogen following the experimental procedure. The pressure and temperature are defined as the experimental conditions.

To model the two chambers at the sides of the core sample (cf. Fig. 7), time-dependent Dirichlet boundaries are used to mimic the changing concentrations of hydrogen and methane within the chambers. The time-dependent Dirichlet boundaries are updated explicitly in every timestep. Based on the substance present in a chamber (cf. Eq. 23), the molar concentration can be determined by Eq. 24.

$$\begin{aligned}&pV = nRTZ \end{aligned}$$
(23)
$$\begin{aligned}&c^\kappa = \frac{n^\kappa }{\sum _\kappa n^\kappa } \end{aligned}$$
(24)

where p is the pressure in Pa, V is the volume of the chamber in m3, n is the amount of substance in mol, R is the universal gas constant in J/(K\(\cdot\)mol), Z is the compressibility factor, and \(c^\kappa\) is the concentration of component k.

Fig. 7
figure 7

Schematic representation of the domain including the modelling of the chambers

The concentration change in the chambers is determined by a material balance for each chamber of the previous and current timestep (Eq. 25).

$$\begin{aligned} n^\kappa _t = n_{t-1}^\kappa - \frac{\textrm{d} n^\kappa }{\textrm{d} t} \Delta t \end{aligned}$$
(25)

where t denotes the new time, \(t-1\) corresponds to the previous timestep, and \(\Delta t\) is the timestep size in s. The change in substance over time is thereby influenced by the flux over the boundary and additional injection/production in/from the chamber.

$$\begin{aligned} \frac{\textrm{d} n^\kappa }{\textrm{d} t} = q_{\Gamma _D}^\kappa + q^\kappa _\textrm{inj}-q^\kappa _\textrm{pro} \end{aligned}$$
(26)

where \(q_{\Gamma _D}\) is the flux over the Dirichlet boundary in mol/s and \(q_\textrm{inj}\) and \(q_\textrm{prod}\) are the injection and production rates from a chamber in mol/s. The boundary flux can be obtained implicitly with:

$$\begin{aligned} q_{\Gamma _D}^\kappa = \Bigl (\underbrace{c_g^\kappa \frac{K k_{rg}}{\mu _g} \nabla p}_\text {advective flux} + \underbrace{D^{\kappa ,\textrm{eff}}_\textrm{pm} \nabla c_g^\kappa }_\text {diffusive flux}\Bigr ) {\hat{\rho }}_g A \end{aligned}$$
(27)

where K is the absolute permeability in m2, \(k_{rg}\) is the relative permeability (here: \(k_{rg} = 1\) due to single-phase gas flow), \(\mu _g\) is the dynamic viscosity of the gaseous phase in \(\mathrm {Pa\cdot s}\), \({\hat{\rho }}_g\) is the molar density in \(\mathrm {mol/m^3}\), and A is the extruded cross section area in \(\mathrm {m^2}\).

Concerning the first chamber, where a continuous injection of methane and production of the gas mixture occurs, the contribution to the gas composition is summarised in Eqs. (2829). For the production composition, the concentration of the previous timestep is selected to simplify the numerical model. However, one limitation is that the maximum timestep size directly depends on the volume of the tiny chamber 1 and the rate of the continuous flushing and is therefore set to 20 s in the present study.

$$\begin{aligned}&q^\kappa _\textrm{inj} = c^\kappa _\textrm{inj} q_\textrm{flush}\ \end{aligned}$$
(28)
$$\begin{aligned}&q^\kappa _\textrm{pro}= c^\kappa _{\textrm{ch1,}t-1} q_\textrm{flush} \end{aligned}$$
(29)

where \(c_\textrm{inj}\) is the injection composition (here: only methane), \(q_\textrm{flush}\) is the continuous production and injection rate in \(\mathrm {mol/s}\), \(c_{\textrm{ch1,}t-1}^\kappa\) is the concentration in chamber 1 of the previous timestep.

A summary of the boundary definition can be found in Table 5.

Table 5 Overview of the definition of the primary variables of the Dirichlet boundaries for chamber 1 and 2

3.2 Results and Comparison of Numerical Simulation with the Laboratory Observations

Fig. 8
figure 8

Comparison of hydrogen fractions versus time observed in laboratory and modelled in DuMux for the reference sample at reference conditions (\(T=\) 40 \(^\circ\)C and \(p=\) 100 bar)

Figure 8 compares the simulated and measured results of the reference case. The general matching parameter is the hydrogen concentration in the gas stream from chamber 1. It is evident that in the beginning, the initial hydrogen in chamber 1 is displaced by methane, leading to a rapid drop in the hydrogen concentration. Generally speaking, the higher the hydrogen concentration in chamber 1, the higher the flux of molecular diffusion. Regarding the quality of the match between observed and modelled data, the implementation in DuMux shows similar hydrogen concentrations and a congruent slope in dependency of time. Based on the simulations, it is also possible to evaluate the spatial distribution of the gas composition within the core sample as depicted in Fig. 9. Again, the simultaneous decrease in the hydrogen concentration and increase in methane content can be observed. For this specific case, the first influence of methane in the second chamber is remarkable after approximately 2000 s, with a continuously increasing trend.

Fig. 9
figure 9

Spatial distribution of hydrogen and methane concentration within the first 10000 s

The quality of the correlations and implementation is evaluated at different thermodynamic conditions. Figure 10 depicts measurements at typical storage conditions. The first case (\(T=\) 40 \(^\circ\)C and \(p=\) 50 bar) shows a deviation, which is expected due to the high relative error of \(\delta _{D_\textrm{pm}^\textrm{AB}} \approx\) 50 % of the correlation. For the other three cases, the modelling of the experiments yields congruent and satisfying results. Similar qualities of match with minor variance can be observed for the samples from actual storage formations (cf. Fig. 11).

Fig. 10
figure 10

Hydrogen concentration versus time for four selected cases of sample A (Bentheimer) at different thermodynamic conditions

Fig. 11
figure 11

Hydrogen concentration versus time for two arbitrary samples from actual storage formations

In general, implementing the developed correlation in DuMux permits a good reproduction of the laboratory experiments. Deviations between the modelled and observed results are mainly caused by inaccuracies in the developed correlation.

4 Conclusions

With hydrogen injection in former gas fields or storage formations, the prediction of mixing behaviour with the initial gas becomes important. In this study, a combination of correlations describing the bulk diffusion and the tortuosity factor of the rock specimen was developed based on performed laboratory experiments on various samples at the range of typical reservoir conditions. Compared to existing models, the proposed correlation yields lower relative errors for the measured results and showed only some exceptions within the range of more than 100 %. Although weaknesses could be observed regarding combinations of high pressure and temperature, the proposed model shows accurate results for typical storage rocks with a wide range of porosity and permeability (17% \(< \phi <\) 32% and 17 mD \(< k <\) 2500 mD). However, whether the developed model applies to other rock types, such as tight sandstones and shale, is questionable as pore connectivity may vary, and further processes (e.g. adsorption at rock surface) may become significant. The limitations regarding thermodynamic conditions are 10 bar \(< p <\) 200 bar and 25 \(^\circ\)C \(< T<\) 100 \(^\circ\)C. Further experiments conducted in extreme thermodynamic environments could lead to improved results and extend the correlations. Measurements of additional gas compositions could be used for a more general description of the bulk diffusion coefficients and experiments addressing the tortuosity factor of the specimen could also mitigate remaining uncertainty of the model.

The implementation of the developed correlations into the open-source simulator DuMux allowed the reproduction of the observed data within the accuracy of the correlation. Here, the adaptability of the source code allowed a straightforward implementation of the correlation and the experimental procedure, which might be limitations in other simulators. The extension of the simulation model can be used to predict the impact of molecular diffusion during hydrogen storage in the subsurface. Nevertheless, the transfer from laboratory-scale to the field-scale should be verified empirically based on actual field data.