Last data update: 2014.03.03
R: Autocatalytic Chemical Reaction of Robertson, ODE
Autocatalytic Chemical Reaction of Robertson, ODE
Description
Describes the kinetics of an autocatalytic reation.
It is an ODE, 3 equations
Usage
rober (times = 10^(seq(-5, 11, by = 0.1)), yini = NULL,
parms = list(), printmescd = TRUE,
atol = 1e-14, rtol = 1e-10, maxsteps = 1e5, ...)
Arguments
yini
the initial (state) values for the DE system. If y
has a name attribute, the names will be used to label the output
matrix.
times
time sequence for which output is wanted; the first
value of times
must be the initial time.
parms
list of parameters that overrule the default parameter values
atol
absolute error tolerance, either a scalar or a vector,
one value for each y.
rtol
relative error tolerance, either a scalar or a vector,
one value for each y,
maxsteps
maximal number of steps per output interval taken by
the solver
printmescd
if TRUE the mixed error significant digits computed using
the reference solution at time 1e13 are printed
...
additional arguments passed to the solver .
Details
The default parameters are:
k1 = 0.04, k2 = 3e7, k3 = 1e4
Value
A matrix of class deSolve
with up to as many rows as elements in
times
and as many
columns as elements in yini
, plus an additional column (the first)
for the time value.
There will be one row for each element in times
unless the
solver returns with an unrecoverable error. If
yini
has a names attribute, it will be used to label the columns
of the output value.
Note
This model is implemented in R
Author(s)
Karline Soetaert <karline.soetaert@nioz.nl>
Francesca Mazzia
References
http://www.dm.uniba.it/~testset
Examples
out <- rober()
plot(out, lwd = 2, log = "x")
# compare to reference solution
out[nrow(out),-1] - reference("rober")
Results