initial import

This commit is contained in:
Dave Goodwin 2004-05-17 22:59:20 +00:00
parent 47a520dffb
commit a7c2084a14
7 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,3 @@
function addReactor(net, reactor)
% ADDREACTOR - Add a reactor to the network
reactornetmethods(4, reactornet_hndl(net), reactor_hndl(reactor));

View file

@ -0,0 +1,5 @@
function t = atol(r)
% ATOL - absolute error tolerance
%
t = reactornetmethods(24, reactornet_hndl(r));

View file

@ -0,0 +1,5 @@
function t = rtol(r)
% RTOL - relative error tolerance
%
t = reactornetmethods(23, reactornet_hndl(r));

View file

@ -0,0 +1,9 @@
function setInitialTime(r, t)
% SETINITIALTIME - Set the initial time at which to begin the time
% integration.
%
% If the time integration has already begun, this restarts the
% integrator using the current solution as the initial condition,
% setting the time to 't'.
%
reactornetmethods(5, reactornet_hndl(r), t);

View file

@ -0,0 +1,12 @@
function setMaxTimeStep(r, maxstep)
% SETMAXTIMESTEP - Set the maximum time step.
%
% The integrator chooses a step size based on the desired error
% tolerances and the rate at which the solution is changing. In
% some cases, the solution changes very slowly at first, then very
% rapidly (ignition problems). In such cases, the integrator may
% choose a timestep that is too large, which leads to numerical
% problems later. Use this method to set an upper bound on the
% timestep.
%
reactornetmethods(6, reactornet_hndl(r), maxstep);

View file

@ -0,0 +1,7 @@
function setTolerances(r, rtol, atol)
% SETTOLERANCES - Set error tolerances.
%
% rtol - scalar relative error tolerance
% atol - scalar absolute error tolerance
%
reactornetmethods(7, reactornet_hndl(r), rtol, atol);

View file

@ -0,0 +1,5 @@
function t = time(r)
% TIME - current value of the time.
%
t = reactornetmethods(22, reactornet_hndl(r));