You are on page 1of 1

function Problema4

clc
clear
[V,x]=ode45(@fProblema4,[0,500],0);
xf=x(length(x))
deltaH=80000;
To=1100;
CpA=170;
CpI=200;
deltaCp=0;
FA0=10;
FI0=10;
thetaA=FA0/FA0;
thetaI=FI0/FA0;
sum=thetaA*CpA+thetaI*CpI;
T=To+((x*(-deltaH))/sum);
subplot(2,1,1),plot(V,x);xlabel('V[dm^3]');ylabel('x');
grid
subplot(2,1,2),plot(V,T);xlabel('V[dm^3]');ylabel('T(K)');
grid
end
function dxdV=fProblema4(V,x)
P=2;
R=0.0821;
To=1100;
CpA=170;
CpI=200;
deltaCp=0;
FA0=10;
FI0=10;
thetaA=FA0/FA0;
thetaI=FI0/FA0;
sum=thetaA*CpA+thetaI*CpI;
delta=1;
y=FA0/(FA0+FI0);
eps=y*delta;
Ca0=P*y/(R*To);
Ca01=Ca0/(1+thetaI);
deltaH=80000;
T=To+((x*(-deltaH))/sum);
k=exp(34.34-34222/T);
Ca=Ca01*(1-x)*To/((1+eps*x)*T);
ra=-k*Ca;
%Ecuacion de diseño PFR
dxdV=-ra/FA0;
end

You might also like