Stochastic simulation of chemical reaction by digital computer, I. The

Reaction Kinetics and Catalysis Letters, Vol. 1, No. 1, 1 1 3 - 1 1 7 / 1 9 7 4 /
STOCHASTIC SIMULATION OF CHEMICAL REACTION BY
DIGITAL COMPUTER, I. THE MODEL
T. Sipos, 1 j . T6th, 2 and P. l~rdi 1
1. Danube Oil Company Computer Center,
2. Institute of Medical Chemistry, Semmelweis
University Medical School, Budapest
Received November 9, 1972
A stochastic model of complex chemical reactions is outlined. A discrete
M a r k o v p r o c e s s corresponds to the complex chemical reaction in the model
i . e . the concentrations of the components are discrete quantities. The differences between the stochastic and d e t e r m i n i s t i c models are discussed.
0 ~ c ~ B a e T c a c T o x a c ~ e c ~ a ~ Mo~e.~!, c:~omu~x xmmqeom]x
pesa~.
Z ~ c ~ p e ~ H ~ n po~ecc Map~o~a CO0~BeTCTByeT Mo~eaz c a o ~ o ~ x m ~ e c ~ o ~ pesy~m~, T . e . . EOFAIeHTpa~mtI I<OMIIOHeHTOB ~IBJISIIOTC~ ~ I O l 4 p e T ~
B e ~ m ' a v ~ . PaccMaTD~Ba-~oTca pa~Jm-~ Me~j~f CTOXaCT~ec~o~ ~ ~eTep~a~zoT~,~ec~o~
mo~eJ~fiv~.
INTRODUCTION
Both deterministic and stochastic models are known to describe complex chemical reactions phenomenologically. The stochastic model of complex chemical r e a c tions has behn developed essentially by R@nyi [1] .
In the f i r s t part of this paper an extension of the stochastic model is presented.
This model provides a framework for as many elementary reactions of as
many
components as desired under practically general conditions.
It should be pointed out that the stochastic model is more n a t u r a l than the det e r m i n i s t i c one.
As the solutions for possible models of even relatively less complex reactions
cannot be presented in a closed form, which is also true for the deterministic model,
one has to use approximate solutions or simulations. In fact we intend to show how
to turn from the model described here to another permitting direct simulation e:~periment.
113
T. SIPOS et a l . : SIMULATION OF C H ~ I C A L
REACTIONS
In the second p a r t of the p a p e r the computer realization of the model will be re ported with some p a r t i c u l a r examples to prove that simulation experiments can be
p e r f o r m e d without the usual simplifying assumption of reaction kinetics.
A more detailed comparison of the d e t e r m i n i s t i c and stochastic models, a full
presentation of the p r o g r a m and an exhaustive list of r e f e r e n c e s a r e
given e l s e -
where [ 2 j .
II. THE STOCHASTIC MODEL
Let us take a v e s s e l (e.g. a test tube, a r e a c t o r , a living organism, etc. ) containing the components K. in quantities
1
~ i(t) (i = 1~ 2, . ..
k) at moment t. The
s y s t e m may be open or isolated, changes in p r e s s u r e , t e m p e r a t u r e and volume a r e
disregarded.
We suppose that only reactions involving one or two components (so called unicomponent and bicomponent reactions, 2) take place, i . e .
C~p,e
. P
KP-
k
~
A.
~
(p, ep)
t=l
I~q, fq - - k
(q, fq )
+K - Y
Bf
Kr
s
i=l
1, 2,
p;
Ki; P . . . . .
e = 1 , 2, . . . Ep;
P
Ki; q = l , 2, . . . q
fq=l, 2....
cr
and
p, ep
[3q, f
q
(3)
correspond to the r e a c t i o n r a t e constants [1]
(p, ep)
(q, fq )
A.
and B.
1
1
a r e stoichiometric coefficients, i . e .
non-negative integers,
P is the number of components on the left-hand side of the unicomponent
reactions,
114 "
(2)
Fq;
q = z ( r , s)
where
(1)
T. SIPOSr al.: SIMULATIONOD CHEMICALREACTIONS
Q is the number of component p a i r s on the left-hand side of bicomponent
reactions,
Ep is the number
of unicomponent r e a c t i o n s starting f r o m the p - t h component,
F q is the number of bicomponent r e a c t i o n s s t a r t i n g f r o m the q-th p a i r of c o m portents.
Z(r, s) is the flmction giving the numbering of the bieomponent r e a c t i o n s s t a r t ing f r o m different p a i r s of components.
The following equations d e s c r i b e the change in the quantities of the components
9
@
if a unicomponent reaction has taken place
(t)+A.(P' ep )
~i(t+ A t ) = ~ i
*
-
5 . lp'
(4)
F o r a bicomponent r e a c t i o n we have
(q,fq)
~i(t+ At)= ~ i ( t ) + B i
- C~ir-6is,
(5)
where
q= Z(r,s),
i=1,2,
. . . k, and
6ij =o if i :~ j.
ij - l f f
i=j
F u r t h e r assumptions u s u a l l y applied in the l i t e r a t u r e [3] a r e :
-
time is t r e a t e d as a continuous v a r i a b l e , while the quantities of the components
as d i s c r e t e ones, m o r e o v e r it is a s s u m e d that
-
the p r o b a b i l i t y of any r e a c t i o n different f r o m those given by eqs. (1) or (2) is
zero, and
- the probability that a r e a c t i o n takes place is proportional to the time elapsed,
to the quantities of components on the left-hand side and to the r e a c t i o n r a t e constants,
- the probability that m o r e then one r e a c t i o n takes place is o( At)*
*o ( h t ) is aquantity tending to z e r o when divided by At tend to zero, (i. e.
lira o(At) =0
At
5t~0
115
T. SIPOSctal. : SIMULATION,OF CHEMICALREACTIONS
Based on these assumptions, a relationship can be derived for the distribution.
From this relationship the Kolmogorov equations can be deduced by dividing by At,
with At approaching zero
~P(1;t)
Ot
=
P
E
~
~p
p = 1 ep= 1
(lp+ 1 - A (p,ep))
(p,ep)
P
P(1-A
+ep~t)+
OCp,ep
(q,fq)
Q
F
q:l
~-~ f ~-~q=l
q
(lr+ I-B r
)
(q, %))
8q,fq
Ip~
E
=1
(q,%)
(Is+ 1 - B s
1+
Q
P
~
q=l
)-~ P C~p,ep
ep=l
F
zq
P(1-B
+ er+ es;t ) 9
\
6q, fq lrl s
P(1; t)
(6)
fq=l
where
P(1, 0) = 1
Here
I = ( I 1,I 2. . . .
if
Ik),
~(t) = ( ~ l ( t ) ,
A(p, ep)
1 = D,
(p, ep)
, A2
(q, fq)
= ~B 1
ep = ( dlp'
62p . . . .
B2
k,
(p, ep)
....
Ak
(q,~l)
,
(7)
~k(t) ), P(l,t) = P(~(t) = I ) ,
b:2(t) . . . .
(p, ep)
P(1, 0) = 0
if i = 1 , 2 . . . . .
0 =I.,
1
= (A1
B (q, fq)
or else
),
(q' fq)
....
Bk
),
d kp }' i.e. ep is the p-th
k-dimensional unit vector, and finally
D = ~ (0)
HI. STOCHASTIC VERSUS DETERMINISTIC MODEL
For the case when the number of the particles is finite, there does not exist a
deterministic model. The description with differential equations, referred to as the
deterministic model can only be an approximate calculation procedure, because the
116
T. SIPOSet al.: SIMULATIONOF CHEMICALREACTIONS
solutions of the model a r e continuous functions, w h e r e a s the concentrations a r e d i s c r e t e quantities,
On the b a s i s of c e r t a i n assumptions, which a r e , however, not always p e r f e c t l y
justified, it can be proved that the r e s u l t s obtained f r o m the d e t e r m i n i s t i c and the
stochastic model e s s e n t i a l l y do n~t differ f r o m each other.
The advantage of the stochastic over the d e t e r m i n i s t i c model is e s p e c i a l l y e v i dent in the analysis of so-called " s m a l l s y s t e m s " [ 4 ] . Namely, if the number of p a r t i c l e s of the components is s m a l l , the fluctuations taken into consideration by the
stochastic model only, cannot be neglected even in the "zeroth approximation", b e cause they a r e not superimposed upon the phenomenon but they r e p r e s e n t the phenomenon itself.
IV. SIMULATION: THE TECHNIQUE OF SOLUTION
Equations (6,7) can be solved in v e r y simple c a s e s only. T h e r e f o r e , a Markov
chain is assigned to the original Markov p r o c e s s and this chain is simulated by the
Monte Carlo method.
REFERENCES
[1~ A. R@nyi: MTA AMI KSzl., 2, 83, (1953)
[2~ P . ]~rdi, T. Sipos, J . TSth: Magyar K@m. F o l y S i r a t (in p r e s s }
[3~ D . A . M c Q u a r r i e , : J . Appl. P r o b . , 4, 413 (1967)
[41 T . L . Hill: T h e r m o d y n a m i c s of Small Systems, Benjamin, New York, A m s t e r d a m ,
1963
117