Next Article in Journal
Evolution of Salinity and Water Table Level of the Phreatic Coastal Aquifer of the Emilia Romagna Region (Italy)
Next Article in Special Issue
Numerical Evaluation of Fractional Vertical Soil Water Flow Equations
Previous Article in Journal
A Highly Packed Biofilm Reactor with Cycle Cleaning for the Efficient Treatment of Rural Wastewater
Previous Article in Special Issue
Spatial and Temporal Evolution of Leaching Zones within Potash Seams Reproduced by Reactive Transport Simulations
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Jacobian Free Methods for Coupling Transport with Chemistry in Heterogenous Porous Media

1
Laboratoire d’Ingénierie Informatique et Systèmes (L2IS), Faculté des Sciences et Techniques, UCAM, 4000 Marrakech, Morrocco
2
Inria, 2 Rue Simone Iff, 75589 Paris, France
3
CERMICS, Ecole des Ponts, 77455 Marne-la-Vallée, France
*
Author to whom correspondence should be addressed.
Water 2021, 13(3), 370; https://doi.org/10.3390/w13030370
Submission received: 24 December 2020 / Revised: 12 January 2021 / Accepted: 25 January 2021 / Published: 31 January 2021

Abstract

:
Reactive transport plays an important role in various subsurface applications, including carbon dioxide sequestration, nuclear waste storage, biogeochemistry and the simulation of hydro–thermal reservoirs. The model couples a set of partial differential equations, describing the transport of chemical species, to nonlinear algebraic or differential equations, describing the chemical reactions. Solution methods for the resulting large nonlinear system can be either fully coupled or can iterate between transport and chemistry. This paper extends previous work by the authors where an approach based on the Newton–Krylov method applied to a reduced system has been developed. The main feature of the approach is to solve the nonlinear system in a fully coupled manner while keeping transport and chemistry modules separate. Here we extend the method in two directions. First, we take into account mineral precipitation and dissolution reactions by using an interior point Newton method, so as to avoid the usual combinatorial approach. Second, we study two-dimensional heterogeneous geometries. We show how the method can make use of an existing transport solver, used as a black box. We detail the methods and algorithms for the individual modules, and for the coupling step. We show the performance of the method on synthetic examples.

1. Introduction

Reactive transport plays an important role in various subsurface applications [1,2,3] including carbon dioxide sequestration, nuclear waste storage bio-geochemistry and the simulation of hydro-thermal reservoirs.
The numerical simulation of reactive transport has been the topic of numerous work. The survey by Yeh and Tripathi [4] has been very influential in establishing a mathematical formalism for setting up models, and also for establishing the “operator splitting” approach (see below) as a standard. More recent surveys, detailing several widely used computer codes and their applications, can be found in the book [1] and the survey article [2].
Methods for coupling transport and chemistry fall into two broad categories:
  • Sequential Iterative Approach (SIA), where transport and chemistry are solved alternatively and one iterates to convergence [5,6,7,8,9,10].
  • Globally Implicit Approach (GIA), where one solves the fully coupled system in one shot [11,12,13,14].
Recently, methods that solve coupled problem without direct substitution, thus maintaining a separation between transport and chemistry, have been introduced [15,16,17,18,19,20,21].
In previous work [22,23], the authors introduced a method for the simulation of reactive transport that falls in the latter category. The method is a globally coupled approach, where transport and chemistry are solved together, but where the transport and chemistry modules are kept separate at the software level. At each time step, the large nonlinear system of algebraic equations representing the coupling of all chemical species at all mesh points is solved by a Newton–Krylov method [24]. The Newton–Krylov method has recently been used for closely related applications to reactive transport, see [25,26,27]. In these works, the method is applied to a system where the mass action laws are subsituted into the mass balance transport equations, while in our work we solve a fixed point system using solution operators for transport and chemistry. In the Newton–Krylov approach the linearized system at each Newton iteration is solved by an iterative method (usually GMRES), so that the full Jacobian matrix does not have to be formed. All that is required is a procedure to multiply the Jacobian matrix by a given vector, and this is where the specific structure of the coupled problem is exploited. It was also shown in [23] that a suitable non-linear preconditioning made the method both more robust and more efficient, as the number of both linear and nonlinear iterations became independent of the mesh size.
The purpose of the present paper is to extend the approach to a larger set of models. Specifically, we target two different extensions:
Mineral species: 
We extend the capabilities of the equilibrium chemical solver to handle mineral precipitation and dissolution;
2D geometries: 
All the examples in [22,23] were one-dimensional. Here we show 2D examples.
Mineral precipitation and dissolution reactions lead to non-smooth problems, where it is not known a priori which species are dissolved. The corresponding equilibrium problem can be formulated in an elegant, and mathematically consistent, formulation as a complementarity problem, as for example in [28,29,30]. However, instead of using a Newton–min method as in those references, we solve the non-linear system by an interior point method [31] or [32], adapted to nonlinear equations as in [33,34]. The approach is validated by computing the potential-pH precipitiation diagram for iron.
The chemical module is coupled to a transport module based on the recently developed ComPASS code [35]. ComPASS targets multiphase, multicomponent geothermal systems. The discretization uses a fully implicit time integration combined with the Vertex Approximate Gradient (VAG) finite volume scheme [36], which is adapted to polyhedral meshes and anisotropic heterogeneous media. The extension of the coupling method to 2D is non-trivial as the cost of the transport step now becomes significant.
The code is validated on two examples:
  • The potential pH diagram for iron is used to validate the interior point Newton method;
  • A 2D variant of the ion exchange system used in Example 11 of the PhreeqC documentation [37]. This test case involves 8 chemical species undergoing 3 ion-exchange reactions, in a simple 2D geometry.
  • The so-called SHPCO2 benchmark that involves 11 chemical species, distributed among 3 phases, and undergoing 4 reactions. One species is a mineral, and one is a gas.
The results show that the proposed approach does handle the large class of models, bu that further work is still required to ascertain its efficiency on large scale examples. This topic is currently being pursued.
An outline of the paper is as follows: Section 2 presents the model and its hypotheses. Section 3 shows how to obtain a reduced coupled problem, and discusses solution methods at the semi-discrete level. In Section 4, we present the numerical methods used for solving the chemical and transport sub-problems. Section 5 discusses the numerical examples.

2. Physical Model and Mathematical Formulation

2.1. The Model

We consider a set of species subject to transport by advection and diffusion and to chemical reactions in a porous medium occupying a domain Ω R d ( d = 1 , 2 , 3 ). The chemical phenomena involve both homogeneous and heterogeneous reactions. Homogeneous reactions, in the aqueous phase, include water dissociation, acid–base reactions and redox reactions, whereas heterogeneous reactions occur between the aqueous and solid phases, and include surface complexation, ion exchange and precipitation and dissolution of minerals (see [38] for details on the modeling of specific chemical phenomena). Accordingly, we assume there are N a aqueous (mobile) species ( X j a ) j = 1 , , N a in the aqueous phase undergoing N r homogeneous reactions, N s solid (immobile) species ( X j s ) j = 1 , , N s in the solid phase undergoing N ¯ r surface sorption reactions or ion exchange reactions, and N p precipitation – dissolution reactions with the additional assumption that each mineral reaction involves only aqueous species and only one mineral species, denoted by ( X j p ) j = 1 , , N p
In this work, we only consider equilibrium reactions, which means that the chemical phenomena occur on a much faster scale than transport phenomena, see [39]. This assumption is justified for aqueous phase and ion-exchange reactions, but may be questionable for reactions involving minerals that could also be modeled as kinetic reactions, with specific rate laws [13,40].
Under the above assumptions, we can write the chemical system as
j = 1 N a ( S a a ) i j X j a + j = 1 N s ( S s s ) i j X j s X i p 0 i = 1 , , N r homogeneous reactions , j = 1 N a ( S s a ) i j X j a + j = 1 N s ( S s s ) i j X j s X i p 0 i = 1 , N ¯ r heterogeneous sorption reactions , j = 1 N a ( S p a ) i j X j a + j = 1 N s ( S s s ) i j X j s X i p 0 i = 1 , N p precipitation - dissolution reactions ,
or in condensed form
S X a X s X p 0 0 0 , where S = S a a 0 0 S s a S s s 0 S p a 0 I
denotes the stoichiometric matrix, with the sub-matrices S a a R N r × N a , S s a R N ¯ r × N a , S s s R N ¯ r × N s and S p a R N p × N a . We assume that both the global stoichiometric matrix S and the “aqueous” stoichiometric matrix S a a are of full rank.
Since the heterogeneous reactions in the examples used in Section 5 have either all surface reactions or all mineral reactions, we illustrate the above concepts with an example from [41] that has both kinds of reactions. The chemical reactions are as follows, the first two reactions are homogeneous, the third one is a surface reaction and the fourth one is a mineral reaction:
R1 
H+ + OH ⇄ H2O
R2 
CO32− + H+ ⇄ HCO3
R3 
X2Ca + 2 Na+ ⇄ 2XNa + Ca2+
R4 
Ca2+ + CO32− ⇄ CaCO3(s).
The aqueous species are X a = H + , OH , CO 3 2 , Na + , Ca 2 + , H 2 O , HCO 3 T , the sorbed species are X s = X 2 C a , XNa T and the mineral species is X p = CaCO 3 T . The corresponding matrices are:
S a a = 1 1 0 0 0 1 0 1 0 1 0 0 0 1 , S s a = 0 0 0 2 1 0 0 , S s s = 1 2 , S p a = 0 0 1 0 1 0 0 .
Each reaction gives rise to a mass action law, linking the activities of the species. For simplicity, we ignore the activity correction, so that the activities of aqueous and sorption species are equal to their concentrations (if water is included as a species, as in example Section 5.3, its activity is taken equal to 1), while the activity of mineral species is by convention equal to 1. We denote by c j (resp. s j , p j ) the concentration of species X j a (resp. X j s , X j p ). It will be convenient to write the mass action law in logarithmic form: given a vector c with positive entries we denote by log   c the vector with entries log   c j .
For the aqueous and sorption reactions we write the corresponding mass action law
S a a 0 S s a S s s log   c log   s = log   K a log   K s ,
where K a R N r , K s R N ¯ r are the equilibrium constants for their respective reactions.
For reactions involving minerals, we define the (logarithmic form of) the solubility product, with K p R N p denoting again the equilibrium constant
Π = log   K p S p a log   c .
Mineral reactions can only be written if the mineral is present, and the mass action law must then be written as the following alternative:
( Π = 0 and p 0 ) or ( Π 0 and p = 0 ) .
Next, we write the mass conservation for each species, considering both transport by advection, diffusion and chemical reaction terms:
ϕ t c + L c = S a a T r a + S s a T r s + S p a T r p , ρ s ( 1 ϕ ) t s + L c = S a a T r a + S s s T r s , ρ s ( 1 ϕ ) t p + L c = S a a T r a + S s a T r s r p . in Ω × [ 0 , T f ]
where L denotes the advection–diffusion operator:
L ( c ) = · q c D c ,
ϕ is the porosity (fraction of void in a Representative Elementary Volume available for the flow), q is the Darcy velocity (we assume here permanent flow, so that q is considered as known), D is a diffusion–dispersion coefficient and ρ s is the density of the rock matrix. The vectors r a R N r , r s R N ¯ r and r p R N p contain the (unknown) reaction rates. We assume that the diffusion coefficient is independent of the species. This is a strong restriction on the model, but one that is commonly assumed to hold [4,16,22,41]. To complete the model, we add boundary conditions, with a partition of the boundary Ω ¯ = Γ ¯ D Γ ¯ N , Γ D Γ N = . For simplicity we only consider either given concentration, or zero diffusive flux boundaries:
Dirichlet boundary: 
c = c D on Γ D × [ 0 , T f ] ,
Neumann boundary: 
c · n = 0 on Γ N × [ 0 , T f ] , where n is the outgoing normal to Ω along Γ N .
Finally, an initial condition
c ( x , 0 ) = c 0 ( x ) in Ω
is given.
Since we assume that all reactions are at equilibrium the reaction rates are unknown, but they can be eliminated. The process is by now well known, and will not be repeated here. We adapt the construction given in [23], to take into account the extra structure due to the presence of mineral species. See [28] for a related derivation, and [16,17] for a more general framework. This approach, originating from [41], makes use of a kernel matrix U such that U S T = 0 , i.e. such that the columns of U T form a basis for the null-space of S. Among the many possible choices there exists one such that
U = U a a U a s U a p 0 U s s 0 U a a R ( N a N r ) × N a , U a s R ( N a N r ) × N s , U p a R ( N a N r ) × N p U s s R ( N s N ¯ r ) × N s
For the example system given above, one finds that the kernel matrices are given by
U a a = 1 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 , U s a = 0 0 0 0 0 0 2 0 0 1 / 2 , U s s = 2 1 , U p a = 0 0 1 0 1 .

2.2. Elimination of the Reaction and Coupled Problem

With this kernel matrix, we can eliminate the reaction terms in Equation (5). We start by defining the total analytic concentration for the mobile and immobile species respectively (these are the same as various total quantities defined in the classical survey by Yeh and Tripathi [4])
T T ¯ = U a a U a s U a p 0 U s s 0 c s p .
We denote by N c = N a N r and N ¯ c = N s N ¯ r the respective dimensions of T and T ¯ . We also define the total mobile and immobile concentrations for the species in the aqueous phase
C = U a a c , C ¯ = U a s s + U a p p ,
so that the total concentrations are given by
T = C + C ¯ = U a a c + U a s s + U a p p .
We now multiply system (5) on the left by U. Because of our assumption that D is the same for all chemical species, multiplication by U commutes with the differential operator, and the system can be rewritten as
ϕ t C + ρ s ( 1 ϕ ) t C ¯ + L C = 0 , ρ s ( 1 ϕ ) t T ¯ = 0 .

3. The Coupled Problem

The coupled system consists of the ( N a N r ) + ( N s N ¯ r ) conservation Partial Diffrential Equations (PDEs) and Ordinary Differential Equations (ODEs) (10), together with the N r + N ¯ r + N p mass action laws (2), the relations connecting concentration and totals (8) and the second line of (7), for the N a + N s + N p concentrations and 2 ( N a N r ) + N s N ¯ r totals. Note that the ODEs for T ¯ are decoupled from the rest of the system.

3.1. Reduction of the Coupled Problem

It is possible to solve directly the coupled system for the concentrations of the species. This is what the Direct Substitution Approach (DSA) does. Actually this is usually done after a further reduction of the chemical system, by introducing primary and secondary species such that each mass action law expresses the formation of one secondary species from the primary species. One substitutes the mass action laws (2) and (4) into the mass conservation PDEs (10), obtaining a large system of nonlinear equations for the primary species (see [25] or [42] for representative examples of this approach).
We prefer, however, to separate the local chemical equations from the PDEs. In order to do this, it will be useful to eliminate the concentrations of the individual species, and keep only the totals as main unknowns. Towards this goal, we notice that given the totals T N c , T ¯ N C ¯ , we can solve the “local chemical equilibrium problem” made up of the mass action laws (2) and (4) together with the definition of the totals (7). Knowing the species concentrations c , s and p, we can compute C N c , C ¯ N C through Equation (8). Because T ¯ is constant, it is convenient to remove it from the system, and we define the chemical solution operator by
Ψ C : R N c R N c T C
The end result is that the coupled problem given by Equations (2), (4), (7), (8) and (10) is equivalent to the following system involving only the totals C and C ¯ :
ϕ t C + ρ s ( 1 ϕ ) t C ¯ + L C = 0 , C ¯ Ψ C ( C + C ¯ ) = 0 .
Remark 1.
Note that one can equivalently add T as an unkwon with the added equation
T = C + C ¯ .
As we recall below, this is how the SIA method is defined, but it turns out to be more efficient to work directly with the smaller system (12) (see [23] for a comparison of the various formulations of the coupled problem).
Before we can fully specify how to solve the reduced system (12), we need to make precise the numerical methods used for solving the transport equations and the local chemical system.

3.2. Semi-Discrete System in Time

We first keep space continuous, and describe our approach on a semi-discrete system. We introduce a discretization of the time interval [ 0 , T f ] into N t intervals [ t n , t n + 1 ] , n = 0 , , N t 1 , with t 0 = 0 and t N t = T f , and we denote Δ t n = t n + 1 t n . We take the simplest backward Euler discretization and approximate the coupled system (12) by
ϕ C n + 1 C n Δ t n + ρ s ( 1 ϕ ) C ¯ n + 1 C ¯ n Δ t n + L C n + 1 = 0 , C ¯ n + 1 Ψ C ( C n + 1 + C ¯ n + 1 ) = 0 .
In analogy with chemical solution operator Ψ C defined in (11) we now introduce the transport solution operator as follows: given an initial concentration c n at time t n and a source term f n + 1 , we let Ψ T ( c n , f n + 1 ) = c n + 1 where c n + 1 solves the transport problem over one time-step:
ϕ c n + 1 c n Δ t n + L c n + 1 = f n + 1 .
We can then rewrite the coupled problem as
C n + 1 = Ψ T C n , ρ s ( 1 ϕ ) C ¯ n + 1 C ¯ n Δ t n C ¯ n + 1 = Ψ C ( C n + 1 + C ¯ n + 1 ) .
Among the various mathematically equivalent formulations, it was shown in [23] that eliminating C n + 1 leads to an efficient formulation. The resulting problem involves only the unknown C ¯ n + 1 and is written as
C ¯ n + 1 = def F ( C ¯ n + 1 ) = Ψ C C ¯ n + 1 + Ψ T C n , ρ s ( 1 ϕ ) C ¯ n + 1 C ¯ n Δ t n .
This is a fixed point problem for C ¯ n + 1 . We recall two ways by which this problem can be solved:
Fixed point 
A fixed point iteration for solving (16) is known in the reactive transport literature as the Sequential Iterative Approach (SIA, see [4,43,44,45] among many references).
At each time step n, one iterates between transport and chemistry. More precisely, for each iteration k, one computes
C ¯ ( n + 1 , k + 1 ) = F ( C ¯ ( n + 1 , k ) ) = Ψ C C ¯ ( n + 1 , k ) + Ψ T C n , ρ s ( 1 ϕ ) C ¯ ( n + 1 , k ) C ¯ n Δ t n .
The iterations are stopped when the relative progress indicator
η k = C ¯ n + 1 , k + 1 C ¯ n + 1 , k C ¯ n + 1 , k
becomes small enough.
One can easily show that this is equivalent with the more standard description of SIA involving three unknowns ( C n + 1 , T n + 1 and C ¯ n + 1 ) .
Newton–Krylov 
As was shown in previous work by the authors [22,23], the coupled system (15) can also be solved by a Newton–Krylov method, leading to a more efficient algorithm.
Recall that at each step of the “pure” form of Newton’s method for solving F ( C ¯ n + 1 ) = 0 , one should compute the Jacobian matrix J = F ( C ¯ ( n + 1 , k ) ) , solve the linear system
J δ C ¯ = F ( C ¯ ( n + 1 , k ) ) ,
usually by Gaussian elimination, and then set C ¯ ( n + 1 . k + 1 ) = C ¯ ( n + 1 , k ) + δ C ¯ . In practice, one should use some form of globalization procedure in order to ensure convergence from an arbitrary starting point. If a line search is used, the last step should be replaced by C ¯ ( n + 1 , k + 1 ) = C ¯ ( n + 1 , k ) + λ δ C ¯ , where λ is determined by the line search procedure [46].
In our context, however, solving the linearized system (18) exactly, or even computing the J matrix, is not possible as both Ψ C and Ψ T are implicitly defined functions. It was shown in our previous work (see [22,23]) that this difficulty could be circumvented by resorting to the Newton–Krylov method (see [24,25,46], to which our work is closely related). The Newton–Krylov method is a variant of Newton’s method where the linear system (18) is solved by an iterative method (of Krylov type), for instance GMRES [47]. The advantage of this choice is that the Jacobian matrix J is no longer required. Instead one needs a procedure to compute the product J v for any given vector v.
In the next section, we complete the description of the method by giving details on the space discretization, and we give additional implementation details on the solution of the coupled problem.

4. Numerical Methods for Transport Furthermore, Chemistry

4.1. Solution of the Chemical Equilibrium Problem by an Interior Point Method

In this section, we show how to solve the local equilibrium problem. We recall that, given T R N C and T R N ¯ C , we need to compute c R N a , s R N s and p R N p , such that Equations (2), (4) and (7) hold. Once the concentrations have been computed a simple post-processing as in Equations (8) gives the chemical operator Ψ C .
In this section, in order to simplify the notation, we will not distinguish between aqueous and sorbed species. Alternatively, this is the same as assuming that all immobile species are mineral species. Additionally, we assume that the aqueous part of stoichiometric matrix S a a has been reduced to the “Morel” form
S a a = I S ˜ a a .
Note that under the assumption that S a a is of full rank, this is always possible (see [41], or [23,48] for more general reductions). This means that the aqueous concentrations have been split between primary species c p and secondary species c s , so that each reaction produces one secondary species, the mass action laws take the form
log   c s = S ˜ a a log   c p + log   K a ,
and the mass conservation Equation (7) become
T = c p + S ˜ a a T c s + S p a T p .
We restate the problem to be solved with this new notation. As mentioned previously, we take as unknowns not the aqueous concentrations themselves but their logarithms. This has the obvious advantage that the concentrations will always be positive, and also reduces the ill-conditioning of the non-linear system (see [22,49,50]). We denote by ξ p (resp. ξ s ) the vector such that ξ i p = log   c i p (resp. ξ i s = log   c i s ), and we will write ξ p = log   c p or c p = exp ( ξ p ) .
The problem to be solved for local chemical equilibrium is:
Given T R N c , find ξ p R N c , p R N p such that:
exp ξ p + S ˜ a a T exp ( ξ s ) + S p a T p T = 0 , with ξ s = S ˜ a a ξ p log   K a ,
( log   K p S p a ξ = 0 and p 0 ) or ( log   K p S p a ξ 0 and p = 0 ) .
Equation (19) combines the mass action law and the conservation of mass. Equation (20) takes the form of a complementarity condition [51,52] and expresses the fact that either the mineral is under-saturated and its concentration is zero, or the mineral is present and the solubility product equals 1. The classical method to take minerals into account involves a systematic search across possible states (the procedure is detailed in [53], and is used by most reactive transport codes [37,54] for example).
More recently, methods based on a more consistent mathematical approach have been used with success: the semi-smooth Newton’s method in [28,29]) and an interior point method that originates from inequality constrained optimization in [33,55]. See also [32] for an overview of solution methods for both equilibrium and kinetic reaction modeling.
In this work we follow [33], who adapted to the case of nonlinear equations with inequality constraints an interior point method originally proposed in [31].
To formulate the algorithm, we rewrite (19)–(20) by introducing a slack variable z R N p (and we denote the system in the first line of (19) by F e ( ξ p , p ) = 0 ):
F e ( ξ p , p ) = 0 S p a ξ p + log   K p + z = 0 p · z = 0 , with p 0 , z 0 ,
where the inequalities are to be understood component-wise.
The idea of the interior point method in [31,33] is to relax the last equation of (21) by introducing a parameter μ that will be driven to 0 by the algorithm and to apply Newton’s method to the relaxed system F c ( X ) = 0 with unknowns X = ( ξ p , p , z ) R N a + 2 N p :
F e ( ξ p , p ) = 0 S p a ξ p + log   K p + z = 0 P Z e μ e = 0 , with p 0 , z 0 .
We have used a notational device that is standard in the optimization literature: we let P = diag p , Z = diag z , and we also let e = ( 1 , , 1 ) T R N p .
A detailed description of the algorithm, together with a convergence proof, can be found in the given references. We just note a few important implementation details.
Computing the Newton step 
Each Newton iteration requires the solution of a linear system
J c s = F c ( X ) ,
where the Jacobian of system (22) is given by:
J c = I + S ˜ a a T Y S ˜ a a S p a T 0 S p a 0 I 0 Z P ,
where Y = diag exp ( ξ S ) , and I is an identity matrix of the appropriate size. These systems can become severely ill-conditioned (see [49]) so that Gaussian elimination may give inaccurate solutions. We monitor the condition number of the Jacobian and if it is larger than 10 15 , so that the solution may have no correct digit, we perform a singular value decomposition and compute a least squares solution.
Damping 
After the Newton step has been computed, we apply two steps of damping: the first one reduces the step to ensure that the iterates for p and z remain positive, and the second one is a line search that makes sure the size of the residual is reduced along the Newton direction.

4.2. The VAG Scheme

The Vertex Approximate Gradient (VAG) scheme has been introduced in [36,56,57]. Its purpose is to provide a consistent dicretization method for anisotropic diffusion schemes on general (polyhedral) meshes, at a reasonable cost. We only give a brief presentation here, referring to the above references for full details. In particular, we only describe the scheme in 2D where important simplification arise.
Let T be a mesh of Ω made up of (open, convex) disjoint polygonal cells K such that K T K ¯ = Ω ¯ . For all K T , let x K K be a point such that K is star-shaped wih respect to x K . We denote the set of vertices of the mesh by V , for each K T by V K the set of its vertices, and for each v V by T K the set of elements containing v as a vertex.
The discrete unknowns of the VAG scheme are values at the vertices of the mesh and at the center of each element. Following [56], we define a discrete space as
W T = ( c s ) s V , ( c K ) K T , c s = 0 for s Γ D ,
and we denote by N T its dimension (the sum of the number of vertices and the number of cells, up to the vertices located on the Dirichlet part of the boundary).
Given a cell K T , we consider the triangular submesh where, for each edge σ E K a triangle is formed by joining the center of the cell to each of the two vertices at the ends of σ (see Figure 1).
We can now define a discrete gradient for each discrete unknown c T W , as the gradient of the P 1 finite element function on the submesh defined above. This gradient is a constant vector on each triangular sub-cell. For future reference, we denote by η s , s V (resp. η K , K T ) the basis functions of the P 1 space associated to the vertices (resp. the cell centers).
The VAG scheme is defined by a variational formulation on the discrete space W T using the gradient defined above. The gradient leads to the definition of fluxes from a cell K T to any of its vertices v V K . The diffusion fluxes are defined as
F K , v d ( c T n + 1 ) = v V K T K v v ( c K n + 1 c v n + 1 ) ,
where the transmissivities T K v v can be computed locally on element K. Their values are given in [56,57].
One also needs advection fluxes, defined as
F K , v a ( c T n + 1 ) = F K , v d ( p T ) c K , v n + 1 ,
where F K , v d ( p T ) is the flux computed as in (23) with the pressure from the flow step, and c K , v is the upwind concentration defined as (cf [56])
c K , v = c K if F K , v d ( p T ) 0 , c v if F K , v d ( p T ) < 0 .
The discrete problem is now defined by the following system:
ϕ K | K | c K n + 1 c K n Δ t + v , v V K T K v , v ( c K n + 1 c v n + 1 ) + v V K F K , v ( p T ) c K , v n + 1 = f K , K T ϕ K | K | c v n + 1 c v n Δ t K V v , v V K T K v , v ( c K n + 1 c v n + 1 ) K T v F K , v ( p T ) c K , v n + 1 = f v , v V
where ϕ K is the average porosity on cell K, f K = K f ( x ) η K ( x ) d x and f v = Ω f ( x ) η s ( x ) d x . In a more condensed notation, we have to solve a linear system
Φ c T n + 1 c T n Δ t + A V c T n + 1 = f T n + 1 .
One notes that the first equation in (26) is local to each element. The cell unkowns can thus be eliminated locally, so that the resulting system involves only the values of the concentration at the vertices. However, in a time dependent problem, the cell unknowns must be recomputed at each time step. This will be important in the coupling with the local chemical problem in Section 4.3.
With a slight abuse of notation, we denote again by Ψ T the discrete version of the transport operator defined in (14), so that (27) is equivalent to c T n + 1 = Ψ T ( c T n , f T ) .
In the examples reported in Section 5, we have used ComPASS [35,58] as a black box for the transport solver. ComPASS is an open source platform for the simulation of multiphase compositional flow on generic unstructured meshes, targeting hydrothermal systems.

4.3. The Discrete Coupled Problem

We now put the two previous sections and Section 3.2 together. The framework for doing this is provided by previous work by the authors [23]. The main issue is to realize that we are solving a problem that couples all concentrations at all degrees of freedom (DOFs), both vertices and cell centers, but that transport only couples spatial DOFs while chemistry is local to each DOF. The method proposed in [22,23] attempts to decouple transport and chemistry, without sacrificing the numerical efficiency afforded by Newton’s method on the coupled problem.
The unknowns of the discrete problems are vectors in X = R ( N c + N p ) × N T , and we denote them by the same letter as their continuous counterpart, written in bold face. For a vector C X , we follow [22] and denote by
  • C : , j the column vector of concentrations of all chemical species at the DOF j.
  • C i , : the row vector of concentrations of species i at all DOFs.
We now extend the transport and chemical operators to operate on vectors in X .
Ψ C : X X T Ψ C ( T ) , and Ψ T : X X C Ψ C ( C ) ,
with
Ψ C ( T ) : , j = ψ C ( T : , j ) , for j = 1 , , N T , Ψ T ( C , f ) i , : = ψ T ( C i , : , f i , : ) , for i = 1 , , N c + N p .
We also note that Ψ T can be made explicit, in matrix form, by making use of the Kronecker product [59]. As first explained in [21] the action of the transport operator
C n + 1 = Ψ T ( C n , f n + 1 )
is equivalent to the solution of the linear system
( Φ I ) C n + 1 C n Δ t + ( A V I ) C n + 1 = f n + 1 .
Of course the Kronecker product is just a notational device, the full matrix A V I is never actually formed. Rather, the implementation of the transport operator is done with a loop over all species, in which one time step of a transport problem is solved (see [23] for details). Similarly, the chemical solution operator Ψ C can be evaluated independently for each degree of freedom of the mesh.
We noted in Section 3.2 that the implementation of the Newton–Krylov method required the solution of a linear system with the jacobian of the function F defined in (16). We emphasize that this function is defined implicitly through the evaluation of both solution operators Ψ C and Ψ T . Alternatively, evaluating F requires the solution of
  • One step of a transport problem for each chemical species;
  • One chemical equilibrium problem for each vertex and each cell.
As explained above, computing the Jacobian matrix is impractical, as it requires the inverse of the two solution operators. However, GMRES does not need the Jacobian matrix itslef, but only its action on a vector. The product J v is interpreted as a directional deritvative. We have shown in [23] how to compute this matrix vector product from the Jacobians of the transport operator (in our case, this is a linear operator) and and the chemical equilibrium operator (where the local Jacobian is needed as part of an inner Newton loop).
In this work, we have resorted to a Jacobian free version of the Newton–Krylov method (see [24] or [25,26,27]), where the required matrix by vector product is approximated bya finite difference quotient. For a small value of δ (see [46] for guidelines on how to choose δ ), there holds:
J v = F ( C ¯ ( n + 1 , k ) ) v F ( C ¯ ( n + 1 , k ) + δ v ) F ( C ¯ ( n + 1 , k ) ) δ .
The consequence is that the overall method can be implemented as soon as one can evaluate the transport and chemistry operators. Not only is this a mininal requirement, it is also what is needed to implement the more common Standard Iterative Approach recalled in (17). The tradeoff between both methods is an expected reduction in the number of iterations versus an increase in function evaluations for solving the linear systems at each Newton step (but notice that the Newton–Krylov methods are a special case of Inexact Newton methods, so that the linear system can be solved with an accuracy that depends on the progress of the outer Newton loop).

5. Numerical Results

5.1. Validation Example for the Interior Point Method: The Iron Precipitation Diagram

As a validation for the Newton–interior point method for computing chemical equilibrium in the presence of precipitation, we chose to recompute the pE–pH diagram for iron, also known as a Eh–pH or Pourbaix diagram ([60], p. 73).
The precise set of species used and the value of the equilibrium constants can be found in the PhD. thesis by Carrayrou [61]. It comprises nine aqueous species and four solid species.
For each pair of values of the pH (between 0 and 14) and the pE (between −14 and 20), a chemical equilibrium is solved by the method detailed in Section 4.1. We first report on the number of iterations needed for the method to converge. On the left, Figure 2 shows a map of the number of iterations for each pE–pH pair, and on the right a histogram of the total number of iterations. Both images show that the method usually converges in less than 30 iterations (the average is 31.6 and the median is 19), but that it failed to converge in a significant number of cases, and we see from the left image that these cases correspond to the upper-right corner of the diagram, that is too large values of both pE and pH.
The diagram itself is shown on Figure 3. We see again in the upper right corner, and also on the rightmost band, that the Newton–IP method had difficulties with this range of values. However, the general shape of the computed diagram is in qualitative agreement with the expected behavior.

5.2. 2D Test Case: Example 11 of PhreeQC

5.2.1. Description of the Test Case

The following example simulates an advective transport in the presence of a cation exchanger. This example is adopted as a test case to validate our method in the two-dimensional case. Its 1D version represents the well known example 11 of PHREEQC documentation [37]. The example describes an experiment in a column whose chemical composition contains a cation exchanger.
Initially, the column contains a sodium-potassium-nitrate solution in equilibrium with the exchanger. The column is flushed along its left side with three pore volumes of a calcium chloride solution. Calcium, potassium, and sodium react to equilibrium with the exchanger at all times.
The flow and transport parameters used in this example are presented in Table 1, with some additional parameters to represent a 2D geometry. The initial and injected concentrations are listed in Table 2. The cation exchanger capacity is 1.1 m mol / L .
The chemical reactions for this example can be written as
Na + + X NaX K + + X KX
1 2 Ca 2 + + X 1 2 CaX 2
KX, NaX, and CaX2 are the complexes formed with the rock, while X indicates the ion exchange site with a charge −1. The chemical description (mass action and conservation laws) can be represented in the Morel tableau in Table 3:
Table 3. Moreal tableau for Phreeqc example.
Table 3. Moreal tableau for Phreeqc example.
Ca 2 + Na + Cl K + X log   K
CaX2100023.4576
NaX010010
KX000110.7
TotalTCaTNaTClTKW
where TCa, TNa, TCl, TK are the total aqueous concentrations and W is the total fixed concentrations (in this example W is a constant equal to 1.1 × 10 3 ).
The domain is a rectangle that initially contains a solution of potassium and sodium, with CaCl2 injected on all or part of the left boundary (the other boundary conditions are zero diffusive flux). We assume that the flow undergoes a uniform horizontal velocity.
We consider two different configurations depending on where CaCl2 is injected on the left boundary of the domain:
1D configuration: 
The injection is made on the entire left boundary of the domain, which leads to a solution that depends only on x. This allows for a quick check of the method;
2D configuration: 
The injection is made only on a part of the left boundary of the domain, which gives rise to a genuinely two-dimensional solution.

5.2.2. Numerical Results

1D Configuration

In this case, CaCl is injected along the full left boundary, so that the concentration depend only on x. This allows for a comparison with the reference solution from the PhreeqC documentation [37].
Figure 4 shows the concentrations along a horizontal line at t = 6 h .
Then, we plot on Figure 5 the elution curves (concentrations at the end of the column as a function of pore volume), so as to compare with the reference solution (cf. page 241 of the PhreeqC documentation [37]). We recall that chloride is a tracer that does not react chemically, and is only subject to transport. Its concentration is given by the well known analytical solution of Ogata and Banks [62].
The results show a good agreement with those in [37].

2D Configuration

In this second case, to show real 2D effects, we inject the solution of CaCl2 on only a part of the left boundary. We consider the same values of the concentrations at the limits, and the same initial conditions as those of the 1D configuration.
Figure 6 shows the aqueous concentration of Ca2+, Na+, Cl, and K+, obtained at time t = 6 h, while Figure 7 shows the aqueous concentration as a function of x along the middle of the domain.
The results are consistent with physical understanding. Here also chloride remains a perfect tracer whose solution curve can be compared with an analytical solution [63]. The numerical chloride results show a good agreement with this analytical solution. The behavior of the other species is similar to the 1D case, with the addition of diffusion along the vertical direction.

5.2.3. Performance of the Elimination Method

In this section we compare the methods discussed in Section 4 for solving the coupled system: the Sequential Iterative Approach and the global approach using Newton–Krylov method (NKM in what follows), that is the nonlinear elimination strategy described in Section 3.1 and Section 4.3. Our main criterion will be the number of iterations required by each method.
We apply the global and the splitting approaches to the 2D test case described in the previous section using several spatial resolutions (ranging from 80 to 2000 grid cells), see Figure 8.
Figure 8 shows the number of iterations required by each method per time-step for the first 20 time steps, as the mesh resolution is refined. The shape of the curves shows that the both methods have difficulty in converging for the first two time steps, but from the third time step (from time = 0.3 h), and for a given mesh resolution, the convergence becomes stable for almost the same number of iterations during the simulation.
Now if we compare the two methods, SIA requires at each time step more iterations than the NKM method (the nonlinear elimination strategy). This number of iterations increases with the mesh resolution for the SIA method while it remains stable and small for the NKM method.
The NKM method requires only two nonlinear iterations on average at each time step for different mesh resolution. Figure 9 shows the results for a typical time step (at t = 0.5 h). As predicted, the elimination method gives a convergence independent of the mesh size also in this 2D case (we had shown in [23] that this was the case for the 1D configuration).
Remark 2.
Here, we do not compare the CPU time, nor the number of evaluation of the objective function. Certainly the NKM method whose Jacobian* vector product is approximated by finite differences at each linear iteration requires a larger number of function evaluations. The number of evaluation of the function will be proportional to the number of the non-linear iterations for the NKM method times the number of GMRES iterations. We are currently investigating the use of an exact Jacobian times vector product, as this should drastically reduce the CPU time for a simulation.

5.3. SHPCO2 Benchmark

5.3.1. Description of the Test Case

The aim of this study is to test the capabilities of the equilibrium chemical solver to handle mineral precipitation and dissolution as well as taking into account chemical reactions in a spatially heterogeneous medium. The test case has been described in [64], and results can be found in [65]. The model is a simplified scenario for CO 2 injection assuming the gas remain immobile, so that a one-phase flow model can be used and gaseous carbon dioxide CO2(g) is considered as a fixed species.
The reservoir model is heterogeneous, with low permeability barriers designed to create a complex flow pattern At the same time, two injectors at different locations induce a complex mixing: one is upstream directly in contact with the bubble of CO2 and the second one is downstream of the CO2 bubble. At time t = 0 , supercritical CO2(g) is injected in a specific zone and is in equilibrium with the concentrations of other chemical species.

Geometry and Physical Data

In this test we consider a two dimensional rectangular domain. A detailed geometry of the domain is shown in Figure 10. The aquifer is divided into five zones, the three green rectangle zones are low permeability barriers, the orange disc zone is the injection zone of gaseous CO2 and has the same properties as the remaining bulk zone (in white).
The flow in the porous medium is computed by solving a single phase flow for the Darcy velocity where the boundary conditions are 110 bars in injector 1, 105 bars in injector 2 and 110 bars in producer as labeled in Figure 10. The other boundary conditions are no flow, an impermeable Neumann boundary conditions.
The values of the flow parameters are given in Table 4. Figure 11 shows the pressure and the velocity fields, and one can see clearly the effect of the low permeability barriers.

Chemical System

The chemical system in this test consists of eight components:
  • Five liquid primary components: water (H2O), hydrogen ion (H+), carbon dioxide dissolved in water (CO2(l)), calcium ion (Ca2+), chlorine (Cl);
  • Two secondary liquid components: hydroxide ion (OH), hydrogen carbonate (HCO3);
  • One fixed precipitated component: calcite (CaCO3);
  • One gas component: gaseous carbon dioxide (CO2(g)).
In this test, we make the assumption that the gas phase is immobile and therefore gaseous carbon dioxide CO2(g) can be considered like a fixed precipitated component, and because pressure variations are small throughout the domain, the partial pressure can be incorporated in the equilibrium constant for CO 2 dissolution.
Among the components of the system there are four chemical reactions:
  • Two aqueous equilibrium reactions:
    OH H 2 O H + HCO 3 H 2 O H + H 2 O H + + CO 2 ( l )
  • Two precipitation–dissolution reactions (taken here to be at equilibrium):
    CO 2 ( g ) CO 2 ( l ) CaCO 3 H 2 O 2 H + + CO 2 ( l ) + Ca 2 +
Chlorine Cl does not participate in chemical reactions and is used as tracer. Chemical description of the test can be represented in the Morel tableau in Table 5. The values of equilibrium constants log K are given under the condition that we use moles as units for concentration of components.

Initial State

For the transport problem, initially in the domain we have two zones with different initial values of total concentrations. The first zone is the circular area containing gaseous CO 2 (in orange on Figure 10). In the rest of the domain, concentration of CO2(g) is initially equal to zero. The initial concentrations of liquid primary components are given in Table 6

5.3.2. Numerical Results

For this preliminary study, we have ran the simulations over the relatively short period of 1900 years. For the results reported below, we could not obtain convergence of the Newton–Krylov method. Because they appear to be qualitatively reasonable, we have nevertheless decided to include them. More investigations are underway to improve the behavior of the NKM method in the presence of minerals, and to ascertain those results. One particular direction we are currently following is to improve the computation of the Jacobian matrix by vector product, by exploiting the known block structure of the matrix.

Evolution of Concentrations

Figure 12 shows the initial condition, while Figure 13, Figure 14 and Figure 15 show snapshots of the concentrations of several species (gaseous CO 2 , calcite, H+ and CL) at 302 years, 1352 years and 1852 years respectively (for a mesh with 95 × 60 grid cells).
The gas bubble disappears as CO2(g) dissolves into water. Here it appears that the dissolution time is somewhat less than 2000 years. At the same time, calcite precipitates, though the effect is quite small, and the medium becomes more acidic. Indeed, one can see that the concentration of H+ behaves somewhat differently than that of the tracer.
Variable time steps are used, as described in Table 7. The time steps are chosen so as to have a small time step at the initialization when strong variations happen and to let the time step increase when the solution varies more slowly.
The results can be compared with those reported by [65]. It appears that the dissolution of the gas is faster on our simulations. On the other hand, the evolution of H+ happens on a similar scale as that in [65]. This is also the case for Cl, as it is a tracer, and thus only subject to transport.

Comparison of the Dissolution CO2(g) on Two Different Meshes

We investigate the effect of the mesh refinement on the results. We present on Figure 16 to Figure 17 the CO2 concentrations obtained with two different meshes (a coarse mesh with 38 × 24 cells and a fine mesh with 95 × 60 cells) at two different times.
One can see the expected better resolution of the bubble (less numerical diffusion), but also that the speed of dissolution of the bubble changes as the mesh is refined. This is one possible explanation for the apparent shorter dissolution times that we observed as compared to [65].

Author Contributions

Both authors contributed equally to all parts of the work. Both authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The code and data used in the experiments can be found on https://gitlab.inria.fr/charms/pynkrt.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Zhang, F.; Yeh, G.; Parker, J. (Eds.) Groundwater Reactive Transport Models; Bentham Publishers: Sharjah, United Arab Emirates, 2012. [Google Scholar]
  2. Steefel, C.I.; Appelo, C.A.J.; Arora, B.; Jacques, D.; Kalbacher, T.; Kolditz, O.; Lagneau, V.; Lichtner, P.C.; Mayer, K.U.; Meeussen, J.C.L.; et al. Reactive transport codes for subsurface environmental simulation. Comput. Geosci. 2015, 19, 445–478. [Google Scholar] [CrossRef] [Green Version]
  3. Steefel, C.; DePaolo, D.; Lichtner, P. Reactive transport modeling: An essential tool and a new research approach for the Earth sciences. Earth Planet. Sci. Lett. 2005, 240, 539–558. [Google Scholar] [CrossRef]
  4. Yeh, G.T.; Tripathi, V.S. A critical evaluation of recent developments in hydrogeochemical transport models of reactive multichemical components. Water Resour. Res. 1989, 25, 93–108. [Google Scholar] [CrossRef]
  5. Carrayrou, J.; Mosé, R.; Behra, P. Operator-splitting procedures for reactive transport and comparison of mass balance errors. J. Contam. Hydrol. 2004, 68, 239–268. [Google Scholar] [CrossRef]
  6. Lagneau, V.; van der Lee, J. HYTEC results of the MoMas reactive transport benchmark. Comput. Geosci. 2010, 14, 435–449. [Google Scholar] [CrossRef] [Green Version]
  7. Mayer, K.U.; Frind, E.O.; Blowes, D.W. Multicomponent reactive transport modeling in variably saturated porous media using a generalized formulation for kinetically controlled reactions. Water Resour. Res. 2002, 38, 1174. [Google Scholar] [CrossRef]
  8. Samper, J.; Xu, T.; Yang, C. A sequential partly iterative approach for multicomponent reactive transport with CORE2D. Comput. Geosci. 2008, 13, 301–316. [Google Scholar] [CrossRef] [Green Version]
  9. Yeh, G.T.; Tripathi, V.S. A Model for Simulating Transport of Reactive Multispecies Components: Model Development and Demonstration. Water Resour. Res. 1991, 27, 3075–3094. [Google Scholar] [CrossRef]
  10. Su, D.; Mayer, K.U.; MacQuarrie, K.T.B. MIN3P-HPC: A High-Performance Unstructured Grid Code for Subsurface Flow and Reactive Transport Simulation. Math. Geosci. 2020. [Google Scholar] [CrossRef]
  11. Xu, T.; Sonnenthal, E.; Spycher, N.; Pruess, K. TOUGHREACT—A simulation program for non-isothermal multiphase reactive geochemical transport in variably saturated geologic media: Applications to geothermal injectivity and CO2 geological sequestration. Comput. Geosci. 2006, 32, 145–165. [Google Scholar] [CrossRef]
  12. Yapparova, A.; Gabellone, T.; Whitaker, F.; Kulik, D.A.; Matthäi, S.K. Reactive Transport Modelling of Dolomitisation Using the New CSMP++GEM Coupled Code: Governing Equations, Solution Method and Benchmarking Results. Transp. Porous Med. 2017, 117, 385–413. [Google Scholar] [CrossRef] [Green Version]
  13. Fan, Y.; Durlofsky, L.J.; Tchelepi, H.A. A fully-coupled flow-reactive-transport formulation based on element conservation, with application to CO2 storage simulations. Adv. Water Resour. 2012, 42, 47–61. [Google Scholar] [CrossRef]
  14. Ahusborde, E.; El Ossmani, M.; Moulay, M.I. A fully implicit finite volume scheme for single phase flow with reactive transport in porous media. Math. Comput. Simul. 2019, 164, 3–23. [Google Scholar] [CrossRef]
  15. Hoffmann, J.; Kräutle, S.; Knabner, P. A parallel global-implicit 2-D solver for reactive transport problems in porous media based on a reduction scheme and its application to the MoMaS benchmark problem. Comput. Geosci. 2009, 14, 421–433. [Google Scholar] [CrossRef]
  16. Kräutle, S.; Knabner, P. A new numerical reduction scheme for fully coupled multicomponent transport-reaction problems in porous media. Water Resour. Res. 2005, 41. [Google Scholar] [CrossRef] [Green Version]
  17. Kräutle, S.; Knabner, P. A reduction scheme for coupled multicomponent transport-reaction problems in porous media: Generalization to problems with heterogeneous equilibrium reactions. Water Resour. Res. 2007, 43. [Google Scholar] [CrossRef]
  18. de Dieuleveult, C.; Erhel, J.; Kern, M. A global strategy for solving reactive transport equations. J. Comput. Phys. 2009, 228, 6395–6410. [Google Scholar] [CrossRef]
  19. De Dieuleveult, C.; Erhel, J. A global approach to reactive transport: Application to the MoMas benchmark. Comput. Geosci. 2010, 14, 451–464. [Google Scholar] [CrossRef] [Green Version]
  20. Erhel, J.; Sabit, S. Analysis of a Global Reactive Transport Model and Results for the MoMaS Benchmark. Math. Comput. Simul. 2017, 137, 286–298. [Google Scholar] [CrossRef] [Green Version]
  21. Erhel, J.; Sabit, S.; de Dieuleveult, C. Solving Partial Differential Algebraic Equations and Reactive Transport Models. In Developments in Parallel, Distributed, Grid and Cloud Computing for Engineering; Topping, B.H.V., Ivànyi, P., Eds.; Computational Science, Engineering and Technology Series; Saxe Coburg Publications: London, UK, 2013; pp. 151–169. [Google Scholar]
  22. Amir, L.; Kern, M. A global method for coupling transport with chemistry in heterogeneous porous media. Comput. Geosci. 2010, 14, 465–481. [Google Scholar] [CrossRef] [Green Version]
  23. Amir, L.; Kern, M. Preconditioning a Coupled Model for Reactive Transport in Porous Media. Int. J. Numer. Anal. Model. 2019, 16, 18–48. [Google Scholar]
  24. Knoll, D.A.; Keyes, D.E. Jacobian-free Newton-Krylov methods: A survey of approaches and applications. J. Comput. Phys. 2004, 193, 357–397. [Google Scholar] [CrossRef] [Green Version]
  25. Hammond, G.E.; Valocchi, A.; Lichtner, P. Application of Jacobian-free Newton–Krylov with physics-based preconditioning to biogeochemical transport. Adv. Water Resour. 2005, 28, 359–376. [Google Scholar] [CrossRef]
  26. Carr, E.; Turner, I.; Perré, P. A variable-stepsize Jacobian-free exponential integrator for simulating transport in heterogeneous porous media: Application to wood drying. J. Comput. Phys. 2013, 233, 66–82. [Google Scholar] [CrossRef]
  27. Guo, L.; Huang, H.; Gaston, D.R.; Permann, C.J.; Andrs, D.; Redden, G.D.; Lu, C.; Fox, D.T.; Fujita, Y. A parallel, fully coupled, fully implicit solution to reactive transport in porous media using the preconditioned Jacobian-Free Newton-Krylov Method. Adv. Water Resour. 2013, 53, 101–108. [Google Scholar] [CrossRef]
  28. Kräutle, S. The semismooth Newton method for multicomponent reactive transport with minerals. Adv. Water Resour. 2011, 34, 137–151. [Google Scholar] [CrossRef]
  29. Buchholzer, H.; Kanzow, C.; Knabner, P.; Kräutle, S. The semismooth Newton method for the solution of reactive transport problems including mineral precipitation-dissolution reactions. Comput. Optim. Appl. 2011, 50, 193–221. [Google Scholar] [CrossRef] [Green Version]
  30. Kräutle, S. Existence of global solutions of multicomponent reactive transport problems with mass action kinetics in porous media. J. Appl. Anal. Comput. 2011, 1, 497–515. [Google Scholar]
  31. El-Bakry, A.S.; Tapia, R.A.; Tsuchiya, T.; Zhang, Y. On the formulation and theory of the Newton interior-point method for nonlinear programming. J. Optim. Theory Appl. 1996, 89, 507–541. [Google Scholar] [CrossRef]
  32. Leal, A.M.M.; Kulik, D.A.; Smith, W.R.; Saar, M.O. An overview of computational methods for chemical equilibrium and kinetic calculations for geochemical and reactive transport modeling. Pure Appl. Chem. 2017, 89, 597–643. [Google Scholar] [CrossRef]
  33. Saaf, F.E. A Study of Reactive Transport Phenomena in Porous Media. Ph.D. Thesis, Rice University, Houston, TX, USA, 1997. [Google Scholar]
  34. Arbogast, T.; Bryant, S.; Dawson, C.; Saaf, F.; Wang, C.; Wheeler, M. Computational methods for multiphase flow and reactive transport problems arising in subsurface contaminant remediation. J. Comput. Appl. Math. 1996, 74, 19–32. [Google Scholar] [CrossRef] [Green Version]
  35. Lopez, S.; Masson, R.; Beaude, L.; Birgle, N.; Brenner, K.; Kern, M.; Smaï, F.; Xing, F. Geothermal Modeling in Complex Geological Systems with the ComPASS Code. In Stanford Geothermal Workshop 2018—43rd Workshop on Geothermal Reservoir Engineering; Stanford University: Stanford, CA, USA, 2018. [Google Scholar]
  36. Eymard, R.; Guichard, C.; Herbin, R. Small-stencil 3D schemes for diffusive flows in porous media. ESAIM Math. Model. Numer. Anal. 2012, 46, 265–290. [Google Scholar] [CrossRef] [Green Version]
  37. Parkhurst, D.L.; Appelo, C. User’s Guide to PHREEQC (Version 2)—A Computer Program for Speciation, Batch-Reaction, One-Dimensional Transport, and Inverse Geochemical Calculations; Technical Report 99-4259; USGS: Reston, VA, USA, 1999. [Google Scholar]
  38. Appelo, C.A.J.; Postma, D. Geochemistry, Groundwater and Pollution, 2nd ed.; CRC Press: Boca Raton, FL, USA, 2005. [Google Scholar]
  39. Rubin, J. Transport of reacting Solutes in Porous Media: Relation Between Mathematical Nature of Problem Formulation and Chemical Nature of reactions. Water Resour. Res. 1983, 19, 1231–1252. [Google Scholar] [CrossRef]
  40. Bear, J.; Cheng, A.H.D. Modeling Groundwater Flow and Contaminant Transport; Theory and Applications of Transport in Porous Media; Springer: Berlin/Heidelberg, Germany, 2010; Volume 23. [Google Scholar]
  41. Saaltink, M.; Ayora, C.; Carrera, J. A Mathematical Formulation for Reactive Transport that Eliminates Mineral Concentrations. Water Resour. Res. 1998, 34, 1649–1656. [Google Scholar] [CrossRef]
  42. Fahs, M.; Carrayrou, J.; Younes, A.; Ackerer, P. On the efficiency of the direct substitution approach for reactive transport problems in porous media. Water Air Soil Pollut. 2008, 193, 299–308. [Google Scholar] [CrossRef]
  43. Saaltink, M.; Carrera, J.; Ayora, C. On the behavior of approaches to simulate reactive transport. J. Contam. Hydrol. 2001, 48, 213–235. [Google Scholar] [CrossRef]
  44. Kanney, J.F.; Miller, C.T.; Kelley, C.T. Convergence of Iterative Split Operator Approaches for Approximating Nonlinear Reactive Transport Problems. Adv. Water Resour. 2003, 26, 247–261. [Google Scholar] [CrossRef] [Green Version]
  45. Saaltink, M.; Carrera, J.; Ayora, C. A Comparison of Two Approaches for Reactive Transport Modelling. J. Geochem. Explor. 2000, 69–70, 97–101. [Google Scholar] [CrossRef]
  46. Kelley, C.T. Iterative Methods for Linear and Nonlinear Equations; With Separately Available Software, Frontiers in Applied Mathematics; SIAM: Philadelphia, PA, USA, 1995; Volume 16, pp. 154–165. [Google Scholar]
  47. Saad, Y.; Schultz, M.H. GMRES: A generalized minimal residual algorithm for solving nonsymmetric linear systems. SIAM J. Sci. Stat. Comput. 1986, 7, 856–869. [Google Scholar] [CrossRef] [Green Version]
  48. Hoffmann, J.; Kräutle, S.; Knabner, P. A general reduction scheme for reactive transport in porous media. Comput. Geosci. 2012, 16, 1081–1099. [Google Scholar] [CrossRef]
  49. Marinoni, M.; Carrayrou, J.; Lucas, Y.; Ackerer, P. Thermodynamic Equilibrium Solutions Through a Modified Newton Raphson Method. AIChE J. 2016, 63, 1246–1262. [Google Scholar] [CrossRef]
  50. Wolery, T.; Jarek, R.L. Software User’s Manual; EQ3/6, Version 8.0; Sandia National Laboratories: Albuquerque, Bernalillo, 2003. [Google Scholar]
  51. Facchinei, F.; Pang, J.S. Finite-Dimensional Variational Inequalities and Complementarity Problems; Springer Series in Operations Research; Springer: New York, NY, USA, 2003; Volume I, pp. 34, 624, I69. [Google Scholar]
  52. Facchinei, F.; Pang, J.S. Finite-Dimensional Variational Inequalities and Complementarity Problems; Springer Series in Operations Research; Springer: New York, NY, USA, 2003; Volume II, pp. 1–34, 625–1234, II1–II57. [Google Scholar]
  53. Bethke, C.M. Geochemical and Biogeochemical Reaction Modeling, 2nd ed.; Cambridge University Press: Cambridge, UK, 2008. [Google Scholar]
  54. Carrayrou, J. Looking for some reference solutions for the reactive transport benchmark of MoMaS with SPECY. Comput. Geosci. 2010. [Google Scholar] [CrossRef]
  55. Leal, A.M.; Blunt, M.J.; LaForce, T.C. Efficient chemical equilibrium calculations for geochemical speciation and reactive transport modelling. Geochim. Cosmochim. Acta 2014, 131, 301–322. [Google Scholar] [CrossRef] [Green Version]
  56. Eymard, R.; Guichard, C.; Herbin, R.; Masson, R. Vertex centred discretization of two-phase Darcy flows on general meshes. In Congrès National de Mathématiques Appliquées et Industrielles; ESAIM Proc.; EDP Sciences: Les Ulis, France, 2011; Volume 35, pp. 59–78. [Google Scholar] [CrossRef]
  57. Eymard, R.; Guichard, C.; Herbin, R.; Masson, R. Vertex-centred discretization of multiphase compositional Darcy flows on general meshes. Comput. Geosci. 2012, 16, 987–1005. [Google Scholar] [CrossRef] [Green Version]
  58. Dalissier, E.; Guichard, C.; Havé, P.; Masson, R.; Yang, C. ComPASS: A tool for distributed parallel finite volume discretizations on general unstructured polyhedral meshes. In CEMRACS 2012; ESAIM Proc.; EDP Sciences: Les Ulis, France, 2013; Volume 43, pp. 147–163. [Google Scholar] [CrossRef]
  59. Golub, G.H.; van Loan, C.F. Matrix Computations, 4th ed.; Johns Hopkins University Press: Baltimore, MD, USA, 2013. [Google Scholar]
  60. Brookins, D.G. Eh-pH Diagrams for Geochemistry; Springer: Berlin/Heidelberg, Germany, 1988. [Google Scholar]
  61. Carrayrou, J. Modélisation du Transport de Solutes Réactifs en Milieu Poreux Saturé. Thèse de Doctorat, Université Louis Pasteur, Strasbourg, France, 2001. [Google Scholar]
  62. Ogata, A.; Banks, R.B. A Solution of the Differential Equation of Longitudinal Dispersion in Porous Media; Technical Report Prof. Pap., 411-A; USGS: Reston, VA, USA, 1961. [Google Scholar]
  63. Feike, L.; Dane, J.H. Analytical solution of the one dimensional advection equation equation and two- or tree-dimentional dispersion equation. Water Ressources Res. 1990, 26, 1475–1482. [Google Scholar]
  64. Haeberlein, F. Time Space Domain Decomposition Methods for Reactive Transport—Application to CO2 Geological Storage. Thèse de Doctorat, Université Paris 13, Paris, France, 2011. [Google Scholar]
  65. Ahusborde, E.; El Ossmani, E. A sequential approach for numerical simulation of two-phase multicomponent flow with reactive transport in porous media. Math. Comput. Simul. 2017, 137, 71–89. [Google Scholar] [CrossRef]
Figure 1. Triangular submesh for a cell K.
Figure 1. Triangular submesh for a cell K.
Water 13 00370 g001
Figure 2. Number of iterations for the iron precipitation example. (Left) map as a function of pH and pE, (Right) histogram of iteration number.
Figure 2. Number of iterations for the iron precipitation example. (Left) map as a function of pH and pE, (Right) histogram of iteration number.
Water 13 00370 g002
Figure 3. pH–pE diagram (Pourbaix diagram) for iron. In each region, the dominant species is shown.
Figure 3. pH–pE diagram (Pourbaix diagram) for iron. In each region, the dominant species is shown.
Water 13 00370 g003
Figure 4. Total aqueous concentrations for y = 0.0075, at t = 6 h.
Figure 4. Total aqueous concentrations for y = 0.0075, at t = 6 h.
Water 13 00370 g004
Figure 5. Evolution of concentrations at the end of the column.
Figure 5. Evolution of concentrations at the end of the column.
Water 13 00370 g005
Figure 6. Total aqueous concentrations at t = 6 h.
Figure 6. Total aqueous concentrations at t = 6 h.
Water 13 00370 g006
Figure 7. Total aqueous concentrations for y = 0.0075 m , at t = 6 h.
Figure 7. Total aqueous concentrations for y = 0.0075 m , at t = 6 h.
Water 13 00370 g007
Figure 8. Number of iterations per time-step for the first 20 time-steps for the various solution methods.
Figure 8. Number of iterations per time-step for the first 20 time-steps for the various solution methods.
Water 13 00370 g008
Figure 9. Number of Iterations as a function of the mesh size for the various solution methods at t = 0.5 h.
Figure 9. Number of Iterations as a function of the mesh size for the various solution methods at t = 0.5 h.
Water 13 00370 g009
Figure 10. Geometry of domain for the SHPCO2 Benchmark.
Figure 10. Geometry of domain for the SHPCO2 Benchmark.
Water 13 00370 g010
Figure 11. Pressure and velocity for the SHPCO2 model.
Figure 11. Pressure and velocity for the SHPCO2 model.
Water 13 00370 g011
Figure 12. Concentrations of the gas CO2(g), the calcite CaCO3, H+ and the tracer Cl at t = 0 year.
Figure 12. Concentrations of the gas CO2(g), the calcite CaCO3, H+ and the tracer Cl at t = 0 year.
Water 13 00370 g012
Figure 13. Concentrations of the gas CO2(g), the calcite CaCO3, H+ and the tracer Cl at t = 302 year.
Figure 13. Concentrations of the gas CO2(g), the calcite CaCO3, H+ and the tracer Cl at t = 302 year.
Water 13 00370 g013
Figure 14. Concentrations of the gas CO2(g), the calcite CaCO3, H+ and the tracer Cl at t = 1352 year.
Figure 14. Concentrations of the gas CO2(g), the calcite CaCO3, H+ and the tracer Cl at t = 1352 year.
Water 13 00370 g014
Figure 15. Concentrations of the gas CO2(g), the calcite CaCO3, H+ and the tracer Cl at t = 1852 year.
Figure 15. Concentrations of the gas CO2(g), the calcite CaCO3, H+ and the tracer Cl at t = 1852 year.
Water 13 00370 g015
Figure 16. CO2(g), at t = 302 y (left image: coarse mesh, right image: fine mesh).
Figure 16. CO2(g), at t = 302 y (left image: coarse mesh, right image: fine mesh).
Water 13 00370 g016
Figure 17. CO2(g), at t = 800 y (left image: coarse mesh, right image: fine mesh).
Figure 17. CO2(g), at t = 800 y (left image: coarse mesh, right image: fine mesh).
Water 13 00370 g017
Table 1. Physical parameters.
Table 1. Physical parameters.
ParameterValue
Darcy Velocity ( m / s ) 2.78 × 10 6
Diffusion coeff ( m 2 / s ) 5.56 × 10 9
Domain dimensions ( m )0.1 × 0.015
Mesh size ( m )0.002 × 0.0015
Time duration (day)1
Table 2. Initial and injected aqueous concentrations ( m mol ).
Table 2. Initial and injected aqueous concentrations ( m mol ).
Comp. C init C inflow
Ca2+0 0.6 × 10 3
Cl0 1.2 × 10 3
K+ 2 × 10 4 0
Na+ 1 × 10 3 0
Table 4. Flow parameters.
Table 4. Flow parameters.
ConstantsBulkBarriers
Permeability K [ m 2 / Pa s ] 10 10 10 12
Diffusion coefficient D [ m / s 2 ] 10 9 10 9
Porosity ϕ 0.20.2
Table 5. Morel table for SHPCO2 system
Table 5. Morel table for SHPCO2 system
H 2 OH + CO 2 (l)Ca 2 + Cl log   K
OH1 1 000 13.2354
HCO31 1 100 6.22
CO2(g)00100 0.2226
CaCO31 2 110 7.7454
Total T H 2 O T H + T CO 2 ( l ) T Ca 2 + T Cl
Table 6. Initial total concentrations for the SHPCO2 Benchmark.
Table 6. Initial total concentrations for the SHPCO2 Benchmark.
Components T init , out of bubble [mol/L] T init , in bubble [mol/L]
H2O 77.19 77.21
H+ 43.36 43.38
CO2(l) 21.68 24.37
Ca2+ 21.72 21.73
Cl01
Table 7. Values for variable time step simulation.
Table 7. Values for variable time step simulation.
Start Time (Year)End Time (Year)Timestep (Year)
020.1
2201
2040010
400121050
12101900100
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Amir, L.; Kern, M. Jacobian Free Methods for Coupling Transport with Chemistry in Heterogenous Porous Media. Water 2021, 13, 370. https://doi.org/10.3390/w13030370

AMA Style

Amir L, Kern M. Jacobian Free Methods for Coupling Transport with Chemistry in Heterogenous Porous Media. Water. 2021; 13(3):370. https://doi.org/10.3390/w13030370

Chicago/Turabian Style

Amir, Laila, and Michel Kern. 2021. "Jacobian Free Methods for Coupling Transport with Chemistry in Heterogenous Porous Media" Water 13, no. 3: 370. https://doi.org/10.3390/w13030370

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop