You are on page 1of 9

a)

CA0=1.6;
k1=0.4;
k2=0.01;
t=0:1:300;
CA=CA0*exp(-k1.*t);
CB=((k1*CA0)/(k2-k1))*(exp(-k1.*t)-exp(-k2.*t));
CC=((k1*k2*CA0)/(k2-k1))*(((exp(-k1.*t)-1)/(-k1))-((exp(-k2.*t)-1)/(-k2)));
plot(t,CA, t,CB, t,CC)
grid on
legend('CA','CB','CC')
b)

CA0=16;
V=500;
k1=0.4;
k2=0.01;
syms t;
CA=CA0*exp(-k1.*t);
CB=((k1*CA0)/(k2-k1))*(exp(-k1.*t)-exp(-k2.*t));
CC=((k1*k2*CA0)/(k2-k1))*(((exp(-k1.*t))/(-k1))-((exp(-k2.*t))/(-k2)));
P=(50*V*CB)-(10*V*(CA0-CA))-(50*V*CA)-(30*V*(exp((0.5*CC)-1))*CC);
Pmax=diff (P,t);
solve (Pmax==0)

time required to achieve the maximum profit = 10.94 hr


c)
E1=41.858;
E2=83.716;
k1=0.4;
k2=0.01;
R=8.314;
ST=0.5;
T1=373.15;
CA0=1.6;
k20=k2./exp((E2/(R*T1)));
k10=k1./exp((E1/(R*T1)));
syms T0
CB=(k10*exp(-E1/(R*T0))*ST*CA0)/((1+k10*exp(-E1/(R*T0))*ST)*(1+k20*exp(-
E2/(R*T0))*ST));
CBmax=diff(CB,T0);
solve(CBmax==0)
d)
function dC=reversible1(t,C)
dC=ones(3,1);
k1=0.4;
k2=0.01;
k3=0.3;
dC(1)=k3*C(2)-k1*C(1);
dC(2)=k1*C(1)-k2*C(2)-k3*C(2);
dC(3)=k2*C(2);
end

>> [t,C]=ode45('reversible1',[0:1:100],[1.6,0,0])

>> plot(t,C)
e)
function dC=reversible2(t,C)
dC=ones(3,1);
k1=0.4;
k2=0.01;
k3=0.3;
k4=0.005;
dC(1)=(k3*C(2)-k1*C(1));
dC(2)=(k1*C(1)-k2*C(2)-k3*C(2)+k4*C(3));
dC(3)=(k2*C(2)-k4*C(3));
end

>> [t,C]=ode45('reversible2',[0:1:200],[1.6,0,0])

>> plot(t,C)
f)

k1>100, k2<0.1, k3=k4=0 ;


function dC=f1(t,C)
dC=ones(3,1);
k1=120;
k2=0.01;
k3=0;
k4=0;
dC(1)=(k3*C(2)-k1*C(1));
dC(2)=(k1*C(1)-k2*C(2)-k3*C(2)+k4*C(3));
dC(3)=(k2*C(2)-k4*C(3));
end

>> [t,C]=ode45('f1',[0:1:200],[1.6,0,0])

>> plot(t,C)
k1>100, k2<0.1, k3=k4=1 ;

function dC=f2(t,C)
dC=ones(3,1);
k1=120;
k2=0.01;
k3=0;
k4=1;
dC(1)=(k3*C(2)-k1*C(1));
dC(2)=(k1*C(1)-k2*C(2)-k3*C(2)+k4*C(3));
dC(3)=(k2*C(2)-k4*C(3));
end

>> [t,C]=ode45('f2',[0:1:10],[1.6,0,0])

>> plot(t,C)
k1>100, k2<0.1, k3=k4=0.25 ;
function dC=f3(t,C)
dC=ones(3,1);
k1=120;
k2=0.01;
k3=0;
k4=0.25;
dC(1)=(k3*C(2)-k1*C(1));
dC(2)=(k1*C(1)-k2*C(2)-k3*C(2)+k4*C(3));
dC(3)=(k2*C(2)-k4*C(3));
end

>> [t,C]=ode45('f3',[0:1:10],[1.6,0,0])

>> plot(t,C)

You might also like