system of implicit time stepping equations. We introduce a simple time stepping strategy to handle non-convergence of
either iteration method for these equations. We will use a superscript n to designate quantities at the nth time step.
The implicit Euler method for advancing the model by time interval Dt leads to a system of algebraic equations for
the model variables at the n þ 1th time level: T
n þ 1
k
¹ D t
X
2 k
9 ¼ 1
V
k ,
k 9
t
n þ 1
AC
n þ 1
k 9
¼ T
n k
þ D tV
k ,
t
n þ 1
T
n þ 1
in
ð 19Þ
T
n þ 1
k
¹ AC
n þ 1
k
¹ P
n þ 1
k
b ¼ 20
g
l
C
n þ 1
k
¼ 0 for l ¼ 1
, 2
, 3
21 g
4
C
n þ 1
1 ,
k
, C
n þ 1
2 ,
k
, P
n þ 1
k
¼ 0:
22 For two cells, there are 20 unknowns in these equations: the
column vector
1
of length 6 T
n þ 1
1
, T
n þ 1
2 t
, the vector of length 12
C
n þ 1
1
, C
n þ 1
2 t
and the vector of length 2 P
n þ 1
1
, P
n þ 1
2 t
.Introducing coefficients q
k ,
k 9
¼ D tV
k ,
k 9
t
n þ 1
, 23
we can see from eqn 20 that X
2 k
9 ¼ 1
q
k ,
k 9
T
n þ 1
k 9
¹ X
2 k
9 ¼ 1
q
k ,
k 9
AC
n þ 1
k 9
¼ X
2 k
9 ¼ 1
q
k ,
k 9
P
n þ 1
k 9
b ,
24 which can be substituted into eqn 19 to eliminate
AC
n þ 1
k
. The resulting equation is 1 ¹ q
k ,
k
ÿ T
n þ 1
k
¹ q
k ,
¯k
T
n þ 1
¯k
þ q
k ,
k
P
n þ 1
k
b þ q
k ,
¯k
P
n þ 1
¯k
b ¼ T
n k
þ q
k ,
T
n þ 1
in
ð 25Þ
for k ¼ 1, 2 and ¯k ¼ 1 þ k
mod 2. If there were no solid phase in either cell, i.e. P
n þ 1
k
¼ for k ¼ 1, 2, then from eqn 25 we can see that the system
decouples into six linear equations for T
n þ 1
k
, that are satisfied independently of C
n þ 1
k
, and that eqns 20 and 21 determine
C
n þ 1
1
, C
n þ 1
2
. This is a particular instance of a more general decoupling that occurs in the
absence of dissolutionprecipitation reactions noted by Rubin
13
and reviewed in Engesgaard and Kipp.
5
The application of Newton’s method to these 20 equa- tions is well defined and familiar. We refer to this fully
coupled approach as global linearization.
3.1 SIA
Sequential iterative approaches are based on splitting the equations and unknowns into overlapping subsets guided
by different modeling features. Iterations for solving the model equations based on SIA can take a variety of
forms, depending on the formulation of the model equations and identification of the operator splitting.
As is typical, we identify one subset as the six linear mass balance equation, eqn 25, for k ¼ 1, 2 and the six
unknowns T
n þ 1
k
to describe the physical transport sub- system. We identify the 14 algebraic equations, eqns
20–22, and unknowns C
n þ 1
k
and P
n þ 1
k
as the second subset determining the chemical subsystem for each cell.
Let T
n þ 1
, j
k
, C
n þ 1
, j
k
, P
n þ 1
, j
k
be the iteration estimates for T
n þ 1
k
, etc., at the end of the jth SIA iterative step, j ¼ 1, 2,
… , which is the jth outer iteration of SIA. It is expected
that the iterates will converge to a solution of the implicit time stepping equations. Each outer iteration proceeds in
stages based on the splitting used. In our case, there are two stages which we have ordered so that the first predicts
the total concentrations, T
n þ 1
, j
k
, at the advanced time in each cell using
1 ¹ q
k ,
k
ÿ T
n þ 1
, j
k
¹ q
k ,
¯k
T
n þ 1
, j
¯k
¼ T
n k
¹ q
k ,
k
P
n þ 1
, j ¹
1 k
b þ q
k ,
¯k
P
n þ 1
, j ¹
1 ¯k
b þ q
k ,
AC
n þ 1
in
ð 26Þ
for k ¼ 1, 2 and ¯k ¼ 1 þ k
mod 2. The first step of this stage requires an initial estimate for P
n þ 1
, k
, which we take as P
n k
. In the second stage of an outer iteration, we solve for each
cell the non-linear system of seven equations: AC
n þ 1
, j
k
þ P
n þ 1
, j
k
b ¼ T
n þ 1
, j
k
27 g
l
C
n þ 1
, j
k
¼ 0 for l ¼ 1
, 2
, 3
28 g
4
C
n þ 1
, j
1 ,
k
, C
n þ 1
, j
2 ,
k
, P
n þ 1
, j
k
¼ 0:
29 These equations are solved on a cell by cell basis by
Newton’s method; the iterations of these methods comprise the inner iterations of SIA. They require initial estimates
which are taken to be C
n þ 1
, j ¹
1 k
, P
n þ 1
, j ¹
1 k
if j . 1, or C
n k
, P
n k
for j ¼ 1. The second stage computes the equi- librium distribution for C
ð 9n þ 1
, j
k
, P
n þ 1
, j
k
of these totals in each cell.
Note that if no solid phase is present in either cell at the n
th time level so that P
n þ 1
, k
¼ 0, and none appears in
solving the second stage equations of the first SIA iteration so that P
n þ 1
, 1
k
¼ 0, then the SIA iteration will terminate.
3.2 Convergencedivergence of iterations and time step size selection
In general, for implicit time stepping methods there are three types of limitation on the choice of time step:
CL 1 the existence of physically meaningful solutions.
CL 2 the convergence of iterative methods for solving
the equations to a physically meaningful solution. CL 3
control of the error between the computed time stepping result and the solution of the continuous
time DAE solution.
1
Recalling that T
n þ 1
k
is a vector of length 3, for k ¼ 1, 2.
Effects of chemical reactions on iterative methods 337
The convergence limitation CL 2 is of primary interest in this study. In Appendix A, we show that, at least for the case
of a single cell, or equivalently, direct flow through from the first cell to the second via v
1
t ¼ v t, we can establish that
eqns 19–22 have a solution with physically meaningful values for any size of time step. So, we believe that limitation
CL 1 is not an issue for the equations of this model. Concern- ing limitation CL 3, in our test computations in Section 4, we
basically use step sizes that are as large as possible for the modeling assumptions. More precisely, using eqn 6, we can
see that
lq
1,1
l ¼ l ¹ v
1
tDth
1
l is the ratio of the time step required to completely flush out cell 1 at volume flow rate
v
1
t, essentially a Courant number. Similarly, lq
2,2
l ¼ lq
2,1
l is the ratio of Dt to the flush through time for cell 2. We can only
expect the model to make sense if we keep these ratios below 1, which is a limitation on the maximum time step. In our
demonstration computations of Section 4, we limit Dt
max
by limiting these ratios to be no greater than 0.5.
We use the same criteria for the convergence of Newton’s method and for the choice of time step size in both the
global linearization and the SIA methods. A Newton itera- tion is regarded as converged when all components of two
successive iterations agree to six significant figures within 12 iterations; otherwise, an iteration is regarded as diverging.
If the required iterations do converge for a time step of size Dt
, the next attempted time step is set to min1.5Dt, Dt
max
. If they do not converge, the step size is reduced by a factor
of 13 and the step repeated. This is a simple, relatively unaggressive time stepping strategy see Ref.
3
for a more sophisticated strategy.
In the implementations of Newton’s method, exact Jacobians were used with no special efficiency in creating
or factoring the Jacobian matrix employed, i.e. whether for solving the equilibrium equations in one cell or globally, the
Jacobian matrix was created and factored as a dense matrix for each iteration.
4 DEMONSTRATION COMPUTATIONS 4.1 Test cases
There are two forms of interactions between the various chemical species which play a key role in the performance
of the methods we are studying for solving the implicit time stepping equations, eqns 19–22. One is the presence
absence of mineral calcite and the other is the transitions between the state in which one dissolved carbonate species
is dominant over another. The correspondence between the dominant carbonate species and pH range has been dis-
cussed by Stumm and Morgan.
18
The influence of solution pH on calcite dissolutionprecipitation has been reported
in the modeling studies of Marzal et al.
10
We will show that both computational strategies exhibit difficulties
during the transitions between dominant carbonate species regimes, but the global linearization method is insensitive
to the saturation state, while SIA is strongly affected by it. We have investigated a variety of cases, but have selected
three test cases which illustrate these interactions. We first describe these cases qualitatively. In the first two cases,
under the control of a steady inflow of basic solution, each cell passes from acidic to basic and, consequently,
each carbonate species dominates in turn; the second cell follows the first in wave-like fashion. The dominant car-
bonate species can be seen in the concentration histories of Fig. 2, for Case 1. Each cell shows periods of relatively
slow change of pH within these regimes, separated by short transition intervals in which the pH and the distribution of
carbonate species vary rapidly. The H
þ
ion concentration starts at 10
¹ 3
mol l
¹ 1
i.e. pH 3 in each cell and dissolved H
2
CO
3
is initially the dominant carbonate species. How- ever, in cell 1, the pH rises to between 5 and 7 in the interval
200 , t , 600 s and HCO
¹ 3
becomes dominant. This pat- tern occurs in cell 2 for 600 , t , 1100 s. In cell 1, the pH
then takes another rise to pH . 10 for t . 700 s and CO
2 ¹ 3
dominates at about 10
¹ 4
M and HCO
¹ 3
drops to about 10
¹ 5
M. The same pattern occurs in cell 2 at t . 1300 s. The time scales of these observations are determined by the
physical transport, i.e. the volumetric flow rates and cell sizes
Fig. 2. Profiles of H
þ
and aqueous carbonate species showing transitions between dominant carbonate species: Case 1.
338 G. J. S. Leeming et al.
arbitrarily set to about 1 l. All our concentrations will sub- sequently be given in mol l
¹ 1
and all times in seconds. For Case 1 that we just described, the cell solutions
remain undersaturated with respect to calcite throughout. Case 2 has essentially the same history for the carbonate
species; however, as the CO
2 ¹ 3
concentration rises in which cell, the solution becomes saturated and a period of preci-
pitation of solid CaCO
3
occurs, followed by its dissolution, in each cell. Fig. 3 shows this episode of precipitation occur-
ring for 600 , t , 1700 s in cell 1 and occurring for 1200 , t , 2600 s in cell 2.
The first two cases illustrate the cells progressing through the transitions in the dominant dissolved carbonate species
with and without precipitation. The third case demonstrates changes in the saturation state in a basic solution with no
transitions in the dominant carbonate species. The concentra- tion histories for Case 3 are shown in Fig. 4. Initially, there is
no calcite in either cell. The inflow of Ca
2þ
is varied so that two episodes of precipitation and complete dissolution occur
in each cell at slightly staggered intervals. While this is per- haps not a realistic scenario, it provides a computational con-
trol case for distinguishing between the effects of transitions in dominant carbonate species and the effect of dissolution
precipitation on the methods for solving the implicit time stepping equations.
4.2 Details of the demonstration cases