Figure 8 (page 15):

The solution to the reduced QSSA model; DAE model.

Code for Figure 8

Text of the GNU GPL.

main.m

clear('all'); close('all');
% solve full model A->B->C
%
% jbr, 11/26/2007
%
global k1 k2
k1 = 1;
k2 = 10;

npts = 150;
tfin = 5;
time = linspace(0, tfin, npts)';


tol = sqrt(eps);
opts = odeset ('AbsTol', tol, 'RelTol', tol);

x0 = [1; 0; 0];
% set initial b concentration
x0(2) = k1/k2*x0(1);
% set the initial time derivatives
xdot0 = qssa(0, x0, zeros(3,1));
xdot0(2) = 0;

[tout, x] = ode15i (@qssa, time, x0, xdot0, opts);

plot(tout, x)

table1 = [tout, x];
save ABC_qssa.dat table1;

qssa.m

function resid = qssa(t, x, xdot)
  global k1 k2
  ca = x(1); cb = x(2); cc=x(3);
  cadot = xdot(1); cbdot = xdot(2); ccdot = xdot(3);
  r1 = k1*ca; r2 = k2*cb;
  resid = [-cadot - r1; r1 - r2; -ccdot + r2];