1 Introduction

The Paris agreement, adopted by 196 parties in 2015, aims at limiting global warming to below 2 \(^\circ \)C, preferably to 1.5 \(^\circ \)C, compared to pre-industrial levels. The reduction of greenhouse gas emissions in the atmosphere is crucial to achieve such long term goal, and requires the transition towards renewable energies, and the subsequent need for effective energy storage; moreover, a safe long term sequestration of CO\(_2\) is considered a promising strategy to reduce emissions into the atmosphere. Many of the aforementioned strategies entail a massive use of the subsurface for fluids injection, storage and production. If, on one hand, it is necessary to guarantee the mechanical integrity of the subsurface to avoid unwanted fracturing and induced seismicity, it is also important to evaluate the effect of chemical reactions on the hydraulic properties of the porous media. Indeed, the injection of water at different temperature and with different solutes concentration with respect to the formation can cause dissolution and precipitation of minerals, with an impact on porosity and permeability. In some cases, as in the case of in situ carbon mineralization, these reactions can be exploited to our advantage to obtain a better storage of CO\(_2\) by (1) chemically trapping carbon by binding it into existing mineral and, at the same time (2) thanks to the change of specific volume associated with the transformation of the minerals, creating a more effective cap-rock, Ling et al. (2021). Even if this process occurs over very long time scales in natural conditions, its controlled exploitation is an interesting technological challenge.

A realistic mathematical model of these phenomena encompasses a model for flow in porous media (we focus on single phase flow, assuming small concentrations of gases, if present), coupled with the transport of mobile species and the modeling of both kinetic and equilibrium reactions. Moreover, since reaction rates are usually influenced by temperature, and in view of the possible application of the model to low temperature geothermal plants, the coupled model is completed by the heat equation, Fumagalli and Scotti (2020).

Since fractures are ubiquitous in porous media and have a major impact on flow and transport (both of solutes and heat) this work is focused on the modeling of fractured porous media, where fractures are modeled as lower dimensional objects, which can be much more permeable than the surrounding medium, or nearly impermeable if, for instance, precipitation occurs reducing their aperture, Fumagalli and Scotti (2021).

Many physical, geometrical and geochemical parameters involved in the model are affected by uncertainty, therefore a purely deterministic evaluation of the model is useless without a suitable analysis of the solution variance. In this work we propose the application of an uncertainty quantification workflow based on Polynomial Chaos (Wiener 1938; Ghanem and Spanos 1991) and sparse grids (Conrad and Marzouk 2013) for the sampling of the parameters space: this choice allows us to obtain accuracy with a manageable number of evaluations of the model, which, being coupled and time dependent, has a non-negligible computational cost. The goal is to compute the Sobol indices associated with some input parameters to quantify the impact of the uncertainty of such quantities on a variable of interest, typically the medium porosity. The space distribution of the Sobol indices, or the partial variances, can also give interesting insight into the problem, which, in spite of being reduced to the minimum possible complexity, already exhibits a non-trivial, fully coupled behavior. In particular we aim at a better understanding of the strength of the couplings among flow, transport, temperature and reactions in the presence of fractures that can connect distant parts of the domain when they are permeable, and conversely act as barriers if filled by minerals.

The paper is structured as follows. In Sect. 2 we describe the problem focusing on dissolution and precipitation reactions and, in Sect. 3, we present the equations in the hybrid dimensional case to account for the coupling with fractures. Section 4 briefly discusses the proposed numerical approximation schemes and some implementation details. Section 5 describes the uncertainty quantification workflow and Sect. 6 is devoted to the presentation of a complete set of test cases. Finally, conclusions are drawn in Sect. 7.

2 Problem description

We consider the coupled problem of single-phase flow and reactive transport in porous media, accounting for the porosity changes linked to mineral reactions. Single phase flow can be assumed, even in the presence of CO\(_2\), at low gas concentrations, for instance at the edge of the plume, away from injection wells. Typically, a large number of species is needed for a realistic modeling of reactive transport, including solid mineral species and aqueous complexes, and the chemical reactions include equilibrium and kinetic ones. However, in this work we focus on the simple, but relevant case of a single salt dissolving or precipitating in water. We can therefore consider a single, simple kinetic reaction in the form

$$\begin{aligned} U+V -W\leftrightarrow 0 \end{aligned}$$

where U and V are the positive and negative ion respectively, and W is the precipitate they can form, Radu et al. (2010). The net reaction rate results from the difference between precipitation (forward reaction) \(r_p\) and dissolution (backward reaction) \(r_d\). Under the hypotheses of electrical equilibrium, we can assume that the concentration of U and V are equal and denoted by u, which from now on is the molar concentration of the mobile species, whereas w is the molar concentration of the precipitate. The net reaction rate is

$$\begin{aligned} r_w(u,w,\theta ) = {\left\{ \begin{array}{ll} \displaystyle \lambda (\theta ) \left( \frac{u^2}{u_e^2}-1\right) &{}{} \text{ if } w>0\\ \lambda (\theta ) \frac{u^2}{u_e^2} &{}{} \text{ if } w\le 0. \end{array}\right. } \end{aligned}$$

where \(u_e\) is the equilibrium solute concentration and \(\lambda \) might depend on the temperature \(\theta \) through an activation energy E by taking the form \(\lambda (\theta ) = \lambda _0 \exp \left( -\frac{E}{\theta }\right) \), with \(\lambda _0\) a given positive proportionality coefficient. Since the speed of reaction depends on the local temperature we include the heat equation in the model. The complete mathematical model, presented in detail in the next section, will thus consist of:

  • The flow equations, based on Darcy’s law

  • The heat equation

  • The advection, transport reaction equation for the chemical species

  • Suitable constitutive laws to close the model.

3 Hybrid dimensional model for fractured porous media

In the following we introduce the coupled mathematical model specialized to the case of fractured porous media, following (Fumagalli and Scotti 2021). For the sake of simplicity we will present the model in the case of a single fracture, geometrically reduced to its centerline, see Fig. 1. This model reduction strategy is often adopted in the simulation of fractured porous media to reduce the computational cost by avoiding excessive mesh refinement; moreover, in our case it is particularly convenient since the aperture can change in time due to reactions. For more references on this approach see (Martin et al. 2005; Jaffré et al. 2011; Sandve et al. 2012; Nordbotten et al. 2019; Chave et al. 2018; Ahmed et al. 2019; Berre et al. 2019; Fumagalli and Scotti 2020) and references therein.

Fig. 1
figure 1

Fractured domain and notation

Let \(\tilde{\varOmega }\) be the fractured domain. Following (Formaggia et al. 2014), we define \(\gamma \) as a non self-intersecting \(C^2\) curve (if \(n=2\)) or surface (if \(n=3\)). In an equi-dimensional setting a fracture can be defined as the following set of points

$$\begin{aligned} \varGamma = \left\{ {\varvec{x}} \in \tilde{\varOmega }: \,{\varvec{x}} = {\varvec{s}} + r {\varvec{n}}_\gamma , \, {\varvec{s}} \in \gamma ,\, r \in \left( -\frac{\epsilon _\gamma ({\varvec{s}})}{2}, \frac{\epsilon _\gamma ({\varvec{s}})}{2}\right) \right\} \end{aligned}$$

where \(\epsilon _\gamma \) denotes the fracture aperture, which can be a function of space and, as we will see later on, might change in time because of mineral precipitation. Thus, we have a subdomain of \(\tilde{\varOmega }\), separated by the surrounding porous medium \(\varOmega \) by the interfaces \(\gamma _+\) and \(\gamma _-\) with associated normal vectors \({\varvec{n}}_+\) and \({\varvec{n}}_-\). We replace the fracture \(\varGamma \) with its centerline \(\gamma \) and we assign a unique normal \({\varvec{n}}_\gamma ={\varvec{n}}_{\gamma ,+}\) to the fracture, see Fig. 1. We assume that the fracture is open, with porosity \(\phi _\gamma =1\).

3.1 Reduced variables

In the following we denote with the subscript \(\gamma \) the variables in the fracture, and with \(\varOmega \) the variables in the porous medium. Note that, after geometrical reduction, we denote with \(\varOmega \) the domain \(\tilde{\varOmega }\setminus \gamma \). Reduced vectors variables in the fracture are defined as the integral of the tangential components of the corresponding equi-dimensional variables,

$$\begin{aligned} {\varvec{q}}_\gamma ({\varvec{x}}) {:=}\int _{\epsilon _\gamma ({\varvec{x}})} T({\varvec{x}}) {\varvec{q}}({\varvec{x}}, s) d s \end{aligned}$$

with \(T{:=}I - N\) and \(N {:=}{\varvec{n}}_\gamma \otimes {\varvec{n}}_\gamma \) the tangential and normal projection matrices, respectively. The reduced scalar variables are instead the integral average, for each section of the fracture, of the equi-dimensional counterparts as in

$$\begin{aligned} a_\gamma ({\varvec{x}}) {:=}\dfrac{1}{\epsilon _\gamma ({\varvec{x}})}\int _{\epsilon _\gamma ({\varvec{x}})} a({\varvec{x}}, s) ds \end{aligned}$$

where a can be replaced with p (pressure), \(\theta \) (temperature), u (solute concentration), w (precipitate concentration).

Moreover, we denote by \(\nabla _\tau \), \(\nabla _\tau \cdot \) the tangential gradient and divergence defined on the tangential space of the fracture.

3.2 Single phase flow

Under the assumption of single-phase flow, the fluid pressure p and Darcy velocity \({\varvec{q}}\) can be computed as the solution of a Darcy problem with suitable boundary conditions. Let k be the permeability tensor, \(\mu \) the viscosity, \(\rho _w\) is the fluid density and g is the gravity acceleration. Moreover, \(\phi \) denotes porosity and \({\varvec{e}}_z\) is the unit vector of the z-axis, normal to the Earth surface. We will assume constant density, but account for porosity changes through a source term. Indeed, porosity depends on the changes of the mineral volume fraction as detailed in Sect. 3.5. In the following, \(p_\gamma \) and \({\varvec{q}}_\gamma \) indicate the reduced pressure and flux in the fracture, defined as in 3.1. Following (Martin et al. 2005) we assume that in the fracture the permeability k can be decomposed in normal and tangential components as

$$\begin{aligned} k = \kappa _\gamma N + k_\gamma T. \end{aligned}$$
(1)

The reduced model for the Darcy flow, which describes the evolution of the reduced Darcy velocity \({\varvec{q}}_\gamma \) and pressure \(p_\gamma \) in the fracture is obtained, following (Martin et al. 2005), integrating the equations in each section of the fracture. The mixed-dimensional problem in \(\varOmega \) and \(\gamma \) then reads:

$$\begin{aligned}&\mu {\varvec{q}}_\varOmega + k_\varOmega (\phi _\varOmega ) \nabla p_\varOmega ={\varvec{0}}\nonumber \\&\partial _t \phi _\varOmega + \nabla \cdot {\varvec{q}}_\varOmega + f_\varOmega =0&\quad \text {in } \varOmega \times (0, T), \end{aligned}$$
(2)
$$\begin{aligned}&\mu {\varvec{q}}_\gamma + \epsilon _\gamma k_\gamma (\epsilon _\gamma ) \nabla _\tau p_\gamma ={\varvec{0}}\nonumber \\&\partial _t \epsilon _\gamma + \nabla _\tau \cdot {\varvec{q}}_\gamma + {\varvec{q}}_\gamma \cdot {\varvec{n}}_\gamma |_{\gamma _+} - {\varvec{q}}_\gamma \cdot {\varvec{n}}_\gamma |_{\gamma _-} + \epsilon _\gamma f_\gamma =0&\quad \text {in } \gamma \times (0, T), \end{aligned}$$
(3)
$$\begin{aligned}&\mu \epsilon _\gamma {\varvec{q}}_\varOmega \cdot {\varvec{n}}_{\gamma }|_{\gamma _+} + \kappa _\gamma (\epsilon _\gamma ) (p_\gamma - p_\varOmega |_{\gamma _+}) = 0&\quad \text {on } \gamma _+ \times (0, T) \end{aligned}$$
(4)
$$\begin{aligned}&\mu \epsilon _\gamma {\varvec{q}}_\varOmega \cdot {\varvec{n}}_{\gamma }|_{\gamma _-} + \kappa _\gamma (\epsilon _\gamma ) (p_\gamma - p_\varOmega |_{\gamma _-}) = 0&\quad \text {on } \gamma _- \times (0, T), \end{aligned}$$
(5)

where \(f_\gamma ({\varvec{x}}) {:=}\epsilon _\gamma ^{-1}({\varvec{x}})\int _{\epsilon _\gamma ({\varvec{x}})} f({\varvec{x}}, s) ds\) is the reduced source or sink term. Following lubrication theory, the fracture tangential permeability \(k_\gamma \) can be expressed as a function of the aperture, as described in more detail in Sect. 3.6.

The conditions on \(\gamma _\pm \) model the fact that the flux exchange between the fracture and the surrounding porous media is related to the pressure jump via \(\kappa _\gamma \). Note that, since \(\kappa _\gamma \), as \(k_\gamma \), can be modeled as a function of \(\epsilon _\gamma \), if the aperture goes to zero the flux exchange vanishes.

3.3 Heat equation

Since reaction rates usually depend on temperature, we include in our model the heat equation for thermal conduction (based on Fourier’s law) and convection in the porous media. We assume thermal equilibrium between rock and water, so that only one equation can be considered instead of two.

We denote as \(c_\varOmega \) the effective thermal capacity defined as the porosity-weighted average of the water \(c_w\) and solid \(c_s\) specific thermal capacities,

$$\begin{aligned} c(\phi ) = \phi \rho _w c_w + (1-\phi ) \rho _s c_s, \end{aligned}$$

where \(\rho _w\) and \(\rho _s\) are the densities of the water and solid phase respectively. The effective thermal conductivity of the porous medium \(\varLambda \) is computed in a similar way, as

$$\begin{aligned} \varLambda (\phi ) = \varLambda _w^\phi \varLambda _s^{1-\phi }, \end{aligned}$$

where \(\varLambda _w\) and \(\varLambda _s\) are the water and solid thermal conductivity. In the fracture we simply have \(c_\gamma =\rho _w c_w\), \(\varLambda _\gamma = \varLambda _w\) since porosity is equal to 1.

The reduced model that describes the evolution of temperature \(\theta _\varOmega \), \(\theta _\gamma \) is obtained, similarly to the Darcy problem, by integrating the conservation equation in each section of the fracture; the coupling conditions however, which stem from a suitable approximation of the total normal heat flux, should take into account the different nature of the advective and diffusive fluxes in the coupling. The coupled model in \(\varOmega \) and \(\gamma \) reads:

$$\begin{aligned}&\partial _t (c(\phi ) \theta _\varOmega )+ \nabla \cdot (\rho _w c_w {\varvec{q}} - \varLambda (\phi ) \nabla \theta _\varOmega ) + j=0{} & {} \text {in } \varOmega \times (0, T),\nonumber \\&\partial _t (\epsilon _\gamma c_w \theta _\gamma )+ \nabla _\tau \cdot (\rho _w c_w {\varvec{q}}_\gamma - \varLambda _w\epsilon _\gamma \nabla _\tau \theta _\gamma ) + \psi ^+ - \psi ^- +j_\gamma = 0{} & {} \text {in } \gamma \times (0, T). \end{aligned}$$
(6)

where \(j_\varOmega \), \(j_\gamma \) are heat source/sink terms, and the conservation equation in the fracture accounts for heat flux exchanged with the fracture on both sides, through the terms \(\psi ^\pm \), defined as

$$\begin{aligned}&\psi ^+ = \rho _w c_w{\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _+} \tilde{\theta }_+ + \dfrac{2 \varLambda _w}{\epsilon _\gamma }(\theta _\varOmega |_{\gamma _+} - \theta _\gamma )\\&\psi ^- = \rho _w c_w{\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _-} \tilde{\theta }_- + \dfrac{2\varLambda _w}{\epsilon _\gamma }( \theta _\gamma - \theta _\varOmega |_{\gamma _-}) \end{aligned}$$

where \(\tilde{\theta }_\pm \) is selected as the upwind value, i.e.

$$\begin{aligned}&\tilde{\theta }_+={\left\{ \begin{array}{ll} \theta _\gamma &{}\quad \textrm{if}\,{\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _+}>0\\ \theta _\varOmega |_{\gamma _+} &{}\quad \textrm{if}\,{\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _+}<0 \end{array}\right. } \qquad&\tilde{\theta }_-={\left\{ \begin{array}{ll} \theta _\gamma &{}\quad \textrm{if}\,{\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _-}<0\\ \theta _\varOmega |_{\gamma _-} &{}\quad \textrm{if}\,{\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _-}>0. \end{array}\right. } \end{aligned}$$

Equation (6) should be completed by initial conditions and boundary conditions on the temperature or heat flux.

3.4 Advection–diffusion-reaction equations for mobile species

The concentration u of mobile species is governed by a partial differential equation accounting for advection, diffusion, and reaction. As in the previous section subscripts \(\varOmega \) and \(\gamma \) denote quantities in the bulk and fracture respectively, in particular \(u_\gamma \) is the reduced concentration in the fracture, defined as in 3.1. As for the permeability, we assume that in the fracture d can be decomposed in normal and tangential components as

$$\begin{aligned} d = \delta _\gamma N + d_\gamma T. \end{aligned}$$
(7)

The reduced model that describes the evolution of the solute \(u_\gamma \) is similar to the reduced heat equation. By integrating the solute conservation equation in the fracture we obtain the reduced equation, such that

$$\begin{aligned}&\partial _t (\phi _\varOmega u_\varOmega ) + \nabla \cdot ({\varvec{q}}_\varOmega u_\varOmega - d_\varOmega \nabla u_\varOmega ) = \phi _\varOmega r_w{} & {} \text {in } \varOmega \times (0, T),\nonumber \\&\partial _t (\epsilon _\gamma u_\gamma ) + \nabla _\tau \cdot ({\varvec{q}}_\gamma u_\gamma - \epsilon _\gamma d_\gamma \nabla _\tau u_\gamma ) + \chi ^+ - \chi ^- = \epsilon _\gamma r_w{} & {} \text {in } \gamma \times (0, T). \end{aligned}$$
(8)

Note that the balance equation in the fracture accounts for exchanges with the porous medium, in particular we have that

$$\begin{aligned}&\chi ^+ = {\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _+} \tilde{u}_+ + \dfrac{2\delta _\gamma }{\epsilon _\gamma }(u_\varOmega |_{\gamma _+} - u_\gamma )\\&\chi ^- = {\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _-} \tilde{u}_- + \dfrac{2\delta _\gamma }{\epsilon _\gamma }( u_\gamma - u_\varOmega |_{\gamma _-}) \end{aligned}$$

where once again \(\tilde{u}_\pm \) is the upwind value, i.e.

$$\begin{aligned}&\tilde{u}_+={\left\{ \begin{array}{ll} u_\gamma &{}\quad \textrm{if}\,{\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _+}>0\\ u_\varOmega |_{\gamma _+} &{}\quad \textrm{if}\,{\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _+}<0 \end{array}\right. } \quad&\tilde{u}_-={\left\{ \begin{array}{ll} u_\gamma &{}\quad \textrm{if}\,{\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _-}<0\\ u_\varOmega |_{\gamma _-} &{}\quad \textrm{if}\,{\varvec{q}}_\varOmega \cdot {\varvec{n}}_\gamma |_{\gamma _-}>0. \end{array}\right. } \end{aligned}$$

Note that the reaction rate \(r_w\) accounts for the net precipitation and dissolution rate as explained in the next section.

3.5 Evolution of mineral species

In the case the species is immobile the evolution equation for its concentration, denoted as w, reduces to an ordinary differential equation since we do not have the transport and diffusion terms, i.e.

$$\begin{aligned}&\partial _t (\phi w_\varOmega ) - \phi r_w(u_\varOmega , w_\varOmega , \theta _\varOmega ) = 0{} & {} \text {in } \varOmega \times (0, T) \end{aligned}$$
(9)
$$\begin{aligned}&\partial _t (\epsilon _\gamma w_\gamma ) - \epsilon _\gamma r_w(u_\gamma , w_\gamma , \theta _\gamma ) = 0{} & {} \text {in } \gamma \times (0, T). \end{aligned}$$
(10)

where an initial condition should be supplemented. It may be more convenient to consider a different measure of concentration for solid species, in particular we want to compute the solid volume fractions \(\phi _w\) as the ratio of the volume of mineral for a unit volume of rock. The volume fractions can be obtained from the concentrations as \(\phi _w=w \eta \phi \) where \(\eta \) is the molar volume of the mineral. If we let \(\phi _I\) be the volume fraction of inert minerals (i.e. species that are not affected by chemical reactions) we have that \(\phi =1-\phi _I - \phi _w\) and therefore

$$\begin{aligned}&d_t \phi + \eta d_t (\phi w_\varOmega )=0{} & {} \text {in } \varOmega \times (0, T)\nonumber \\&\phi (t=0) = \phi _0{} & {} \text {in } \varOmega \times \{0\} \end{aligned}$$
(11)

As the porosity changes with mineral precipitation, we consider a similar law to describe the evolution of the fracture aperture \(\epsilon _\gamma \). We have

$$\begin{aligned}&d_t \epsilon _\gamma + \eta _\gamma d_t( \epsilon _\gamma w_\gamma )= 0{} & {} \text {in } \gamma \times (0, T)\nonumber \\&\epsilon _\gamma (t=0) = \epsilon _{\gamma , 0}{} & {} \text {in } \gamma \times \{0\} , \end{aligned}$$
(12)

where \(\eta _\gamma \) represents the molar volume of the mineral as it precipitates on the fracture walls.

3.6 Permeability and aperture model

Finally, we provide a model for permeability changes. The intrinsic permeability, which we assume to be isotropic in the bulk porous medium, can be modeled as a function of porosity. We consider the following law

$$\begin{aligned} k(\phi )=k_0\left( \dfrac{\phi }{\phi _0}\right) ^2 \end{aligned}$$

where \(k_0\) is the reference value at the initial porosity \(\phi _0\). Note that this dependence will introduce a non-linear coupling among the model equations.

As already mentioned we assume that both components of the permeability k in the fracture follow a law which relates them to the aperture, more precisely

$$\begin{aligned} k_\gamma (\epsilon _\gamma ) = k_{\gamma ,0} \dfrac{\epsilon _\gamma ^2}{\epsilon _{\gamma , 0}^2} \quad \text {and} \quad \kappa _\gamma (\epsilon _\gamma ) = \kappa _{\gamma , 0}\dfrac{\epsilon _\gamma ^2}{\epsilon _{\gamma , 0}^2}, \end{aligned}$$
(13)

where \(k_{\gamma ,0}\) and \(\kappa _{\gamma , 0}\) are reference coefficients along and across the fracture, respectively, and \(\epsilon _{\gamma , 0} > 0\) is the initial aperture.

4 Numerical approximation

The complete mathematical model consists of equations (2), (6), (8), (9), complemented by constitutive laws for the material parameters and the equations (11), (12) for the evolution of porosity and fracture aperture. The numerical schemes for the solution of this deterministic problem are implemented in the PorePy library (Keilegavlen et al. 2020) which provides support for multidimensional coupling, allowing for an easy implementation of the problem in fractured media.

4.1 Time integration and splitting strategy

The complete problem is fully coupled in a non-linear way. For the sake of computational efficiency, in this work its solution is based on a non-iterative splitting strategy, with the underlying assumption that the changes to the flow parameters due to chemical reactions are relatively slow. In particular, at each time step we follow the scheme proposed in Fumagalli and Scotti (2021), represented in Fig. 2. In particular:

  1. 1.

    We first solve the Darcy problem to obtain the advective fields \({\varvec{q}}_\varOmega \), \({\varvec{q}}_\gamma \). The flow problem is discretized in time by approximating the time derivative \(\partial _t \phi \) by finite differences as

    $$\begin{aligned} \partial _t\phi \simeq \dfrac{\phi ^*-\phi ^n}{\varDelta t} \end{aligned}$$

    where \(\phi ^*=2\phi ^n-\phi ^{n-1}\) is the extrapolated value;

  2. 2.

    With \({\varvec{q}}_\varOmega \), \({\varvec{q}}_\gamma \) we solve the heat equation, discretized in time with the Implicit Euler method;

  3. 3.

    Then, given the temperature field we solve the advection–diffusion-reaction problem which is in turn split into

    1. (a)

      The advective step, discretized in time with the Implicit Euler scheme, which gives and intermediate solute concentration \(u^*\);

    2. (b)

      The reaction step to compute the final solute and precipitate concentrations (note that the precipitate is not affected by transport). This step is integrated explicitly in time, with the addition of an event location procedure to avoid negative precipitate concentrations.

  4. 4.

    Finally, we update porosity and permeability for the next step.

Fig. 2
figure 2

Splitting strategy for the solution of the coupled problem

4.2 Space discretization

Space discretization is based on a standard, conforming approach where fractures are honoured by the computational grid and each element of the fractures grid is a face of the porous media grid. However, this assumption could be relaxed allowing for different grid resolutions with the use of mortar variables. Finally, since equations are in mixed-dimensions, all the numerical schemes are applied in different dimensions, i.e. in 2D and 1D.

Since the Darcy flux is involved in the advective terms of the transport and heat equations, it is of fundamental importance that local mass conservation is fulfilled. Therefore, we approximate the Darcy problem in its mixed formulation and employ a suitable pair of discrete spaces for the pressure and the Darcy flux. In particular we employ the lowest order Raviart-Thomas element pair \(\mathbb{R}\mathbb{T}_0\), \(\mathbb {P}_0\).

For the numerical solution of the heat equation and the advection–diffusion-reaction equation we apply, in hybrid dimensions, the Finite Volume method. Consistently with the continuous model we consider an upwind approximation of the advective term, whereas the diffusive term is approximated with the two point flux approximation (TPFA), see (Eymard et al. 2000; Faille et al. 2002; Droniou 2013). Since we are considering constrained triangulations to honour the fractures the grid may in principle not be orthogonal. However, we assume that the distortion is small enough to obtain a reliable approximation even with a simple TPFA scheme.

5 Sensitivity analysis workflow

In this section we present the algorithm employed to approximate stochastic quantities by means of Polynomial Chaos (PC) expansions (Wiener 1938; Ghanem and Spanos 1991). This technique will allow us to compute the sensitivity Sobol indices and to obtain a surrogate model of the problem for a quick evaluation of the quantities of interest. PC expansion have been used to treat a large variety of problems, including elliptic models [(see, e.g., Babuška and Chatzipantelidis (2002), Matthies and Keese (2005)), fluid mechanics problems (Le Maître et al. 2002], and flow and transport in porous media [(see, e.g., Ghanem and Dham (1998), Botti et al. (2020)].

The sampling of the uncertain parameters space is performed with pseudo-spectral projection on sparse grids (Conrad and Marzouk 2013), thus obtaining an accurate estimate with a limited number of evaluation of the deterministic model and, as a result, mitigating the so-called curse of dimensionality. This is particularly important since the problem is time dependent and, moreover, the presence of chemical reactions can introduce a fast time scale, constraining the time step amplitude with an increase in the computational cost for each evaluation.

5.1 Polynomial Chaos expansion

Let N be the number of independent and identically distributed parameters \({\varvec{\xi }}= (\xi _i)_{1\le i \le N}\) and \(\varXi \) the space of possible realizations. For the sake of simplicity the parameters are rescaled so that \(\varXi =[0,1]^N\). Moreover, given a probability measure \(\rho :\varXi \rightarrow \mathbb {R}^+\), the inner product of two second-order random variables \(X({\varvec{\xi }})\) and \(Y({\varvec{\xi }})\) is defined as

$$\begin{aligned} \langle X, Y \rangle = \int _\varXi X({\varvec{\xi }}) Y({\varvec{\xi }}) \rho ({\varvec{\xi }}) \textrm{d}{\varvec{\xi }}. \end{aligned}$$

The Polynomial Chaos (PC) expansion of a variable \(X({\varvec{\xi }})\) reads

$$\begin{aligned} X({\varvec{\xi }}) = \sum _{{\varvec{k}}\in \mathbb {N}^N} X_{{\varvec{k}}} \phi _{{\varvec{k}}}({\varvec{\xi }}), \end{aligned}$$
(14)

where \(\{X_{{\varvec{k}}}=\langle X, \phi _{{\varvec{k}}}\rangle : {\varvec{k}}\in \mathbb {N}^N\}\) are the spectral modes of X, the basis functions \(\{ \phi _{{\varvec{k}}}({\varvec{\xi }}): {\varvec{k}}\in \mathbb {N}^N\}\) are multi-variate polynomials chosen to be orthogonal with respect to the product \(\langle \cdot ,\cdot \rangle \), and the multi-index \({\varvec{k}}=(k_1,\ldots , k_N)\) denotes the polynomial degree with respect to the parameters \(\xi _i\).

The PC approximation is then obtained by truncating the expansion in (14) to a finite set \(\mathcal {K}\subset \mathbb {N}^N\), which determines the quality of the approximation:

$$\begin{aligned} X_{\mathcal {K}}({\varvec{\xi }}):= \sum _{{\varvec{k}}\in \mathcal {K}} X_{{\varvec{k}}}\phi _{{\varvec{k}}}({\varvec{\xi }}). \end{aligned}$$
(15)

The statistical moments of the variables of interest are easily obtained from the PC approximations; e.g., mean, variance, and covariance are given by

$$\begin{aligned} \langle X_{\mathcal {K}} \rangle = X_{{\varvec{0}}}, \quad \mathbb {V}\!{\textrm{ar}}(X_{\mathcal {K}}) =\sum _{{\varvec{k}}\in \mathcal {K}\setminus {\varvec{0}}} X_{{\varvec{k}}}^2, \quad \mathbb {C}\!{\textrm{ov}}(X_{\mathcal {K}}, Y_{\mathcal {K}}) = \sum _{{\varvec{k}}\in \mathcal {K}\setminus {\varvec{0}}} X_{{\varvec{k}}} Y_{{\varvec{k}}}. \end{aligned}$$
(16)

5.2 Spectral projection method

The coefficients of the PC expansion in (15) can be computed in different ways [(see, e.g., Le Maître and Knio (2010), Constantine et al. (2012)]. This work is based on non-intrusive pseudo-spectral projection, which in our opinion, provides the best trade-off between complexity and precision. The numerical quadrature schemes are constructed as sparse tensorization of a one dimensional formula (Gerstner and Griebel 2003). Then, given M quadrature points and the respective weights \(\{w^{(q)}\}_{1\le q \le M}\), the modes \((X_{{\varvec{k}}})_{{\varvec{k}}\in \mathcal {K}}\) are computed as

$$\begin{aligned} X_{{\varvec{k}}} = \langle X,\phi _{{\varvec{k}}}\rangle \simeq \sum _{q=1}^{M} {w^{(q)} X({\varvec{\xi }}^{(q)}) \phi _{{\varvec{k}}}({\varvec{\xi }}^{(q)}) }. \end{aligned}$$
Fig. 3
figure 3

Sparse grid for two parameters of level 2 on the left, level 4 on the centre and level 6 on the right

The complexity of the method is governed by the number M of evaluations of the deterministic problem, while the accuracy depends on the PC basis \(\{\phi _{{\varvec{k}}}\}_{k\in \mathcal {K}}\). In order to maximize the accuracy with respect to the computational effort, we adopt a sparse method (cf. Fig. 3) hinging on the application of Smolyak’s formula (Smolyak 1963) directly on the projection operator, rather than on the integration operator. Specifically, the set \({\mathcal {K}}\) is defined as the largest possible one such that the discrete projection is exact for any function spanned by \(\{\phi _{{\varvec{k}}}\}_{k\in \mathcal {K}}\), i.e.:

$$\begin{aligned} \forall {\varvec{k}}, {\varvec{l}} \in \mathcal {K}, \, \sum _{q=1}^{M} {w^{(q)} \phi _{{\varvec{k}}}({\varvec{\xi }}^{(q)}) \phi _{{\varvec{l}}}({\varvec{\xi }}^{(q)}) } = {\left\{ \begin{array}{ll} 1 &{} \text {if }{\varvec{k}} = {\varvec{l}}\\ 0 &{} \text {otherwise} \end{array}\right. }. \end{aligned}$$

In this work, we have opted for an isotropic sparse tensorization of nested Clenshaw–Curtis quadrature rules, where the level \(l\in {\mathbb {N}}\) of the sparse grid is the only parameter controlling the quality of the approximation. As l increases, both the number of nodes M and the multi-index set \(\mathcal {K}\) increase.

5.3 Sensitivity analysis

The sensitivity analysis consists in the evaluation of the different contributions of the input parameters on the variance of the solution. This is achieved by the computation of the Sobol indices, defined as the ratio between the partial variance corresponding to the input parameter under investigation \(\xi _i\), and the total variance of the quantity of interest X

$$\begin{aligned} S_{1,i}:= \frac{\mathbb {V}\!{\textrm{ar}}(\mathbb {E}(X({\varvec{\xi }})|\xi _i))}{\mathbb {V}\!{\textrm{ar}}(X({\varvec{\xi }}))}, \qquad \forall 1\le i\le N, \end{aligned}$$
(17)

where \(\mathbb {E}(X({\varvec{\xi }})|\xi _i)\) denotes the conditional expected value of X given \(\xi _i\). The indices \((S_{1,i})_{1\le i\le N}\) in (17) are known as principal or first-order Sobol indices and measure the individual contribution of the coefficient \(\xi _i\) to the variance.

Higher-order Sobol indices measure the effect of the concurrent variation of more variables. For instance, second-order Sobol indices read

$$\begin{aligned} S_{i,j}:= \frac{\mathbb {V}\!{\textrm{ar}}(\mathbb {E}(X({\varvec{\xi }})|\xi _i, \xi _j))}{\mathbb {V}\!{\textrm{ar}}(X({\varvec{\xi }}))} - S_{1,i} - S_{1,j}, \qquad \forall 1\le i<j\le N. \end{aligned}$$

Finally, the total Sobol index is obtained as the sum of the indices involving parameter \(\xi _i\)

$$\begin{aligned} S_{T_i}: = 1 - \frac{\mathbb {V}\!{\textrm{ar}}(\mathbb {E}(X({\varvec{\xi }})|{\varvec{\xi }}_{\setminus i}))}{\mathbb {V}\!{\textrm{ar}}(X({\varvec{\xi }}))}, \end{aligned}$$

where the vector \({\varvec{\xi }}_{\setminus i}=\left( \xi _{j\ne i}\right) \) contains all uncertain variables except \(\xi _i\).

The computation of the Sobol indices results directly from the PC approximation (15) of the variable of interest. Indeed, the partial variances can be explicitly expressed as functions of the spectral modes similarly to the statistical quantities in (16), e.g.

$$\begin{aligned} \mathbb {V}\!{\textrm{ar}}(\mathbb {E}(X_\mathcal {K}|\xi _i)) = \sum _{{\varvec{k}}\in \mathcal {K}_i} X_{{\varvec{k}}}^2,\quad \text { and }\quad \mathbb {V}\!{\textrm{ar}}(\mathbb {E}(X_\mathcal {K}|{\varvec{\xi }}_{\setminus i})) = \sum _{{\varvec{k}}\in \mathcal {K}_{\setminus i}} X_{{\varvec{k}}}^2, \end{aligned}$$

where \(\mathcal {K}_i\subset \mathcal {K}\) and \(\mathcal {K}_{\setminus i}\subset \mathcal {K}\) are the subset multi-indices such that the corresponding basis function depends only on \(\xi _i\) and all the parameters except \(\xi _i\), respectively. We refer the reader to Crestaux et al. (2009) for additional details.

6 Numerical examples

In this section, we present two test cases to test the mathematical model and the proposed UQ workflow. In both cases we show the reference numerical solution and discuss the uncertainty quantification related to three parameters affected by uncertainty.

Due to the complexity of the problem, all data in the two cases are the same except for the number of fractures in the network. In the first case, presented in Sect. 6.1, a single fracture touching one boundary is considered, while in Sect. 6.2, ten intersecting fractures are considered.

The data for the Darcy problem, the heat equation, and the precipitation-dissolution process are given in Table 1. Furthermore, we assume that the following three parameters are affected by uncertainty and uniformly distributed as

$$\begin{aligned} \eta _\gamma \sim \mathcal {U}(1.29, 2.71) \qquad E \sim \mathcal {U}(2.98, 5.02) \qquad \theta ^{\textrm{inflow}} \sim \mathcal {U}(0.93, 2.07). \end{aligned}$$

Here \(\theta ^{\textrm{inflow}}\) denotes the inflow temperature on the bottom boundary. Actually, many of the considered parameters might be affected by uncertainty but the one selected here are for the following reasons: \(\eta _\gamma \) governs the flow properties of the fractures having a substantial impact on the flow properties of the system, E is a crucial parameter that governs the temperature effects on the reactions by speeding them up or slowing them down and thus accelerating a possible clogging in the porous media, finally \(\theta ^{\textrm{inflow}}\) can be considered as a proxy for the efficiency of the geothermal system. The main quantity of interest is the porosity, because we want to quantify the impact of transport and reaction on the porous medium microstructure. Strong changes in porosity are expected to affect the storativity of the medium, and its permeability which is modeled as a nonlinear function of porosity. We expect to observe an increase or decrease of porosity if temperature favors reaction, and if solute concentration is far from equilibrium.

Table 1 Common data for the advection-reaction problem, examples in Sect. 6. For \(\bullet \in \{ k_\varOmega ; \phi _\varOmega ; \varTheta ; u; w; \varepsilon _\gamma ; k_\gamma ; \kappa _\gamma \}\), the notation \((\bullet )_0\) is used for the reference value of the quantity \(\bullet \) prescribed as initial condition

Being the construction of the sparse grids dependent only on the chosen level, the number of uncertain parameters and the chosen quadrature formula to determine the sampling evaluations, here we use the Fejér rule. The number of simulations needed to construct the PC expansion are: 31 runs for level 2, 111 runs for level 3, 351 for level 4, 1023 for and level 5. The simulations are independent and thus it is possible to perform them in parallel to speed up the process. Once constructed, the evaluation of the PC expansion takes a small fraction of the time used by the full order model to evaluate the solutions for different times and for different values of the uncertain parameters. Hence, we will use the PC expansion as a surrogate model and evaluate its performances and accuracy properties. In both cases, we will discuss the convergence properties of the PC expansion by increasing the level of the sparse grid considered, the analysis of the Sobol indices, conditioned variances and covariances for selected solutions and finally the probability distribution functions.

The simulations are developed with the library PorePy, a simulation tool for fractured and deformable porous media written in Python, see (Keilegavlen et al. 2020).

6.1 Single fracture network

Fig. 4
figure 4

Domain \(\varOmega \) and fracture \(\gamma \) for the example of Sect. 6.1

Let us consider a domain \(\varOmega =(0, 1)^2\) with a single immersed fracture defined by the following vertices: (0.1, 0) and (0.9, 0.8). The fracture thus touches the bottom boundary of \(\varOmega \) as depicted in Fig. 4. Data and uncertain parameters are reported in the beginning of Sect. 6. We set as 0.05 the time step and \(2^{-6}\) the requested mesh size for Gmsh (Geuzaine and Remacle 2009). We point out that the fracture is permeable at the beginning of the simulation and due to the solute precipitation its aperture diminishes in time. As a result the effective fracture permeability decreases and until the fracture behaves as a barrier and not anymore as a preferential path.

In the following parts, we detail some aspects related to the uncertainty quantification analysis. In Sect. 6.1.1 a convergence study is carried out, in Sect. 6.1.2 we discuss the variances and covariances of the solutions and in Sect. 6.1.3 we introduce the computed probability distribution functions of some of the components of the solutions along the fracture.

The reference solution, corresponding to the average input parameters, is reported in Fig. 5, where it is possible to notice the variation of the pressure distribution over time due to the sealing of the fractures and the transport of the solute when the fractures are still highly permeable.

Fig. 5
figure 5

Reference solutions with mean value of the uncertain parameters. On the left pressure at time \(t=0.1T\) and on the centre for \(t=T\), on the right the solute for \(t=0.1T\). Test case of Sect. 6.1

6.1.1 Convergence

In this part, we discuss the convergence and accuracy properties of the surrogate model built with the PC expansion. In fact, the latter can be used to make fast simulations without the need of running the full order model. Since we are dealing with a time dependent problem, we analyse the PC expansion for two different simulation times: after few time steps \((t=t_1=0.1T)\) and at the end of the simulation \((t=T)\).

Figure 6 presents, for both times, the error decay of the computed solutions by increasing the level of the sparse grid. For a given sparse grid level, the error is computed averaging the relative \(L^2\)-error between the surrogate model and the full model over a random sample of \(n_{sim} = 200\) simulations, namely

$$\begin{aligned} err_l = \sqrt{\sum _{i=1}^{n_{sim}} \frac{\Vert X({\varvec{\xi }}_i) - X_{\mathcal {K}}({\varvec{\xi }}_i)\Vert ^2_{L^2}}{n_{sim} \Vert X({\varvec{\xi }}_i) \Vert ^2_{L^2}} } \end{aligned}$$

for a given observed variable X and corresponding surrogate variable \(X_\mathcal {K}\) at sparse grid level l.

For a smooth relation between uncertain parameters and the solutions, we expect exponential decay of the error with respect to the level, which is the behaviour observed in the figure. Additionally, for \(t = t_1\) the error computed is much smaller compared to the end of the simulation, showing a temporal dependence on the quality of the PC expansion.

Fig. 6
figure 6

Error convergence for increasing level of the sparse grids, on the left at time \(t=0.1T\) and on the right at final time \(t=T\). Test case of Sect. 6.1.1

In Fig. 7, we compare the porosity \(\phi \) computed with the full order model with the one constructed by the PC expansion and the corresponding relative error. In this case the error is relative and it has been computed cell-wise between a specific realisation of the porosity. The two solutions are in good agreement for both times and the error is rather low. As before, the latter is smaller at the beginning of the simulation and tends to increase at the end, in particular near the inflow boundary at the bottom of \(\varOmega \). Moreover, at the beginning of the simulation the fracture is highly permeable and, consequently, we observe also a region in the proximity of \(\gamma \) where the error is higher due to stronger geochemical effects.

Fig. 7
figure 7

On the left porosity in the media computed with the full model and on the centre with the polynomial chaos expansion, on the right the error between them. On the top at time \(t=0.1T\) and on the bottom at final time \(t=T\). Test case of Sect. 6.1.1

Finally, Fig. 8 compares some of the variables in the fractures computed with the full order model or reconstructed with the PC expansion. Also in this case, the quality of the latter is high and in good agreement with the reference solution. Moreover, in Fig. 8 the green dashed lines represent the solutions obtained for each run to construct the PC expansion and can be useful to visualize the variance of the solution.

Fig. 8
figure 8

Solutions along \(\gamma \): in blue computed with the full model, in red with the polynomial chaos expansion and in green computed by the full model on each sparse grid node (sparse grid level 2). On the top at time \(t=0.1T\) and on the bottom at final time \(t=T\). Test case of Sect. 6.1.1(colour figure online)

6.1.2 Analysis of variance and correlations

Fig. 9
figure 9

First order Sobol indexes for different unknowns along \(\gamma \), on the top at time \(t=t_1\) and on the bottom at final time \(t=T\). The local coordinate of the fracture starts from the bottom boundary. Test case of Sect. 6.1.2

An important factor is the impact on observed variables of the uncertain input data. In Fig. 9 we report the Sobol indices for some variables in the fracture for \(t=t_1\) and \(t=T\). We notice that the three variables are influenced in a similar manner by the uncertain data, and the activation energy is the most important factor, followed by the temperature at the inflow boundary. We notice that while the high temperature front penetrates in the domain and in the fracture, the importance of the activation energy over the temperature inflow tends to diminish and the latter becomes more important. Note also that the Sobol indices of \(\epsilon _\gamma w_\gamma \) at final time are different from the other two considered variables since \(\eta _\gamma \) dominates the induced uncertainty of the precipitate. This different behavior could be due to the fact that, while the amount of solute reflects the porosity, the amount of precipitate is correlated to porosity in a more complex way: the larger the porosity, at fixed w, the more precipitate is present, but a larger amount of precipitate reduces porosity.

In Fig. 10, we compare the variances of the porosity in the domain \(\varOmega \) induced by the uncertain data. Depending on the situation, it might be more convenient to consider either the normalized Sobol indices or the partial variances: the former give a very intuitive idea of the relative impact of the parameters on the quantity of interest variance, but the partial variance can be interesting as well, to understand where and when the solution exhibits larger variability. The importance of the activation energy over time is rather interesting. In the beginning the fracture is highly permeable and most of the flow is concentrated around the fracture. However, due to the deposition of new material the fracture becomes very low permeable; thus the water flow tends to avoid it and concentrates more in the right part of the domain, where the solute is transported and becomes precipitate altering the porosity. This effect, less evident, can be seen also in the spatial distribution of the Sobol index of \(\eta _\gamma \). For the temperature, we still notice the permeability change effect coupled with the inflow of higher temperature that speeds up the precipitation process and, as a result, the porosity decay.

Fig. 10
figure 10

On the left the variance of porosity conditioned to the activation energy E, on the centre conditioned with \(\eta _\gamma \) expansion, and on the right conditioned with the temperature inflow \(\theta ^{inflow}\). On the top at time \(t=0.1T\) and on the bottom at final time \(t=T\). Test case of Sect. 6.1.2

Another important aspect is the interdependency of the output variables, which can be expressed by their covariances. Figure 11 presents this relation between the porosity in the media and several other variables at the initial time. For the porosity and \(\phi _\varOmega w_\varOmega \) we observe a negative correlation, namely if more precipitate is deposited in the porous media, less void space is left, and the porosity diminishes. The temperature front can be seen in the plot of the covariance between \(\phi _\varOmega \) and \(\theta _\varOmega \), i.e. higher values of the latter tend to facilitate the deposition of solute with concentration higher than the equilibrium. This increases the value of the precipitate and consequently lowers the value of the porosity.

Fig. 11
figure 11

Covariances between different solutions in the porous media at time \(t=0.1T\). Test case of Sect. 6.1.2

6.1.3 Probability density functions

We consider now the probability density functions (PDFs) of some variables induced by the uncertain data, which are uniformly distributed. We compare the PDFs computed directly from numerical simulations with the one based on solutions produced by the polynomial model for the same inputs. Figure 12 shows, for level 2, the distribution of \(\epsilon _\gamma u_\gamma \) at two points along the fracture, and for both times. We notice that at the beginning of the simulation the PDFs are more spread showing a high variability of the considered variable. However, at the end of the simulation the uncertainty tends to become much smaller and the value is more concentrated. Another important aspect is that the PC expansion outcomes might not fulfill physical bounds, in this case we can get negative values of \(\epsilon _\gamma u_\gamma \) which are not correct. The situation improves by considering a higher level of the sparse grid, indeed as represented in Fig. 13 this phenomenon is not present any more and the PDFs constructed with the PC expansion are in good agreement with the one computed by the full order model.

Fig. 12
figure 12

Probability distribution function of \(\epsilon _\gamma u_\gamma \) for level 2 at two points in \(\gamma \), on the top at time \(t=0.1T\) and on the bottom at final time \(t=T\). Test case of Sect. 6.1.3

Fig. 13
figure 13

Probability distribution function of \(\epsilon _\gamma u_\gamma \) for level 5 at two points in \(\gamma \), on the top at time \(t=0.1T\) and on the bottom at final time \(t=T\). Test case of Sect. 6.1.3

6.2 Multiple fractures network

We consider now a test case with a network composed of multiple-fractures. The geometry is given by the Benchmark 3 of Flemisch et al. (2018), where fractures at \(t=0\) are now considered all highly permeable with material properties and problem data equal to the previous test case. A graphical representation of the computational domain is given in Fig. 15 on the left. Fractures \(\gamma _3\) and \(\gamma _8\) will be considered later for a specific analysis.

Some quantities from the reference numerical solution are reported in Fig. 14, where it is possible to notice the variation of the pressure distribution over time due to the sealing of the fractures and the transport of the solute when the fractures are still highly permeable.

Fig. 14
figure 14

Reference solutions with mean value of the uncertain parameters. On the left pressure at time \(t=0.1T\) and on the centre for \(t=T\), on the right the solute for \(t=0.1T\). Test case of Sect. 6.2

6.2.1 Convergence

We discuss now the convergence properties of the PC expansion. On the right of Fig. 15, we plot the error decay for increasing sparse grid level for multiple variables. Also in this case, the exponential decay expected is confirmed for all the variables.

Fig. 15
figure 15

On the right the computational domain with boundary conditions and on the left the error convergence for increasing level of the sparse grids. Test case of Sect. 6.2.1

In Fig. 16 we compare the porosity computed by the differential model with the one computed by the PC expansion. On the right we also represent the relative error. The two solutions are in good agreement with a maximum error of \(13\%\) confined at the bottom of the domain, the error is much smaller in the other parts being of the order of \(5\%\) or less. The surrogate model provided by the PC expansion gives a satisfactory result at (almost) no additional computational cost.

Fig. 16
figure 16

On the left porosity in the media computed with the full model and on the centre with the polynomial chaos expansion, on the right the error between them. Test case of Sect. 6.2.1

Figure 17 compares some of the variables along the two fractures \(\gamma _3\) and \(\gamma _8\) computed by the full order model and by the PC expansion. Also in the fractures, we observe a high quality for the solutions computed with the PC expansion even for \(\gamma _8\) that has two intersections with other fractures. The jump across the intersection is properly captured, confirming also in this case that the surrogate model from the PC expansion yields a good approximation of the solutions.

Fig. 17
figure 17

Solutions along two \(\gamma _i\) and in blue computed with the full model, in red with the polynomial chaos expansion and in green computed by the full model on each sparse grid node. On the top \(\gamma _3\) and on the bottom for \(\gamma _8\). Level considered 2. Test case of Sect. 6.2.1 (colour figure online)

6.2.2 Analysis of variance and correlations

In this section, we present and analyze the impact of the uncertainty on some of the computed variables. In particular, Fig. 18 shows the Sobol indices for some of the variables of interest in the fractures \(\gamma _3\) and \(\gamma _8\). Since \(\gamma _3\) is closer to the inflow boundary than \(\gamma _8\), the associated Sobol indices behave similarly with respect to the ones of the previous test case. The effect of the inflow is more evident at the lowest tip of the fracture \(\gamma _3\) with increased impact of \(\theta ^\textrm{inflow}\) for \(\epsilon _\gamma \) and \(\epsilon _\gamma u_\gamma \) compared to the other variables. For \(\epsilon _\gamma w_\gamma \) the relation expressed by the Sobol index is less clear. Since fracture \(\gamma _8\) is more distant form the inflow boundary, the high temperature front at the end of the simulation does not fully reach it. Some effect are still visible since warmer water has been transported by the fractures, especially for \(\epsilon _\gamma w_\gamma \) where the activation energy E becomes less important than \(\eta _\gamma \) compared with the other two variables under investigation.

Fig. 18
figure 18

First order Sobol index for different solutions along two \(\gamma _i\). On the top \(\gamma _3\) and on the bottom for \(\gamma _8\). Test case of Sect. 6.2.2

In Fig. 19 we present the partial variances of the porosity with respect to the uncertain data at final simulation time. We notice a small impact of \(\eta _\gamma \), and a much more significant relevance of E and \(\theta ^{\text {inflow}}\). Note that the effect of these two uncertain parameters on reaction speed is opposite. Moreover, we notice that, on the bottom of the domain, the effect of the temperature is more pronounced since it is close to the inflow boundary, while for the activation energy E the impact is more predominant away from the inflow and close to the fractures. This can be motivated by the fact that the water and solute get more channelized into the fractures and transported upward. Since the fractures do not touch the outflow boundary, the solute flows again into the rock matrix and then alters the value of the porosity by creating more precipitate.

Fig. 19
figure 19

On the left the variance of porosity conditioned to the activation energy E, on the centre conditioned with \(\eta _\gamma \) expansion, and on the right conditioned with the temperature inflow \(\theta ^{inflow}\). Test case of Sect. 6.2.2

The covariances between some of the computed variables are reported in Fig. 20. The correlation between \(\phi _\varOmega \) and \(\theta _\varOmega \) is expected: below the warm water front, the increased temperature facilitates the chemical reaction and thus lowers the porosity; above the front, the solute is lower than the equilibrium value and the temperature is lower, hence precipitation may not occur once fractures have been sealed and stopped supplying reactant to the upper part of the domain. The correlation between \(\phi _\varOmega u_\varOmega \) and \(\phi _\varOmega w_\varOmega \) is not included here since they are, as expected, equal to − 1 in the whole domain. The same applies for \(\epsilon _\gamma u_\gamma \) and \(\epsilon _\gamma w_\gamma \).

Fig. 20
figure 20

Covariances between different solutions in the porous media. Test case of Sect. 6.2.2

6.2.3 Probability density functions

Finally, we present in (Fig. 21) the PDFs of the quantity \(\epsilon _{\gamma _i} u_{\gamma _i}\) at 75% of fractures \(i=3, 8\) for level 2 of the sparse grid. We notice a phenomenon similar to the one observed in the previous test case. For \(\gamma _3\) we might obtain unphysical values of \(\epsilon _\gamma u_\gamma \) when the PDF is computed by the PC expansion. This issue does not appear for \(\gamma _8\), since it is further from the inflow and, as a consequence, is less subject to the uncertainty. In both cases the probability distribution functions computed with the full model and with the PC expansion are quite similar.

Fig. 21
figure 21

Probability distribution function of \(\epsilon _{\gamma _i} u_{\gamma _i}\) for level 2 at two points in \(\gamma _i\). On the left \(\gamma _3\) and on the right for \(\gamma _8\). Level considered 2. Test case of Sect. 6.2.3

7 Conclusions

In this work we have presented a mathematical model to describe the evolution in time of reactive transport in fractured porous media. We have adopted a simplified model, where only one solute and one precipitate are involved in the chemical reactions. In several meaningful applications, the chemical processes can be triggered and accelerated by high temperatures, thus we have included in the model also an additional equation to model the thermal effects. The solute, transported by a liquid, might form precipitate and alter the porosity in the media, forming a fully coupled and non-linear system. In order to obtain a more realistic approximation of the physical process, we have considered a mixed-dimensional model for the fractures where the latter are represented as object of lower dimension. We have introduced appropriate equations and derived coupling conditions with the surrounding porous media. Additionally, we have applied a splitting strategy to numerically solve the problem by using standard discretization schemes.

In a real scenario, several parameters might be affected by uncertainty. To quantify their effect on the system, we have considered a polynomial chaos expansion constructed by resorting to spectral projection methods on sparse grids. This strategy proved to be very effective, since it provides high quality approximations at low computational cost. Indeed, a limited amount of simulations are needed to construct a surrogate model which can then be used to perform multiple-simulations, even if one has to be aware that the polynomial surrogate model might produce, especially if the approximation is poor, unphysical results such as, for instance, negative concentrations. Moreover, from the PC expansion one can easily compute useful statistical quantities such as partial variances and Sobol indexes to investigate the impact of input parameters on the model unknowns and gain insight into the complex model couplings. This technique has been applied to two numerical examples by increasing the geometrical complexity of the fracture network. The results obtained showed the validity of the proposed approach. In particular we have observed that, despite the fact that fractures create strong anisotropy or even discontinuities in the solution, the surrogate model can describe the quantities of interest with good accuracy. One of the most interesting effects of fractures is the fact that, due to their small aperture, their behavior can switch during the time intervals considered from conductive to blocking and vice-versa if precipitation or dissolution occur. This results in a different impact of uncertain parameters on the quantities of interest, in space and in time.