% LEP 12-3 : Production of Propylene Glycol in an Adiabatic CSTR
%

dH=36400;
A=16960000000000;
Ea=32400;
To=535;
FM0=71.78;
FI0=0;
FB0=802.8;
V=40.1;
FA0=43;
CpA = 35;
CpB = 18;
CpM = 19.5;
CpI = 28.1;
thetaB = FB0/FA0;
thetaM = FM0/FA0;
thetaI = FI0/FA0;
sumcp = CpA + thetaB*CpB + thetaM*CpM + thetaI*CpI;
vo = (FA0/0.9232) + (FB0/3.444) + (FM0/1.5416) + (FI0/1.1);
tau = V/vo;
T=linspace(535,635,200);
for i=1:200
XMB(i)= (tau)*A*exp(-Ea/(1.987*T(i)))/(1 + (tau)*A*exp(-Ea/(1.987*T(i))));
XEB(i)= sumcp* (T(i) - To)/(dH + 7* (T(i) - 528));
end
plot(T,XMB(1:200),T,XEB(1:200),'LineWidth',1.5);
leg=legend('X_{MB}','X_{EB}');
ylabel('Conversion');
xlabel('T(^{\circ}R)');
axis([535 635 0 1]);
leg.ItemTokenSize=[10,10];
title('Conversion as a function of T')
grid on

%

