1 Introduction

Geothermal reservoirs may encounter porosity changes induced by geochemical reactions in the pores. The injected water and the in situ brine have different temperatures and chemical composition, triggering mineral precipitation and/or dissolution. These chemical reactions cause reservoir rock properties to develop dynamically with time due to the porosity changes. When porosity is altered, the flow conditions are affected and the permeability of the medium will change. Also, as the volume contribution of fluid and rock change, effective properties such as heat conductivity are affected. For a geothermal reservoir, where subsurface heat transport and fluid flow are of high importance for the heat production performance, changes in such properties are important to model accurately to account for their possible impacts on operating conditions.

As reported from field studies and simulations, porosity and permeability changes due to precipitation and dissolution of minerals as silica, quartz, anhydrite, gypsum and calcite can occur when exploiting geothermal reservoirs (Libbey and Williams-Jones 2016; McNamara et al. 2016; Mielke et al. 2015; Mroczek et al. 2000; Pape et al. 2005; Sonnenthal et al. 2005; Taron and Elsworth 2009; Wagner et al. 2005; White and Mroczek 1998; Xu et al. 2009). These fluid–rock interactions can alter and possibly clog flow paths, potentially affecting the performance of the geothermal plant significantly. Modeling of the mineral precipitation and dissolution is important to understand the processes and to better estimate to which extent the chemical reactions can affect the permeability and other effective properties of the porous medium. However, reactive transport affecting flow properties and heat transport can be particularly challenging to model due to the processes jointly affecting each other.

When investigating porosity and permeability changes, understanding the underlying processes at the pore scale is essential for highly coupled problems. The pore geometry affects the reaction rates as the reactive surface develops, while the permeability depends on how the geometry changes. Also, ion diffusivity and heat conductivity can be affected by the grain shape and can be anisotropic. Hence, using a Darcy scale model based on an upscaled pore-scale model can give a better representation of the effective properties than common porosity-weighted average approaches. Pore-scale models incorporating mineral precipitation and dissolution have been studied earlier in van Duijn and Pop (2004) and van Noorden et al. (2007), and the corresponding Darcy scale models have been investigated both analytically and numerically further in van Duijn and Knabner (1997), Knabner et al. (1995), Kumar et al. (2013a, 2014). The rigorous derivation of upscaled model starting from the pore-scale model in van Duijn and Pop (2004) has been performed in Kumar et al. (2016) using two-scale convergence framework. These papers assume the pore geometry to be fixed, which is a valid assumption if the mineral layer is not changed much compared to the pore aperture. Upscaled pore-scale models honoring porosity changes are found in Kumar et al. (2011, 2013b), van Noorden (2009a, b). In these papers, the position of the interface between grain and void space is tracked, giving a problem with a free boundary. Similar models can also be obtained for biofilm growth (van Noorden 2010), for drug release from collagen matrices (Ray et al. 2013), and on an evolving microstructure (Peter 2009). These models do not include any temperature dependence in the reaction rates nor any heat transfer.

The present work builds on the pore-scale model for coupled heat transport and reactive transport in a thin strip first formulated by Bringedal et al. (2015). Later, this model was formulated for a periodic porous medium and upscaled to Darcy scale by Bringedal et al. (2016). The freely moving interface between the mineral layer and the void space is modeled through a level set function at the pore scale. The authors derive two-dimensional effective equations honoring the pore-scale dependence through cell problems. The geometry is the same as considered by van Noorden (2009a), where Bringedal et al. (2016) also include heat transport as well as temperature effects in the fluid flow and in the chemical reactions. Including heat transport introduced a coupled cell problem at the pore scale with energy conservation in the void space and in the grain space, allowing for a more realistic transport of the conductive heat transfer through the pore. For geothermal systems, modeling the temperature dependences and heat transport correctly is crucial. We will build upon the upscaled model derived in Bringedal et al. (2016) by solving the cell problems and investigate the behavior of the resulting effective properties. Further, to test the model we consider an idealized case study where clogging occurs. The model by Bringedal et al. (2016) does not allow phase change, but we mention that (Duval et al. 2004) upscaled decoupled two-phase flow with phase change using volume averaging.

The effective model in Bringedal et al. (2016) is derived for a two-dimensional domain, but Schulz et al. (2016) recently derived an effective three-dimensional model for an isothermal reactive model without flow. The extension from two to three spatial dimensions could be performed by defining a tangent plane for the fluid–grain interface in the upscaling procedure, while the resulting effective model has the same appearance as in the two-dimensional case. The present paper deals only with the two-dimensional case, but a three-dimensional interpretation of the results is possible.

Our interest in this work stems from developing efficient computational techniques for deformable porous medium, in particular, in the limit case of clogging. As the upscaled equations in Bringedal et al. (2016) (see Sect. 2) show, the Darcy scale model is coupled to cell problems (pore-scale processes) via their coefficients depending upon the grain geometry. The latter is described by a level set and is in turn impacted by the Darcy scale variables such as pressure and temperature. In terms of discretization, in the upscaled two-scale model, there is a cell problem at each spatial mesh point. To obtain the effective parameters at the Darcy scale, the grain geometry at the cell problem needs to be updated at each time step and the corresponding problems need to be solved. Therefore, solving the upscaled model implies that at each time step and at each spatial mesh point, we need to solve as many cell problems as there are spatial mesh points to obtain the corresponding effective parameters. Assuming the Darcy scale domain to be a 2D domain, the upscaled model is a 4-dimensional model (2-dimensional for the cell problem and 2-dimensional for the Darcy scale domain). Even if these cell problems can be solved in parallel, the computational efforts involved are quite huge. Our approach here can be seen as a simplification of this full fledged approach. We assume that the geometry at the pore scale can be characterized by a single parameter and hence, the level set equation becomes an ordinary differential equation. Next, instead of solving the cell problems at each time step, we develop relationships (e.g., polynomial law) of the effective parameters based on the geometry parameter. As a result, solving the upscaled model requires simply using these fitted polynomials for the parameters drastically reducing the computational costs. Our approach should be contrasted with the prevalent approaches of treating porosity as an unknown, defining an ordinary differential equation for its evolution and using engineering correlations for the effective parameters such as permeability, heat conductivity, and diffusion coefficient (see, e.g., Chadam et al. 1986, 1991; Zhao 2014). In contrast to using the heuristic correlations, we use the homogenization approach to provide the polynomial fit. Moreover, even though we simplify the situation here by characterizing the geometry by only one unknown, this approach can be extended to include more parameters for characterizing the geometry and higher-order fits for the effective parameters.

Our contributions in this work are in studying the evolution of effective quantities, specially near the critical porosity limit, by solving the cell problems for certain grain geometries. This work may also be interpreted as an extension of similar studies as (van Noorden 2009a) to a non-isothermal case and a focus on the near-clogging scenario. Additionally, we also provide an approximate closed form analytical solution for the cell problem and show its accuracy by comparing it to the detailed numerical simulations. In practice, there are several correlations used in engineering literature coupling porosity and effective quantities (see, e.g., Verma and Pruess 1988, Eq. 6 below). We enrich this study by comparing some of these correlations to homogenization approach for evolving geometry. The cell problem, as obtained from the homogenization theory, is solved to provide the effective parameters for the different geometries providing us plots for the effective parameters versus the geometry. We can interpret our approach as a derivation of these correlation-type relationships. Moreover, the changes in the geometry at the pore scale may not always be symmetric. Our approach allows the flexibility of characterizing the geometry in more than one variable and then studying this variation. Naturally, the more variables we take for characterizing the geometry at the pore scale, we get the flexibility of describing more complex geometries, but the offline computational costs increase. We also report a numerical study showing the impact of pore-scale geometry changes on the Darcy scale flow and transport.

The structure of this paper is as follows. In Sect. 2, we present the effective equations with corresponding cell problems, while in Sect. 3 we solve the cell problems numerically. Section 4 compares the numerical solution of the cell problems with analytical solution of approximate cell problems, before considering a macroscale case study with clogging in Sect. 5. The paper ends with a summary with some comments on applications together with some concluding remarks.

2 Effective Equations and Cell Problems

The non-dimensional upscaled model by Bringedal et al. (2016) considers coupled reactive flow with heat transport and varying porosity. We state here the resulting upscaled model and refer to Bringedal et al. (2016) for the derivation and underlying assumptions, and references therein for justification of model choices. In the general formulation, still using a level set function to describe the pore structure, the model consists of the five (non-dimensional) unknowns S(xyt), u(xt), T(xt), \(\bar{\mathbf q}(x,t)\) and p(xt), which are the level set function, macroscopic ion concentration, temperature, flow rate and pressure, respectively. All but the first depend only on time t and spatial variable x, which is defined for all \(x=(x_1,x_2)\in \varOmega \), \(\varOmega \) being the macroscopic, i.e., the Darcy scale, domain. The level set function S(xyt) also depends on the microscopic variable \(y=(y_1,y_2)\in [-\frac{1}{2},\frac{1}{2}]^2\), where y is as a zoomed-in variable resolving the pore structure at a specific macroscopic point \(x\in \varOmega \). The five non-dimensional upscaled equations are \((x\in \varOmega , t>0)\)

In the above equations, \(\rho \) is the constant molecular density of the mineral, while \(\rho _f\) and \(\mu _f\) are the molecular density and viscosity of the fluid and are allowed to depend on temperature. Further, D is the molecular diffusivity of the fluid, while \(\kappa _f\) and \(\kappa _g\) are the heat conductivities of fluid and grain, respectively. These are considered properties of the fluid/grain and are constant. The reaction rate f describes the mineral precipitation and dissolution and is given by

$$\begin{aligned} f(T,u,y) = ke^{-\alpha /T}\left( \frac{u^2}{K_\mathrm{m}(T)}-w(\text {dist}(y,B),T,u)\right) , \end{aligned}$$

where k is the Damköhler number, and \(\alpha =E/RT_\mathrm{ref}\) where E is the activation energy, R the gas constant and \(T_\mathrm{ref}\) a reference temperature. Further, \(K_\mathrm{m}(T)\) is the solubility of the mineral in question, and the function \(w(\text {dist}(y,B),T,u)\) is defined by

$$\begin{aligned} w(d,T,u) = {\left\{ \begin{array}{ll} 0 &{} \text {if } d<0, \\ \min \left( \frac{ u^2}{K_\mathrm{m}(T)},1\right) &{} \text {if } d=0, \\ 1 &{} \text {if } d>0, \end{array}\right. } \end{aligned}$$
(1)

where the distance corresponds to the width of the mineral layer. The spaces \(G_0(x,t)\), \(Y_0(x,t)\) and \(\varGamma _0(x,t)\) refer to the microscopic grain space, void space and the interface between them, inside the unit cell \(y\in [-\frac{1}{2},\frac{1}{2}]^2\), see Fig. 1. These spaces are defined implicitly as where the level set function is positive, negative and zero, respectively. The notation \(|\cdot |\) refers to the area (volume) of the space. The effective coefficients \({\mathcal {A}}_u\), \({\mathcal {A}}_f\), \({\mathcal {A}}_g\), and \(\mathcal K\) represent the porous medium’s ability to transmit ions through diffusion, heat through conduction in fluid/grain, and fluid through fluid flow. The effective coefficients are tensors with components

$$\begin{aligned} a^u_{ij}(x,t)&=\int _{Y_0(x,t)}(\delta _{ij}+\partial _{y_i}v^j(y))\mathrm{d}y, \end{aligned}$$
(2a)
$$\begin{aligned} a_{ij}^f(x,t)&=\int _{Y_0(x,t)}(\delta _{ij}+\partial _{y_i}\Theta ^j_f(y))\mathrm{d}y, \end{aligned}$$
(2b)
$$\begin{aligned} a_{ij}^g(x,t)&= \int _{G_0(x,t)}(\delta _{ij}+\partial _{y_i}\Theta ^j_g(y))\mathrm{d}y, \end{aligned}$$
(2c)
$$\begin{aligned} k_{ij}(x,t)&= \int _{Y_0(x,t)}\omega ^j_i(y)\mathrm{d}y, \end{aligned}$$
(2d)

respectively, for \(i,j=1,2\). The functions \(v^j(y)\), \(\Theta ^j_f(y)\), \(\Theta ^j_g(y)\) and \(\omega ^j(y)\) are solutions of the cell problems \((x\in \varOmega ,y\in [-\frac{1}{2},\frac{1}{2}]^2,t>0)\)

$$\begin{aligned} \nabla _y^2v^j(y)=0&\text { in } Y_0(x,t) \text { and } \mathbf n\cdot (\mathbf e_j+\nabla _y v^j(y))=0 \text { at } \varGamma _0(x,t), \end{aligned}$$
(3a)
$$\begin{aligned} \nabla _y^2\Theta ^j_f(y) =0&\text { in } Y_0(x,t) \text { and } \nabla _y^2\Theta ^j_g(y) =0 \text { in } G_0(x,t) \text { where } \nonumber \\&\kappa _f\mathbf n_0\cdot (\mathbf e_j+\nabla _y\Theta ^j_f(y)) =\kappa _g\mathbf n_0\cdot (\mathbf e_j+\nabla _y\Theta _g^j(y))\nonumber \\&\text { and } \Theta _f^j(y) = \Theta _g^j(y) \text { at } \varGamma _0(x,t), \end{aligned}$$
(3b)
$$\begin{aligned} \mathbf e_j+\nabla _y\Pi ^j(y)=&-\nabla _y^2\omega ^j(y) \text { and } \nabla _y\cdot \omega ^j(y) = 0 \text { in } Y_0(x,t)\nonumber \\&\text { and } \omega ^j(y)=0 \text { at } \varGamma _0(x,t), \end{aligned}$$
(3c)

together with the periodicity in y for \(v^j(y)\), \(\Theta ^j_f(y)\), \(\Pi ^j(y)\) and \(\omega ^j(y)\), \(j=1,2\). The periodicity assumption comes from the macroscopic domain being filled with microscopic cells, as the one seen in Fig. 1, lying adjacent to each other. Hence, the periodic boundary condition is due to the proximity of the neighboring cells. However, the neighboring cells do not have to be equal; hence, inhomogeneities are allowed.

Fig. 1
figure 1

Model of microscopic pore, with fluid space \(Y_0(x,t)\), grain space \(G_0(x,t)\) and the interface between them \(\varGamma _0(x,t)\), which has unit normal \(\mathbf n\) pointing into the grain. Note that the grain consists of both a reactive mineral layer (dark gray) surrounding a non-reactive part B (light gray)

We will consider a simplified version of this formulation by imposing constraints on the pore space geometry. By assuming the grains to have a specific shape described through a single variable, the level set equation can be replaced by an equation for that variable. Here, we show how the model equations change when using circular grains, but the approach is more general and can be used as long the grain shape can be described through one free parameter. For circular grains, we introduce the level set function \(S(x,y,t)=R^2(x,t) -y_1^2-y_2^2\), where R(xt) is the radius of the grains. Note that the grain radius is a function of position (and time) as the grain radius can vary between unit cells, allowing non-homogeneous media. The upscaled equations will depend on grain radius R(xt) instead of the level set function. This simplification was also made by van Noorden (2009a), but places severe constraints on the pore structure and should be interpreted as a choice made for visualization purposes. We mention that Frank et al. (2011) and Frank (2013) implemented other choices of the level set function for a Stokes–Nernst–Planck–Poisson system, and in the following section, we also solve the cell problems for elliptic grains to indicate the effect of anisotropy. Using the circular geometry, the Darcy scale model equations now become, for \((x\in \varOmega ,t>0)\)

$$\begin{aligned}&\displaystyle \partial _t\Big (\rho R(x,t)\Big ) = f(T,u,R),&\end{aligned}$$
(4a)
$$\begin{aligned}&\displaystyle \partial _t \Big ((1-\pi R^2(x,t))u(x,t)+\pi R^2(x,t) \rho \Big ) + \nabla _x\cdot \Big (\bar{\mathbf q}(x,t)u(x,t)\Big )&\nonumber \\&\displaystyle = \nabla _x\cdot \Big (D{\mathcal {A}}_u(R)\nabla _x u(x,t)\Big ),&\end{aligned}$$
(4b)
$$\begin{aligned}&\displaystyle \partial _t\Big ((1-\pi R^2(x,t))\rho _f(T)T(x,t)+\pi R^2(x,t)\varsigma \rho T(x,t)\Big ) + \nabla _x\cdot \Big (\rho _f(T)\bar{\mathbf q}(x,t)T(x,t)\Big )&\nonumber \\&\displaystyle = \nabla _x\cdot \Big (\kappa _f{\mathcal {A}}_f(R)\nabla _x T(x,t)+\kappa _g{\mathcal {A}}_g(R)\nabla _x T(x,t)\Big ),&\end{aligned}$$
(4c)
$$\begin{aligned}&\displaystyle \partial _t \Big ((1-\pi R^2(x,t))\rho _f(T)+\pi R^2(x,t)2\rho \Big )+\nabla _x\cdot \Big (\rho _f(T)\bar{\mathbf q}(x,t)\Big ) = 0,&\end{aligned}$$
(4d)
$$\begin{aligned}&\displaystyle \bar{\mathbf q}(x,t) = -\frac{1}{\mu _f(T)}\mathcal K(R)\nabla _xp(x,t).&\end{aligned}$$
(4e)

The reaction rate f uses the distance between R and \(R_{\text {min}}\), where \(R_{\text {min}}\) is the radius of the non-reactive solid, to calculate the width of the mineral layer. The matrices \({\mathcal {A}}_u\), \({\mathcal {A}}_f\), \({\mathcal {A}}_g\) and \(\mathcal K\) depend only on grain radius R(xt) as the integration area is determined by the radius alone. The cell problems are defined as before, but where the unit cell spaces are now defined using the grain radius. Hence, the pore space is \(Y_0(x,t) = \{y\in [-\frac{1}{2},\frac{1}{2}]^2 \ | \ y_1^2+y_2^2 > R^2(x,t)\}\), grain space is \(G_0(x,t)= \{y\in [-\frac{1}{2},\frac{1}{2}]^2 \ | \ y_1^2+y_2^2 < R^2(x,t)\}\) and the interface between them is \(\varGamma _0(x,t)= \{y\in [-\frac{1}{2},\frac{1}{2}]^2 \ | \ y_1^2+y_2^2 = R^2(x,t)\}\). The tensors \({\mathcal {A}}_u\), \({\mathcal {A}}_f\), \({\mathcal {A}}_g\) and \(\mathcal K\) defined in Eq. (2) will now be cheaper to compute, and are due to the symmetric grain shape scalars.

3 Numerical Solution of Cell Problems

The cell problems are decoupled from the macroscale equations and solved beforehand. For various fixed values of grain radius R, the cell problems (3) can be solved, hence providing effective quantities \({\mathcal {A}}_u\), \({\mathcal {A}}_f\), \({\mathcal {A}}_g\) and \(\mathcal K\) that are functions of R. Note that the cell problems are second-order linear elliptic problems. The permeability and diffusion tensors cell problems are defined in the pore space with appropriate boundary conditions on the grain geometry, whereas the thermal problem is defined in the whole cell geometry together with interface conditions across the grain-pore space boundary. To solve these elliptic problems, we adopt standard approaches. We write down a weak formulation for these cell problems and use standard finite element techniques as implemented in the Finite Element package COMSOL multiphysics (COMSOL Inc. 2011). The coupled cell problems for effective heat conductivity coefficients \({\mathcal {A}}_f\) and \({\mathcal {A}}_g\) have not been considered earlier. We will in this paper focus on circular grains, which represents an isotropic medium. However, in this section we also solve the cell problems for elliptic grains to sketch the effect of anisotropy on the effective quantities. For solving these cell problems, we use Finite Element Method with triangular elements using P1-basis functions. Since we consider a sequence of pore-scale geometry, the corresponding mesh also changes. For example, as shown in Fig. 2, for the case of thermal conductivity computations, elliptic grain shape, with major axis diameter 0.4 and minor axis diameter of 0.1 (contrast of 4), the number of triangular elements is 1602. We use the automatic meshing and solution approach as implemented in COMSOL Inc. (2011). The post-processing of the solution to obtain the effective quantities is also performed using the available tools there. Note that the effective quantities are all non-dimensional according to the non-dimensionalization in Bringedal et al. (2016).

Fig. 2
figure 2

Mesh of a microscopic pore geometry with elliptic grain space with major axis 0.4 and minor axis of 0.1 (contrast of 4). Also, see Fig. 1 showing a representative unit cell geometry and Fig. 7 showing an elliptic grain geometry

3.1 Circular Grains

As the resulting effective quantities \({\mathcal {A}}_u\), \({\mathcal {A}}_f\), \({\mathcal {A}}_g\) and \(\mathcal K\) are known to be scalars when the grains are circular due to isotropy, it is only necessary to solve Eqs. (23) for \(i=j=1\). The resulting effective diffusion coefficient \({\mathcal {A}}_u\) is identical as the one considered by van Noorden (2009a), and the results are not presented here.

The heat conductivity coefficients can be interpreted as a weighting of the relative importance of the void space and grain space, as a more accurate alternative to the usual porosity weighting since the actual heat transfer within and between fluid and grain is taken into account. The sum of \({\mathcal {A}}_f\) and \({\mathcal {A}}_g\) is always 1. Figure 3 shows the effective heat conductivity coefficients as a function of grain radius R, for various values of \(\kappa =\kappa _g/\kappa _f\). The case \(\kappa =1\) corresponds to when the heat conductivities in fluid and grain are equal. In this case, the cell problem is trivial and \({\mathcal {A}}_f = \phi = 1-\pi R^2\) and \({\mathcal {A}}_g=1-\phi = \pi R^2\), which corresponds to the usual porosity weighting. The figures only display values for radii between 0.2 and 0.5. A radius of 0.5 corresponds to the porous medium being clogged (although there is still void space caught between the circular grains), while we have not considered radii less than \(R_{\text {min}}=0.2\) even though the cell problems are well defined for radii down to 0.

Fig. 3
figure 3

Effective heat conductivity coefficients for fluid (left) and grain (right). Increasing grain radius R corresponds to less void space. When \(\kappa \) is larger than 1, the grain heat conductivity is larger than in the fluid

Figure 4 shows the effective heat conductivity of the medium that is defined as

$$\begin{aligned} \kappa _\mathrm{{eff}} = \kappa _f{\mathcal {A}}_f + \kappa _g{\mathcal {A}}_g. \end{aligned}$$

In Fig. 4 \(\kappa _f=1\), hence the value of \(\kappa =\kappa _g/\kappa _f\) corresponds to the value of \(\kappa _g\). Hence, all lines approach 1 if extending the plot to \(R=0\). Figure 5 compares two of the effective heat conductivities with the usual volume averaged heat conductivities

$$\begin{aligned} \kappa _\mathrm{{eff,ar}}&= \kappa _f(1-\pi R^2) + \kappa _g\pi R^2, \end{aligned}$$
(5a)
$$\begin{aligned} \kappa _\mathrm{{eff,geo}}&= \kappa _f^{(1-\pi R^2)}\kappa _g^{(\pi R^2)}, \end{aligned}$$
(5b)
$$\begin{aligned} \kappa _\mathrm{{eff,har}}&= \frac{1}{\frac{1-\pi R^2}{\kappa _f}+\frac{\pi R^2}{\kappa _g}}, \end{aligned}$$
(5c)

which are the arithmetic, geometric and harmonic averages, respectively. As seen in the figure, the effective heat conductivities calculated from the cell problems always give a smaller value than the arithmetic averaged value, which is the one usually employed for porous media (Nield and Bejan 2013). The overestimation of the effective heat conductivity by the arithmetic averaging can be understood as follows: Consider a case where the heat conductivity is much larger in grain than in fluid, corresponding to an extreme case of \(\kappa =2\) shown in Fig. 5. The unit cell would still experience a relatively low heat conductivity for low grain radii, as the grains are isolated from each other by the low-conductive fluid. However, when the grain radius is so high that the medium almost clogs and the distance between the highly conductive grains is smaller, the heat conductivity will increase substantially. This behavior is captured by the cell problem solutions, as illustrated by the line for \(\kappa =10\) in Fig. 4, while an arithmetic averaging based on porosity will not be able to capture such behavior and instead overestimates the importance of the highly conductive phase. The cell problem solution is best approximated by the geometric mean, which is the known as the more suitable solution for random porous media (Woodside and Messmer 1961). Also for such an extreme case of \(\kappa =10\), the geometric mean is the best choice (not shown). The case with \(\kappa _f=\kappa _g\) is trivial and gives equal results for all methods.

Fig. 4
figure 4

Effective heat conductivities for the porous medium. In all cases, \(\kappa _f=1\), hence \(\kappa \) reflects the value of the heat conductivity in the grain \(\kappa _g\)

Fig. 5
figure 5

Effective heat conductivities for the porous medium. The solid curves arise from the cell problem formulation, the dotted are the arithmetic means, the dashed are the geometric means, and the dashed-dotted are the harmonic means. The four top curves are for \(\kappa =2\), while the four lower are for \(\kappa =0.2\)

The permeability \(\mathcal K\) is identical as the one found by van Noorden (2009a), and is displayed in Fig. 6. As grain radii close to 0.5 correspond to being close to clogging, the permeability quickly approaches zero for growing grain radius. From the logarithmic plot of the permeability, we can estimate that the permeability approaches zero as the grain radius approaches 0.5 with an inclination number corresponding to approximately \(O\big ((R-0.5)^{5/2}\big )\).

Fig. 6
figure 6

Permeability of the porous medium. The right plot shows a log–log plot for the permeability as a function of \((0.5-R)\), as the permeability approaches zero when the grain radius approaches 0.5. Note that the permeability values are non-dimensional, but dimensional (\(m^2\)) values can be obtained by scaling with \(l^2\), where l is the typical pore size, i.e., the scaling such that the cell in Fig. 1 has side lengths 1

3.2 Elliptic Grains

The level set formulation can also be applied to investigate other grain shapes than the isotropic circular shape, and we mention here the differences when going into an anisotropic regime using elliptic grains. We assume the grain in each unit cell being elliptic with a fixed ratio between the semi-major and semi-minor axis. When the grain grows and shrinks due to mineral precipitation and dissolution, the grain would not preserve its elliptic shape due to the underlying assumption of even growth/dissolution arising from the upscaling and derivation of the cell problem (Bringedal et al. 2016). However, making physical arguments through the grain shape itself locally allowing for higher or lower reaction rates, we could argue that the elliptic shape should be maintained, and hence the shape of the grain can at all times be explained through the parameter M, the length of the semi-major axis. See Fig. 7 for a sketch of the unit cell, where the ratio between the semi-major and semi-minor axis of the grain is 2.

Fig. 7
figure 7

Model of microscopic pore with elliptic shape with ratio of 2 between the semi-major and semi-minor axis. The unit cell has fluid space \(Y_0(x,t)\), grain space \(G_0(x,t)\) and the interface between them \(\varGamma _0(x,t)\), which has unit normal \(\mathbf n\) pointing into the grain

The formulation of the upscaled equations would be similar as in Eq. (4), replacing the radius R(xt) with the semi-major axis M(xt), and taking into account the fluid volumes and grain volumes changing. Now, \(|Y_0(x,t)| = 1-\pi M^2/2\) and \(|G_0(x,t)|=\pi M^2/2\) when the ratio between semi-major and semi-minor axis is 2. As earlier, we assume there is some part of the grain that will not dissolve and choose this to be for \(M_{\text {min}}=0.2\). This minimum choice of M corresponds to a different porosity than \(R_{\text {min}}=0.2\). The maximum semi-major axis is \(M=0.5\), corresponding to clogging. Note, however, that \(M=0.5\) resembles a layered medium with no flow in the \(y_2\)-direction, but still allowing flow in the \(y_1\)-direction. The porosity is significantly higher than in the circular case with \(R=0.5\).

Due to the anisotropy of the grain shape, the resulting effective permeability, diffusivity and heat conductivities in Eq. (2) will no longer be scalars, but \(2\times 2\) matrices. The cell problems (3) are solved using elliptic grain shape with \(M\in [0.2,0.5)\) using COMSOL multiphysics (COMSOL Inc. 2011). For the heat conductivities, we only consider the two cases \(\kappa =0.2\) and \(\kappa =2\) as our goal is only to sketch the effect of anisotropy arising from the cell problem geometry. Although the cell problems provide \(2\times 2\) matrices, the off-diagonal terms are effectively zero due to the orientation of the grain shape; the anisotropy is aligned with the grid. Hence, we only focus on the diagonal terms. These diagonal values are also the eigenvalues of the matrices, which are important for characterizing the anisotropic medium.

Figure 8 shows the heat conductivity coefficients for the fluid and grain as a function of semi-major axis M, using \(\kappa =\kappa _g/\kappa _f\) either equal to 0.2 or 2, and ratio between the semi-major and semi-minor axis being either 2 or 4. These plots should be compared to Fig. 3 for circular grains. There are several interesting findings for the anisotropic heat conductivities. Firstly, the differences between the \(y_1\)- and \(y_2\)-coefficients are significantly different already for a relatively small ratio between the semi-major and semi-minor axis, which becomes more visible when the grain is larger (corresponding to the anisotropic feature becoming more relevant), and these differences are important both for when heat conductivity is largest in the fluid and in the grain. Whether the heat conductivity coefficient is largest in the \(y_1\)- or \(y_2\)-direction depends on the value of \(\kappa \), and phase: When \(\kappa =2\), the horizontally elongated shape of the grain makes the grain heat conductivity coefficient larger in the \(y_1\)-direction than in the \(y_2\)-direction, and oppositely for the fluid. Hence, the contribution from grain on heat conduction is more important for the \(y_1\)-direction than in \(y_2\) in this case, contributing to a larger medium heat conductivity in the \(y_1\)-direction as the grain heat conductivity is larger than in the fluid. From Fig. 8, we see how the grain heat conductivity coefficient is larger in the \(y_2\)-direction than in the \(y_1\)-direction when \(\kappa =0.2\). Hence, the grain heat conductivity gives a larger to contribution to the effective heat conductivity in the \(y_2\)-direction than in the \(y_1\)-direction. However, this contribution is a “negative” one as the heat conductivity in the grain is smaller than in fluid when \(\kappa =0.2\). Hence, the grain conductivity hampers the medium heat conductivity to a larger extent across the layers. The effective heat conductivities seen in Fig. 9 show how the heat conductivity is always larger in \(y_1\)-direction for both values of \(\kappa \). Hence, heat conductivity of the medium is always more efficient along the layers than across, independently of whether the fluid or grain has the largest conductivity.

Fig. 8
figure 8

Comparison of the effective heat conductivity coefficients for fluid (left) and grain (right). Increasing M corresponds to more grain space, while ‘ratio’ refers to the ratio between semi-major and semi-minor axis of the elliptic grain. When \(\kappa \) is larger than 1 (black lines), the grain heat conductivity is larger than in the fluid. Oppositely for \(\kappa \) smaller than 1 (green lines)

Comparing the effective heat conductivities with corresponding arithmetic, geometric and harmonic averages based on (5) reveals some different behavior for the elliptic case as seen for the circular grains in Fig. 5. Figure 9 shows how the different effective behaviors in the \(y_1\)- and \(y_2\)-directions are approximated by the arithmetic, geometric and harmonic averages for the two choices of \(\kappa \). While the circular grain effective heat conductivities were always closer to the geometric mean, the effective heat conductivity in the \(y_1\)-direction (along layering) is best approximated by the arithmetic mean (low \(\kappa \)) or by the geometric mean (high \(\kappa \) and low M), and the effective heat conductivity in the \(y_2\)-direction (across layering) is best approximated by the harmonic mean (high \(\kappa \)) or by the geometric mean (low \(\kappa \) and low M). These findings were to some extent expected as harmonic mean is known to be more suitable for series distributions and arithmetic mean for parallel distributions (Woodside and Messmer 1961). However, as seen from Fig. 9, the geometric averages can still be the best alternative for lower values of M and especially for small ratio between the semi-major and semi-minor axis, corresponding to when the anisotropic effect is not so strong. Hence, using arithmetic mean along the layering and harmonic mean across the layering is important when there are strong anisotropic effects in the porous medium.

Fig. 9
figure 9

Comparison of the effective heat conductivities for the porous medium for when the ratio between semi-major and semi-minor axis is 2 (left) and 4 (right). The five top curves are for \(\kappa =2\), while the five lower are for \(\kappa =0.2\)

For the ion diffusivity, the question of which type of averaging is not so relevant as the ion diffusivity in the grain is zero, and hence only the arithmetic mean would be applicable. In practice, the resulting diffusivity coefficient is then the porosity, which is often used when modeling diffusivities with varying porosity. However, as Fig. 10 shows, the porosity is a poor approximation for the effective diffusivity coefficient, even for circular geometries. The porosity approximates the diffusivity in the \(y_1\)-direction (along layers) quite well, especially when anisotropic effects are strong, but gives a poor approximation for the \(y_2\)-direction (across layers), which is zero when M is 0.5 due to clogging in the \(y_2\)-direction, while the porosity is still large.

Fig. 10
figure 10

Comparison of the effective ion diffusivity coefficients for circular and elliptic grains, as a function of either grain radius R or the semi-major axis M. Increasing R or M corresponds to more grain space, while ‘ratio’ refers to the ratio between semi-major and semi-minor axis of the elliptic grain

The permeability is also a tensor when considering elliptic grain shapes. The off-diagonal terms are effectively zero due to the orientation of the grain, and hence we only need to consider the two diagonal terms. Here, the \(y_2\)-term will approach zero when M approaches 0.5 due to clogging, while the \(y_1\)-term will still have a large permeability when M is 0.5. Figure 11 shows the diagonal components of the permeability tensor for the elliptic grain as a function of the semi-major axis M. For comparison, the circular grain permeability is also included.

Fig. 11
figure 11

Comparison of the permeabilities for the porous medium for circular and elliptic grains, as a function of either grain radius R or the semi-major axis M. The right plot shows a log–log plot of the permeabilities as a function of \((0.5-R)\) or \((0.5-M)\), as clogging occurs when R or M approaches 0.5. A ratio of 4 means that the grain is more elongated. The red stars in the right plot indicate the estimated permeability values based on an upscaled thin strip model (Bringedal et al. 2015)

As seen from Fig. 11, the permeabilities in the \(y_1\)-direction do not approach zero when M approaches 0.5. Due to the elliptic grain shape, the medium is not blocked in the \(y_1\)-direction but forms channels. For channels, it is shown earlier (Bringedal et al. 2015) that the non-dimensional permeability should behave as \(K=d^3/12\) where d is the aperture. If we use the minimum distance between two adjacent grains as a measure of the aperture in the \(y_1\)-direction of the channel-like medium, the cubic relationship estimates a (non-dimensional) permeability of \(K=0.0105\) and \(K=0.0352\) for when the ratio between the semi-major and semi-minor axis are 2 and 4, respectively. These two values are marked with red stars in the right part of Fig. 11. The \(k_{11}\) permeability values calculated from the cell problems when M is close to 0.5 are \(k_{11}=0.0145\) and \(k_{11}=0.0406\) for these two ratios. Hence, the cubic relationship slightly underestimates the calculated along-channel permeabilities, which is possibly due to the channel not being straight but is generally wider than the minimum value used here. Also, the cell problems are not solved for \(M=0.5\), as the flow cell problem is undefined in this case, and hence the comparison is made for \(M=0.499\).

The circular grain permeability and elliptic grain \(k_{22}\)-permeabilities all approach 0 when R or M approach 0.5, although at slightly different speeds. Due to the anisotropy, the clogging happens at different critical porosities. The critical porosity is defined as the remaining porosity when clogging (in the \(y_2\)-direction) occurs and will be \(\phi _{\text {crit}}=1-\pi 0.5^2\) for the circular grain, and \(\phi _{\text {crit}}=1-\pi 0.5^2/2\) and \(\phi _{\text {crit}}=1-\pi 0.5^2/4\) for the elliptic grain for ratio equal to 2 and 4, respectively. TOUGHREACT (Xu et al. 2012) incorporates a power law for the permeability based on Verma and Pruess (1988) when there is a known critical porosity, namely

$$\begin{aligned} K=K_0\left( \frac{\phi -\phi _{\text {crit}}}{\phi _0-\phi _{\text {crit}}}\right) ^n, \end{aligned}$$
(6)

where \(K(\phi _0)=K_0\) at some other porosity \(\phi _0>\phi _{\text {crit}}\). The power n is, as the critical porosity, medium dependent and needs to be estimated. Using the permeabilities at \(R_{\text {min}},M_{\text {min}}=0.2\) and the known critical porosities, we can estimate n through a least-square approach. We find \(n=2.82\) for the circular grain, while \(n=2.68\) and \(n=2.53\) are the powers best estimating the elliptic grain cases for when the ratio between semi-major and semi-minor axis is 2 and 4, respectively. See Fig. 12 for illustration of these three cases. Due to fitting of the entire interval, the resulting approximated permeabilities are slightly too steep when approaching the critical porosities, but do a fairly good job in capturing the behavior of the permeability near clogging.

Fig. 12
figure 12

Comparison of the permeability, or permeability in the \(y_2\)-direction when the porosity approaches the critical porosity. The green lines are the least-square fitted versions of Eq. (6) based on Verma and Pruess (1988)

4 Comparison with Approximate Solutions

The cell problems (3) can be solved numerically for discrete values of grain radius R, but when implementing the macroscale Eq. (4), it is more efficient if the effective quantities can be known through analytical expressions instead of solving the cell problems for each time step as the radius will vary with both time and space. One way to get around this is to solve the cell problems beforehand for a large number of discrete R values and create a lookup-table, but we here investigate the possibility of approximating the cell problem solutions with either solving a related cell problem analytically, or by solving the cell problems numerically for discrete values of R and use polynomial interpolation.

4.1 Approximate Heat Conductive Cell Problems

The cell problem (3b) used to calculate the heat conductivity coefficients \({\mathcal {A}}_f\) and \({\mathcal {A}}_g\) can be approximated by solving a related cell problem analytically. The cell problem is formulated through the unknown functions \(\Theta _f(y_1,y_1)\) and \(\Theta _g(y_1,y_2)\), that should fulfill Eq. (3b) together with periodicity across the external cell boundaries:

$$\begin{aligned} \Theta _f(y_1=-1/2) = \Theta _f(y_1=1/2),\ \Theta _f(y_2=-1/2) = \Theta _f(y_2=1/2). \end{aligned}$$

Our approach involves using polar coordinates and separation of variables; hence, we assume the solutions can be written on the form

$$\begin{aligned} \Theta _f(r,\theta ) = F_r(r)F_{\theta }(\theta ),\ \Theta _g(r,\theta ) = G_r(r)G_{\theta }(\theta ). \end{aligned}$$

However, as shown in the “Appendix”, our assumption of separation of variables together with the resulting solution form in the azimuthal direction will lead to the periodicity requirement on the external boundary not being fulfilled. Instead, we search an approximate solution through alternative boundary conditions for the external boundary. We consider two alternatives: Either dropping the external boundary, allowing \(\Theta _f\) to be defined for all \(r>R\); or, keeping the boundary, but use other means to obtain a unique solution. Redefining the cell problem, makes it more similar to the conductive single-inclusion solutions handled by Torquato (2013). Torquato (2013) also shows how to expand these solutions to effective medium approximations of multiphase media. However, the two approaches lead to the same solution, namely:

$$\begin{aligned} {\mathcal {A}}_f&= (1-\pi R^2)\frac{1+\kappa }{1+\kappa + \pi R^2(1-\kappa )},\end{aligned}$$
(7a)
$$\begin{aligned} {\mathcal {A}}_g&= \pi R^2\frac{2}{1+\kappa +\pi R^2(1-\kappa )}. \end{aligned}$$
(7b)

The full derivation of the solution using the two approaches are found in the “Appendix”. Figure 13 compares the approximate effective heat conductivity from Eq. (7) with the exact solution found from the cell problem (3b) and the volume weighted geometric average (5b). The approximate cell problem does a better job than the volume averaging except for large values of R.

Fig. 13
figure 13

Comparison of the effective heat conductivities. The three lower curves are for \(\kappa _f=1,\kappa _g=0.2\), while the three upper curves are for \(\kappa _f=1,\kappa _g=2\)

4.2 Approximate Polynomials for the Cell Problem Solutions

We here try to estimate the effective quantities \({\mathcal {A}}_u(R)\), \({\mathcal {A}}_f(R)\), \({\mathcal {A}}_g(R)\) and \(\mathcal K(R)\) with approximate polynomials based on numerically found solutions of the cell problems (3), which have been obtained for discrete values of R within our interval of interest: \(R\in [0.2,0.5]\). As van Noorden (2009a), we use a polynomial with powers of \(R^0\), \(R^{1/2},R^{1},R^{3/2}\) and \(R^{2}\) for the ion diffusivity coefficient and the heat conductivity coefficients. While van Noorden (2009a) could use that the polynomial for \({\mathcal {A}}_u\) was 1 when \(R=0\) and 0 when \(R=0.5\), the latter is not the case for \({\mathcal {A}}_f\) as there is still a large amount of conductive heat transfer in the fluid when the porous medium is clogged. However, the polynomial for \({\mathcal {A}}_g\) would be 0 for \(R=0\), and the polynomials approximating \({\mathcal {A}}_f\) and \({\mathcal {A}}_g\) should still fulfill that their sum is 1 for all R.

The polynomial found to approximate \({\mathcal {A}}_u\) best in the least-square sense is

$$\begin{aligned} {\mathcal {A}}_u(R)\approx 0.7232(0.5-R)^{1/2}-0.2166(0.5-R)+4.8785(0.5-R)^{3/2}-3.9439(0.5-R)^2. \end{aligned}$$

The coefficients of this polynomial are quite different than the ones found by van Noorden (2009a), despite fitting within the same interval. The curves provide similar values. The maximal error in the fitting points was \(10^{-3}\) for van Noorden (2009a), which is also the case here.

We approximate \({\mathcal {A}}_f\) and \({\mathcal {A}}_g\) with polynomials only for \(\kappa =2\) and \(\kappa =0.2\), to indicate the different behaviors for when \(\kappa \) is larger/smaller than 1. For \(\kappa =2\), the polynomials found to approximate \({\mathcal {A}}_f\) and \({\mathcal {A}}_g\) best in the least-square sense are

$$\begin{aligned} {\mathcal {A}}_f(R)&\approx 3.3481R^{1/2}-19.5551R+38.2452R^{3/2}-27.33065R^2 +1.\\ {\mathcal {A}}_g(R)&\approx -3.3433R^{1/2}+19.5274R-38.1923R^{3/2}+27.2974R^2. \end{aligned}$$

For \(\kappa =0.2\), the polynomials found to approximate \({\mathcal {A}}_f\) and \({\mathcal {A}}_g\) best in the least-square sense are

$$\begin{aligned} {\mathcal {A}}_f(R)&\approx 1.0282R^{1/2}-4.3256R+3.8254R^{3/2}-3.2395R^2 +1.\\ {\mathcal {A}}_g(R)&\approx -1.0317R^{1/2}+4.3455R-3.8638R^{3/2}+3.2639R^2. \end{aligned}$$

The polynomials for \({\mathcal {A}}_f\) are assumed to have a constant factor of 1 as \({\mathcal {A}}_f(0)=1\) and \({\mathcal {A}}_g(0)=0\), but are otherwise only fitted within the interval of interest. Due to numerical roundoff error and as the least-square fitting have been done independently for the polynomials, the approximating polynomials do not sum up exactly to 1 for all R, but deviate from 1 with up to \(10^{-4}\). The maximum error for the fitting points is \(10^{-3}\) for the effective heat conductivities in both cases. Plotting the effective heat conductivity calculated from the cell problems together with the approximate effective heat conductivity from the above polynomials, reveals the two curves being virtually equal. The two cases of high and low \(\kappa \) result in polynomials of similar structure, but the higher-order coefficients are of relative higher importance for R-values close to 0.5 when \(\kappa =2\), while the linear terms dominate for \(\kappa =0.2\). This behavior is due to the more curved shapes of the high \(\kappa \) curves near \(R=0.5\) seen in Fig. 3.

The behavior of the permeability close to clogging is important to capture when modeling precipitation and clogging as the flow pattern can change significantly as pores close (and possibly reopen) and the relative permeability variations can vary within several orders of magnitude close to clogging. In van Noorden (2009a), the permeability was fitted with a sum of first-, second- and third-order powers of \((0.5-R)\). Van Noorden did not focus on clogging and fitted with the factors that would capture the behavior over his whole region of interest. However, the sum of these three terms implies that the permeability should approach zero as \(O(0.5-R)\) as the first-order term will dominate the two others when R approaches 0.5. Investigating the permeability values when R is close to 0.5, as seen in the right part of Fig. 6, reveals that the permeability does not approach zero linearly when close to clogging. The logarithmic plot indicates an inclination number of approximately 5 / 2 for R close to 0.5. This means that to capture the behavior close to clogging, the approximating polynomial should not contain terms with \((0.5-R)\)-factors of power less than 5 / 2. The polynomial can, however, contain higher-order terms as these will not dominate close to clogging. A polynomial that is found to approximate the permeability values satisfactory, both away from clogging and close to clogging, is

$$\begin{aligned} \mathcal K(R)\approx 0.6191(0.5-R)^{5/2}-0.4892(0.5-R)^3+1.0441(0.5-R)^{7/2}. \end{aligned}$$

The maximum error in the fitting points is \(10^{-4}\) and is found for low values of R. The maximum relative error is 0.08 and occurs when the radius is close to clogging. Approximate polynomials with terms containing first-order \((0.5-R)\)-terms are found to have a relative error larger than 1. An alternative approach to the above polynomial would be to approximate the behavior of the permeability with two polynomials: one valid for low values of R and one valid for R close to 0.5, and tie these two polynomials together with continuity constraints in some breaking point. This approach could, however, cause issues in a numerical implementation. As the logarithmic plot in Fig. 6 does not indicate any obvious breaking points, using the same polynomial for the whole fitting interval [0.2, 0.5) should be feasible in this case.

5 Case Study: Clogging

To investigate the behavior of the upscaled effective Eq. (4) in a numerical implementation, we create a case study with initial and boundary conditions, mineral solubilities and rock properties such that clogging will occur at some distance away from the well. The Darcy scale domain is assumed to be filled with microscopic pores as Fig. 1 next to each other, in line with the periodic assumption in deriving the upscaled model in Bringedal et al. (2016). The microscopic cells are not explicitly visible in the Darcy scale domain, as they in the homogenization limit are assumed infinitesimally small, but contribute through the cell problem solution for effective quantities, e.g., permeability, at each macroscopic point in the domain. The goal of this case study is to see how the upscaled model equations behave close to clogging and how the heat transport is affected by the clogging.

5.1 Case Study Formulation and Implementation

Note that all parameters and numbers specified in the following are non-dimensional according to the non-dimensionalization given in Bringedal et al. (2016). Temperatures are also shifted to lie between 0 and 1. The macroscale domain is a two-dimensional square \(x\in [0,1]^2\) with injection and production wells operating at constant pressure. The injection well is located in \((x_1,x_2)=(0.2,0.2)\), and the production well in \((x_1,x_2)=(0.8,0.8)\). External boundaries are impermeable and insulated. The domain is initialized with a temperature of 1 and with an ion concentration such that the fluid is fully saturated with ions, in this case a concentration of \(\sqrt{0.75}\). We mimic a reservoir with two types of rock that are such that the temperature drop due to injecting fluid of temperature 0 triggers mineral dissolution near the injection well and mineral precipitation further away. The two types of rocks meet along the line \(x_1=0.5\). The injected fluid has the same ion concentration as the initial to resemble reinjection of produced fluid, but mineral dissolution will occur near the injection well due to the temperature drop. As fluid flows toward the production well, minerals start precipitating when crossing \(x_1=0.5\), both due to the incoming fluid having a larger ion concentration from the upstream mineral dissolution, but also caused by the gradual temperature decrease.

The Darcy scale model Eq. (4) is modeled fully coupled with Euler forward in time and the control volume method on a square grid with two point flux approximation in space. The injection wells are handled through a mass conservative implementation as described in Bringedal et al. (2014). As clogging is a difficult process to model due to the degenerate nature of the transport equations, we use a time step constraint when one or more cells are close to clogging. Also, we consider a cell clogged when the grain radius exceeds \(R=0.4997\). When a cell clogs, pressure is undefined in this cell and is no longer solved for. Heat conduction and chemical reactions are still solved for in the clogged cells, the latter to allow for any reopening at a later time. The dissolution rate, which has a discontinuity from (1), is regularized. We mention there are more sophisticated ways of dealing with both mineral dissolution (containing a discontinuous reaction term) and precipitation possibly leading to clogging, and refer to Agosti et al. (2015a, b) for details on event-driven implementation of this aspect. Despite using Euler forward for time stepping, the resulting system of equations is nonlinear due to the nonlinearities in the time derivatives. The nonlinear system of equations is solved with Newton iterations, using the solution from the previous time step as initial guess.

The effective quantities \({\mathcal {A}}_u(R)\), \({\mathcal {A}}_f(R)\), \({\mathcal {A}}_g(R)\) and \(\mathcal K(R)\) arising from the cell problems are implemented with their approximating polynomials found in Sect. 4.2. Hence, the cell problems do not need to be solved at each mesh point at each time step, but pore-scale effects are included through the approximate polynomials of the effective quantities arising from cell problem solutions. We have used \(\kappa _f=1\) and \(\kappa _g=2\), which is a representative correspondence between heat conductivity in fluid and grain for many soils/rocks. The porous medium is initialized with \(R=0.3\), and the amount of minerals that cannot dissolve is chosen to correspond to \(R_{\text {min}}=0.2\). Note that this choice of homogeneous initial condition (and minimum radius) for the rock is not a necessity for the model formulation and only chosen for convenience. Other parameters appearing in the model Eq. (4) are given by

$$\begin{aligned} D=1,\ \ \ \varsigma = 1,\ \ \ k=1,\ \ \ \alpha = 1,\ \ \ \rho = 1,\\ \beta _{\rho }=0.01,\ \ \ \beta _{\mu }=0.01,\ \ \ \rho _0=2, \ \ \ \mu _0 = 1, \end{aligned}$$

where the fluid density is \(\rho _f(T) = \rho _0-\beta _{\rho }T\) and viscosity is \(\mu (T)=\mu _0-\beta _{\mu }T\). The injection pressure is 100, and production pressure is 0.5, which induces a pressure difference in the domain giving flow rates around 1 initially, and hence advective and diffusive processes occur at about the same time scale, which is one of the assumptions in the derivation of the upscaled model by Bringedal et al. (2016).

5.2 Numerical Results

When injection starts, the fluid flows toward the production well and brings along lower temperatures and larger ion concentrations as the minerals close to the injection well dissolves. Upon reaching the other rock type at \(x_1=0.5\) minerals precipitate, resulting in gradually lower porosities and permeabilities behind this line. Also, as the minerals dissolves close to the injection well, the effective heat conductivity decreases due to \(\kappa _f\) being lower than \(\kappa _g\). Although one would expect clogging to first occur in \((x_1,x_2)=(0.5,0.2)\), this being the point closest to the injection well where clogging can occur; the clogging first occurs at \((x_1,x_2)=(0.5,0)\). This is caused by the point \((x_1,x_2) = (0.5,0)\) being cooled faster than \((x_1,x_2)=(0.5,0.2)\), despite being further away from the injection point, triggering larger precipitation rates. The differences in cooling (and initiating of clogging) are small, but this faster cooling in (0.5, 0) is a result of the heat conductivity being larger in regions where less minerals have dissolved. The convective cooling is (initially) focused mainly along the band between injection and production well, and hence conductive cooling dominates between the injection well and the line \(x_1=0.5\) for low \(x_2\)-values. As the dissolving occurs slower, along \(x_2=0\) the heat conduction is faster than for \(x_2=0.2\). The fact that clogging occurs first at \((x_1,x_2)=(0.5,0)\) instead of in (0.5, 0.2) is a nice example of the effect of the interplay between heat transfer and reactive transport. Clogging gradually occurs along increased values of \(x_2\) as these cells are being cooled, and at the same time the flow is forced to follow trajectories further away from the clogged region. Due to heat conduction still playing a role in the blocked region, clogging still occurs behind the line \(x_1=0.5\). Figure 14 shows the pressure distribution, and some flow trajectories some time after clogging have started near \((x_1,x_2)=(0.5,0)\).

Fig. 14
figure 14

Pressure distribution (colors) 1 time unit after injection starts. Clogged cells are marked as white as the pressure is undefined. Black lines are (instantaneous) stream lines. The flow trajectories are not smooth across \(x_1=0.5\) as the grain radius R and hence also permeability \(\mathcal K\) are discontinuous here

There is still heat conduction in the clogged cells. In fact, the clogged cells encounter an increased effective heat conductivity as the grain heat conductivity is larger than fluid heat conductivity. Hence, the temperature distribution is not strongly affected by the clogged flow paths in this case study. Figure 15 shows how the effective heat conductivity and temperature distributions are at the same time as the pressure distribution in Fig. 14.

Fig. 15
figure 15

Effective heat conductivity distribution (left) and temperature distribution (right) 1 time unit after injection starts. Temperature is still well defined in the clogged cell where the highest effective heat conductivity values are found. The increased heat conductivity is the reason for the relatively smooth temperature field despite flow paths being clogged

6 Summary and Conclusion

In this paper, we have shown how the effective behavior of heat conductivity and permeability performs in a porous medium where porosity changes due to mineral precipitation and dissolution. The heat conductivity coefficients and permeability is calculated through cell problems derived from a pore-scale formulation based on Bringedal et al. (2016), using circular and elliptic grains as illustrative examples. We have shown how the effective behavior for the heat conductivity differs from the usually applied porosity-weighted averaging between fluid and grain, where the geometric averaging performs better in the isotropic case and harmonic, geometric or arithmetic averaging is the better approximation depending on degree of and direction of anisotropy.

We have solved the heat conductivity cell problems numerically, but approximate versions can be solved analytically. The resulting solutions for circular grains capture the effective behavior well and generally better than the geometric averaging. Hence, for practical use in simulators, one can either apply the approximate analytical solutions, or approximate polynomials based on least-square fitting of discretely solved cell problems. When doing least-square fitting for the cell problems, one has to decide which order terms to include in the polynomial, and this can potentially alter the behavior of the resulting effective parameters, especially near critical points as clogging represents. As the permeability can vary with several orders of magnitude near clogging, approximating with suitable terms and factors is especially important in this case.

As we are particularly interested in the behavior of the effective model near clogging, a case study where clogging would occur was designed. The case study mimics a geothermal reservoir where cold fluid is injected, and where composition of different rock types leads to mineral precipitation at some distance away from the well. The reduced permeability and gradual clogging of the medium lead to the injected water being forced through new flow paths further away from the production well, and at the same time increasing the effective heat conductivity through the medium.