%
% Example 4.3A: Simple Fermentation Process
%
% - constant volume
% - well mixed
% - Monod kinetics
% - batch configuration
%
% Bob Newell, May 1996
%
%-----------------------------------------------------------
% parameters
Kh = 3*0.1;
Kx = 0.1;
qfe = 3;
Kfe = 20;
fsi = 0.0;
%
global p
p = [ Kh Kx qfe Kfe fsi ];
%-----------------------------------------------------------
% initial states
V = 12.5;
Xs = 350;
Sf = 25;
Sa = 50;
Xh = 850;
%
xo = [ V Xs Sf Sa Xh ];
%-----------------------------------------------------------
% integrate the state equation
to = clock;
days = 4/24;
[ t, x ] = ode45( 'Simple_Fermentation', [ 0 days ], xo );
secs = etime( clock, to )
%-----------------------------------------------------------
% plot the results
font = 20;
figure;
plot( 24*t, x(:,2), '-', 24*t, x(:,3), '-', ...
       24*t, x(:,4), '-' );
axis( [ 0 24*days 0 400 ] );
set( gca, 'fontsize', font );
xlabel( 'Time in hours' );
ylabel( 'Substrate in mg/l' )
%
stext( 1.5, 310, '{\times \20 \it X_S}' );
stext( 0.5, 30, '{\times \20 \it S_F}' );
stext( 2.5, 120, '{\times \20 \it S_A}' );
%
printsto -f1 -deps2 ex4-3a.eps
%
%-----------------------------------------------------------
% the end!   
