%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Solves the catalytic reactor problem.
% The differential equations are provided in reactor.m
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Initialize time
t = cputime;
% Integration time interval
TSPAN = [ 0 750 ];
% Initial conditions
Y0 = [ 0.1 600 0 690 ];
% Integrate using ode15s
[T,Y] = ode15s('model310',TSPAN,Y0(:));
% Print how long it took for the integration
time = cputime-t
% Plot the results
subplot(2,1,1), semilogx(T,Y(:,2),T,Y(:,4),'-.');
xlabel(' Time')
ylabel(' T, Tp')
legend(' T',' Tp')
title(' Dynamic Approach to Low Steady State')
subplot(2,1,2), semilogx(T,Y(:,1),T,Y(:,3),'-.');
xlabel(' Time')
ylabel(' P, Pp')
legend(' P',' Pp')