1 3D Benchmark of Free Thermal Convection in a Faulted System

Fabien Magri, Mauro Cacace, Thomas Fischer, Dmitri Naumov, Wenqing Wang, Norihiro Watanabe, Marc Walther

1.1 Introduction

In a geothermal system, unstable fluid density profiles due to temperature variations can trigger the onset and development of free thermal convective processes (Elder 1967). Early studies on the problem showed that the development of free thermal convection in the Earth’s crust require a relatively high permeability of the porous rocks (Lapwood 1948). Since the permeability inside the damaged area of major fault zones can far exceed the permeability of the enclosing rocks (Wallace and Morris 1986), one can expect the development of free thermal convective instabilities to occur in such tectonically perturbed rocks. The onset of thermal convection of a single-phase fluid in a vertical fault enclosed in impermeable rocks was considered in a full 3D approximation by Wang et al. (1987). A fundamental result of those investigations was that highly permeable faults allow for onset of free thermal convection even under a normal (e.g. 30 \(^{\circ }\mathrm{C}\cdot \mathrm{km}^{-1}\)) geothermal gradient. In contrast to simple homogenous 1D and 2D systems, no appropriate analytical solutions can be derived to test numerical models for more complex 3D systems that account for variable fluid density and viscosity as well as permeability heterogeneity (e.g. presence of faults). Owing to the efficacy of thermal convection for the transport of thermal energy and dissolved minerals in the moving fluid, a benchmark case study for density/viscosity driven flow is crucial to ensure that the applied numerical model accurately simulates the physical processes.

The presented chapter proposes a 3D benchmark test for the simulation of thermal convection in a faulted system that accounts for temperature dependent fluid viscosity. The linear stability analysis recently developed by Malkovsky and Magri (2016) is used to estimate the critical Rayleigh number within the fault: by definition, thermal convection occurs or is absent if a small perturbation develops or decays with time, i.e. at Rayleigh numbers higher or lower than the critical value, respectively. OGS-6 results are compared to those obtained using the commercial software FEFLOW (Diersch 2014) to test the ability of the open source code in matching both the critical Rayleigh number at which convection occurs and the dynamical features of convective processes. Additionally, the results derived from an application relying on the GOLEm simulator (Cacace and Jacquey 2017) are also presented. Despite some internal differences between the three software in handling the nonlinear coupling of thermal and hydraulic processes, all models are qualitatively comparable.

1.2 Problem Formulation HT

Let us consider a faulted geological system, with height H, as shown in Fig. 7.1. It is assumed that temperatures T at lower (\(z=0\)) and upper (\(z=H\)) boundaries of the rock layer are fixed and equal to \(T_h\) and \(T_c\), respectively, and \(T_c < T_h\) (subscripts h and c for hot and cold, respectively). Rock properties such as density, specific heat capacity and thermal conductivity of the whole system (i.e. fault zone and enclosing rocks) are homogeneous and temperature-invariant. The fault zone permeability is k, whereas that of the enclosing rocks is negligibly small.

Fig. 7.1
figure 1

Schematic representation of a single fault embedded in conductive rocks. The fault width is \(2\delta \), and \(\varDelta =\frac{\delta }{H} \) is half of the aspect ratio of the fault. \(T_{c} \) and \(T_{h} \) are top (cold) and bottom (hot) temperature boundary conditions

Governing Equations

Fluid velocity components \(v_{x}\), \(v_{y}\), and \(v_{z}\) satisfy Darcy’s law

$$\begin{aligned} v_{x} =-\frac{k}{\mu } \frac{\partial p}{\partial x} ,\quad v_{y} =-\frac{k}{\mu } \frac{\partial p}{\partial y} ,\quad v_{z} =-\frac{k}{\mu } \left( \frac{\partial p}{\partial z} +\rho g\right) \end{aligned}$$

where x, y, and z are cartesian coordinates, p is pressure, k is the permeability of the rocks, \(\mu \) is dynamic viscosity of the fluid, \(\rho \) is density of the fluid. The permeability distribution in the considered rock layer can be represented as:

$$\begin{aligned} k=\left\{ \begin{array}{c} {k,\quad \left| y\right|<\delta ,\; 0<z<H,} \\ {0,\quad \left| y\right| \ge \delta ,\; 0<z<H} \end{array}\right. \end{aligned}$$

where \(2\delta \) is width of the fault zone.

We assume that over given temperature ranges at hydrostatic pressure the dependence of fluid density on temperature can be approximated by a linear function (Bear 1972)

$$\begin{aligned} \rho =\rho _{0} \left[ 1-\beta \left( T-T_{c} \right) \right] \end{aligned}$$

where \(\rho _{0} \) is fluid density at \(T=T_{c} \), \(\beta \) is fluid thermal expansion coefficient.

Temperature dependence of fluid viscosity can be approximated by the function

$$\begin{aligned} \mu (T)=\mu _{0} \exp \left( -\frac{T-T_{c} }{T_{v} } \right) \end{aligned}$$

where \(\mu _{0} =\mu (T_{c})\) and \(T_{v} \) are approximation constants. This equation of state (EOS) provides good fit over temperature variations of 150 \(^{\circ }\) C as shown later in the numerical examples.

The continuity equation in the Boussinesq’s approximation takes the form

$$\begin{aligned} \frac{\partial v_{x} }{\partial x} +\frac{\partial v_{y} }{\partial y} +\frac{\partial v_{z} }{\partial z} =0 \end{aligned}$$

Temperature distribution in the fault zone satisfies the equation

$$\begin{aligned} \rho _{r} c_{r} \frac{\partial T}{\partial t} +\rho c\left( v_{x} \frac{\partial T}{\partial x} +v_{y} \frac{\partial T}{\partial y} +v_{z} \frac{\partial T}{\partial z} \right) =\lambda \left( \frac{\partial ^{2} T}{\partial x^{2} } +\frac{\partial ^{2} T}{\partial y^{2} } +\frac{\partial ^{2} T}{\partial z^{2} } \right) \end{aligned}$$

where t is the time, \(\rho _{r}\) and \(c_{r}\) are density and specific heat capacity of the rock, \(\lambda =n\lambda _{l} +\left( 1-n\right) \lambda _{s} \) is averaged thermal conductivity of the fluid (subscript l for liquid) and the saturated rocks (subscript s for solid), and n is rock porosity.

The fluid velocity is zero outside the fault. Therefore, the temperature distribution outside the fault satisfies the equation

$$\begin{aligned} \rho _{r} c_{r} \frac{\partial \vartheta }{\partial t} =\lambda \left( \frac{\partial ^{2} \vartheta }{\partial x^{2} } +\frac{\partial ^{2} \vartheta }{\partial y^{2} } +\frac{\partial ^{2} \vartheta }{\partial z^{2} } \right) \end{aligned}$$

where \(\vartheta \) is the temperature in the considered layer outside the fault (\(0<z<H\); \(\left| y\right| >\delta \)).

Boundary Conditions

The upper and lower boundaries of the layer are impermeable (i.e. the normal component of the velocity at the top and bottom sides of the model is equal to zero). Therefore, conditions for the pressure at these boundaries take the form:

$$\begin{aligned} \begin{array}{c} {z=0,\quad \frac{\partial p}{\partial z} +\rho _{0} g\left[ 1-\beta \left( T_{h} -T_{c} \right) \right] =0;} \\ {z=H,\quad \frac{\partial p}{\partial z} +\rho _{0} g=0.} \end{array} \end{aligned}$$

The lower and upper boundaries of the layer are isothermal, i.e.:

$$\begin{aligned} z=0,\; T=\vartheta =T_{h} ;\quad z=H,\; T=\vartheta =T_{c} , \end{aligned}$$
$$\begin{aligned} T_{h} >T_{c} \end{aligned}$$

Sides are insulated.

Rayleigh Theory

The OGS implementation given above allows to directly calculating the Rayleigh number, by example, at the top cold temperature \(T_{c}\), using the following formula:

$$\begin{aligned} \mathrm {Ra}=\frac{k\rho _{0}^{2} cg\beta \left( T_{h} -T_{c}\right) H}{\lambda \; \mu _{0}} \end{aligned}$$
(7.1.1)

Malkovsky and Magri (2016) provide a simple polynomial fit to estimate the critical Rayleigh number \(\mathrm {Ra}_\mathrm {crit}\) for temperature-dependent viscous fluids

(7.1.2)

where \(\gamma =\frac{T_{h} -T_{c} }{T_{v} } \) characterizes the viscous property of the saturating fluid and \(\mathrm{\; }\varDelta =\frac{\delta }{H} \) is half of the fault aspect ratio. Thermal convection develops for \(\mathrm {Ra}>\mathrm {Ra}_\mathrm {crit} \).

1.3 Numerical Benchmark

All models refer to an embedded 3D fault with aspect ratio \(\frac{2\delta }{H} =7.3\cdot 10^{-3} \) (i.e.\(\varDelta =3.65\cdot 10^{-3}\)). Specifically, the dimensions of the modeled fault are \(H=5000\) m and \(\delta =40\) m discretized with prismatic elements (Fig. 7.2).

Fig. 7.2
figure 2

Modeled faulted system displaying the finite element mesh and temperature boundary conditions. \(107'000\) hexahedral elements discretize the faulted block. A mesh refinement is performed within the 40 m wide fault (zoom). The top and bottom temperature boundary conditions are 10 and 160 \(^{\circ }\)C respectively, corresponding to an initial geothermal gradient of approximately 27 \(^{\circ } \mathrm{C} \cdot \mathrm{km}^{-1}\)

Material and Solid Properties

The physical properties of both fault and enclosing rocks are homogenous and isotropic, as given in Table 7.1.

Table 7.1 Medium and solid properties. For simplicity, storage and heat capacity are set to 0

Fluid Properties

At the given pressure, the EOS for fluid viscosity \(\mu (T)=\mu _{0} \exp \left( -\frac{T-T_{c} }{T_{v} } \right) \) and fluid density \(\rho =\rho _{0} \left[ 1-\beta \left( T-T_{c} \right) \right] \) are sufficient to describe fluid properties at liquid phase over temperature ranges \(T_{h} -T_{c} \approx 150\,^{\circ }\mathrm{C}\) or smaller. Both EOS have been implemented into the applied software. Fluid properties used in the benchmark are summarized in Table 7.2.

Table 7.2 Fluid properties. \({\mu }_0\) \({\rho }_0\) at \(T_0=20\,^{\circ }\mathrm{C}\) are \(10^{-3}\mathrm{Pa}\cdot \mathrm{s}\) and \(1000\,\mathrm{kg}\cdot \mathrm{m}^{-3}\), respectively

Initial and Boundary Conditions

This benchmark illustrates a low enthalpy geothermal system, where 20\(\le \ \mathrm{T}\ \le 170\,^{\circ }\mathrm{C}\). An example of a high enthalpy system can be found in Malkovsky and Magri (2016).

In all models, the initial pressure is hydrostatic and the initial temperature \(T^\mathrm {init}\) increases linearly with depth, from 20 to \(170\,^{\circ }\mathrm{C}\) (top and bottom Dirichlet boundary conditions, Fig. 7.2).

Within the fault, a perturbation of the form \(\varepsilon (x, z)=\sin (\pi z)\cos (\pi x)\) is added to \(T^\mathrm {init}\) in order to trigger a circular convective cell within the fault plane (x-z). The amplitude of the perturbation is \(\pm 1\,^{\circ } \mathrm{C}\).

Rayleigh Number Setup

\(\mathrm {Ra}\) is calculated with Eq. (7.1.1), i.e. at the reference top temperature \(T_{c} = 20\,^{\circ }\mathrm{C}\), with \(T_{h} -T_{c} = 150\,^{\circ } \mathrm{C}\). Using the values given in the tables, this benchmark refers to an estimated \(\mathrm {Ra}=829\).

According to Eq. (7.1.2), at \(\varDelta =3.65\cdot 10^{-3} \) and \(\gamma =2\), the onset of convection is triggered at the critical Rayleigh number \(\mathrm {Ra}^\mathrm {crit} \approx 753\).

Simulation Time, Time Scheme

The simulated period is \(2\cdot 10^{11}\mathrm{s}\). Simulations were run using a fixed-time stepping (user defined).

1.4 Results

The calculated Darcy flow field and temperature anomaly \(\varepsilon =T-T^\mathrm {init} \) are illustrated in Fig. 7.3 at the end of the simulated period for the case \(Ra=829\).

Fig. 7.3
figure 3

OGS-6 results for the final time at the fault plane; \(\mathrm {Ra}=829\); left: temperature perturbation \(\varepsilon =T-T^\mathrm {init} \), right: Darcy velocity field

OGS results compare well against those obtained with FEFLOW (Fig. 7.4). It can be seen that the patterns as well as the temperature and velocity ranges are in excellent agreement with OGS results. Minor differences can only be observed in the peak values.

Fig. 7.4
figure 4

FEFLOW results for the final time at the fault plane; \(\mathrm {Ra}=829\); left: temperature perturbation, right: Darcy velocity field

Remarks to the Users

Here it is worth recalling that in density-driven flow problems different type of numerical implementation (e.g. weak coupling vs. monolithic) or applied solver induces numerical errors which propagation modifies the developing fingers. As a result, the temporal evolution of the temperature perturbation vary, depending on the software applied, as observed in the different peak values calculated with OGS-6 and FEFLOW.

As an additional example, Fig. 7.5 shows the results obtained with GOLEm which uses a full monolithic formulation while dealing with the nonlinearities between the two processes without making use of the Boussinesq approximation.

Fig. 7.5
figure 5

MOOSE results for the final time at the fault plane; \(\mathrm {Ra}=829\); left: temperature perturbation, right: Darcy velocity field

It can be seen that patterns, though qualitatively very similar to those derived from OGS (Fig. 7.3) and FEFLOW (Fig. 7.4), show some deviations in the magnitudes and geometry of computed thermal anomalies in the fault plane.

1.5 OGS-6 and OGS-5 Computing Time

Scaling tests were performed on two discretized meshes, obtained from sequential refinements of the original grid with \(107'000\) elements illustrated in Fig. 7.2. The first and second refinements (Ref1, Ref2) led to \(859'000\) and \(6'871'000\) hexahedral elements, respectively. The OGS simulations were performed on the EVE cluster system at the UFZ using computing nodes with 20 cores (Intel® Xeon® CPU E5-2670 v2, 20 MB cache per core). For each simulation we reserved a 20 core compute node with 64 GB main memory such that a simulation run fits a compute node. Full nodes were allocated to avoid internode communication.

Table 7.3 summarizes the computational time needed to solve the described 3D benchmark: (1) OGS-6 runtimes decrease for single core and parallel appliances in comparison to OGS-5; (2) it can be seen that on refined meshes (e.g. Ref1, 2) with a high degree of parallelization (e.g. \({>}60\) cores) OGS-6 is up to a factor 20 faster than OGS-5; (3) for Ref1 in both applications, both OGS-5 and OGS-6, show a clear decrease of the efficiency for 60 or more cores.

The better performance and scaling of OGS-6 versus OGS-5 relies on: (1) a fully coupled HT approach, i.e. monolithic scheme in OGS-6 using a Newton–Raphson method versus a staggered scheme in OGS-5 using fixed-point iterations, and (2) computation of shape functions and derivatives. In OGS-6, this is done only once at the beginning of the simulation run, while in OGS-5, computation of shape functions is performed at each integration point for each local assembly.

Table 7.3 Computing time (in [s]) OGS-6 versus OGS-5 for different refinements

1.6 Summary

A numerical benchmark for the simulations of thermal convection onset of a single-phase fluid with temperature dependent viscosity in a vertical permeable fault is proposed.

OGS-6 successfully simulates the onset of thermal convection at critical Rayleigh numbers inferred from recently developed linear stability analysis (Malkovsky and Magri 2016). The parallelization in OGS-6 for this type of problem shows great computational and scaling improvements with respect to the previous version. OGS results are consistent with those obtained with FEFLOW and GOLEm. Owing to strong coupling of the partial differential equations, the numerical solutions are highly sensitive to numerical errors that can be due to different applied methods and/or solver settings. Consequently, the calculated patterns are all qualitatively similar while differences in the calculated values exist. Therefore, results of case-studies must be interpreted carefully and require additional constraints (field data).

The given example provides a useful benchmark that can be applied to any numerical code of thermally-driven flow processes at basin-scale (Table 7.4).

Table 7.4 Benchmark deposit (https://docs.opengeosys.org/books/bmb-5)

2 2D Benchmark of Large-Scale Free Thermal Convection

Tianyuan Zheng, Fabien Magri, Dmitri Naumov, Thomas Nagel

This is a summary of a 2D benchmark test for the simulation of thermal convection in a km-scale porous media that accounts for temperature-dependent fluid viscosity and density. This problem is analogous to the 3D case presented in Sect. 7.1. By definition, thermal convection occurs or is absent if a small perturbation develops or decays with time.

OGS-6 results (monolithic approach) are compared to those obtained with the commercial software FEFLOW (Diersch 2013) to test the ability of the open-source code in matching the dynamical features of convective processes.

2.1 Problem Formulation

Let us consider a 2D vertical square as illustrated in Fig. 7.6, i.e. the fault plane as previously illustrated in the 3D case (Fig. 7.2). It is assumed that temperatures at lower (\(z=0\)) and upper (\(z=H\)) boundaries of the rock layer are fixed and equal to \(T_\mathrm {h}\) and \(T_\mathrm {c}\), respectively, and \(T_\mathrm {c} < T_\mathrm {h}\). Rock properties such as density, specific heat capacity and thermal conductivity of the whole system are considered homogeneous and temperature-invariant.

Fig. 7.6
figure 6

2D domain and FE mesh. Square 5.5 \(\times \) 5.5 km; 32 \(\times \) 32 elements

Governing Equations

Fluid velocity components \(v_{x} ,\; v_{z} \) satisfy Darcy’s law:

$$\begin{aligned} v_{x} =-\frac{k}{\mu } \frac{\partial p}{\partial x}, \quad v_{z} =-\frac{k}{\mu } \left( \frac{\partial p}{\partial z} +\rho g\right) \end{aligned}$$
(7.2.1)

where p is the pressure, k is the intrinsic permeability of the rocks, \(\mu \) is the dynamic viscosity of the fluid and \(\rho \) is the density of the fluid.

We assume that over given temperature ranges at hydrostatic pressure the dependence of fluid density on temperature can be approximated by a linear function (Bear 1972).

$$\begin{aligned} \rho =\rho _{0} \left[ 1-\beta \left( T-T_{\text {c}} \right) \right] \end{aligned}$$
(7.2.2)

where \(\rho _{0} \) is the fluid density at \(T=T_\mathrm {c} \) and \(\beta \) is the fluid thermal expansion coefficient.

Temperature dependence of fluid viscosity can be approximated by the function:

$$\begin{aligned} \mu (T)=\mu _{0} \exp \left( -\frac{T-T_{\text {c}}}{T_\mathrm {v} } \right) \end{aligned}$$
(7.2.3)

where \(\mu _{0} =\mu (T_\mathrm {c} )\) and \(T_\mathrm {v} \) are approximation constants.

The continuity equation in the Boussinesq’s approximation takes the form:

$$\begin{aligned} \frac{\partial v_{x} }{\partial x} +\frac{\partial v_{z} }{\partial z} =0 \end{aligned}$$
(7.2.4)

Temperature distribution in the porous media satisfies:

$$\begin{aligned} \rho _\mathrm {r} c_\mathrm {r} \frac{\partial T}{\partial t} +\rho c\left( v_{x} \frac{\partial T}{\partial x} +v_{z} \frac{\partial T}{\partial z} \right) =\lambda \left( \frac{\partial ^{2} T}{\partial x^{2} } +\frac{\partial ^{2} T}{\partial z^{2} } \right) \end{aligned}$$
(7.2.5)

where t is the time, \({\rho }_\mathrm {r}\) and \(c_\mathrm {r}\) are density and specific heat capacity of the fluid saturated rocks, \(\lambda =n\lambda _\mathrm {f} +\left( 1-n\right) \lambda _\mathrm {s} \) is thermal conductivity of the fluid saturated rocks and n is the rock porosity.

Boundary Conditions and Initial Conditions

Boundary and initial conditions are identical to those of the 3D case, as given in Sect. 7.1.

2.2 Numerical Benchmark

Here, the values of the different physical properties of the numerical benchmark are given in Tables 7.6 and 7.5.

Material Properties

For simplicity, these values are constant and allowed for thermal convection.

At a given pressure, the EOS for fluid viscosity (Eq. 7.2.3) and fluid density (Eq. 7.2.2 are sufficient to describe fluid properties at liquid phase over temperature ranges \(T_\mathrm {h} -T_\mathrm {c} \approx 150\mathrm{\; {}^\circ C}\) or smaller. Both EOS have been implemented into OGS. Fluid properties used in the benchmark are summarized in Table 7.6.

Table 7.5 Medium and solid properties. For simplicity storage and heat capacity are set to 0
Table 7.6 Fluid properties \(\mu _0\) and \(p_0\) at \(T_0 = 20\,^{\circ }\)C are \(10^{-3}\) Pa s and 1000 kg/m\(^3\), respectively

Additionally, the case with constant viscosity (\(\mu =10^{-3} \)Pa s) will also be illustrated.

Numerical Setup

Due to the high non-linearity in this numerical model, the linear solver and time stepping were elaborately chosen. The direct solver SparseLU (Guennebaud et al. 2010) were used so solve the linear system and Picard iterations were employed for the non-linear iterations until convergence with a relative tolerance of \(10^{-5}\) was reached.

2.3 Results

Temperature-Dependent Viscosity

The calculated Darcy-flow field and temperature anomaly \(\varepsilon =T-T^\mathrm {init} \) are illustrated respectively in Fig. 7.7a and b at the end of the simulated period (Fig. 7.8).

Fig. 7.7
figure 7

Temperature perturbation (\({}^{\circ }\)C) at \(\mathrm{t}=5\cdot 10^{10}\) s

Fig. 7.8
figure 8

Darcy velocity field (m/s) at \(\mathrm{t}=5\cdot 10^{10}\) s

A single convective cell covering the entire domain forms. A thermally-driven plume flows along the bottom side of the PM at peak velocity of \(6.7\cdot 10^{-9}\) m/s. The resulting upwelling/downwelling increases/decreases the initial temperature profile. The solution displays periodical oscillations.

Constant Viscosity

Here the fluid viscosity is set to its reference value, (\(\mu =1\cdot 10^{-3}\) Pa s). Compared to the previous case, the temperature anomaly and the velocity field are less vigorous which highlights the strong destabilizing effects of temperature-dependent viscosity. These solutions are steady state (Figs. 7.9 and 7.10).

Fig. 7.9
figure 9

Temperature perturbation (\({}^{\circ }\)C) at \(\mathrm{t}=5\cdot 10^{10}\) s

Fig. 7.10
figure 10

Darcy velocity field (m/s) at \(\mathrm{t}=5\cdot 10^{10}\) s

2.4 Summary

  • A numerical benchmark for the simulations of 2D km-scale thermal convection onset of a single-phase fluid with temperature dependent viscosity and density is proposed.

  • OGS-6 successfully simulates the onset of thermal convection. OGS-6 results are consistent with those obtained with the previous version and FEFLOW (Table 7.7).

Table 7.7 Benchmark deposit (https://docs.opengeosys.org/books/bmb-5)

The OGS-6 version performed for this benchmark can be found in the master branch under:

The input files named square\({\_}\)5500x5500.prj are available at:

3 Two-Dimensional Transient Thermal Advection

Tianyuan Zheng, Xing-Yuan Miao, Dmitri Naumov, Thomas Nagel

Heat transport in a moving liquid is discussed in this section, and a series of benchmarks is presented comprising the transient two-dimensional temperature distribution in a moving liquid.

The following assumptions are made to simplify the problem:

  • Constant material properties

  • Neglecting viscous dissipation effects

  • Local thermal equilibrium

  • No phase change process

Table 7.8 Physical parameters

Hence, flow is not affected by temperature, but couples into heat transport via an advection term:

$$\begin{aligned} (\varrho c_\mathrm {p})\frac{\partial T}{\partial t} - \nabla \cdot \varvec{\lambda }\nabla T + \varrho _\mathrm {f}c_\mathrm {f}{\mathbf {q}} \nabla T = 0 \end{aligned}$$
(7.3.1)
$$\begin{aligned} \phi \kappa \frac{\partial p}{\partial t} = \nabla \cdot \left( \frac{{\mathbf {k}}}{\mu }\nabla p - \varrho _\mathrm {f}{\mathbf {g}}\right) \end{aligned}$$
(7.3.2)

where \(\varrho c_\mathrm {p}\) represents the heat capacity of the porous media \(\phi \varrho _\mathrm {f}c_\mathrm {f} + (1 -\phi )\varrho _\mathrm {s}c_\mathrm {s}\), \(\lambda \) represents the heat conductivity \(\phi \lambda _\mathrm {f} + (1 - \phi )\lambda _\mathrm {s}\) and \({\mathbf {q}}\) is the Darcy velocity. The different parameters and their values are given in Table 7.8.

Within the finite element framework, the above equations were cast into the following matrix form:

$$\begin{aligned} \begin{pmatrix} {\mathbf {M}}_{\text {TT}} &{} {\mathbf {0}} \\ {\mathbf {0}} &{} {\mathbf {M}}_{\text {pp}} \end{pmatrix} \begin{pmatrix} \dot{T} \\ \dot{p} \end{pmatrix} + \begin{pmatrix} {\mathbf {K}}_{\text {TT}} &{} {\mathbf {K}}_{\text {Tp}} \\ {\mathbf {0}} &{} {\mathbf {K}}_{\text {pp}} \end{pmatrix} \begin{pmatrix} T \\ p \end{pmatrix} = \begin{pmatrix} f_{\text {T}} \\ f_{\text {p}} \end{pmatrix} \end{aligned}$$
(7.3.3)

in which \({\mathbf {M}}_{TT} = ({\mathbf {N}})^\mathrm {T}\varrho c_\mathrm {p}{\mathbf {N}}\) indicates the thermal storage term, \({\mathbf {M}}_{pp} = ({\mathbf {N}})^\mathrm {T}\phi \kappa {\mathbf {N}}\) indicates the pressure-associated storage term for liquid flow, \({\mathbf {K}}_{TT} = (\nabla {\mathbf {N}})^\mathrm {T}\lambda \nabla {\mathbf {N}} + {\mathbf {N}}^\mathrm {T}\varrho _\mathrm {f}c_\mathrm {f}{\mathbf {q}}\nabla {\mathbf {N}}\) indicates the advection-diffusion matrix for heat transport, \({\mathbf {K}}_{pp} = (\nabla {\mathbf {N}})^\mathrm {T}\frac{{\mathbf {k}}}{\mu }\nabla {\mathbf {N}}\) is the Laplace matrix for liquid flow and \({\mathbf {K}}_{Tp} = (-{\mathbf {N}})^\mathrm {T}\beta _\mathrm {f}{\mathbf {N}}\) is the thermal expansion term which is only considered in the density-driven heat convection process described in the previous 2d thermal convection benchmark.

3.1 Transient 2D Heat Transport with Moving Liquid

In this benchmark, the storage term of the liquid flow equation is neglected, thus considering the flow process to be in steady state. A transient heat transport process is coupled with the steady-state flow.

The domain is a 2D rectangular domain extending 2 m by 1.5 m along the positive x and y axes. The liquid and solid are both incompressible and the gravity has been explicitly neglected. The storage term of the liquid flow equation is assumed to be zero. Pressure \(p = 200000\) Pa at the left boundary and zero at the right boundary drive with the steady-state flow along the x axis. A constant temperature \(T_\mathrm {b} = 274.15\,\mathrm {K}\) is given in the centre of the left boundary (from 0.5 to 1 m), whereas in the remaining domain the initial temperature is set to \(T_\mathrm {0} = 273.15\,\mathrm {K}\). The simulation evaluates the transient temperature distribution in the entire domain after 4000 s and the result is validated with an analytical solution (Fig. 7.11).

Fig. 7.11
figure 11

Spatial discretization

3.1.1 Analytical Solution

A similar analytical solution was described in Kolditz et al. (2016c), the rectangle with 2 \(\times \) 1.5 m located in the x-y plane and divided into 200 \(\times \) 150 square elements. The permeable porous media is considered, with isotropic permeability and porosity. The specified inlet temperature reads,

$$\begin{aligned} g(y) = {\left\{ \begin{array}{ll} 0 &{} \quad \mathrm {for} \quad y \le a \\ T_\mathrm {b} &{} \quad \mathrm {for} \quad a \le y \le b \\ 0 &{} \quad \mathrm {for} \quad y \ge b \end{array}\right. } \end{aligned}$$
(7.3.4)

The solution of pressure distribution and specific discharge is same with Kolditz et al. (2016c). For 1D flow along the x-axis, the pressure comes

$$\begin{aligned} p(x) = p_\mathrm {0} \left( 1 - \frac{x}{L_\mathrm {x}} \right) \end{aligned}$$
(7.3.5)

and the specific discharge q is obtained by Darcy’s law

$$\begin{aligned} q = \frac{k}{\mu }\frac{P_\mathrm {0}}{L_\mathrm {x}} \end{aligned}$$
(7.3.6)

Then the heat transport equation is considered (see Eq. 7.3.1). The following notations introduced:

$$\begin{aligned} {\begin{matrix} w = \frac{\phi \varrho _\mathrm {f} c_\mathrm {f}}{\phi \varrho _\mathrm {f}c_\mathrm {f} + (1-\phi )\varrho _\mathrm {s}c_\mathrm {s}}\frac{q}{\phi } \\ \chi = \frac{\phi \lambda _\mathrm {f} + (1 -\phi )\lambda _\mathrm {s}}{\phi \varrho _\mathrm {f}c_\mathrm {f} + (1 - \phi )\varrho _\mathrm {s}c_\mathrm {s}} \end{matrix}} \end{aligned}$$
(7.3.7)

The heat transport equations becomes

$$\begin{aligned} \frac{\partial T}{\partial t} + w\frac{\partial T}{\partial x} = \chi \left( \frac{\partial ^2 T}{\partial x^2} + \frac{\partial ^2 T}{\partial y^2}\right) \end{aligned}$$
(7.3.8)

and is complemented by the initial conditions

$$\begin{aligned} T(x,y, 0) = T_\mathrm {0} \end{aligned}$$
(7.3.9)

and the boundary conditions

$$\begin{aligned} {\begin{matrix} T(0,y, t) = g(y) \quad \mathrm {for} \quad t> 0 \\ \lim _{x \rightarrow \infty } T(x,y, t) = 0 \quad \mathrm {for} \quad t> 0 \\ \lim _{y \rightarrow \infty } T(x,y, t) = 0 \quad \mathrm {for} \quad t> 0 \\ \lim _{y \rightarrow -\infty } T(x,y, t) = 0 \quad \mathrm {for} \quad t > 0 \\ \end{matrix}} \end{aligned}$$
(7.3.10)

Performing a Laplace transformation with respect to t gives

$$\begin{aligned} s\frac{\partial {\bar{T}}}{\partial t} + w\frac{\partial {\bar{T}}}{\partial x} = \chi \left( \frac{\partial ^2 {\bar{T}}}{\partial x^2} + \frac{\partial ^2 {\bar{T}}}{\partial y^2}\right) \end{aligned}$$
(7.3.11)

where T is the Laplace transform of T and s is the transformation parameter. The boundary conditions convert to

$$\begin{aligned} {\begin{matrix} T(0,y,s) = \frac{g(y)}{s} \\ \lim _{x \rightarrow \infty } T(x,y, s) = 0 \\ \lim _{y \rightarrow \infty } T(x,y, s) = 0 \\ \lim _{y \rightarrow -\infty } T(x,y, s) = 0 \\ \end{matrix}} \end{aligned}$$
(7.3.12)

Then the Fourier transform is implemented

$$\begin{aligned} \chi {\bar{U}}'' -w{\bar{U}} - (s + \chi r^2){\bar{U}} = 0 \end{aligned}$$
(7.3.13)

where \(\bar{U}\) is the Fourier transform of \({\bar{T}}\) and r is the Fourier transformation parameter. The boundary condition now becomes

$$\begin{aligned} {\begin{matrix} {\bar{U}}(0,r,s) = \frac{G(r)}{s} \\ \lim _{x \rightarrow \infty }{\bar{U}}(x,r, s) = 0 \end{matrix}} \end{aligned}$$
(7.3.14)

where G(r) is the Fourier transform of g(y). This yields

$$\begin{aligned} {\bar{U}}(x,r, s) = \frac{G(r)}{s}\mathrm {exp}\left[ x\left( \frac{w}{2\chi } - \sqrt{\left( \frac{w}{2\chi }\right) ^2 + \frac{s}{\chi } + r^2}\right) \right] \end{aligned}$$
(7.3.15)

Application of the inverse Laplace transformation results in

$$\begin{aligned} U(x,r, t) = \frac{x}{(4\pi \chi )^{1/2}}\int ^t_0 \frac{G(r)\mathrm {exp}(- \chi r^2 t')}{(t')^{3/2}}\mathrm {exp}\left( -\frac{(x - t' w)^2}{4\chi t'}\right) dt' \end{aligned}$$
(7.3.16)

Knowing the inverse Fourier transform

$$\begin{aligned} F^{-1}{G(r)\mathrm {exp}(-\chi r^2 t')} = \frac{\mathrm {exp}(-y^2/(4\chi t'))}{(2\chi t')^{1/2}} \end{aligned}$$
(7.3.17)

and using the convolution theorem of Fourier transformation

$$\begin{aligned} {\begin{matrix} &{} F^{-1}{G(r)\mathrm {exp}(-\chi r^2 t')} = F^{-1}{G(r)}F^{-1}{\mathrm {exp}(-\chi r^2 t')} \\ &{} = T_\mathrm {b}\int _a^b\frac{(2\pi )^{-1/2}}{2\chi t'}^{1/2}\mathrm {exp}\left( -\frac{(y-v)^2}{4\chi t'}\right) dv \end{matrix}} \end{aligned}$$
(7.3.18)

one finally arrives at the temperature solution

$$\begin{aligned} T = \frac{T_\mathrm {b}x}{4(\pi \chi )^{1/2}}\int _0^t\left( -\frac{(x-t'w)^2}{4\chi t'}\right) \left( \mathrm {erf}\frac{y-a}{(4\chi t')^{1/2}} - \mathrm {erf}\frac{y-b}{(4\chi t')^{1/2}}\right) t'^{-3/2}dt' \end{aligned}$$
(7.3.19)

The analytical solution was implemented with Python and Romberg integration scheme is applied to integral. It has to be noticed is that the analytical solution does not contain the boundary values (\(x = 0\)) which have to be assigned manually (Fig. 7.12).

Fig. 7.12
figure 12

2D hydrothermal temperature profile (analytical solution)

3.1.2 Numerical Solution

The governing equation (7.3.1) is treated with the finite element method in a monolithic scheme. The biconjugate gradient stabilized method (BiCGSTAB) is used as the linear solver with a tolerance of 10\(^{-16}\). The Picard method was implemented as the nonlinear solver with the tolerance of \(10^{-5}\). The element size is set to 0.01\(\times \)0.01 m\(^2\) and a time step of 100 s is chosen.

In order to quantify the difference between analytical solution and numerical solution, the relative error (\(\varepsilon = |T_\mathrm {analytical} - T_\mathrm {numerical} |/T_\mathrm {analytical}\)) is calculated.

Fig. 7.13
figure 13

2D hydrothermal temperature profile (numerical solution)

Fig. 7.14
figure 14

The relative error between numerical solution and analytical solution

From Figs. 7.13 and 7.14, it can be seen that the numerical solution fits well with the analytical solution and maximum relative error is in the order of 10\(^{-4}\). The maximum error exists in the two corners of the left boundary. This is because the analytical solution tends to be infinite when the x coordinate is closed to zero (Table 7.9).

Table 7.9 Benchmark deposit (https://docs.opengeosys.org/books/bmb-5)

The OGS-6 version performed for this benchmark can be found in the master branch under:

The input files named quad\({\_}\)80x60 are available at: