## 1 Introduction and motivation

Numerical simulation of reactive transport in porous media is an important issue in computational geosciences. Many publications during the last decades deal with proposals how to improve the efficiency of numerical methods, for example, by choosing new sets of variables and reformulate the governing equations, or by improving the linear and nonlinear solvers involved in the solution process. However, it seems that for one specific difficulty arising in the numerical solution of reactive transport problems, the literature is very scarce: the numerical handling of a (not locally Lipschitz continuous) surface term for surface-controlled precipitation–dissolution reactions between minerals and aqueous species. For many precipitation–dissolution processes, the reaction rate (per volume of the porous medium) should depend on the size of the reactive surface of the mineral within this volume (e.g., [2, 5, 16,17,18, 20,21,22,23,24]),

\begin{aligned} \partial _t c=A(c)\,r(\varvec{c}_{\mathrm {aq}})\,, \end{aligned}
(1)

where c is the concentration of a mineral (moles per total volume) and A is the reactive mineral surface per total volume. The factor r depends on the vector of aqueous species concentrations $$\varvec{c}_{\mathrm {aq}}$$; we might consider the law of mass action, for example.

For the reactive surface A, there are several models used and discussed in the literature. Some papers assume that the amount of precipitation–dissolution is independent of the mineral surface size, which can be modeled by setting $$A(c)=\text{ const }$$ in (1); see for example, [1, 3, 4, 9,10,11,12, 14, 15, 29]. On the other hand, when assuming that the surface size determines the reaction velocity, then a frequently used classical model for a variable surface is

\begin{aligned} A(c) = A_0\, c^{2/3}, \end{aligned}
(2)

with a constant $$A_0\!>\!0$$, for $$c\!\ge \!0$$. This concept is used by many authors, see [2, 5, 17, 18, 20, 22,23,24]. In particular, it is implemented in the simulation tools PFLOTRAN  and Crunch Flow  that are well known in the computational geoscientific community. The model (2) is justified by the following consideration on the micro-scale. If we assume that within a representative elementary volume (REV), the mineral consists of small equisized hemispheres, or spheres, or cubes of “radius” r, then the surface size of every mineral grain within the REV behaves like $$A_{\mathrm {grain}}\!\sim \!r^2$$ and its volume or mass $$m_{\mathrm {grain}}$$ like $$r^3$$. Hence, $$A_{\mathrm {grain}}\!\sim \!(m_{\mathrm {grain}})^{2/3}$$, and therefore, reactive mineral surface and mineral amount should meet the relation (2) in every REV, and the mineral source term should contain a factor (2). Note that also the so-called shrinking particle/core models are based on the concept of these spherical grains.

There are other models possible, the assumption of platy mineral structures, growing only in two space dimensions (reactive surface $$A_{\mathrm {grain}}\!\sim \!r$$, mass $$m_{\mathrm {grain}}\!\sim \!r^2$$), may lead to (1) with

\begin{aligned} A(c) = A_0\, c^{1/2}, \end{aligned}

instead of (2). There are also models focusing on large mineral amounts (“clogging” of the pore space) and describe a monotonically decreasing surface area—these scenarios are not considered in this article. There are models derived by upscaling relating the mineral surface to the porosity (i.e., to the mineral volume) [25, 30], and the pore geometry is parametrized by the radius of the grains as a parameter (Sect. 4 in , Sect. 2.3 in ) to simplify the model—this radius corresponds to the variable $$\xi$$ we are introducing in Sect. 6. There are also models assuming a population of crystals of different sizes within every REV or discretization point, instead of one radius r [7, 16, 27] and which have a closer look at the formation of mineral crystals (nucleation) and how the distribution of crystal sizes evolves in time (Ostwald ripening), see . The price to pay for such a much more detailed model is its much larger computational amount of work. However, in this article, we are interested in models containing the term (2) and effects that arise for small mineral concentrations, caused by this term.

The ODE (1)–(2) will be coupled to a system of partial differential equations (PDEs) for the unknowns $$\varvec{c}_{\mathrm {aq}}$$ (see Sect. 2), but for a moment—and for the sake of simplicity—let us just assume that $$\varvec{c}_{\mathrm {aq}}$$ is given, so that (1)–(2) is an ODE $$c'(t)=f(c(t))$$. One immediately realizes that (2), and therefore, the right-hand side of the ODE (1), is not locally Lipschitz continuous at $$c\!=\!0$$, and therefore, the uniqueness of solutions is only clear as long as the solution stays away from the value $$c\!=\!0$$. We may point out that a one-sided Lipschitz condition, i.e., if there is an $$L\!\in \!{\mathbb {R}}$$ such that

\begin{aligned} (f(c_1)-f(c_2))\cdot (c_1-c_2) \le L\, |c_1-c_2|^2, \end{aligned}
(3)

would also be sufficient for the uniqueness of the solution of an initial value problem (see, for example, (12.2) and Theorem 12.1 in Chapter IV, in the textbook ). However, for our model of precipitation–dissolution reactions, even a one-sided Lipschitz condition does not hold. In fact, it would be fulfilled if $$r(\varvec{c}_{\mathrm {aq}})\!\le \!0$$, i.e., if we would only consider scenarios in which the fluid is undersaturated with respect to the mineral reactions and so dissolution always exceeds precipitation; in an oversaturated setting with initial mineral concentration equal to zero, there are indeed infinitely many solutions (cf. Appendix A). Hence, first of all, we have to clarify which solution is the physically correct one. See Sect. 4 for a discussion. Then, an important issue is the question what impact the non-uniqueness of solutions has for numerical solvers. When there are multiple solutions, a numerical solver may follow the one or the other solution. The numerical scheme has to take care that the physical solution is computed. Possibilities are discussed in Sects. 5 and 6.

Reactive transport is usually discretized using an implicit timestepping scheme, and the resulting nonlinear discrete problem has to be solved iteratively. The first method of choice is Newton’s method, since it is (locally) quadratic convergent. We found that the term (2) causes difficulties for Newton’s method to converge for mineral concentrations close to zero. The authors could not find any proposals in the literature how to deal with this specific difficulty, except the publication , where it is suggested to use a regularization of (2) or even a completely different type of law, such as a Monod-type law. Instead of modifying the law (2), another idea would be to hinder the mineral concentration to reach zero, i.e., to enforce $$c\!\ge \!\epsilon$$ for an $$\epsilon \!>\!0$$.

Both techniques, to replace or to regularize (2), or to force $$c\!\ge \!\epsilon$$, are approximations/modifications of the original model. Questions like how to choose $$\epsilon$$ or the regularization parameter in numerical simulations arise. However, we will show—and this is the main purpose of this publication—that no approximation/modification of the law (2) or of standard nonlinear solvers are necessary at all. Instead, the method we propose is to apply a simple substitution

\begin{aligned} \xi =c^{1/3}\,. \end{aligned}
(4)

After the substitution is done, the model has a unique solution, and also the numerical difficulties vanish. The nicest thing about this substitution is that the idea is very simple, and also the implementation is easy. If at all, the implementation is even easier than for the original model.

The paper is structured as follows. In Sect. 2, we present our multi-species multi-reaction model with mineral precipitation-dissolution reactions and with aqueous reactions. In Sect. 3, we present simplified versions of the model by omitting transport (hence, reducing the PDE-ODE model to an ODE model) and by limiting the complexity of the reactive network. The reason for this is the fact that the simpler model can be easier analyzed. In Sect. 4, we show that the model of Sect. 3 admits infinitely many solutions (the proof is given in Appendix A). In Sect. 5, we turn to the discretized version of the model and point out why we should expect convergence problems with Newton’s method, caused by the term (2), for small mineral concentrations. We discuss “ad hoc methods,” in particular, what we call the “epsilon method,” i.e., the idea mentioned above that the solution should be forced to be larger or equal to an $$\epsilon \!>\!0$$, to circumvent the difficulties, and we discuss how the numerical parameter $$\epsilon$$ should be chosen. Section 6 contains the most important novelty of this article. We present the substitution which lets the non-Lipschitz term vanish. In Appendix B, we prove that after the substitution, the model admits only one solution. In Sect. 7, we perform numerical tests for our “substitution method.” We compare it in terms of accuracy, robustness, and number of Newton steps with the “epsilon method.” We perform our numerical tests both for the ODE model from Sect. 3 and for the PDE–ODE reactive transport model of Sect. 2. It turns out that the new substitution method tends to smaller numerical errors and fewer Newton steps compared to the epsilon method. Finally, we discuss whether the substitution idea can be extended to “arbitrary” non-Lipschitz terms (Sect. 8), and we give a conclusion (Sect. 9).

## 2 The multi-species multi-reaction transport-reaction model

Let us consider a multi-species multi-reaction model with $$I\!\in \!{\mathbb {N}}$$ mobile (dissolved) species $$X_i$$ and $$J\!\in \!{\mathbb {N}}$$ kinetic reactions among the mobile species, as well as $$M$$ mineral species $$Y_j$$ and mineral reactions. The vector of the mobile species concentrations is denoted by $$\varvec{c}_{\mathrm {aq}}=(c_{\mathrm {aq},1},\ldots ,c_{\mathrm {aq},I})^\mathrm{{T}}$$ and the vector of the mineral species concentrations by $$\varvec{c}_{\mathrm {min}} = (c_{\mathrm {min},1},\ldots ,c_{\mathrm {min},M})^\mathrm{{T}}$$. The aqueous reactions and the precipitation–dissolution reactions are

\begin{aligned} \begin{array}{lcll} \sum \limits _{i=1}^I \, {\underline{\sigma }}_{{i,j}} \, X_i &{} \longleftrightarrow &{} \sum \limits _{i=1}^I \, {\overline{\sigma }}_{{i,j}} X_i\,,\quad &{} j=1,\ldots ,J, \\ \sum \limits _{i=1}^I \, {\underline{\tau }}_{{i,j}} \, X_i &{} \longleftrightarrow &{} Y_j + \sum \limits _{i=1}^I \, {\overline{\tau }}_{{i,j}} \, X_i \,,\quad &{} j=1,\ldots ,M\,. \\ \end{array} \end{aligned}

We assume that all the stoichiometric coefficients $${\underline{\sigma }}_{{ij}}$$, $${\overline{\sigma }}_{{ij}}$$, $${\underline{\tau }}_{{ij}}$$, $${\overline{\tau }}_{{ij}}$$ are nonnegative integers, and we set

\begin{aligned} \begin{array}{ll} s_\mathrm{{ij}}:={\overline{\sigma }}_{{ij}}-{\underline{\sigma }}_{{ij}}\,, &{} \quad \varvec{S}_{\mathrm {aq}}:=(s_{{ij}})\in {\mathbb {Z}}^{I,J}\,, \\ s_{\mathrm {min},ij}:={\overline{\tau }}_{{ij}}-{\underline{\tau }}_{{ij}}\,, &{} \quad \varvec{S}_{\mathrm {min}}:=(s_{\mathrm {min},ij})\in {\mathbb {Z}}^{I,M}\,. \end{array} \end{aligned}

We denote the aqueous reaction rates and the mineral reaction rates by $$r_{\mathrm {aq},j}$$, $$j\!=\!1,\ldots ,I$$, and $$r_{\mathrm {min},j}$$, $$j\!=\!1,\ldots ,M$$. The mass balance equations for the advection-diffusion-reaction problem then read

\begin{aligned}&\partial _t (\Phi \,c_{\mathrm {aq},i}) + \nabla ( -\Phi \, d\, \nabla c_{\mathrm {aq},i} + \varvec{q}\,c_{\mathrm {aq},i} ) \nonumber \\&\quad = \Phi \sum \limits _{j=1}^I s_{ij}\,r_{\mathrm {aq},j}(\varvec{c}_{\mathrm {aq}}) + \sum \limits _{j=1}^M s_{\mathrm {min},ij}\,\partial _t c_{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}}) \nonumber \\&\quad = \Phi \! \sum \limits _{j=1}^I \!s_{ij} r_{\mathrm {aq},j}(\varvec{c}_{\mathrm {aq}}) + \!\sum \limits _{j=1}^M \!s_{\mathrm {min},ij} A_{j}(c_{\mathrm {min},j}) r_{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}}), \end{aligned}
(5)

$$i\!=\!1,\ldots ,I$$, with porosity $$\Phi$$, and where (1) was implemented. If we want to take into account the evolution of the porous medium, we have to do this in the specific surface (e.g., by (2)), but equally one should take into account that the porosity is evolving with

\begin{aligned} \Phi =\Phi (\varvec{c}_{\mathrm {min}})=\Phi _0-\sum _{j=1}^M \rho _j^{-1}\,c_{\mathrm {min},j}\,, \end{aligned}
(6)

where $$\rho _j$$ are the molar densities of the pure minerals. This volume balance can be deduced from deriving the equations from upscaling by periodic homogenization [25, 30] and is also used in , for one precipitation reaction only. Note that clogging may be possible but is not to be considered here; we focus on situations where mineral amounts change between zero and small positive amounts. Note that the assumption (6) leads to a back coupling of the reaction regime to the Darcy flow field $$\varvec{q}$$.

Our model with reaction rate vectors $$\varvec{r}_{\mathrm {aq}}$$ for the aqueous reactions and $$\varvec{r}_{\mathrm {min}}$$ for the mineral precipitation–dissolution reactions then reads

\begin{aligned}&\partial _t (\Phi \varvec{c}_{\mathrm {aq}}) + \varvec{L}\, \varvec{c}_{\mathrm {aq}} = \Phi \varvec{S}_{\mathrm {aq}} \varvec{r}_{\mathrm {aq}}(\varvec{c}_{\mathrm {aq}}) + \varvec{S}_{\mathrm {min}} \partial _t \varvec{c}_{\mathrm {min}} \quad \text{ on } Q_T, \end{aligned}
(7)
\begin{aligned}&\partial _t \varvec{c}_{\mathrm {min}} = \varvec{A}(\varvec{c}_{\mathrm {min}})\,\varvec{r}_{\mathrm {min}}(\varvec{c}_{\mathrm {aq}},\varvec{w}) \quad \text{ on } Q_T, \end{aligned}
(8)
\begin{aligned}&\varvec{w} \in H(\varvec{c}_{\mathrm {min}}) \quad \text{ on } Q_T, \end{aligned}
(9)
\begin{aligned}&\varvec{c} (\cdot ,0) = \varvec{c}_0\quad \text{ on } {{\overline{\Omega }}}, \end{aligned}
(10)
\begin{aligned}&\varvec{c}_{\mathrm {min}} (\cdot ,0) = \varvec{c}_{\mathrm {min},0}\quad \text{ on } {{\overline{\Omega }}} \end{aligned}
(11)

on a domain $$\Omega \!\subset \!{\mathbb {R}}^n$$, with $$\Omega _T\!=\!(0,T)\!\times \!\Omega$$, $$\varvec{c}$$, $$\varvec{c}_{\mathrm {min}}\!\ge \!\varvec{0}$$ (componentwise) and with some boundary conditions for $$\varvec{c}_{\mathrm {aq}}$$ not specified here. In the following (cf. (12)–(18)), we will explain all the terms in our system (7)–(11). For an explanation of the entity, $$\varvec{w}$$ see (18) and the subsequent text.

In (7), $$\varvec{L}=(L_1,\ldots ,L_I)^{\mathrm{{T}}}$$ stands for an operator modeling diffusion/dispersion and advection, such as

\begin{aligned} L_ic_{\mathrm {aq},i}=\nabla \cdot (-d\,\Phi \,\nabla c_{\mathrm {aq},i} + \varvec{q}\, c_{\mathrm {aq},i})\,. \end{aligned}
(12)

The product of vectors is meant componentwise, i.e., $$(\varvec{A}\,\varvec{r}_{\mathrm {min}})_j = \varvec{A}_j\,\varvec{r}_{\mathrm {min},j}$$, $$j=1,\ldots ,M$$. As motivated in Sect. 1, we want to consider the surface model

\begin{aligned} A_i(c_{\mathrm {min},i}) = A_{0,i}\,c_{\mathrm {min},i}^{2/3}\,. \end{aligned}
(13)

For what follows in the next chapters, it turns out that we may generalize this assumption to

\begin{aligned} A_i(c_{\mathrm {min},i}) = A_{0,i}\,c_{\mathrm {min},i}^{\alpha _i} \end{aligned}

with $$\alpha _i\!\ge \!0$$ and $$A_{0,i}\!>\!0$$. The case $$\alpha _i\!=\!0$$ corresponds to the constant surface

\begin{aligned} A_i(c_{\mathrm {min},i}) = \text{ const } = A_{0,i} \,, \end{aligned}
(14)

and for $$\alpha _i\!\ge \!1$$, the law (15) is locally Lipschitz continuous. We are mainly interested in the case

\begin{aligned} A_i(c_{\mathrm {min},i}) = A_{0,i}\,c_{\mathrm {min},i}^{\alpha _i} \,, \quad 0<\alpha _i<1\,, \end{aligned}
(15)

(in particular, the case $$\alpha _i\!=\!\frac{2}{3}$$) where the term (15) is not locally Lipschitz continuous at $$c_{\mathrm {min},i}\!=\!0$$.

The aqueous reaction reaction rates in (7)–(11) are assumed to follow the law of mass action (LMA) with—for the sake of simplicity—ideal activities:

\begin{aligned} r_{\mathrm {aq},j}(\varvec{c}_{\mathrm {aq}}) = k_{\mathrm {f},j} \prod _{i=1}^{I} c_{\mathrm {aq},i}^{\;{\underline{\sigma }}_{ij}} - k_{\mathrm {b},j} \prod _{i=1}^{I} c_{\mathrm {aq},i}^{\,{\overline{\sigma }}_{ij}}, \end{aligned}
(16)

$$j\!=\!1,\ldots ,J$$, with $$k_{\mathrm {f},i},k_{\mathrm {b},i}\!\ge \!0$$. The precipitation–dissolution reactions also follow the LMA, but with constant activity for the mineral species:

\begin{aligned} r_{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}},w_j) = k_{\mathrm {p},j} \prod _{i=1}^{I} c_{\mathrm {aq},i}^{\;{\underline{\tau }}_{ij}} - k_{\mathrm {d},j} \prod _{i=1}^{I} c_{\mathrm {aq},i}^{\,{\overline{\tau }}_{ij}}\,w_j \;, \end{aligned}
(17)

$$j\!=\!1,\ldots ,M$$, with precipitation and dissolution constants $$k_{\mathrm {p},i},k_{\mathrm {d},i} \!>\! 0$$ and with $$w_j \!\in \! H(c_{\mathrm {min},j})$$ with the Heaviside “function” or Heaviside graph

\begin{aligned} H(x) = \left\{ \begin{array}{cl} \{1\} \,, &{}\quad x>0, \\ {[0,1]} \,, &{}\quad x=0, \\ \{0\} \,, &{}\quad x<0\,. \end{array} \right. \end{aligned}
(18)

By this Heaviside term in (8)–(9), the dissolution of minerals is switched off whenever a mineral concentration impends to become negative. This is an established method to implement the nonnegativity of constant-activity species (e.g., [1, 9,10,11, 14, 15, 29]). In order to motivate this term, let us assume for a moment that we would replace $$r_{\mathrm {min},j}$$ by

\begin{aligned} \rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}}) = k_{\mathrm {p},j} \prod _{i=1}^{I} c_{\mathrm {aq},i}^{\;{\underline{\tau }}_{ij}} - k_{\mathrm {d},j} \prod _{i=1}^{I} c_{\mathrm {aq},i}^{\,{\overline{\tau }}_{ij}} \; \end{aligned}
(19)

in (8), or, what is the same, to set $$w_j=1$$, $$j=1,\ldots ,M$$, instead of (9). Then, if the fluid is undersaturated with respect to some mineral, i.e., $$\rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}})<0$$, and if the mineral concentration $$c_{\mathrm {min},j}$$ is zero, then negative mineral concentrations would be imminent—at least if the surface area term is non-zero, cf. (14). However, thanks to the Heaviside term, any solution of (7)–(11) is nonnegative. A proof of nonnegativity of solutions for the case (14) is standard and can be found for example in [10, 29]; this proof easily carries over to non-constant surface laws like (15).

There are other established formulations to implement nonnegativity of mineral concentrations. One can replace (8)–(9) by a so-called complementarity formulation 

\begin{aligned} \begin{array}{l} \Big ( c_{ \mathrm {min},j}>0 \; \text{ and } \; \partial _t c_{ \mathrm {min},j} - A_j(c_{ \mathrm {min},j})\,\rho _{ \mathrm {min},j}(\varvec{c}_{ \mathrm {aq}})=0 \Big ) \\ \qquad \; \text{ or } \;\quad \Big ( c_{ \mathrm {min},j}=0 \; \text{ and } \; \partial _t c_{ \mathrm {min},j} - A_j(c_{ \mathrm {min},j})\,\rho _{ \mathrm {min},j}(\varvec{c}_{ \mathrm {aq}})\ge 0 \Big ), \end{array} \end{aligned}
(20)

$$j=1,\ldots ,M$$. It is well known that a complementarity condition can be transformed into an equation (see, e.g., [4, 12] for the handling of mineral reactions at equilibrium),

\begin{aligned} \min \{ c_{\mathrm {min},j} , \partial _t c_{\mathrm {min},j} \!-\! A_j(c_{\mathrm {min},j})\rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}}) \} \!=\! 0\,. \end{aligned}
(21)

And another formulation can be found in . An investigation in  showed that all these formulations are equivalent in some weak sense.

For the model with a constant surface, (14), i.e., (7)–(11), (14), (16)–(18), under the simplification of a constant porosity instead of (6), existence of a global solution in a certain function space was proven in [9, 10], provided that some mild assumption on the stoichiometry holds, uniqueness was proven in . For a constant surface model restricted to one mineral reaction and without aqueous reactions, analysis (existence, uniqueness, convergence) can be found in [14, 15, 29], and such a model coupled to porosity and permeability changes is considered in . For the model, we are mainly interested in, the model with the variable surface (15) in the specific form (7)–(11), (15)–(18); however, we could not find any mathematical analysis in the literature.

Let us discuss how a discretized version of the model could be solved numerically. While the Heaviside formulation (8)–(9) is well suited for analysis [1, 9, 10, 15, 29], we prefer the minimum formulation (21) for numerical solution. A discretization of (21) with the implicit Euler method reads

\begin{aligned} \begin{array}{lcl} f_j(\varvec{c}_{\mathrm {aq}},\varvec{c}_{\mathrm {min}}) &{} := &{} \min \{c_{\mathrm {min},j} \,,\, c_{\mathrm {min},j}\!-\!c_{\mathrm {min},\mathrm {old},j}\!-\!\Delta t\,A_j(c_{\mathrm {min},j})\rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}})\} \\ &{} = &{} c_{\mathrm {min},j} \!+\! \min \{0,-c_{\mathrm {min},\mathrm {old},j}\!-\!\Delta t\,A_j(c_{\mathrm {min},j})\rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}})\} \,=\, 0, \end{array} \end{aligned}
(22)

where the subscript “$$\mathrm {old}$$” for $$c_{\mathrm {min},\mathrm {old},j}\ge 0$$ denotes values from the previous time step. While $$f_j$$ is not very smooth (for the surface model (14), it has a kink where $$-c_{\mathrm {min},\mathrm {old},j}-\Delta t\,A_{0,j}\rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}})=0$$), it is well known that such equations can be solved with the so-called semismooth Newton method [4, 12]. From a practical viewpoint, the semismooth Newton method is in fact the same as the classical Newton method but applied to a “semismooth” function.Footnote 1 As for the classical Newton iteration, the semismooth Newton method is locally quadratic convergent for strongly semismooth functions—definitions  and proofs can be found in [6, Chapter 7].

Let us mention that other authors use the Heaviside formulation for discretization and apply a regularization to the discontinuous term  or event-driven algorithms detecting the moment when a trajectory meets a discontinuity . We prefer to use the minimum formulation for discretization (21), (22) since it does not contain discontinuities.

In order to make (22) meaningful also for negative arguments $$c_{\mathrm {min},j}$$ for exponents $$\alpha _j\!<\!1$$ (this might be reasonable in view of Newton’s method, where iterates might be negative), we should discuss how to interpret a power with negative argument and fractional exponent. Let us define for the whole paper that

\begin{aligned} x^\alpha :=0\quad \text{ for } x\!<\!0 \text{ and } \alpha \!>\!0\,. \end{aligned}
(23)

This specific setting has another benefit. We have already pointed out that in general the Heaviside term, or, equivalently, the first of the two branches in (21) and in (22) is essential to avoid negative physically meaningless solutions. However, if we focus on the surface law (15) in combination with the setting (23), an adaptation of the nonnegativity proof in  shows that (8)–(9) might be simplified by setting $$w_j\equiv 1$$ in our model, i.e., we may replace (8)–(9) byFootnote 2

\begin{aligned} \partial _t \varvec{c}_{\mathrm {min}} = \varvec{A}_0\, \varvec{c}_{\mathrm {min}}^{\,\varvec{\alpha }}\,\varvec{\rho }_{\mathrm {min}}(\varvec{c}_{\mathrm {aq}}) \end{aligned}
(24)

– but only for the variable surface model (15), and not for the constant surface model (14). Analogously, for the surface law (15) and with the setting (23) and using $$c_{\mathrm {min},\mathrm {old},j}\ge 0$$, one can easily check that the first branch in (22) is dispensable and (22) may be replaced by

\begin{aligned} c_{\mathrm {min},j}\!-\!c_{\mathrm {min},\mathrm {old},j}\!-\!\Delta t\,A_{0,j}c_{\mathrm {min},j}^{\alpha _j}\rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}}) = 0\,. \end{aligned}

## 3 Batch models (ODE models)

In this section, we want to fix two simple ODE models as simplifications of the PDE–ODE model of the previous section. They will help us to understand the behavior of the full model from Sect. 2 and its discretization.

We assume that there is no transport, or that the initial values are space independent and the boundary conditions of (7)–(11) are such that solutions are constant in space. We assume that (6) can be approximated by $$\Phi \!=\!\text{ const }$$ and set this constant to one for the sake of simplicity. We consider the scenario that there are just two aqueous species and one mineral and one reaction

\begin{aligned} X_{1}+X_{2} \longleftrightarrow Y_{1}. \end{aligned}
(25)

The model from Sect. 2 then reads

\begin{aligned} \partial _t c_{i} = - \partial _t c_{\mathrm {min}}\,, \quad i=1,2, \end{aligned}

with

\begin{aligned} \partial _t c_{\mathrm {min}} = A_0\,c_{\mathrm {min}}^{2/3}\,(k_pc_1c_2-k_dw)\,,\quad w\in H(c_{\mathrm {min}}) \end{aligned}

or with

\begin{aligned} \min \{ c_{\mathrm {min}} , \partial _t c_{\mathrm {min}} - A_0\,c_{\mathrm {min}}^{2/3}\,(k_pc_1c_2-k_d) \} = 0, \end{aligned}

where $$c_i$$ is short for $$c_{ \mathrm {aq},i}$$. In view of (23), we may simplify this to

\begin{aligned} \partial _t c_{\mathrm {min}} = A_0\,c_{\mathrm {min}}^{2/3}\,(k_pc_1c_2-k_d)\,. \end{aligned}

We will focus on situations where

\begin{aligned} c_{\mathrm {min}}(0)=0\,, \end{aligned}
(26)

i.e., there is no mineral at the initial state, and where the fluid is oversaturated, i.e., $$k_pc_1(0)c_2(0)-k_d>0$$ (precipitation exceeds dissolution), e.g.,

\begin{aligned} c_1(0)=c_2(0)=1\,,\; k_p=2\,,\; k_d=1\,. \end{aligned}
(27)

\begin{aligned} \begin{array}{lll} \partial _t c_{i} = - \partial _t c_{\mathrm {min}}\,, \quad i=1,2,\quad \partial _t c_{\mathrm {min}} = A_0\,c_{\mathrm {min}}^{2/3}\,(k_pc_1c_2-k_d)\,. \end{array} \end{aligned}
(28)

If we consider the even simpler chemistry

\begin{aligned} X_{1} \longleftrightarrow Y_{1} \end{aligned}

instead of (25), we accordingly obtain the ODE model

\begin{aligned} \begin{array}{lll} \partial _t c_{\mathrm {aq}} = - \partial _t c_{\mathrm {min}}\,,\quad \partial _t c_{\mathrm {min}} = A_0\,c_{\mathrm {min}}^{2/3}\,(k_pc_{\mathrm {aq}}-k_d)\,. \end{array} \end{aligned}
(29)

Since $$c_{\mathrm {aq}}+c_{\mathrm {min}}=\text{ const }=c_{\mathrm {aq},0}$$ (cf. (26)), we may eliminate $$c_{\mathrm {aq}}$$ and get the ODE

\begin{aligned} \begin{array}{lll} \partial _t c_{\mathrm {min}} = A_0\,c_{\mathrm {min}}^{2/3}\,[k_p(c_{\mathrm {aq},0}-c_{\mathrm {min}})-k_d] = c_{\mathrm {min}}^{2/3}\,(\kappa _1-\kappa _2\,c_{\mathrm {min}}) \,, \\ \end{array} \end{aligned}
(30)

with $$\kappa _1=A_0\, (k_p c_{\mathrm {aq},0}-k_d)>0$$ and $$\kappa _2=A_0 k_p> 0$$.

## 4 Non-uniqueness of solutions

Let us consider the ODE model (30)—which is equivalent to (29)—with initial condition (26). At the first glance, we get the impression that, since $$c_{\mathrm {min}}(0)=0$$ and since $$\kappa _1 - \kappa _2\,c_{\mathrm {min}}(t) \approx \text{ const }$$ for small values of $$t>0$$, the solution should behave like the solution of

\begin{aligned} y' = \kappa _1\, y^{2/3}\,, \quad y(0)=0\,. \end{aligned}

It is well known that this ODE admits infinitely many solutions

\begin{aligned} y(t) = \left\{ \begin{array}{ll} (\frac{\kappa _1}{3})^3\,(t-t_*)^3\,, &{}\quad t>t_*, \\ 0\,, &{}\quad t\le t_*\,, \end{array}\right. \end{aligned}

$$t_*\ge 0$$ arbitrary. And indeed, one can show that also (30) with (26) admits infinitely many solutions. See Appendix A for a construction of a solution for (29)/(30) which is strictly positive for $$t\!>\!t_*\!=\!0$$. Besides, $$c_{\mathrm {min}}\!\equiv \!0$$ is obviously another solution. It has to be expected that the solution is also non-unique for more complicated reactive networks, if the initial value for a mineral is zero and the fluid is oversaturated with respect to this mineral. Of course, the non-uniqueness issue is not only relevant for zero initial values for the mineral, but also if a mineral concentration drops to zero after some time and then some changes in the aqueous concentrations trigger precipitation.

Concerning the PDE model from Sect. 2, we can expect that at least for constant-in-space initial values and certain boundary conditions (homogeneous Neumann), the non-uniqueness effect should carry over. Beyond that, we also can expect non-uniqueness for the PDE model (7)–(13), (16)–(18) for non-constant initial values: Suppose one mineral has zero concentration all over the computational domain at time $$t_0=0$$, and its concentration rises to a non-zero function $$c_{\mathrm {min},j}(t)$$ after some time $$t\!>\!0$$ (for example, due to infiltrating aqueous species). Then also a second solution exists with mineral concentration $$c_{\mathrm {min},j}$$ remaining at zero. This second solution is the solution of the problem (7)–(13), (16)–(18), modified by omitting the j-th mineral reaction from the system. The following questions arise.

How to interpret this non-uniqueness. Which is the physically relevant solution?

Second, what are the consequences of this non-uniqueness for numerical schemes? Which of the solutions is followed by the numerical scheme, are there any numerical difficulties coming along with the issue of non-uniqueness?

Third, how to overcome these numerical difficulties in a simple way?

Concerning the first question, we postulate that in the scenario under consideration, i.e., a mineral concentration at zero in an oversaturated fluid, the solution which rises at once, without any delay time, is the relevant one. A justification could be given by considering models which have a closer look at the nucleation of minerals, such as . In an oversaturated fluid, first nuclei should form with a certain non-zero probability per time, i.e., the expected value for the precipitated amount of mineral should immediately be—if tiny, but—positive, without delay. One might also mention here that the solution which rises without delay is distinguished from the other solutions by being the limit of solutions with initial value $$c_{\mathrm {min},0}\!>\!0$$ for $$c_{\mathrm {min},0}\rightarrow 0$$, i.e., it is stable in this sense. In several computer codes, the condition $$c_{\mathrm {min},0}\!\ge \!0$$ is replaced by $$c_{\mathrm {min},0}\!\ge \!\epsilon$$ in order to evade any numerical difficulties arising from the non-uniqueness (cf. Sect. 5). Hence, these codes approximate that solution which rises without delay. In any case, the solution which rises without delay is the one we want to compute in this paper.

In Sect. 5, we tackle the second question. We analyze the simple ODE model (cf. Sect. 3) in order to demonstrate that the non-uniqueness issue causes numerical difficulties for the discretized problem.

The main purpose of this paper is to answer question 3. We make a proposal how the numerical solution, which rises immediately, can be computed in a robust and simple way, overcoming the numerical difficulties. See Sect. 6.

## 5 Numerical challenges in the discretized model

Let us consider a discretization in time of our model (26)–(28). We focus on Euler’s implicit method, since this is probably the most used timestepping for reactive transport problems. See a short discussion of explicit timestepping methods at the end of this section.

Denoting the unknowns at the new time step by $$c_1,c_2,c_3$$ and the given values at the previous time step (or, the initial values in case of the computation of the first time-step) by $$c_{1, \mathrm {old}},c_{2, \mathrm {old}},c_{3, \mathrm {old}}\ge 0$$, we obtain the root-finding problem

\begin{aligned} f_i(c_1,c_2,c_3)=0\,, \quad i=1,2,3, \end{aligned}
(31)

with

\begin{aligned} \begin{array}{lll} f_1(c_1,c_2,c_3) &{} = &{} c_1-c_{1, \mathrm {old}}+c_3-c_{3, \mathrm {old}}\,,\\ f_2(c_1,c_2,c_3) &{} = &{} c_2-c_{2, \mathrm {old}}+c_3-c_{3, \mathrm {old}}\,,\\ f_3(c_1,c_2,c_3) &{} = &{} c_3\!-\!c_{3, \mathrm {old}}\!-\!\Delta t\,A_0\,c_3^{2/3}\,\rho (c_1,c_2)\quad \text{ with } \rho (c_1,c_2)=k_p c_1 c_2 - k_d\,. \end{array} \end{aligned}

We observe that $$\partial _3 f_3(c_1,c_2,c_3) = 1-\frac{2}{3} \Delta t A_0 c_3^{-1/3}\!\rho (c_1,c_2)$$ for $$c_3>0$$. Hence, a first difficulty is that the Jacobian is unbounded for $$c_3$$ close to zero. (Remember that our initial value, and so probably also the starting point for Newton’s iteration, should be at zero.) So Newton’s method or the Jacobian would have to be modified for iterates close to zero. Let us assume that we have overcome this first technical difficulty in one way or another. Let us turn to the first time-step, i.e., $$c_{3, \mathrm {old}}=0$$. Then one solution of (31) is obviously

\begin{aligned} c_1=c_{1,\mathrm {old}}\,,\;\; c_2=c_{2,\mathrm {old}}\,, \;\; c_3=c_{3,\mathrm {old}}=0\,. \end{aligned}
(32)

This is the solution which remains at zero, i.e., the solution which we do not want to find (see discussion in Sect. 4). Another solution with $$c_1\!<\!c_{1, \mathrm {old}}$$, $$c_2\!<\!c_{2, \mathrm {old}}$$, $$c_3\!>\!c_{3, \mathrm {old}}\!=\!0$$ could be computed explicitly by substituting the first two equations of (31) into the third. This is the solution that our numerical scheme should produce. For the moment, let us estimate this solution by exploiting that the rate $$\rho (c_1,c_2)$$ should not differ very much from $$\rho (c_{1, \mathrm {old}},c_{2, \mathrm {old}})$$ (if the time step is small, the supersaturation assumed for the initial condition should last over some time steps). Then we find (remember $$c_{3,\mathrm {old}}=0$$)

\begin{aligned} \begin{array}{lll} c_3 &{} = &{} [\Delta t\,A_0\,\rho (c_1,c_2)]^3 \approx [\Delta t\,A_0\,\rho (c_{1, \mathrm {old}},c_{2, \mathrm {old}})]^3 \,=\, O(\Delta t^3)\,, \\[2pt] c_i &{} \approx &{} c_{i, \mathrm {old}}-[\Delta t\,A_0\,\rho (c_{1, \mathrm {old}},c_{2, \mathrm {old}})]^3\,,\; i=1,2\,. \end{array} \end{aligned}
(33)

That means that the two numerical solutions (32) and (33) of the first time-step are very close, and so it is not so easy to make sure that Newton’s method converges to the wanted solution. See Fig. 1, left part. The bold line shows the root-finding problem for the first time-step (oversaturated scenario with initially no mineral present, $$c_{3,\mathrm {old}}\!=\!0$$), the physical solution (33) is displayed in green and the unphysical (32) in red. In this sketch only, the component $$f_3$$ as a function of (only) $$c_3$$ is displayed. The red line segment indicates: if the initial guess or any Newton iterate is here, we cannot expect that Newton’s method converges to the physical solution.

Supposing that we have solved somehow the first time-step, let us consider now later time steps, i.e., we consider $$c_{3, \mathrm {old}}$$ small but strictly positive now. The graphs of the functions $$f_1,f_2,f_3$$ are just lowered by some constant $$c_{3,\mathrm {old}}$$ compared to the first time-step (dashed line in Fig. 1, left part). The unwanted solution at zero, which appeared in the first time-step, is not any more present. However, Fig. 1 (the red part of the dotted line) shows that for small values of $$c_3$$ (of order $$O(\Delta t^3)$$), we can expect that Newton’s method leads away from the solution towards negative values. These analytical considerations are confirmed by practical numerical test: For small mineral values of order $$O(\Delta t^3)$$, classical Newton’s method does not converge, see Sect. 7, and line-search strategies would not help.

Let us now discuss some straightforward techniques to evade the non-uniqueness issue and the numerical difficulties discussed above. Literature about the non-uniqueness issue for surface-controlled mineral precipitation reactions seems to be almost nonexistent. We found a report by  where this issue is discussed. One proposal in  is to just use another surface-to-mass relation which is Lipschitz continuous, or, to use a regularization of (15),

\begin{aligned} {\tilde{A}}(c) = A_0\ c^\alpha \frac{1}{(c/c_*)^{\alpha -1}+1}\,,\quad c_*>0\,, \end{aligned}
(34)

which behaves like $$A_0\,c^\alpha$$ for large c and like $${\tilde{A}}_0\,c$$ with $${\tilde{A}}_0=A_0c_*^{1-\alpha }$$ for small nonnegative c. The regularization (34) is indeed Lipschitz continuous, so the issue of non-uniqueness vanishes. However, for $$c=0$$, it has $${\tilde{A}}(0)=0$$, i.e., $$c\equiv 0$$ constant in time would be the (unique) solution. So this regularization chooses a solution from the bunch of solutions, but the “wrong” one. The user would have to hope that numerical errors (e.g., in a PDE setting) will trigger the rise of the mineral concentration in the oversaturated case. We think that if a modification or regularization $${\tilde{A}}={\tilde{A}}(c)$$ of $$A=A(c)$$ is aspired, then it should have the property $${\tilde{A}}(0)>0$$.

Instead of a modification of the relation $$A=A(c)$$, another straightforward idea is to prevent that c is exactly zero, i.e., to enforce that $$c\!\ge \!\epsilon$$ for some given $$\epsilon \!>\!0$$. In the setting of Sects. 23, this could be easily implemented: in the complementarity formulation (20) we just replace “$$c_{\mathrm {min},j}\!>\!0$$,” “$$c_{\mathrm {min},j}\!=\!0$$” by “$$c_{\mathrm {min},j}\!>\!\epsilon$$,” “$$c_{\mathrm {min},j}\!=\!\epsilon$$.” Correspondingly, in the Heaviside formulation, replace (9) by

\begin{aligned} \varvec{w} \in H(\varvec{c}_{\mathrm {min}}-\epsilon )\,, \end{aligned}

and in the minimum formulation, replace (21) by

\begin{aligned} \min \{ c_{\mathrm {min},j} - \epsilon , \partial _t c_{\mathrm {min},j} - A_j(c_{\mathrm {min},j}) \rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}}) \} = 0, \end{aligned}
(35)

which is discretized by Euler’s implicit method

\begin{aligned} \min \{ c_{\mathrm {min},j} - \epsilon \,,\, c_{\mathrm {min},j} - c_{\mathrm {min},j, \mathrm {old}} - \Delta t\, A_j(c_{\mathrm {min},j}) \rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}}) \} \,=\,0\,, \end{aligned}
(36)

replacing the original equation

\begin{aligned} \min \{ c_{\mathrm {min},j} \,,\, c_{\mathrm {min},j} - c_{\mathrm {min},j, \mathrm {old}} - \Delta t\, A_j(c_{\mathrm {min},j}) \rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}}) \} \,=\, 0\,. \end{aligned}
(37)

The right part of Fig. 1 sketches the root-finding problem for the modified problem (36). The three lines represent three different choices of $$\epsilon$$, here denoted by $$\epsilon ',\epsilon '',\epsilon '''$$. The wanted root of the unmodified problem (37) is depicted in green. The value $$\epsilon =\epsilon '$$ is too small and can lead to nonconvergence of Newton’s method (red part of the line). For the choice $$\epsilon =\epsilon '''$$, the root is perturbed (black circle), i.e., we get only an approximate solution of (37).

Note that we might also choose $$\epsilon \!=\!\epsilon _j$$ individually for every mineral reaction. If one chooses this “epsilon approach,” the question arises how to set $$\epsilon$$ or $$\epsilon _j$$. Some rather crude analysis of (36) and right part of Fig. 1 indicates that $$\epsilon _j$$ should meet the condition:

\begin{aligned} \epsilon _j > rsim \tfrac{8}{27} \, (A_{0,j}\,\Delta t\,\rho _j(\varvec{c}_{\mathrm {aq}}))^3 \end{aligned}
(38)

to obtain/expect convergence for Newton’s method in the case $$\alpha _j\!=\!\frac{2}{3}$$; see Appendix B in  for details. For slightly larger $$\epsilon _j$$, in fact for $$\epsilon _j$$ begin larger than the zero of (37), i.e., for $$\epsilon _j$$ larger than

\begin{aligned} (A_{0,j}\,\Delta t\,\rho _j(\varvec{c}_{\mathrm {aq}}))^3\,, \end{aligned}
(39)

one has to expect that the root of the function (36) is not equal to the root of the original equation (36), but only an approximation to it (see the shift from green to black circle in Fig. 1), right part. This range for $$\epsilon _j$$, between (38) and (39),where no perturbation is caused, is very small ($$\Delta t^3$$ is much smaller than $$\Delta t$$) and this range depends not only on $$\Delta t$$ and given rate constants, but also on dynamically changing variables (the aqueous concentrations—they vary not only from time step to time step by, let’s say, $$O(\Delta t)$$, they also vary within the Newton iteration. Hence, it is unlikely or impractical to hit this range, and so we have to accept that the introduction of an $$\epsilon >0$$ (Eqs. (36) instead of (37)) will influence numerical results. We present numerical tests on the choice of $$\epsilon _j$$ and its effect on the accuracy in Sect. 7.

Hence, the enforcement of $$c_{\mathrm {min}}\ge \epsilon$$ is a modification, an approximation of the original model. The same, of course, holds true for any regularization of the non-Lipschitz surface term such as (34). The main issue of this publication is to point out that no modification is necessary. See Sect. 6 for the proposal of a substitution.

In this section and in the rest of this article, we focus on implicit timestepping methods, since it is well known that explicit schemes for diffusion problems would suffer from a severe restriction on the time step size. However, some reactive transport codes use a splitting of a time step into a transport substep and a reaction substep—note that such a splitting either introduces an additional error (“splitting error”) or requires an iteration between transport and reaction (“sequential iterative approach”). However, if the reaction step is discretized with an explicit scheme such as Euler’s explicit method—this may be an option if the mineral reactions are rather slow—then we do not have to solve a problem of the type (31), instead, we have the explicit computation

\begin{aligned} c_3 = c_{3,\mathrm {old}}+\Delta t\,A_0 \, c_{3,\mathrm {old}}^{2/3}\,\rho (c_{1,\mathrm {old}},c_{2,\mathrm {old}})\,. \end{aligned}

For an initial value of the mineral $$c_{3,\mathrm {old}}\!=\!0$$, we would obtain $$c_3\!=\!0$$ even if $$\rho (c_{1,\mathrm {old}},c_{2,\mathrm {old}})\!>\!0$$, i.e., our scheme would pick the unphysical solution. One would have to hope that numerical errors trigger the rise of the solution somehow, but we would not call this a robust scheme. Similar as for the implicit scheme, an ad hoc way to resolve this issue would be the introduction of an $$\epsilon \!>\!0$$ and to set $$c_3 = \max \{ c_{3,\mathrm {old}}\!+\!\Delta t\,A_0 \, c_{3,\mathrm {old}}^{2/3}\,\rho (c_{1,\mathrm {old}},c_{2,\mathrm {old}}) \,,\, \epsilon \}$$ and to postulate the initial value being equal to or larger than $$\epsilon$$, i.e., a modification (perturbation) of the original model, or the method proposed in the next section.

## 6 A substitution

In this section, we apply a substitution to derive new model equations. The new model will not suffer from any non-uniqueness issues (cf. Sect. 4 and Appendices A, B) and the numerical challenges explained in Sect. 5 will disappear, without any perturbation of the model by an epsilon.

Let us present the idea for the case $$\alpha \!=\!\frac{2}{3}$$, which seems to be the most relevant one. We apply the substitution

\begin{aligned} \xi =c_{\mathrm {min}}^{1/3}\,, \quad c_{\mathrm {min}}=\xi ^3 \end{aligned}
(40)

to the ODE model (28) (and componentwise to the PDE model (7)–(11)) and obtain, for $$c_{\mathrm {min}}\!>\!0$$

\begin{aligned} \begin{array}{l} \partial _t\,\xi = \partial _t (c_{\mathrm {min}}^{1/3}) = \frac{1}{3}\, c_{\mathrm {min}}^{-2/3} \, \partial _t\,c_{\mathrm {min}} = \frac{1}{3} A_{0}\,r_{\mathrm {min}}(\varvec{c}_{\mathrm {aq}},w), \end{array} \end{aligned}
(41)

where we have used the ODE (8)/(28) with (13) in the last step. The ODE model (28) now reads

\begin{aligned} \begin{array}{lll} \partial _t c_{i} = - \partial _t (\xi ^3)\,, \quad i=1,2,\quad \partial _t \xi = \frac{1}{3}\,A_0\,\,(k_pc_1c_2-k_d)\ \end{array} \end{aligned}
(42)

for the unknowns $$c_1,c_2,\xi$$. We state that the non-Lipschitz term in the ODE (28) has vanished! Let us elucidate the relation between the model (28) and the model (42): If we have some a priori knowledge that the solution $$c_{\mathrm {min}}$$ is strictly positive, then both models are equivalent, as the computation (41) has proven. However, if we consider situations where $$c_{\mathrm {min}}$$ might be zero, then the two models are not equivalent; the application of the substitution changes the model—note that (40) is not differentiable at $$c_{\mathrm {min}}\!=\!0$$ (the mapping $$c_{\mathrm {min}}\mapsto \xi$$ is a diffeomorphism only on $$(0,\infty )$$, but not on $$[0,\infty )$$), and so the computation (41) is not valid whenever $$c_{\mathrm {min}}\!=\!0$$. Different to the old model, the new one has a unique solution even if we start from $$c_{\mathrm {min}}(0)\!=\!\xi (0)\!=\!0$$, since all terms are locally Lipschitz. In the oversaturated case $$k_pc_1c_2\!-\!k_d\!>\!0$$, the component $$\xi (t)$$ of the unique solution of (42) will rise immediately. Via (40), this corresponds to that solution $$c_{\mathrm {min}}(t)$$ of the old model that rises immediately. The wanted (or physical) solution of the old model, i.e., the solution that rises straight away, has a representation in the new model, its unique solution $$\xi$$, but the other solutions of the old model have no correspondent solutions in the new model. We summarize: The new model (42) always has a unique solution (cf. Appendix B). Every “physical” solution of model (28) has a representation as a solution of (42) via (40), and vice versa, while the unphysical solutions of (28) have no correspondence in the model (42). By the change of the model, we have removed the unphysical solutions, and we have preserved the physical solutions without any perturbation/approximation, no perturbation parameter $$\epsilon \!>\!0$$ is needed.

While the old variable $$c_{\mathrm {min}}$$ corresponds to the mass or volume of the mineral per REV, $$\xi$$ corresponds to the radius or diameter of the crystals (up to a constant), compare to [30, Eq. (4.6)] or [30, Eq. (2.10)].

The substitution which we performed for the case $$\alpha \!=\!\frac{2}{3}$$ can be generalized to the case $$\alpha \!\in \![0,1)$$ and to several minerals $$i\!=\!1,\ldots ,M$$ by applying the substitutionFootnote 3

\begin{aligned} \xi _i = c_{\mathrm {min},i}^{1-\alpha _i}\,, \quad c_{\mathrm {min},i} = \xi _i^{\frac{1}{1-\alpha _i}}\,,\quad i=1,\ldots ,M. \end{aligned}
(43)

For $$c_{\mathrm {min},i}>0$$, we obtain

\begin{aligned} \partial _t\,\xi _i= & {} \partial _t (c_{\mathrm {min},i}^{1\!-\!\alpha _i}) = (1-\alpha _i)\, c_{\mathrm {min},i}^{-\alpha _i} \,\partial _t\, c_{\mathrm {min},i} \nonumber \\= & {} (1\!-\!\alpha _i) \, c_{\mathrm {min},i}^{-\alpha _i}\,A_{0,i}\, c_{\mathrm {min},i}^{\alpha _i}\,r_{\mathrm {min},i}(\varvec{c}_{\mathrm {aq}},w_i) \nonumber \\= & {} (1\!-\!\alpha _i)\,A_{0,i} \, \,r_{\mathrm {min},i}(\varvec{c}_{\mathrm {aq}},w_i), \end{aligned}
(44)

where we have used the ODE (8) with (15) in the second but last step. Replacing the ODE (8) by (44) and the unknown $$c_{\mathrm {min},i}$$ by $$\xi _i$$, the non-Lipschitz term has vanished from our model.

\begin{aligned}&\partial _t (\Phi \varvec{c}_{\mathrm {aq}}) + \varvec{L}\, \varvec{c}_{\mathrm {aq}} = \Phi \varvec{S}_{\mathrm {aq}} \varvec{r}_{\mathrm {aq}}(\varvec{c}_{\mathrm {aq}}) + \varvec{S}_{\mathrm {min}} \partial _t (\varvec{\xi }^{\,\varvec{\beta }}) \quad \text{ on } Q_T \end{aligned}
(45)
\begin{aligned}&{\partial }_{t} \varvec{\xi } = \varvec{{\tilde{A}}}_0\,\varvec{r}_{\mathrm {min}}(\varvec{c}_{\mathrm {aq}},\varvec{w})\quad \text{ on } Q_T, \end{aligned}
(46)
\begin{aligned}&\varvec{w} \in H(\varvec{\xi })\quad \text{ on } Q_T, \end{aligned}
(47)
\begin{aligned}&\varvec{c} (\cdot ,0) = \varvec{c}_0\quad \text{ on } {{\overline{\Omega }}}, \end{aligned}
(48)
\begin{aligned}&\varvec{c}_{\mathrm {min}} (\cdot ,0) = \varvec{c}_{\mathrm {min},0}\quad \text{ on } {{\overline{\Omega }}} \end{aligned}
(49)

with $${\tilde{A}}_{0,i}=(1\!-\!\alpha _i)A_{0,i}$$ and $$\beta _i=\frac{1}{1-\alpha _i}$$. Note that $$\beta _i\!\ge \!1$$ for $$\alpha _i\!\in \![0,1)$$. The product in (46) and the power $$\varvec{\xi }^{\,\varvec{\beta }}$$ in (45) are of course meant componentwise. Equation (6) becomes

\begin{aligned} \Phi =\Phi (\varvec{\xi })=\Phi _0-\sum _{j=1}^M \rho _j^{-1}\,\xi _{\mathrm {min},j}^{\beta _j}\,. \end{aligned}

What we can easily see is that in a setting of oversaturation (i.e., positive $$r_{\mathrm {min},i}$$), a solution with $$c_{\mathrm {min},i}(t)=\text{ const }=0$$, which is $$\xi _i(t)=\text{ const }=0$$, on an interval $$[0,t_*)$$ is no longer possible. It is in fact possible to prove uniqueness of the solution. Since for the full PDE model—Eqs. (45)–(49) together with boundary conditions—the proof is rather technical and also very similar to the uniqueness proof in , we only present a uniqueness proof for the simpler ODE model (i.e., we omit the term $$\varvec{L}\,\varvec{c}_{\mathrm {aq}}$$ in (45)) in Appendix B.

The substitution we made is an equivalence transformation as long as $$c_{\mathrm {min},i}\!>\!0$$. Hence, different from the ad hoc proposals from Sect. 5 (cf. (34) and (35)), our transformed system has precisely the same behavior as the original system. And for initial value $$c_{\mathrm {min},i}(0)=0$$ and oversaturation $$r_{\mathrm {min},i},\rho _{\mathrm {min},i}\!>\!0$$, we obviously obtain a solution which rises at once. So the transformation picks the “wanted” solution (see end of Sect. 4) from the bunch of infinitely many solutions. The other solutions disappear.

For numerical simulations, we replace (46)–(47) by

\begin{aligned} \min \{ \xi _j \, , \, \partial _t \xi _j - \tilde{A}_{0,j}\, \rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}}) \} = 0 \end{aligned}

and discrete in time

\begin{aligned} \min \{ \xi _j \, , \, \xi _j-\xi _{\mathrm {old},j} - \Delta t\,\tilde{A}_{0,j}\, \rho _{\mathrm {min},j}(\varvec{c}_{\mathrm {aq}}) \} = 0\,, \end{aligned}

$$j\!=\!1,\ldots ,M$$, compare (21), (22).

Note that the mineral source term in the aqueous species equations (which was $$\partial _t c_{\mathrm {min},j}$$ in the old model) now reads or can be expressed as follows:

\begin{aligned} \partial _t\, (\xi _i^{\frac{1}{1-\alpha _i}}) \quad \text{ or } \quad \tfrac{1}{1-\alpha _i}\, \xi _i^{\frac{\alpha _i}{1-\alpha _i}}\,\partial _t\,\xi _i \quad \text{ or } \quad A_{0,i}\, \xi _i^{\frac{\alpha _i}{1-\alpha _i}}\,r_{\mathrm {min},i}(\varvec{c}_{\mathrm {aq}},w_i)\,. \end{aligned}
(50)

However, in the discretized scheme, it is favorable to use the first version, $$\partial _t\, (\xi _i^{1/(1-\alpha _i)})$$, for the sake of mass conservation, i.e., the term is discretized as $$\frac{1}{\Delta t} [ \xi _i^{1/(1-\alpha _i)} - \xi _{\mathrm {old},i}^{1/(1-\alpha _i)} ]$$.

We emphasize that—apart from the mineral source term in (45)—the variable surface model after the transformation, (45)–(49), looks like a constant surface model. And therefore, it is not admitted to replace (47) by $$w\!=\!1$$ or to remove the first branch from the minimum function, except if there is some a priori knowledge that $$c_{\mathrm {min},i}(t)\!>\!0$$ (or that the fluid is oversaturated) for all i on the whole time interval under consideration (0, T].

By applying the substitution, the model with variable surface obtains a structure very similar to models with fixed surface, for which analysis is available. The only difference, if (45)–(49) is compared with the constant surface model in [9, 10], lies in the mineral source term in the PDE. Apparently, the substitution establishes possibilities to extend analysis from [9, 10] (existence of global solution) and possibly also from [14, 15] (convergence of discrete schemes, for fixed-surface models of one aqueous and one immobile species) to the variable surface model.

## 7 Numerical simulations

We have implemented the new substitution method and, for comparison, the $$\epsilon$$-method, in matlab. The code can be used both for the ODE setting (batch problem) as well as for the PDE-ODE setting (reactive transport). We use linear finite elements in space and implicit Euler time stepping. The nonlinear system is solved with Newton’s method. We implemented Armijo’s rule. For the sake of simplicity, we assume that the porosity changes are moderate so that we can approximate (6) by $$\Phi \!=\!\text{ const }$$ so that we can use a constant flow field in Sec. 7.2.

### 7.1 Batch model

At first, we consider the ODE model with three species (26)–(28), i.e., we have a binary precipitation–dissolution reaction (25), we have an oversaturated fluid, we start from a zero mineral concentration, exponent $$\alpha \!=\!\frac{2}{3}$$, and $$A_0\!=\!1$$. We want to test our new substitution method (cf. Sect. 6) and compare its robustness and its accuracy with the $$\epsilon$$-method (cf. Sect. 5). At first, we test how large $$\epsilon$$ has to be chosen for the $$\epsilon$$-method so that Newton’s method converges. The results are depicted in Table 1. We consider a time interval [0, 1], and we stop the Newton iteration when the residual is at most $$\hbox {tol}_{\mathrm{Newton}}=10^{-12}$$ in the $$L^\infty$$-norm. As the considerations of Sect. 5 predicted, the tests confirm that the smallest $$\epsilon$$ for which Newton’s method converges behaves as $$O(\Delta t^3)$$. Note that for the $$\epsilon$$-method, we have to start at $$c_{\mathrm {min},0}=\epsilon$$ instead of $$c_{\mathrm {min},0}=0$$. On the other hand, for the new substitution method, we do not need any $$\epsilon$$ and we can start at $$c_{\mathrm {min},0}=0$$.

Next, we measure the error of $$c_{\mathrm {min}}$$ at time $$t=1$$ for the $$\epsilon$$-method and for the new substitution method for the same scenario as in Table 1. We consider values of $$\Delta t$$ ranging from $$10^{-1}$$ to $$10^{-3}$$. As a reference solution, we take the numerical solution for $$\Delta t=2\cdot 10^{-5}$$. The results are depicted in Fig. 2.

The red solid line is for the $$\epsilon$$-method when we choose $$\epsilon =(\Delta t)^3$$. Note that a computation with $$\epsilon =0.25\cdot (\Delta t)^3$$ fails (while $$\epsilon =0.3\cdot (\Delta t)^3$$ still works) in this test. This fits very well to the findings of Sect. 5 and [13, Appendix B] that $$\epsilon$$ should be chosen as $$\epsilon \sim \max (A_0\Delta t \rho )^3$$, more precisely as

\begin{aligned} \epsilon > rsim \tfrac{8}{27} \max (A_0\Delta t \rho )^3 \end{aligned}
(51)

where $$\rho$$ is the value of the precipitation–dissolution rate, and the maximum is taken over those points in space and time where the mineral concentration rises from zero to positive values (it is $$\rho \approx 1$$ in the scenario under consideration). The green line is for the new substitution method which works without the choice of any $$\epsilon$$ (and with $$\epsilon =0$$). Since we use implicit Euler timestepping, we observe first-order convergence for both methods. However, the new substitution method produces errors which are two powers of ten smaller than the $$\epsilon$$-method. If we choose constant $$\epsilon$$, i.e., independent of $$\Delta t$$, then we obtain no convergence to the exact solution at all (see the dotted red lines) for $$\Delta t\rightarrow 0$$. This is not surprising, since we have perturbed the original problem by a fixed term. Let us discuss the question why the new substitution method is more accurate than the $$\epsilon$$-method. The substitution method needs no perturbation, we can start our simulation exactly with the initial value $$c_{\mathrm {min}}(0)=0$$, while for the $$\epsilon$$-method the smallest possible value is $$c_{\mathrm {min}}(0)=\epsilon$$, and this initial error of course spoils the whole solution. To investigate this effect in more detail, we also perturbed the substitution method by using the initial value $$c_{\mathrm {min}}(0)=\epsilon$$, see the black line. It turns out that the solution of this variant is still a bit more accurate than the $$\epsilon$$-method (red line). Hence, it seems that the disturbance of the initial value is not the only reason for the larger error. It seems that the term $$c_{\mathrm {min}}^{2/3}$$ in the right-hand side of our ODE (which is present using the $$\epsilon$$-method, but which is not present when using the substitution) causes larger numerical errors in our timestepping scheme.

### 7.2 Reactive transport model (PDE–ODE model)

For the next test, we want to apply the new substitution method in a PDE setting. We consider a spatial domain $$\Omega =(0,1)\!\times \!(0,1)$$. We use linear finite elements on a Friedrichs-Keller mesh with mass lumping for the source terms and the accumulation terms, i.e., for the time derivatives. We have again two aqueous species and one mineral, and we consider the asymmetric binary reaction $$2\,X_1+X_2 \longleftrightarrow Y$$ with rate coefficients $$k_p=2\cdot 10^4$$, $$k_d=4\cdot 10^1$$, $$\alpha =\frac{2}{3}$$, and $$A_0=1$$. We use zero flux boundary conditions $$(-d\nabla c_{\mathrm {aq},i}+\varvec{q} c_{\mathrm {aq},i})\cdot \varvec{n}=0$$ at the inflow ($$=$$left) boundary and homogeneous Neumann conditions $$\varvec{n}\cdot \nabla c_{\mathrm {aq},i}=0$$ at the other boundaries. Our initial condition is

\begin{aligned} \begin{array}{l} c_{\mathrm {aq},0,1}=\chi _{[\frac{2}{16},\frac{7}{16})\times [\frac{9}{16},1]}\,,\quad c_{\mathrm {aq},0,2}=\chi _{[\frac{2}{16},\frac{7}{16})\times [0,\frac{7}{16})}\,,\quad c_{\mathrm {min},0}=0\,, \end{array} \end{aligned}
(52)

where $$\chi _M$$ is the characteristic function of the set M. Hence, the domains where the two aqueous species are present in the beginning do not overlap. A time series for the numerical solution is depicted in Fig. 4. It is computed using the new substitution method. We use $$\Delta t\!=\!5\!\cdot \!10^{-4}$$ and $$128\!\times \!128$$ mesh points.

Due to diffusion ($$d\!=\!0.15$$), the species mix, and where $$k_pc_{\mathrm {aq},1}^2c_{\mathrm {aq},2}\!>\!k_d$$, the precipitation of the mineral sets in. This is the case at about $$t\!=\!0.0085$$. The red line indicates where precipitation $$r_{\mathrm {prec}}\!=\!k_pc_{\mathrm {aq},1}^2c_{\mathrm {aq},2}$$ and dissolution rate $$r_{\mathrm {diss}}\!=\!k_d$$ are equal, i.e., inside the red line the mineral concentration increases and outside it decreases. Because of advection (Darcy velocity $$\varvec{q}\!=\!(2,0)^\mathrm{{T}}$$) the concentrations of the aqueous species move to the right, and so does the area where precipitation dominates. The interplay of precipitation, dissolution, and advection of the aqueous species leads to a movement of the domain where mineral is present. In the second and third row of Fig. 4 we see the precipitation of the mineral and its effect as a sink term on $$c_{\mathrm {aq},1}$$, $$c_{\mathrm {aq},2}$$ (inside the red line). In the fourth and fifth the shape of the contour lines is influenced by the mineral dissolution serving as a source term for $$c_{\mathrm {aq},1}$$, $$c_{\mathrm {aq},2}$$.

The test shows that the substitution method works also in a PDE setting, in a scenario that covers both the rise of the mineral concentration from zero and the decrease of the mineral down to zero.

We confirmed that the new substitution method converges of first order in $$\Delta t$$, see Fig. 3 (green line).

For this test, we used $$32\!\times \!32$$ mesh points and computed the $$L^\infty$$-error at $$t\!=\!0.32$$ for $$\Delta t\!\in \!\{16,8,4,2,1,\frac{1}{2},\frac{1}{4}\}\!\cdot \!10^{-3}$$. As a reference solution, we used the numerical solution with $$\Delta t\!=\!2^{-6}\!\cdot \!10^{-3}$$ on the same spatial mesh. (By extrapolation, we can estimate that the reference solution carries a temporal error of about $$5.5\!\cdot \!10^{-5}$$.) We also tested the $$\epsilon$$-method. For $$\epsilon$$, we tried values $$10^{-i}$$ for $$i\!=\!1,2,\ldots ,8$$, see the black lines in Fig. 3 from top to bottom. For a given $$\epsilon \!>\!0$$, for $$\Delta t$$ too large, Newton’s method does not converge; therefore, the black lines stop at a certain $$\Delta t$$—this is similar as in the ODE test setting of Sect. 7.1. Regarding the accuracy, Fig. 3 shows that there are some couples of $$\epsilon$$ and $$\Delta t$$ for which the numerical error is similar as for the new substitution method (e.g., $$\Delta t\!=\!2\!\cdot \!10^{-3}$$ with $$\epsilon \!=\!10^{-3}$$). However, if for a given $$\Delta t$$—and the scenario under consideration—the value of $$\epsilon$$ is chosen too large then the error is larger than the error of the new substitution method. Hence, in order to obtain convergence and small numerical errors, the choice of the numerical parameter $$\epsilon$$ (or $$\epsilon _j$$, $$j\!=\!1,\ldots ,M$$, if several mineral reactions are considered) is delicate. We consider it to be a major advantage of the substitution method that it does not require such a numerical parameter.

Figure 5 shows the average number of Newton steps per time step. For the $$\epsilon$$-method, we took some effort to take an optimal value of $$\epsilon$$ (at least up to a factor of two) for every $$\Delta t$$, i.e., we determined the smallest $$\epsilon$$ of the shape $$\epsilon \!=\!2^i\!\cdot \!10^{-5}$$, $$i\!\in \!{\mathbb {N}}$$, for which Newton’s method converges. (For the new substitution method, we took $$\epsilon \!=\!0$$ of course.) For $$\Delta t\!=\!(16,8,4,2,1,\frac{1}{2},\frac{1}{4},\frac{1}{8},\frac{1}{16})\!\cdot \!10^{-3}$$ we got $$\epsilon \!=\!2^i\!\cdot \!10^{-5}$$ with $$i\!=\!13,11,7,1,-5,-11,-17,-22,-29$$ for $$32\!\times \!32$$ points and $$i\!=\!15,12,7,2,-4,-10,-16,-22,-27$$ for $$64\!\times \!64$$ mesh points and $$i\!=\!16$$, $$12,8,3,-4,-9,-15,-21,-27$$ for $$128\!\times \!128$$ points. So for every reduction of $$\Delta t$$ by a factor of two, we roughly may reduce $$\epsilon$$ by a factor of about $$2^6$$ (or sometimes $$2^5$$). Is this a deviation or contradiction to the observations in the ODE test case (Sect. 7.1)? In fact, a major difference of the PDE-ODE test case to the test case of Sect. 7.1 is that we now start from undersaturation (at $$t=0$$). In that moment when—at a certain point of the domain—saturation is reached and the mineral concentrations starts to rise from zero, then the rate $$\rho$$ is zero at this point, and so the formula (51) seems difficult to interpret. If we assume that during the time step when—at a spatial point under consideration—the value of $$\rho$$ rises from undersaturation $$(\rho \!<\!0$$) to oversaturation ($$\rho \!>\!0$$), the value of $$\rho$$ is about $$\rho \!\sim \! O(\Delta t)$$, then we obtain $$\epsilon \! > rsim \! O(\Delta t^6)$$ from (51), which fits well to the numerical findings mentioned above.

The Newton iteration was carried out until the residual reached $$\text{ tol}_{\mathrm{Newton}}=10^{-12}$$. Figure 5 shows that the number of Newton steps, computed with the optimal $$\epsilon$$ for the $$\epsilon$$-method (in red), and with $$\epsilon \!=\!0$$ for the new substitution method (in green), is (in almost all simulations) smaller for the substitution method. This carries over to the overall numerical effort, since the problems to solve are very similar for the two methods (the sparsity of the matrix is slightly better for the new substitution method). We think that the smaller number of Newton steps for the substitution method compared to the epsilon method is caused by the elimination of one of the nonlinearities, $$c_{\mathrm {min}}^{2/3}$$, from the system. Let us mention here that Armijo’s rule was sometimes invoked with the epsilon method (in $$\ll \!1\%$$ of the Newton steps) but never for the $$\epsilon$$-method. In the tests, we described in this chapter we never obtained a “nonconvergence” for the substitution method, but it occurred frequently for the $$\epsilon$$-method when $$\epsilon \!>\!0$$ was chosen too small. Finally, let us mention that for very large time steps, such as $$\Delta t=16\!\cdot \!10^{-3}$$ and, e.g., $$64\!\times \!64$$ grid points, we have $$\epsilon > rsim 2^{15}\!\cdot \!10^{-5}\!\approx \!0.3$$ that means that the numerical results obtained with the epsilon method are completely wrong, since we have to raise the intended initial value $$c_{\mathrm {min}}(0)\!=\!0$$ to $$c_{\mathrm {min}}(0)\!=\!\epsilon \approx \!0.3$$; for comparison: the maximum value that the true solution attains after some time is about the same magnitude. With the substitution method, we can use $$c_{\mathrm {min}}(0)\!=\!\epsilon \!=\!0$$.

Now let us consider another scenario. All the data are exactly the same as in the previous scenario, except that we change our initial value (52) to

\begin{aligned} \begin{array}{l} c_{\mathrm {aq},0,1}=\chi _{[\frac{2}{16},\frac{7}{16})\times [\frac{7}{16},1]}\,,\quad c_{\mathrm {aq},0,2}=\chi _{[\frac{2}{16},\frac{7}{16})\times [0,\frac{9}{16})}\,,\quad c_{\mathrm {min},0}=0\,, \end{array} \end{aligned}
(53)

i.e., there is a domain where both aqueous species are present at $$t\!=\!0$$. As a consequence, precipitation sets in at $$t\!=\!0$$ at a rather high rate; in the first time-step, we can already expect a precipitation with rate $$\rho \approx k_p c_{\mathrm {aq},1,0}^2c_{\mathrm {aq},2,0}-k_d\approx 2\cdot 10^4$$ in the overlap domain (instead of $$\rho \sim O(\Delta t)$$ in the previous setting). Hence, if we apply our estimator (which we originally developed for the ODE setting) to this scenario, we expect that the optimal $$\epsilon$$ for the $$\epsilon$$-method should be about $$\epsilon \approx \frac{8}{27}(A_0\Delta t\rho )^3$$ with $$\rho \!\approx \!2\!\cdot \!10^4$$, $$A_0\!=\!1$$, i.e., $$\epsilon \!\sim \!O(\Delta t)^3$$, and not $$\epsilon \!\sim \!O(\Delta t)^6$$ as in the previous scenario. In fact, the numerical tests confirm such a behavior for small $$\Delta t$$, see Table 2.

So, for example, for $$\Delta t\!=\!10^{-5}$$, we must use $$\epsilon \!\ge \!0.003$$ for the epsilon method, i.e., we start with an initial error of (at least) 0.003 in the mineral concentration. (For comparison, the maximal value that the mineral concentration reaches after some time is about 1.3, so the initial error is less than one percent.) However, a simulation with this timestep size requires 75,000 time steps to reach time $$T\!=\!0.75$$, the time when the aqueous species are advected out of the computational domain. Hence, one might want to use larger time steps. However, with $$\Delta t\!=\!8\!\cdot \! 10^{-5}$$ (9375 time steps), we must use at least $$\epsilon \!=\!0.13$$, and so the initial error is already about ten percent of the expected mineral amount. Hence, for larger time steps, the $$\epsilon$$-method cannot be used, i.e., if it is used, it requires such a large $$\epsilon$$ that the numerical results are meaningless. On the other hand, the new substitution method has no problem with such a large time step size, or even much larger ones. For the much larger timestep size $$\Delta t\!=\!2.5\!\cdot \!10^{-3}$$ (which corresponds to 300 time steps) and $$\epsilon \!=\!0$$, it runs with an average of 3.05 Newton steps per time step, and with $$\Delta t\!=\!10^{-2}$$ (i.e., only 75 time steps), it runs without difficulties with 4.12 Newton steps per time step. Of course, the initial fast precipitation in the overlap domain is not any longer resolved with these larger $$\Delta t$$. However, all the other processes (advection, diffusion, precipitation–dissolution in other places or for larger time t) are well resolved. The numerical solution obtained by the substitution method is depicted in Fig. 6.

To summarize, if strong precipitation processes occur, the necessity of choosing a sufficiently large $$\epsilon$$ for convergence of Newton’s method acts as a kind of constraint for the timestep size. For large time steps, the method requires $$\epsilon$$ such large that the numerical results are polluted by a large error, making the numerical results meaningless. The new substitution method, however, runs stable even for large $$\Delta t$$ (and $$\epsilon \!=\!0$$).

## 8 Extension of the substitution method

The question arises if the issue on non-uniqueness/the presence of a non-Lipschitz term can be avoided if “arbitrary” surface dependences of the rate beyond (15) are used in the model. For example, one might be interested in a model where the surface behaves like (15) for small mineral concentrations $$c_{\mathrm {min},i}$$, but where the surface area is bounded for $$c_{\mathrm {min},i}\rightarrow \infty$$. This might be achieved by

1. (a)

a surface model of “product type,”

\begin{aligned} A_i(c_{\mathrm {min},i})=A_{0,i} \, c_{\mathrm {min},i}^{\alpha _i} \, f(c_{\mathrm {min},i})\,, \end{aligned}

with the non-Lipschitz factor $$c_{\mathrm {min},i}^{\alpha _i}$$ and a smooth factor $$f(c_{\mathrm {min},i})$$, or

2. (b)

by a concatenation with a Monod term,

\begin{aligned} \begin{array}{l} A_i(c_{\mathrm {min},i}) = A_{0,i}\,f(c_{\mathrm {min},i}^{\alpha _i}) \,\,\quad \text{ with } \, f(x)=\frac{x}{K_i+x}\,, \;\, K_i\!>\!0\,. \end{array} \end{aligned}
(54)

For model extension (a), we try the same substitution which worked for the standard model (15), i.e., (43). We obtain (compare (44))

\begin{aligned} \partial _t\,\xi _i= & {} \partial _t (c_{\mathrm {min},i}^{1-\alpha _i}) = (1-\alpha _i)\, c_{\mathrm {min},i}^{-\alpha _i} \,\partial _t\, c_{\mathrm {min},i} \\= & {} (1\!-\!\alpha _i) \, c_{\mathrm {min},i}^{-\alpha _i}\,A_{0,i}\, c_{\mathrm {min},i}^{\alpha _i}\,f(c_{\mathrm {min},i})\,r_{\mathrm {min},i}(\varvec{c}_{\mathrm {aq}},w_i) \\= & {} (1\!-\!\alpha _i)\,A_{0,i} \, f(\xi _i^{\frac{1}{1-\alpha _i}})\, r_{\mathrm {min},i}(\varvec{c}_{\mathrm {aq}},w_i)\,. \end{aligned}

Hence, the removement of non-Lipschitz terms was successful, for arbitrary $$\alpha _i\in (0,1)$$. Let us turn to model extension (b). Since for small mineral amount (54) is close to (15), we might try the same substitution which worked for (15) and for case (a), i.e., (43). We obtain

\begin{aligned} \partial _t\,\xi _i= & {} \partial _t (c_{\mathrm {min},i}^{1-\alpha _i}) = (1-\alpha _i)\, c_{\mathrm {min},i}^{-\alpha _i} \,\partial _t\, c_{\mathrm {min},i} \nonumber \\= & {} (1\!-\!\alpha _i) \, c_{\mathrm {min},i}^{-\alpha _i}\,A_{0,i}\, f(c_{\mathrm {min},i}^{\alpha _i})\,r_{\mathrm {min},i}(\varvec{c}_{\mathrm {aq}},w_i) \nonumber \\= & {} (1\!-\!\alpha _i)\,A_{0,i} \, \tfrac{1}{K_i+c_{\mathrm {min},i}^{\alpha _i}} \, r_{\mathrm {min},i}(\varvec{c}_{\mathrm {aq}},w_i) \nonumber \\= & {} (1\!-\!\alpha _i)\,A_{0,i} \, \tfrac{1}{K_i+\xi _i^{\frac{\alpha _i}{1-\alpha _i}}} \, r_{\mathrm {min},i}(\varvec{c}_{\mathrm {aq}},w_i)\,. \end{aligned}
(55)

Hence, the removal of non-Lipschitz terms was successful for $$\alpha _i\!\in \![\frac{1}{2},1)$$ but surprisingly failed for $$\alpha _i\!\in \!(0,\frac{1}{2})$$. However, the most important scenario of $$\alpha _i\!=\!\frac{2}{3}$$ is covered. The question arises whether there is any other substitution which removes the non-Lipschitz term also for $$\alpha _i\!\in \!(0,\frac{1}{2})$$, or, even more general, for an “arbitrary” law

\begin{aligned} A_i(c_{\mathrm {min},i}) = A_{0,i}\,F_i(c_{\mathrm {min},i}) \end{aligned}

for a function $$F_i$$ which is not specified and which is not Lipschitz at zero. In order to find the matching substitution, we use the ansatz

\begin{aligned} c_{\mathrm {min},i}=s_i(\xi _i)\,, \quad \xi _i=s_i^{-1}(c_{\mathrm {min},i})\,. \end{aligned}

Without loss of generality, we assume $$s_i(0)=0$$. Following (55), we obtain

\begin{aligned} \partial _t\,\xi _i= & {} \partial _t \, s_i^{-1}(c_{\mathrm {min},i}) = \tfrac{1}{s_i'(\xi _i)} \, \partial _t\, c_{\mathrm {min},i} = \tfrac{1}{s_i'(\xi _i)} \, A_{0,i}\, F_i(c_{\mathrm {min},i})\,r_{\mathrm {min},i}(\varvec{c}_{\mathrm {aq}},w_i) \\= & {} \tfrac{1}{s_i'(\xi _i)} \, A_{0,i}\, F_i(s_i(\xi _i))\,r_{\mathrm {min},i}(\varvec{c}_{\mathrm {aq}},w_i). \end{aligned}

Hence, our task is to find s such that the mapping $$\xi _i\mapsto \frac{F_i(s_i(\xi _i))}{s_i'(\xi _i)}$$ is Lipschitz, while $$F_i$$ is not. One possibility is to postulate $$\frac{F_i(s_i(\xi _i))}{s_i'(\xi _i)} \!=\! \text{ const } \!=\!1$$, i.e.,

\begin{aligned} s_i'(\xi _i) = F_i(s_i(\xi _i))\, , \quad s_i(0)=0\,. \end{aligned}
(56)

This ODE is autonomous and might be solved if $$F_i$$ is sufficiently simple. For the model (b) discussed above, i.e., for $$F_i(c_{\mathrm {min},i}) \!=\! c_{\mathrm {min},i}^{\alpha _i}/(K_i\!+\!c_{\mathrm {min},i}^{\alpha _i})$$, we find the solution of (56)

\begin{aligned} \begin{array}{l} s_i(\xi _i) + \frac{K_i}{1-\alpha _i}\,s_i(\xi _i)^{1-\alpha _i} = \xi _i \,,\quad s_i^{-1}(c_i) = c_{\mathrm {min},i} + \frac{K_i}{1-\alpha _i}\,c_{\mathrm {min},i}^{1-\alpha _i} \,. \end{array} \end{aligned}

$$s_i,s_i^{-1}:{\mathbb {R}}^+_0\rightarrow {\mathbb {R}}^+_0$$ are monotonically increasing functions. We have found a substitution that removes the non-Lipschitz term for (54) not only for $$\alpha _i\!\in \![\frac{1}{2},1)$$, but also for $$\alpha _i\!\in \!(0,1)$$:

\begin{aligned} \xi _i = c_{\mathrm {min},i} + \tfrac{K_i}{1-\alpha _i}\,c_{\mathrm {min},i}^{1-\alpha _i}. \end{aligned}
(57)

Indeed, the mineral ODEs then read

\begin{aligned} \partial _t\,\xi _i = A_{0,i}\,r_{\mathrm {min},i}(\varvec{c}_{\mathrm {aq}},w_i) \end{aligned}

while the PDEs contain a source term

\begin{aligned} \partial _t\, c_{\mathrm {min},i} = \partial _t\, s(\xi _i)\,. \end{aligned}
(58)

We have to realize that for the surface model (54) with $$\alpha _i\in (0,\frac{1}{2})$$, the situation is not as nice as for the original surface model (15): We do not have the inverse transformation $$c_{\mathrm {min},i}=s_i(\xi _i)$$ in an explicit formFootnote 4, and so we would have to compute $$c_{\mathrm {min},i}$$ iteratively whenever it is needed—that is for the PDE source term (58)—or to use look-up tables and interpolation.

Let us mention that a surface model which behaves like (15) for small mineral concentrations $$c_{\mathrm {min},i}$$ and where the surface area is bounded for $$c_{\mathrm {min},i}\rightarrow \infty$$ is a cut-off version of (15),

\begin{aligned} A_i(c_{\mathrm {min},i})=\left\{ \begin{array}{ll} A_{0,i}\,c_{\mathrm {min},i}^{\alpha _i}\,, &{} c_{\mathrm {min},i}\le c_{i,*} \\ A_{0,i}\,c_{i,*}^{\alpha _i}\,, &{} c_{\mathrm {min},i}>c_{i,*} \end{array}\right. \end{aligned}
(59)

for some $$c_{i,*}>0$$. This surface model is of type (a), and so for this surface model, the original substitution (43) works, and there are no difficulties with the inverse transformation as for (57). In fact, we have implemented this version in our code. Of course, the applicability of the substitution (43) remains true if we replace the kink in (59) by some smoother transition.

Let us summarize. The substitution technique can be generalized to many surface area models beyond (15), to remove a non-Lipschitz term. However, depending on the chosen model, it might happen that a suitable substitution for which also the inverse function is explicitly given, is not easily at hand.

## 9 Summary

We have pointed out that the typical reactive transport model with mineral surface $$A\!\sim \!c_{\mathrm {min}}^{2/3}$$ is ill posed in the sense that it admits non-unique solutions whenever a mineral concentration rises from zero to positive values. We demonstrated by theoretical investigations and by numerical tests that convergence problems of Newton’s method have to be expected for a numerical scheme based on the ill-posed model. We compared two strategies to remove the ill-posedness and the nonconvergence issue: the—what we call—epsilon method, which forces any mineral concentration to be larger than or equal to $$\epsilon \!>\!0$$, and the substitution method. At least the latter is new to our best knowledge. To summarize in short, we propose to use the new substitution method. Disadvantages of the epsilon method are

• A parameter $$\epsilon \!>\!0$$ has to be chosen. If it is chosen too small, then nonconvergence of Newton’s method is imminent. The larger it is chosen, the more error is introduced in the numerical solution. Let us mention that the necessity to carefully choose a parameter also is true for other potential regularizations of the model.

In practice, the parameter is probably chosen by trial and error. If a simulation is started with another timestep size, then also $$\epsilon$$ should be changed. Questions occur for numerical codes with adaptive timestepping.

• While, in some scenarios, tests show that the additional numerical error of the epsilon method may be tolerable, we found scenarios (transition from zero to nonzero mineral concentration by fast precipitation, precipitation that is poorly resolved by the timestep size) where the accuracy of the numerical solution becomes extremely bad or very short time steps have to be used.

• In most of our tests, the number of Newton steps was larger for the epsilon method than for the substitution method. This means a larger computational effort for the same spatial and temporal resolution.

We think that the main advantages of the new substitution method are

• no parameter has to be chosen,

• it does not introduce additional numerical error,

• it might influence the number of Newton steps in a positive way,

• the method is elegant and easy to implement, and no technical modifications of Newton’s method are required,

• and it allows to carry over proofs of existence and uniqueness of solutions for the constant surface model to the $$A\!\sim \!c^\alpha$$-surface model.

An interpretation of the substitution and its performance might be that it seems to be advantageous to use grain size (radii) instead of mineral volume or mass in a macroscale model.

We hope that the substitution is a contribution for the improvement of robustness and efficiency of reactive transport codes. It should not be too difficult to implement the substitution into existing reactive transport codes. For the future, it would be desirable to obtain experiences and comparisons also for more complex scenarios (parameters and concentrations varying over many magnitudes, or aqueous reactions modeled by equilibrium conditions, or adaptive timestepping).