fogler8_8.pdf
TRANSCRIPT
-
8/10/2019 Fogler8_8.pdf
1/4
ChBE 354 In-Class
Fogler 8-8
function Fogler_8_8
%(a)%Constants
v0=20;P0=10;T0=450;cpa=40;cpb=25;cpc=15;Ha=-70*1000;Hb=-50*1000;Hc=-40*1000;Ea=31.4*1000;R=8.3144;Rg=0.082;x0 = 0;Wspan = [0,50];
%Calculated values
dhr=Hb+Hc-Ha;Ca0=P0/(Rg*T0);
Fa0=Ca0*v0;EoR=Ea/R;delta=1/1+1/1-1/1;ep=delta;
%Functions fT = @(x1) T0+x1.*(-dhr)./cpa;fkT = @(x1) 0.133*exp(EoR.*(1/T0-1./fT(x1)));fra = @(x1) fkT(x1).*Ca0.*((1-x1)./(1+ep.*x1)).*T0./fT(x1);fpbr = @(w1,x1) fra(x1)./Fa0;
%ODE Solve
[W,X] = ode23(fpbr,Wspan,x0);%Plot the solutionssubplot(2,2,1)plot(W,X,'LineWidth',2)xlabel('W','FontSize',14,'FontWeight','Bold')ylabel('X','FontSize',14,'FontWeight','Bold')
subplot(2,2,2)plot(W,fT(X),'LineWidth',2)xlabel('W','FontSize',14,'FontWeight','Bold')ylabel('T','FontSize',14,'FontWeight','Bold')
subplot(2,2,3)
plot(W,fra(X),'LineWidth',2)xlabel('W','FontSize',14,'FontWeight','Bold')ylabel('( -r_A )','FontSize',14,'FontWeight','Bold')
%Part (b) Weight in a CSTR
xx = 0.8; w0 = Fa0 * xx/fra(xx)
%Part (c) Add pressure drop to the pbr
-
8/10/2019 Fogler8_8.pdf
2/4
alpha = 0.019;Wspan=[0,37];x0 = [0;1];
fT = @(x1) T0+x1.*(-dhr)./cpa;fkT = @(x1) 0.133*exp(EoR.*(1/T0-1./fT(x1)));fra = @(x1) fkT(x1(1)).*Ca0.*((1-x1(1))./(1+ep.*x1(1))).*T0./fT(x1(1)).*x1(2);
fdy = @(x1) -alpha./(2.*x1(2)).*fT(x1(1))./T0.*(1+ep.*x1(1));
fpbr = @(x1) fra(x1)./Fa0;
f = @(w1,x1) [fpbr(x1);fdy(x1)];[W,X] = ode23(f,Wspan,x0);
%Plot the solutionsfigure
subplot(2,2,1)plot(W,X(:,1),'LineWidth',2)
xlabel('W','FontSize',14,'FontWeight','Bold')ylabel('X','FontSize',14,'FontWeight','Bold')
subplot(2,2,2)plot(W,fT(X(:,1)),'LineWidth',2)xlabel('W','FontSize',14,'FontWeight','Bold')ylabel('T','FontSize',14,'FontWeight','Bold')
subplot(2,2,3)
%It is necessary to evaluate fra incrementallyfor i = 1:length(X) y(i) = fra([X(i,1),X(i,2)]);end
plot(W,y,'LineWidth',2)xlabel('W','FontSize',14,'FontWeight','Bold')ylabel('( -r_A )','FontSize',14,'FontWeight','Bold')
subplot(2,2,4)plot(W,X(:,2),'LineWidth',2)xlabel('W','FontSize',14,'FontWeight','Bold')ylabel('P','FontSize',14,'FontWeight','Bold')tWeight','Bold')
w0 = 39.4030
2 Fogler8_8.nb
-
8/10/2019 Fogler8_8.pdf
3/4
No Pressure Drop
Fogler8_8.nb 3
-
8/10/2019 Fogler8_8.pdf
4/4
With Pressure Drop
4 Fogler8_8.nb