Example 9-5: Type LEP - 9 - 5

You might also like

Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 3

Example 9-5

type LEP_9_5

% "LEP_9_5"
% m-file to solve example 9-5
%
% x(1)=ca
% x(2)=cb
% x(3)=cc
% x(4)=cm
% x(5)=T
% xdot(1)=d(ca)/dt, xdot(2)=d(cb)/dt, xdot(3)=d(cc)/dt, etc.

function xdot=LEP_9_5(t,x)

UA=16000;
Ta1=60;
Fao=80;
To=75;
k=16.96e12*exp(-32400/1.987/(x(5)+460));
Fbo=1000;
Fmo=100;
ra=-k*x(1);
rb=-k*x(1);
rc=k*x(1);
Thetacp=35+Fbo/Fao*18+Fmo/Fao*19.5;
vo=Fao/0.923+Fbo/3.45+Fmo/1.54;
V=500/7.484;
tau=V/vo;
cao=Fao/vo;
cbo=Fbo/vo;
cmo=Fmo/vo;
Na=x(1)*V;
Nb=x(2)*V;
Nc=x(3)*V;
Nm=x(4)*V;
mc=1000;
NCp=Na*35+Nb*18+Nc*46+Nm*19.5;
Ta2=x(5)-((x(5)-Ta1)*exp(-UA/(18*mc)));
Q=mc*18*(Ta1-Ta2);

xdot(1,:)=1/tau*(cao-x(1))+ra;
xdot(2,:)=1/tau*(cbo-x(2))+rb;
xdot(3,:)=1/tau*(0-x(3))+rc;
xdot(4,:)=1/tau*(cmo-x(4));
xdot(5,:)=(Q-Fao*Thetacp*(x(5)-To)+(-36000)*ra*V)/NCp;

ic=[0;3.45;0;0;75]; tspan=[0 4];


[t,x]=ode45('LEP_9_5',tspan,ic);
T=x(:, 5);
plot(t,T); title('Example 9-5');xlabel('t');ylabel('T');

Example 9.4
160

150

140

130

120
T

110

100

90

80

70
0 0.5 1 1.5 2 2.5 3 3.5 4
t

ca=x(:, 1);
plot(t,ca);title('Example 9-5');xlabel('t');ylabel('ca');
Example 9.4
0.16

0.14

0.12

0.1
ca

0.08

0.06

0.04

0.02

0
0 0.5 1 1.5 2 2.5 3 3.5 4
t

plot(T,ca);title('Example 9-5');xlabel('T');ylabel('ca');

Example 9.4
0.16

0.14

0.12

0.1
ca

0.08

0.06

0.04

0.02

0
70 80 90 100 110 120 130 140 150 160
T

You might also like