Learn R Programming

deTestSet (version 1.0)

rober: 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(), atol = 1e-10, 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
...
additional arguments passed to the solver .

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.

Details

The default parameters are: k1 = 0.04, k2 = 3e7, k3 = 1e4

References

http://www.dm.uniba.it/~testset

Examples

Run this code
out <- rober()
plot(out, lwd = 2, log = "x")

# compare to reference solution
out[nrow(out),-1] - reference("rober")

Run the code above in your browser using DataLab