Professional Documents
Culture Documents
WILLIAM D. C. MOEBS
Department of Physics, Purdue Fort Wayne,
Fort Wayne, Indiana 46805
Communicated by S. Azen
ABSTRACT
INTRODUCTION
Suppose a system of chemicals C,(i= 1, . ..,N) reacts according to the
stoichiometric equations
(1)
a=l,...l-,
where the a, and bi, are the stoichiometric coefficients for the reactants and
products, respectively, the Roman subscripts denote chemical species, and
the Greek subscripts denote chemical reactions, which are r in number. The
chemical concentrations [ Ci] obey the differential equations
F= ~ek,[Cjl”“[C~l”“...[C,]x”i=l,...,N, (2)
where the k, are rate constants, the x, are constants, often equal to the a,,
the summation is over all reactions for which Ci is a reactant or product, 17,
is -a, if Ci is a reactant, and rl, is + bia if Ci is a product. Since the
concentration is proportional to the number of molecules Ni, [C;.] can be
6 American Elsevier Publishing Company, Inc., 1974
114 W. MOEBS
(3)
Equations (2) or (3) can be integrated in closed form for some simple
systems [l]. For complicated systems numerical methods must be used to
solve the rate equations [2].
It is the purpose of this article to describe a Monte Carlo technique [3]
which can be used to solve the rate equations for the time development of
the [C,] or Ni. This technique uses the digital computer to generate chemical
reactions, the number of each type being dependent on the appropriate
term in the summation of Eq. (3).
A listing of the program and sample input and output data are available
from the author.
If the product
R cl= k UIN”I+~~~.
/ . . N”na
n (4)
RJR,,-/% (6)
R, = k, NpNjx2.. . . N;-
MONTE CARLO SIMULATION OF CHEMICAL REACTIONS 115
Nj=Ni-a,, N,=N,+b,,
Nj = N, - ajm N,=N,+b,,
(7)
N,,=h,,-a,, N,=i,+b,,
5. Repeat steps 2,3, and 4 M, times. M, has been 20 and A has been 0.5
for those systems tested so far.
6. After M, iterations find that chemical which has the smallest change
in
-- dN,(l) (8)
dt
where dlv,(l)/dt represents dNi/dt before the first iteration and dNi(M,)/dt ,
represents dN,/dt after the M,‘st iteration. That chemical which has the
smallest percentage change in its derivative is assumed to give the most
accurate estimate of the time interval in Eq. (9).
7. Using the chemical found in step 6, calculate the time interval for the
M, iterations from the second-order Runge-Kutta [4] formula
represents the average of dN,/dt between the first and M,‘st iterations.
Because of the statistical nature of this calculation, a reaction with a low
probability of acceptance can possibly be chosen in Step 6. This usually
results in a poor estimate of the time interval. In order to avoid this
difficulty, the choices in Step 6 are restricted to those for which AN, > 3 (if
Mi = 20 and A = 0.5).
8. If ANi < 3 for all chemicals, do M, more iterations and repeat Steps 6
and 7 with M, replaced by 2 M,. If ANi < 3 after two iterations, do M, more
iterations and repeat Steps 6 and 7 with M, replaced by 3 M,. If ANi<
after three iterations, assume the system has reached chemical equilibrium
and terminate the calculation.
9. Repeat Steps 2 through 8 M, times. The size of M, is dependent on
the complexity of the system and the total time interval for which the
calculation is to be made.
k, t
(10)
c2-+c3 Cz+G
Since the rate equations for this system can be solved in closed form [l], the
program’s computation can be compared with an exact solution. These two
solutions are compared in Fig. 1. It is seen that they agree very well. The
Monte Carlo solution ends at t = 5.6 sec. This is because the system is so
close to equilibrium at this point in time that the calculation is terminated,
as explained in Step 8.
The time development for the system
4 k,
c,+c2 c,+c,-+c,
(11)
has also been calculated using the Monte Carlo method. This solution is
compared with a numerical integration of the rate equations using the
MONTE CARLO SIMULATION OF CHEMICAL REACTIONS 117
1
TIME (SECONDS)
FIG. 1. The time development of the chemicals concentrations in reaction (IO). The
solid lines represent the theoretical curves, and the d.esignated points represent the Monte
Carlo calculation.
k,=5.0 set-‘; k,=4.0 set-‘; k,=3.0 see-I; k,=3.0 see-‘.
TIME (SECONDS)
TIME ( SECONDS 1
FIG. 2. The time development of the chemical concentrations in reaction (11). The
solid lines represent the Runge-Kutta integration, and the designated points represent the
Monte Carlo calculations.
k,=2.0~ 10-l set-‘; k,=4.0x10-6molecule-‘sec-‘; k3=4.0X 10-l set-‘;
k,= 1.0~ lo-’ molecule-’ set-‘; k,= 1.0~ 10e6 molecule-‘set-‘;
k6=5.0x 10e6 molecule-‘set-‘.
MONTE CARLO SIMULATION OF CHEMICAL REACTIONS 119
TIME (SECONDSI
FIG. 3. Monte Carlo calculations of the time development of C, from reaction (10)
for three different assumptions for the initial number of molecules of C,.
REFERENCES
1 Robert Livingston in, Technique of Organic Chemisr~, 2nd Ed., Part 1, (S. L. Friess, E.
S. Lewis, and A. Weissberger, Eds.) Interscience, New York, 1961, pp. 136138.
2 Roger G. E. Franks, Modeling and Simulation in Chemical Engineering, Wiley, New
York, 1972, Chap. VI.
3 D. P. Landau and R. Alben, Am. J. Physics 41, 394 (1973).
4 Roger G. E. Franks, lot. cit., pp. 55-56.
5 Rudy Svoboda, Mathematics Department, Purdue Fort Wayne, Fort Wayne, Indiana
(private communication).
6 Roger G. E. Franks, lot. cit., pp. 5961.