Escolar Documentos
Profissional Documentos
Cultura Documentos
3/9/2011
Lawrence D. Cloutman
adastera47@yahoo.com
Abstract
The rate equations of chemical kinetics are a system of nonlinear ordinary differ-
ential equations. Explicit numerical integration methods tend to have restrictive time
step limitations, so there is an incentive to use implicit methods with better stability
properties. However, the non-linear character of these equations makes numerical so-
lution challenging. We present a method of linearizing the difference equations in the
advanced-time terms that will provide improved numerical performance over explicit
methods while remaining numerically tractable. The applications include regular chem-
ical reaction networks, nuclear chemistry networks, and the Lotka-Volterra equations
of theoretical ecology.
2011
c by Lawrence D. Cloutman. All rights reserved.
1
1 Introduction
The equations of chemical kinetics are a system of nonlinear ordinary differential equations.
In many combustion applications, these rate equations are incorporated into the multicompo-
nent partial differential equations of fluid dynamics. In that case, the rate equations typically
are operator-split from the fluid equations and solved as a system of ordinary differential
equations.
Many methods have been used to solve the rate equations. Explicit integration meth-
ods tend to have restrictive time step limitations, so there is an incentive to use implicit
methods with better stability properties. However, the non-linear character of these equa-
tions makes numerical solution challenging. We present a method of linearizing the difference
equations in the advanced-time terms that will provide improved numerical performance over
explicit methods while remaining numerically tractable. The method described here is a spe-
cialization of a commonly used approach described in Appendix A [1]. This report documents
its implementation into an updated version of an existing program [2].
The proposed method is not limited to combustion research. It is applicable to any
system of coupled nonlinear ordinary differential equations. Other applications include non-
combustion chemical reaction networks, nuclear chemistry networks (including astrophysical
applications), and the Lotka-Volterra equations of theoretical ecology [3].
In Section 2, we describe the governing equations and the constitutive relations used
in combustion research. Section 3 details the rate expressions for chemical reaction networks.
Section 4 defines and describes some of the simple and commonly used methods for solving
the rate equations, plus a discussion of some of their numerical properties. Section 5 describes
the linearized implicit algorithm for integrating the rate equations. Sections 6 and 7 present
some numerical examples, plus the analytic solution for a single-reaction example. Section
8 contains the summary and conclusions. There are two appendixes providing additional
details on selected topics. All units are CGS and the temperature T is in K unless otherwise
noted.
2
2 Governing Equations
To solve reactive flow problems, we assume the fluid is a mixture of species described by
the single-velocity (mass weighted) representation. The equations outlined in this section
have been incorporated into an updated version of the COYOTE computer program [2] to
produce the numerical results presented here.
Mass conservation is expressed by the continuity equation for each species α:
∂ρα
+ ∇ · (ρα u) = −∇ · Jα + Rα , (1)
∂t
where ρα is the density of species α, t is time, u is the velocity, and Rα is the rate at which
species α is created by chemical reactions. The “exact” diffusional mass flux is given by an
extremely complicated expression [4, 5, 6]. A clear summary of the mass transport equations
and an efficient numerical algorithm for solving them are given by Ramshaw [7, 8] and by
Ramshaw and Chang [9]. Equation (1) may be summed over species to obtain the total
continuity equation
∂ρ
+ ∇ · (ρu) = 0. (2)
∂t
The momentum equation is
∂(ρu)
+ ∇ · (ρuu) = ρg − ∇P + ∇ · T, (3)
∂t
where g is the gravitational acceleration, P is the pressure, and T is the stress tensor
2
T = µ ∇u + (∇u)T − ∇ · u U + µb ∇ · u U, (4)
3
where U is the unit tensor, µ is the coefficient of viscosity, and µb is the bulk viscosity.
We can express energy conservation in terms of the specific thermal internal energy
I:
∂(ρI) X
+ ∇ · (ρIu) = −P ∇ · u + T : ∇u − ∇ · q + Hα Rα , (5)
∂t α
where q is the diffusional heat flux, and Hα is the heat of formation of species α (per unit
mass). The heat flux is a complicated function, and for many applications it is adequate to
use the sum of Fourier’s law and enthalpy diffusion:
X
q = −K∇T + hα Jα , (6)
α
3
For a constant g, Φ = −g · x, where x is the position vector.
The thermal equation of state is the sum of partial pressures for each species:
X Rρα T
P = , (8)
α Mα
where R is the universal gas constant, and Mα is the molecular weight of species α.
The caloric equation of state is
X
ρI = ρα Iα (T ), (9)
α
where Iα is the species specific thermal internal energy. In the present application, we assume
RT
Iα = Cvα T = , (10)
(γα − 1)Mα
4
3 Chemical Reaction Networks
Chemical reactions are symbolized by
X X
aαr Ξα *
) bαr Ξα , (11)
α α
where Ξα represents one mole of species α, and aαr and bαr are the dimensionless stoichio-
metric coefficients for the rth reaction. It is assumed that aαr and bαr are integers. The
chemical source term in the species continuity equation is given by
X
Rα = Mα (bαr − aαr )ω̇r , (12)
r
where ξα is the third body efficiency (or chaperon coefficient) for species α (normally unity
unless otherwise specified). An example of such a reaction is 2 H + M * ) H2 + M, where M
represents all of the species in the mixture. The parameter ζr is zero or unity depending on
whether M occurs in the reaction.
5
4 Some Commonly-Used Numerical Methods
The chemical reaction terms are usually time-split from the rest of the fluid dynamics equa-
tions so the numerical chemistry problem reduces to a system of ordinary differential equa-
tions in each computational zone on each time step. We shall consider several simple methods
for numerically integrating the system of ordinary differential equations
dx
= f(x, t) (18)
dt
for the solution vector x.
The simplest algorithm is the first-order Euler’s method, the fully explicit method for
advancing from time ti−1 to ti ,
where δt = ti − ti−1 and the subscript i denotes the value of the function at time ti .
Next consider the fully implicit first-order method
6
4.1 Application to a Single Model Equation
It is instructive to consider a simple example that illustrates the strength and weakness of
each of these methods. The purpose is to provide insight into useful methods for solving
realistic combustion problems. Following chapter 5 of Ramshaw [13], we shall consider the
equation
dx
= Kxm (m ≥ 1). (24)
dt
The analytic solution for m = 1 is
For m > 1,
h i1/(1−m)
x(t) = x(0)1−m + (1 − m)Kt . (26)
We shall examine five different methods for numerically integrating equation (24)
with m = 1 and m = 2, which are important special cases for combustion chemistry and
nucleosynthesis. Consider first the fully explicit method for advancing from time ti−1 to ti ,
xi = xi−1 + K δt xm
i−1 , (27)
where δt = ti − ti−1 . If K > 0, the numerical solution grows exponentially. 1 However, for
K < 0 the numerical method can produce a negative solution if the time step is too large.
Physically this is nonsense if x represents a molar concentration or species density, which
must be non-negative.
Next consider the fully implicit method
xi = xi−1 + K δt xm
i . (28)
7
For the limit of vanishing δt to make sense, we must choose the minus sign regardless of
the sign of K. For K < 0, the solution decays and stays positive for all values of δt, as
it should. However, for K > 0 and sufficiently large δt, the argument of the square root
becomes negative.
Now we shall consider some second-order methods. First, the Crank-Nicholson scheme,
equation (21), is
K δt m
xi = xi−1 + xi−1 + xmi . (31)
2
For m = 1,
xi−1 (1 + 0.5 K δt)
xi = . (32)
1 − 0.5 K δt
Regardless of the sign of K, the solution will alternate its sign from one time step to the next
if δt exceeds twice the explicit limit. The same thing happens for the diffusion equation in
spite of a formal stability analysis showing that the method is unconditionally stable. That
is, the solution remains bounded, but it is bounded garbage. For m = 2, the Crank-Nicholson
method has qualitatively the same issues as the fully implicit method.
Next we consider the two-step Runge-Kutta scheme based on the midpoint rule,
equation (22).
K δt m
x∗i = xi−1 + xi−1
2
xi = xi−1 + K δt (x∗i )m . (33)
and
h i
xi = xi−1 1 + 2αxi−1 + 4(αxi−1 )2 + 2(αxi−1 )3 (m = 2), (35)
• For K > 0, both solutions solution grow along with δt, just as they should.
• For K < 0 and m = 1, the method is only conditionally stable (in the sense of
maintaining xi ≥ 0). The polynomial in α has a minimum at α = −0.5 (that is,
δt = −1/K). Physically, we expect xi to decrease more on each time step as δt is
increased. This fails to happen for α < −0.5 (remember that α becomes more negative
with increasing δt if K < 0).
• Things are even worse for m = 2 and K < 0: The polynomial has two extrema (at
α = −1/3 and −1) and begins to behave badly for αxi−1 < −1/3.
8
Finally we consider the Runge-Kutta scheme based on the trapezoidal rule, equation (23).
x∗i = xi−1 + K δt xm
i−1
K δt h m i
xi = xi−1 + xi−1 + (x∗i )m . (36)
2
The combined equations are
xi = xi−1 1 + 2α + 2α2 (m = 1) (37)
and
h i
xi = xi−1 1 + 2αxi−1 + 4(αxi−1 )2 + 4(αxi−1 )3 (m = 2). (38)
The behavior is qualitatively the same as for the previous method. For m = 1, the two
Runge-Kutta methods are identical. For m = 2, the polynomial factor goes negative for
αxi−1 less than about 0.75.
The method of most interest for this report is linear in the advanced time variables.
For the case m > 1, it is obtained by by approximating the fully implicit equation (27) with
m−1
xm m
i ≈ mxi xi−1 − (m − 1)xi−1 . The solution may be written as
m−1
1 − 2(m − 1) α xi−1
xi = xi−1 m−1 . (39)
1 − 2 m α xi−1
m−1
The method fails if αmxi−1 > 0.5. All seems well for negative values of α. However, as
m−1
αxi−1 approaches −∞, the ratio xi /xi−1 saturates at a value of (m − 1)/m rather than
zero. This means that while the method may be stable for very large time steps, transient
solutions may be quite inaccurate.
m−1
A second method of linearization is xm
i ≈ xi xi−1 . The solution may be written as
xi−1
xi = m−1 . (40)
1 − 2αxi−1
While this method has the correct limit for large δt, it is not obvious how to apply it to a
term such as xi yi , where x and y are the molar concentrations of two different species.
There are two main lessons from this discussion. First, implicitness is not always the
solution to numerical stability issues. Second, numerical stability does not imply accuracy.
Indeed, explicit stability limits often play the additional role of accuracy conditions. We note
that there is another, more subtle failure mode for nonlinear difference equations, which is
described in Appendix B.
9
5 Linearized Implicit Chemistry Algorithm
The species continuity equation (1) is solved in COYOTE by operator splitting. That is,
the advection, diffusion, and chemical terms are computed independently. The chemistry
problem involves the reactions
X X
aαr Ξα *
) bαr Ξα . (41)
α α
where there are N species and 1 ≤ α ≤ N. The algebraic product operations are over
chemical products and reactants in an obvious notation. For elementary reactions, a0αr = aαr
and b0αr = bαr . The parameter ζr is zero unless the reaction involves species that do not
change during the reaction (typically denoted by M in reactions such as H2 + M * )2H+
M), in which case it is unity. The energy released per mole of reaction is
X
Qr = (aαr − bαr )Hα Mα , (43)
α
10
in time level n + 1 quantities. If we assume Cαn+1 = Cαn + δCα , then for a product of Np
species,
Np my Np my Np
Y Y X δC y
Cyn+1 ≈ Cyn 1 + my n , (45)
y=1 y=1 y=1 Cy
2
where my are constants, usually positive integers. Note that linearization is equivalent to
that used in equation (39).
The rate equations are discretized fully implicitly in the species densities, but explic-
itly in temperature:
!a0yr !b0yr
1 δρα X Y ρn+1
y
Y ρn+1
y
= n
(bαr − aαr ) kf r (T ) − kbr (T ) n C ζr .
M
Mα δt r y(r)=react
My y(r)=prod
My
(46)
Next we use equation (45) to linearize the equations and to produce a linear system in the
δρα . Since the total molar concentration of the mixture will change little during the time
step, we compute CM at time n:
N
X ρnα
CM = ξα , (47)
α=1 Mα
where the ξα are the third body efficiencies (also called the chaperon coefficients). Rewriting
equation (46) in terms of concentrations,
δCα X Y a0yr Y b0yr
= (bαr − aαr ) kf r (T n ) Cyn+1 − kbr (T n ) Cyn+1 C ζr . (48)
M
δt r y(r)=react y(r)=prod
Y b0yr X δC
y
−kbr (T n ) Cyn b0yr n
y(r)=prod
Cy y
X Y a0yr Y b0yr
ζr
= δt CM (bαr − aαr ) kf r (T n ) Cyn − kbr (T n ) Cyn . (49)
r y(r)=react y(r)=prod
2
Occasionally one encounters rate expressions that involve non-integer powers. Those cases are generally
in simplified global rate expressions (for example, [14]), and they can be handled using the above linear
expansion in the δρα . However, those will not be considered explicitly here.
11
is redundant and need not be included in the linear system. However, should we ever
encounter conditions where the matrix is ill-conditioned, we might want to try replacing one
of the species equations with this one.
12
6 Example 1: A Single Elementary Chemical Reaction
Consider the single two-body elementary reaction H2 + O2 * ) 2 OH. The rate equations
(r = 1) are
dρH2 h i
= RH2 = −MH2 kf 1 CH2 CO2 − kb1 COH 2
, (51)
dt
dρO2 MO2
= RO2 = RH2 , (52)
dt MH2
and
dρOH
= ROH = −RH2 − RO2 . (53)
dt
To simplify the notation, let us assign k = 1, 2, and 3 for H2 , O2 , and OH, respectively.
Then we may rewrite our three rate equations as
dC1 h i
= − kf 1 C1 C2 − kb1 C32 , (54)
dt
dC2 h i
= − kf 1 C1 C2 − kb1 C32 , (55)
dt
and
dC3 h i
= 2 kf 1 C1 C2 − kb1 C32 . (56)
dt
13
The constants B0 , B1 , and B2 may be evaluated from the initial conditions.
Equation (60) may be solved by using the following integrals. If B12 > 4B0 B2 , then
Z 1/2
dx 1
2B2 x + B1 − (B12 − 4B0 B2 )
= 1/2
ln 1/2
. (61)
B2 x2 + B1 x + B0 (B12 − 4B0 B2 ) 2B2 x + B1 + (B12 − 4B0 B2 )
14
6.2 Numerical Solutions
We create a partially implicit model that is linear in the advanced-time quantities by intro-
ducing the approximation (45):
h in+1/2 h i
kf 1 C1 C2 − kb1 C32 = kf 1 [C1n C2n + C2n δC1 + C1n δC2 ] − kb1 (C3n )2 + 2 C3n δC3 .
(70)
The rate equations (49) may be written as
δC1
+ kf 1 (C2n δC1 + C1n δC2 ) − 2 kb1 C3n δC3 = − kf 1 C1n C2n + kb1 (C3n )2 , (71)
δt
δC2
+ kf 1 (C2n δC1 + C1n δC2 ) − 2 kb1 C3n δC3 = − kf 1 C1n C2n + kb1 (C3n )2 , (72)
δt
and
δC3
− 2 kf 1 (C2n δC1 + C1n δC2 ) + 4 kb1 C3n δC3 = 2 kf 1 C1n C2n − 2 kb1 (C3n )2 . (73)
δt
6.2.1 Case 1
The first case is calculated using three species and the one reaction with kf 1 = 1.0 × 1012
and kb1 = 1.0 × 1010 . The initial molar concentrations are C1 (0) = C2 (0) = 2.04361 × 10−5
and C3 (0) = 1.20161 × 10−8 mol/cm3 . The molecular weights are MO2 = 31.9988, MH2 =
2.01588, and MOH = 17.00734.
15
8.28624D-01 analytic
Species Mass Fractions, ncyc = 2000 t = 1.000000D-06
1.56861D-01 9.88203D-03 8.33257D-01 Euler
1.56863D-01 9.88213D-03 8.33255D-01 midpoint RK
1.56864D-01 9.88223D-03 8.33254D-01 linearized
8.33255D-01 analytic
This problem was solved for δt = 0.5 ns using three methods: the first-order explicit Eu-
ler’s method, the second-order midpoint Runge-Kutta method, and the first-order linearized
implicit method. The analytic solution is also shown in Table 1. All three methods agree
with one another and with the analytic solution. To further demonstrate grid-independence
of the solution, the calculation was repeated with the time step cut in half. The results are
shown in Table 2.
We see that the agreement is even better. The solution at late times should approach the
equilibrium condition,
kb C1 C2
KC = = . (74)
kf C32
16
Indeed, the solution is converging toward the correct equilibrium value C3 (t) = 0.833333.
Next we try solutions at three larger time steps. The first solution uses δt = 5.0 ns
and is shown in Table 3.
Although accuracy is slightly degraded, it is still acceptable for most purposes for all three
methods.
17
Species Mass Fractions, ncyc = 400 t = 2.000000D-05
1.56789D-01 9.87750D-03 8.33333D-01 Euler
1.56789D-01 9.87750D-03 8.33333D-01 midpoint RK
1.56789D-01 9.87750D-03 8.33333D-01 linearized
Increasing the time step another factor of 10 produces a poor transient, as shown in the
results on cycle 1. The worst method is Euler, which produces negative mass fractions of O2
and H2 on the first cycle. However, all three methods converge to the correct equilibrium.
+++++ Table 5. Increase delt by 1000 (500 ns) +++++
Species Mass Fractions, ncyc = 1 t = 5.000000D-07
-8.66921D+00-5.46148D-01 1.02154D+01 Euler
1.09750D+01 6.91408D-01-1.06664D+01 midpoint RK
4.92171D-01 3.10061D-02 4.76823D-01 linearized
8.28644D-01 analytic
Increasing the time step to 500 ns finally shows failure of both the Euler method and the
Runge-Kutta method. Both produce large negative concentrations on cycle 1, and things get
worse as the calculation proceeds. The Runge-Kutta method fails catastrophically, producing
a NaN on cycle 4. Even though the linearized implicit method is stable, the transient has
substantial truncation errors.
These results are a reminder that a stable solution is not necessarily an accurate
solution. The linearized implicit model has excellent stability properties, but it should
include a time step control that prevents any concentration or the temperature from changing
too much on any one time step.
6.2.2 Case 2
Case 1 was about the simplest case possible, and next we wanted to try something a bit more
challenging. Case 2 differs from Case 1 in having different initial concentrations plus a fourth
inert species (argon, MAr = 39.948). The initial concentrations are C1 (0) = 1.60529 ×10−5,
C2 (0) = 2.40161 × 10−5, C3 (0) = 9.43882 × 10−9, and C4 (0) = 1.20554 × 10−8. In addition,
this time we included the heats of formation so we could track the evolution of temperature.
The initial temperature was 1500 K. The results for δt = 0.5 ns are summarized in Table 6.
18
Table 6. Numerical Solution for Case 2
Species Mass Fractions, ncyc = 0 t = 0.000000D+00
1 2 3 4 T
9.12825D-01 8.60336D-02 2.85269D-04 8.55806D-04 1.50000D+03 t=0.0
All three numerical methods agree quite well and with the analytic solution. All three
seem to be converging to the correct equilibrium OH mass fraction, 0.909598. Note that
this reaction is strongly endothermic and would be quenched if we had used the physical
temperature dependence of the rates instead of the same constant rates used in Case 1.
The behavior of the three methods is the same as for Case 1 as we vary the time step.
Again, the linearized implicit method lets us run with the largest time step. Table 7 is a
short summary of results for δt = 5.0 × 10−7 s.
19
Table 7. Numerical Solution for Case 2
Species Mass Fractions, ncyc = 1 t = 5.000000D-07
3.91721D-01 5.32048D-02 5.54218D-01 8.55806D-04 7.72349D+02 linearized
Species Mass Fractions, ncyc = 1000 t = 5.000000D-04
5.74031D-02 3.21432D-02 9.09598D-01 8.55806D-04 2.40613D+02
The results for cycle 1 of Table 7 are at the same time as cycle 1000 in Table 6. There is a
big difference between the two solutions. Although accuracy of the transient is poor for the
larger time step, the solution is converging to the correct equilibrium by cycle 1000.
20
7 A 21-Species Example
In this section, we consider a more complex kinetics mechanism. It uses 21 species and
30 reactions. Ar, H2 O2 , C2 H2 , and CH2 O are treated as inert. No hydrocarbon fuels are
included in the initial conditions so the chemistry is mainly that of oxygen and hydrogen,
minus any H2 O2 chemistry. The initial conditions are P = 1.013 × 106 dynes/cm2 , ρ =
1.25029×10−4 g/cm3 , and T = 1700 K. Table 8 lists the molecular weights, heats of formation,
and equilibrium constants for the 21 species. Table 9 is a list of the forward rate constants
for the 30 reactions.
Table 10 is a summary of computational results. It shows temperatures and species
mass fractions at 10 µs for two numerical methods and three values of δt (2.5, 5.0, and
20.0 ns). The second-order Runge-Kutta method is denoted by “midpoint RK,” and the
first-order linearized implicit method is denoted by “linearized.”
Consider first the inert species Ar, H2 O2 , C2 H2 , and CH2 O. Only Ar is inert in the
sense of not normally being chemically reactive. However, the other 3 species are not included
in any of the chemical reactions in this mechanism (except all species are included in the
chemical symbol M). Therefore the mass fractions of this set of species should be constant
in time. This is true for all four inert species for both numerical methods and for all three
time steps.
Next consider the reactive hydrocarbon species CH4 , C2 H4 , and C3 H8 . Both the
initial mass fractions and the reverse rates of their global oxidation reactions were set to
zero. The mass fractions remained zero for the Runge-Kutta integration for all three time
steps. For the linearized method, the mass fractions are all tiny negative numbers. These
are due to rounding errors in the linear-system solver. 4 The worst case is a mass fraction of
−1.0 × 10−24 for methane. This represents roughly one methane molecule in a mole of fluid,
which is physically insignificant. These small negative numbers are merely a minor cosmetic
issue, as long as they stay small.
For the 0.25 ns time step, the two numerical methods agree to about one part in 104
for all species except N, where the difference is about 1 percent. This is a trace species, so
the agreement between the two methods suggests that this solution is time-step-independent
for all practical purposes.
For the Runge-Kutta method, doubling the time step to 5.0 ns makes a little differ-
ence, and the agreement is still mostly at the 1 part in 104 level. The exceptions are N and
CHO. The N mass fraction is still fairly accurate, but that of CHO now is in error by about
30 percent. For the first-order linearized implicit method, the worst discrepancy between
4
All calculations were done in double precision (real*8).
21
the two time steps is about one percent in the mass fractions. This includes N, and there is
almost no change in CHO. Note also that the predicted temperatures for the four solutions
discussed so far agree to within 5 K.
Next the time step was increased by a factor of 4 to 20.0 ns. The Runge-Kutta
solution is now totally unacceptable. The mass fraction of OH is -0.1. OH is a key radical
for the combustion of all hydrocarbons, and such a large negative mass fraction renders
the solution physically meaningless. On the other hand, the linearized implicit method
is still well-behaved. The only negative mass fractions are the tiny rounding errors for
methane, ethylene, and propane. With few exceptions, the truncation errors are on the
order of 3 percent. The mass fraction of N has decreased almost 10 percent for N with the
Runge-Kutta method, but has increased by almost the amount with the first-order linearized
implicit method. N2 O and CHO are significantly more accurate for the first order method.
The second-order mass fraction of CHO is off by 3 orders of magnitude (possibly influenced
by the massive error in OH). The final temperatures increased by 45 K for the Runge-Kutta
solution, but only by 18 K for the first-order method.
In closing, we make the following observation: The formal order of accuracy for
a numerical method says little about its accuracy. Even for the largest time step that
produced a large negative mass fraction of OH, the Runge-Kutta method kept on running.
It was not unstable in the sense of the solution becoming unbounded, but the solution is
physically unrealistic. The first-order method seems to be less prone to producing negative
mass fractions, and its accuracy at large time steps for species such as CHO may be related
to its ability to keep fast reactions in near-equilibrium under conditions that would cause
stability problems with explicit methods.
22
Table 8. Species Thermodynamic Parameters
Species Mα Hα Aα bα Eα
1 CH4 1.604296D+01 -1.59921128D+01 1.51456D-06 0.00000D+00 -2.19712D+04
2 O2 3.199880D+01 0.00000000D+00 1.00000D+00 0.00000D+00 0.00000D+00
3 N2 2.801348D+01 0.00000000D+00 1.00000D+00 0.00000D+00 0.00000D+00
4 CO2 4.401000D+01 -9.39653441D+01 1.12780D+01 -2.86036D-01 -9.37359D+04
5 H2O 1.801528D+01 -5.71034894D+01 2.03999D-02 -3.56445D-01 -5.86397D+04
6 H 1.007940D+00 5.16336042D+01 1.61801D+01 5.14866D-01 5.21438D+04
7 H2 2.015880D+00 0.00000000D+00 1.00000D+00 0.00000D+00 0.00000D+00
8 O 1.599940D+01 5.89842256D+01 2.64100D+02 2.86036D-01 5.98602D+04
9 N 1.400674D+01 1.12528680D+02 1.27475D+02 3.69647D-01 1.13213D+05
10 OH 1.700734D+01 9.17543021D+00 2.46399D+01 -1.80423D-01 9.48250D+03
11 CO 2.801060D+01 -2.72000478D+01 4.27854D+07 -8.75711D-01 -2.49755D+04
12 NO 3.000614D+01 2.14567399D+01 4.60300D+00 0.00000D+00 2.16200D+04
13 Ar 3.994800D+01 0.00000000D+00 1.00000D+00 0.00000D+00 0.00000D+00
14 C2H4 2.805416D+01 1.45760038D+01 3.81096D-04 -2.50832D-01 9.41822D+03
15 C3H8 4.409712D+01 -1.94400000D+01 8.86700D-15 -5.90400D-01 -2.76300D+04
16 HO2 3.300674D+01 1.19646271D+00 3.74583D-03 -3.08039D-02 -3.35439D+02
17 H2O2 3.401468D+01 -3.10248565D+01 2.07494D-05 -3.34443D-01 -3.28504D+04
18 N2O 4.401288D+01 2.04304493D+01 1.44700D+00 -3.75100D-01 3.42000D+04
19 C2H2 2.603828D+01 5.63467973D+01 5.35000D+02 0.00000D+00 5.30100D+04
20 CH2O 3.002648D+01 -2.67822657D+01 9.05000D-03 0.00000D+00 -3.03700D+04
21 HCO 2.901854D+01 1.03133365D+01 1.41000D+02 0.00000D+00 8.67800D+03
23
Table 9. Chemical Mechanism
No. Reaction Aj bj Ej /R (K) Ref.
1. O2 + H *) O + OH 2.00 × 1014 0.0 8.4551 × 103 [15]
2. *
H2 + O ) H + OH 1.80 × 1010 1.0 4.4416 × 103 [15]
3. H2 + OH *) H2 O + H 1.17 × 109 1.3 1.8245 × 103 [15]
4. *
2 OH ) H2 O + O 6.04 × 108 1.3 2.766 × 101 [15]
5. H + HO2 *) 2 OH 1.5 × 1014 0.0 5.0514 × 102 [15]
6. H + OH + M * ) H2 O + M 2.20 × 1022 -2.0 0.0 [15]
7. *
2 H + M ) H2 + M 1.80 × 1018 -1.0 0.0 [15]
8. 2O+M* ) O2 + M 6.17 × 1015 -0.5 0.0 [15]
9. H+O+M* ) OH + M 6.20 × 1016 -0.6 0.0 [15]
10. H + O2 + M *) HO2 + M 2.30 × 1018 -0.8 0.0 [15]
11. CO + OH * ) CO2 + H 1.5 × 107 1.3 −3.855 × 102 [16]
12. CO + O2 *) CO2 + O 2.53 × 1012 0.0 2.40036 × 104 [16]
13.1 CO + O + M * ) CO2 + M 1.35 × 1024 -2.79 2.1085 × 103 [16]
14.2 C2 H4 + O2 → 2 CO + 2 H2 1.6 × 1013 0.0 1.5 × 104
15.3 N2 + M *)2N+M 3.70 × 1021 -1.6 1.132 × 105 [17]
16. O + N2 *) NO + N 1.80 × 1014 0.0 3.8368 × 104 [18]
17. O2 + N *) NO + O 6.40 × 109 1.0 3.1512 × 103 [18]
18. OH + N * ) NO + H 3.0 × 1013 0.0 0.0 [18]
19.4 N2 O + M *) N2 + O + M 9.13 × 1014 0.0 2.9036 × 104 [18]
20. *
N2 O + O ) 2 NO 1.0 × 1014 0.0 1.409 × 104 [16]
21. N2 O + O *
) N2 + O2 1.0 × 1014 0.0 1.409 × 104 [16]
22. *
N2 O + H ) N2 + OH 2.53 × 1010 0.0 2.2897 × 103 [16]
23. N2 O + H *
) N2 + OH (pt. 2) 2.23 × 1014 0.0 8.4541 × 103 [16]
24.5 CH4 + O2 → CO + 2 H2 + O 3.00 × 1013 0.0 1.500 × 104
25.6 C3 H8 + O2 → CH4 + 2 CO + 2 H2 2.30 × 1013 0.0 1.5000 × 104
26. CO + H2 *) CHO + H 1.30 × 1015 0.0 4.52811 × 104
27. CO + H2 O *) CHO + OH 2.80 × 1015 0.0 5.28186 × 104
28. CO + HO2 * ) CHO + O2 6.70 × 1012 0.0 1.62451 × 104
29. CO + H + M * ) CHO + M 1.14 × 1015 0.0 1.20031 × 103
30. *
N2 O + OH ) N2 + HO2 2.00 × 1012 0.0 1.05978 × 104
kf = Aj T bj exp(−Ej /RT ), units are cm, mol, kJ, and K (R = 8.31451 × 10−3 ).
1
Third body efficiencies: CO2 = 3.8, H2 O = 12.0, H2 = 2.5, CO = 1.9.
2
[C2 H4 ]0.75 [O2 ]
3
Third body efficiency: N = 4.5.
4
Third body efficiencies: Ar = 0.63, H2 O = 7.5.
5
[CH4 ]0.75 [O2 ]
6
[C3 H8 ]0.75 [O2 ]
24
Table 10. Computational Results
I. midpoint RK, delt = 5.0 ns, t = 1.0d-05 s
II. linearized, delt = 5.0 ns, t = 1.0d-05 s
III. midpoint RK, delt = 20.0 ns, t = 1.0d-05 s
IV. linearized, delt = 20.0 ns, t = 1.0d-05 s
t=0.0 I II III IV
T 1700.00 2626.01 2630.48 2670.88 2644.24
1 CH4 0.00000D+00 0.00000D+00 -2.57215D-25 0.00000D+00 -5.94794D-27
2 O2 8.88883D-01 3.98839D-01 3.98666D-01 4.89061D-01 3.98173D-01
3 N2 5.55552D-02 5.55468D-02 5.55466D-02 5.55461D-02 5.55459D-02
4 CO2 5.55552D-07 4.03041D-06 4.03260D-06 4.40560D-06 4.03894D-06
5 H2O 0.00000D+00 3.25715D-01 3.25834D-01 3.85957D-01 3.26219D-01
6 H 0.00000D+00 5.34054D-03 5.32067D-03 1.15954D-02 5.26139D-03
7 H2 5.55552D-02 7.24030D-03 7.23372D-03 4.57965D-03 7.21293D-03
8 O 0.00000D+00 9.70924D-02 9.69506D-02 8.40667D-02 9.65125D-02
9 N 0.00000D+00 5.38798D-08 5.50073D-08 4.81938D-08 5.83956D-08
10 OH 0.00000D+00 1.10073D-01 1.10295D-01 -9.97724D-02 1.10918D-01
11 CO 5.55552D-06 3.34388D-06 3.34249D-06 3.01279D-06 3.33846D-06
12 NO 0.00000D+00 1.37526D-05 1.41937D-05 1.46528D-05 1.55501D-05
13 Ar 5.55552D-08 5.55552D-08 5.55552D-08 5.55552D-08 5.55552D-08
14 C2H4 0.00000D+00 0.00000D+00 -2.13198D-43 0.00000D+00 -5.32357D-44
15 C3H8 0.00000D+00 0.00000D+00 -2.13198D-43 0.00000D+00 -5.32357D-44
16 HO2 0.00000D+00 1.29181D-04 1.29623D-04 6.89413D-02 1.30979D-04
17 H2O2 0.00000D+00 0.00000D+00 0.00000D+00 0.00000D+00 0.00000D+00
18 N2O 0.00000D+00 2.97237D-06 3.00210D-06 3.51539D-06 3.09155D-06
19 C2H2 0.00000D+00 0.00000D+00 0.00000D+00 0.00000D+00 0.00000D+00
20 CH2O 0.00000D+00 0.00000D+00 0.00000D+00 0.00000D+00 0.00000D+00
21 CHO 0.00000D+00 3.61787D-11 2.77373D-11 9.56537D-08 2.74183D-11
++++++++++++++++++++++++++++++++++++++++++++++++++
delt = 2.5 ns midpoint RK linearized
T 2625.98 2628.21
1 CH4 0.00000D+00 -1.01578D-24
2 O2 3.98834D-01 3.98748D-01
3 N2 5.55468D-02 5.55467D-02
4 CO2 4.03037D-06 4.03147D-06
5 H2O 3.25710D-01 3.25770D-01
6 H 5.34040D-03 5.33053D-03
7 H2 7.24041D-03 7.23713D-03
8 O 9.70932D-02 9.70229D-02
9 N 5.39062D-08 5.44638D-08
10 OH 1.10082D-01 1.10191D-01
11 CO 3.34391D-06 3.34321D-06
12 NO 1.37618D-05 1.39800D-05
13 Ar 5.55552D-08 5.55552D-08
14 C2H4 0.00000D+00 -4.26482D-43
15 C3H8 0.00000D+00 -4.26482D-43
16 HO2 1.29190D-04 1.29408D-04
17 H2O2 0.00000D+00 0.00000D+00
18 N2O 2.97287D-06 2.98762D-06
19 C2H2 0.00000D+00 0.00000D+00
20 CH2O 0.00000D+00 0.00000D+00
21 CHO 2.78450D-11 2.77909D-11
25
8 Summary and Conclusions
We investigated a first-order method for integrating the rate equations for chemical kinetics.
It is based on an implicit method that is linear in advanced-time quantities. It is compu-
tationally less work than the fully implicit method. The amount of computational effort is
approximately the same as for one iteration of the fully implicit method when solved by the
standard Newton-Raphson method. When compared with the Euler method and a second-
order Runge-Kutta method base on the mid-point rule, the linearized-implicit method has
improved accuracy and stability properties at larger time steps.
Work is in progress to see if this translates into being able to simulate combustion in
simple burners more quickly and with more accuracy than is possible with the explicit meth-
ods. At the time of this writing, a detailed two-dimensional simulation of a laminar Bunsen
burner flame is in progress that couples the full fluid dynamics equations with the skeletal
mechanism for methane combustion and NOx production given in Table 1 of Glarborg, et
al. [19]. This mechanism has 27 species and 77 reactions. I supplemented the reaction set
with 9 additional reactions to aid in thermal ignition. So far the linearized implicit method
is performing well. The midpoint Runge-Kutta method was numerically unstable for δt of
20 ns, but the linearized implicit method is stable at 200 ns.
In addition, a one-dimensional laminar H2 -air flame has been simulated with the GRI
3.0 mechanism for methane combustion [20], which includes 53 species and 325 reactions.
There is excellent agreement between the linearized implicit method and Runge-Kutta when
run with a time step for which the Runge-Kutta method performed well. Further numerical
experimentation will be needed to find the limits of accuracy and stability in this method.
A task for future code development will be to extend this linearly implicit method
to second order by using the linearly implicit algorithm in both the predictor and corrector
steps of the midpoint-rule Runge-Kutta method.
26
References
[1] F. X. Timmes, “Integration of nuclear reaction networks for stellar hydrodynamics,”
Ap. J. Suppl. 124, 241 (1999).
[2] L. D. Cloutman, 1990, “COYOTE: A Computer Program for 2D Reactive Flow Simu-
lations,” Lawrence Livermore National Laboratory report UCRL-ID-103611, 1990.
[4] L. H. Aller and S. Chapman, “Diffusion in the sun,” Ap. J. 132, 461 (1960).
[10] J.-L. Tassoul, Theory of Rotating Stars, (Princeton U. Press, Princeton, 1978).
[12] G. R. Caughlin and W. A. Fowler, “Thermonuclear reaction rates V,” At. Data Nucl.
Data Tables 40, 284 (1988).
[14] C. K. Westbrook and F. L. Dryer, “Simplified reaction mechanisms for the oxidation of
hydrocarbon fuels in flames,” Combustion Sci. Tech. 27, 31 (1981).
27
[15] C. J. Montgomery, G. Kosály, and J. J. Riley, “Direct numerical simulation of turbulent
reacting flow using a reduced hydrogen-oxygen mechanism,” Comb. Flame 95, 247
(1993).
[16] M. T. Allen, R. A. Yetter, and F. L. Dryer, “High pressure studies of moist carbon
monoxide/nitrous oxide kinetics,” Combust. Flame 109, 449 (1997).
[17] C. Park, “Assessment of a two-temperature kinetic model for dissociating and weakly
ionizing nitrogen,” J. Thermophysics 2, 8 (1988).
[21] L. D. Cloutman, “A Note on the Stability and Accuracy of Finite Difference Approx-
imations to Differential Equations,” Lawrence Livermore National Laboratory report
UCRL-ID-125549, 1996.
28
A Fully Implicit Chemistry Algorithm
Timmes [1] outlines three implicit methods for integrating nuclear reaction networks. The
simplest one is equivalent to the method outlined in Section 5, although he describes it in
slightly different language. Following Timmes, we consider the system of equations
ẏ = f(y). (75)
where δt is the time step. If we let ∆ = yn+1 − yn , then equation (77) may be rearranged to
(U − δt J) · ∆ = δt f(yn ), (78)
where U is the unit matrix. This linear system may be solved for ∆ using any standard
linear system solver, and then yn+1 may be computed.
A fully implicit method may be similarly derived. Define a function g(y(ν) ) such that
The last equality provides the basis for an iterative solution method for yn+1 . Unfortunately,
evaluation of G(ν+1) = ∂g/∂y(ν+1) is as expensive as evaluating J. However, it is likely that
the iterations will converge if G(ν+1) is held fixed after being initialized on the first iteration.
29
B The Logistic Equation: A Warning
The logistic equation is the basis of a crude but popular and useful model of population
dynamics [3]. If N is the population, then the hypothesis is that it obeys the logistic
equation
dN KL − N
= AL N − BL N 2 = AL N , (81)
dt KL
where KL = AL /BL is the carrying capacity of the environment. The first term on the right
hand side represents the familiar exponential growth of the population via constant difference
between birth and mortality rates. The nonlinear term is a simple ad hoc representation of
an increase in mortality or decrease in fertility due to crowding.
The logistic equation has a very simple general solution. At first glance this equation
appears to have two free parameters, but it can be reduced to a dimensionless equation that
has a self-similar solution with no parameters. Let us make the linear changes of variables
N = N/KL and τ = AL t. Then equation (81) becomes
dN
= N − N 2. (82)
dτ
We assume that the value of N (0) is given. Equation (82) is easily solved by separation of
variables:
N (0)
N (τ ) = . (83)
N (0) + [1 − N (0)] exp(−τ )
There are two equilibrium solutions, N = 0 and 1.
The equilibrium solution N (τ ) = 1 is stable. If the solution is perturbed such that
N (τ ) > 1, the solution decays monotonically to unity. If the equilibrium is perturbed by
decreasing the population, N grows monotonically back to unity.
The equilibrium solution N = 0 is unstable. For a positive perturbation, the solution
follows equation (83) to unity as τ increases. For a negative perturbation, the formal solution
diverges to −∞ in a finite time. A negative perturbation is not realizable physically.
The ecologically interesting case is 0 < N (0) < 1. In this case, the solution rises
monotonically to unity at late times. The solution does not overshoot the carrying capacity.
The nature of the solution is independent of the parameters A and B. These parameters
determine the carrying capacity and the time scale for population growth, but not the shape
of the curve of N versus t.
We note that populations obeying equation (81) do not exhibit chaos. Ordinary
differential equations that are local in the independent variable and have no external forcing
terms must be of at least third order to have chaotic solutions.
30
B.1 Chaos and Instability in Finite Difference Equations
Even though we have the analytic solution to the logistic equation, it is instructive to consider
numerical solutions. This introduces the issue of numerical stability of the methods used.
The stability of finite difference approximations to linear differential equations has been well
studied. In the case of nonlinear differential equations, they are sometimes linearized and a
stability analysis performed on the linearized equations. Then one assumes the results apply
as well to the full nonlinear system. However, the stability conditions so derived are only
necessary conditions for numerical stability. In this appendix, we show that the nonlinearities
introduce an additional complication into the stability question.
The simplest explicit finite difference approximation to equation (82) is
Nj+1 − Nj
= Nj − Nj2 , (84)
δτ
where δτ is the dimensionless time step. It is easy to show that this approximation is
consistent. This equation may be rearranged to obtain
This equation is just the familiar one-parameter logistic map with the parameter value
A = (1 + δτ ). Note that M has the value δτ /(1 + δτ ) for the nontrivial equilibrium solution
N = 1.
The behavior of this map for various values of A has been thoroughly studied. Assume
we begin the iterations with 0 < M0 < δτ /(1 + δτ ).
3. For A between two and three, Nj overshoots unity, then converges to unity, oscillating
about it on alternate cycles.
4. For A between 3 and 3.44, the solution eventually settles into a limit cycle with period
2.
5. For A between 3.44 and 3.57, the solution undergoes a sequence of period doublings.
31
7. For A greater than 4, the solution diverges to −∞.
When using the approximation equation (84) to solve numerically equation (82), the
first possibility, A < 1, is not physically meaningful. The second is the range of A that
produces meaningful approximations to equation (83), although accuracy decreases as A
increases. Possibilities 3 through 6 represent bounded solutions to equation (84) that are
qualitatively different than the solution to equation (82). The final possibility represents a
traditional numerical instability.
Other ways of differencing the logistic equation show similar types of behavior, al-
though the details can differ considerably. Each particular difference approximation has its
own behavior, but typically there are a region of stability for small time steps, then oscilla-
tory and periodic solutions, chaotic solutions, and eventually solutions that become infinite.
In particular, it is noteworthy that the two second-order Runge-Kutta methods discussed in
previous sections can converge to the wrong steady state value for a limited range of time
steps [21].
So what does all this have to do with combustion simulations? Simple: the finite
difference equations for combustion simulations, with or without coupling with fluid dynam-
ics, are simply very complicated nonlinear iterated maps with δt as a free parameter. The
present result suggests that we should not be surprised to see the same progression of solution
types in combustion simulations as in the logistic map: smooth solutions, various oscillatory
solutions, chaotic solutions, and finally instability as δt is increased. This behavior has in
fact been observed [21].
32