Documentos de Académico
Documentos de Profesional
Documentos de Cultura
UNIFAC
PROCESO ISOBÁRICO
%BENZENE
antA_1=3.98523 ; antB_1=1184.240 ; antC_1=217.572; %Prausnitz 2001
%n-HEXANE
antA_2=4.00139 ; antB_2=1170.875 ;antC_2=224.317;
disp('sore')
%Declaración de datos de entrada: composiciones en la fase líquida
syms T
x1=[0.00001 0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.95 0.99999];
x2=1-x1;n=length(x1);P=1.01325;%bar
%Determinación de las presiones de vapor en "bar"
Pv1=10^((antA_1)-antB_1/(T-273.15+antC_1));Tb1=antB_1/(antA_1-log10(P))-
antC_1+273.15;%temperatura en grados K
Pv2=10^((antA_2)-antB_2/(T-273.15+antC_2));Tb2=antB_2/(antA_2-log10(P))-
antC_2+273.15;%temperatura en grados K
%Determinación de los coeficientes de actividad en la fase líquida
disp('Modelo Termodinamico: UNIFAC')
disp('==========================================================')
fprintf('%10s %8s %10s %13s %10s\n','T ,ºC', 'x1', 'y1', 'Gama 1', 'Gama 2');
disp('==========================================================')
for co = 1:n
x=[x1(co) x2(co)];
NSG=3;
Rk=[0.9011 0.6744 0.5313];
Qk=[0.848 0.540 0.400 ];
v=[0 2; 0 4; 6 0];
a=[0 0 61.130; 0 0 61.130; -11.120 -11.120 0];
%Parte combinatorial
r=[0 0];q=r;
for i=1:2
for k=1:NSG
r(i)=v(k,i)*Rk(k)+r(i);
q(i)=v(k,i)*Qk(k)+q(i);
end
end
z=10;l=(z/2)*(r-q)-(r-[1 1]);
S1=0;S2=S1;S3=S2;
for i=1:2
S1=r(i)*x(i)+S1;
S2=q(i)*x(i)+S2;
S3=x(i)*l(i)+S3;
UNIVERSIDAD NACIONAL DEL CENTRO DEL PERÚ
FACULTAD DE INGENIERÍA QUÍMICA
E.A.P. INGENIERIA QUIMICA
end
for i=1:2
phi(i)=r(i)*x(i)/S1;
theta(i)=q(i)*x(i)/S2;
LngC(i)=log(phi(i)/x(i))+(z/2)*q(i)*log(theta(i)/phi(i))+l(i)-
phi(i)*S3/x(i);
end
% Parte Residual
for i=1:2
for k = 1:NSG
Xmi(k,i)=v(k,i)/sum(v(1:NSG,i));
end
end
for i=1:2
for k=1:NSG
Qmi(k,i)=Xmi(k,i)*Qk(k)/sum(Xmi(1:NSG,i)'.*Qk(1:NSG));
end
end
psi=exp(-a/T);
S=sym(zeros(1,NSG));Si=sym(zeros(NSG,2));
for c=1:2
for f=1:NSG
for i =1:NSG
S(i)=Qmi(i,c)*psi(f,i)/sum(Qmi(1:NSG,c).*psi(1:NSG,i))+S(i);
end
Si(f,c)=sum(S);
S=sym(zeros(1,NSG));
end
end
for i=1:2
for k=1:NSG
LnT(k,i)=Qk(k)*(1-log(sum(Qmi(1:NSG,i).*psi(1:NSG,k)))-Si(k,i));
end
end
Xm=v*x'/sum(v*x');
Qm=Xm.*Qk'/sum(Xm.*Qk');
S=sym(zeros(1,NSG));Si=sym(zeros(NSG,1));
for f=1:NSG
for i =1:NSG
S(i)=Qm(i)*psi(f,i)/sum(Qm(1:NSG).*psi(1:NSG,i))+S(i);
end
Si(f)=sum(S);
S=sym(zeros(1,NSG));
end
for k=1:NSG
LnTk(k)=Qk(k)*(1-log(sum(Qm(1:NSG).*psi(1:NSG,k)))-Si(k));
end
LngR=sym(zeros(1,2));
for i=1:2
for k=1:NSG
LngR(i)=LngR(i)+v(k,i)*(LnTk(k)-LnT(k,i));
end
end
gama(co,1:2)=exp(LngC+LngR);
% Determinación de la temperatura
y1(co)=x(1)*gama(co,1)*Pv1/P;
y2(co)=x(2)*gama(co,2)*Pv2/P;
func(co)=y1(co)+y2(co)-1;
To=(Tb1+Tb2)/2;e=10^-4;distancia=1;
while distancia > e
UNIVERSIDAD NACIONAL DEL CENTRO DEL PERÚ
FACULTAD DE INGENIERÍA QUÍMICA
E.A.P. INGENIERIA QUIMICA
fxi=subs(func(co),To);
derivada=diff(func(co));
Dxfxi=subs(derivada,To);
T_1=single(To-(fxi/Dxfxi));
distancia=abs(T_1-To);
To=T_1;
end
Tf(co)=single(T_1);X1(co)=x(1);
Y1(co)=single(subs(y1(co),Tf(co)));
G1(co)=single(subs(gama(co,1),Tf(co)));
G2(co)=single(subs(gama(co,2),Tf(co)));
fprintf('%10.3f %10.3f %10.3f %10.3f %10.3f\n',Tf(co)-273.15, X1(co),
Y1(co), G1(co), G2(co));
end
%Datos Experimentales
xe=1-[0 0.073 0.172 0.268 0.372 0.462 0.585 0.692 0.792 0.828 0.883 0.947 0.962
1.00];
ye=1-[0 0.140 0.268 0.376 0.460 0.540 0.644 0.725 0.807 0.838 0.888 0.950 0.964
1.00];
Te=[353.25 350.75 348.25 346.55 345.15 344.05 343.15 342.55 342.25 342.15
342.05 341.95 341.95 341.95]-273.15;
%Gráfica de resultados predecidos por UNIFAC y experimentales
subplot(1,2,1),
plot(X1,Y1,'c',xe,ye,'bh',[0 1],[0 1],'k'),
axis([0 1 0 1],'square'),grid on,
legend('UNIFAC y1 vs x1','Exp. y1 vs x1','Location','SouthEast')
title('Diagrama del sistema Benzene(1) - n-Hexane(2) a 1 atm')
xlabel(' x, fracción molar del Benzene (líquido) ')
ylabel(' y, fracción molar del n-Hexane (vapor) ')
subplot(1,2,2),
p=plot(X1,Tf-273.15,'g',Y1,Tf-273.15,xe,Te,ye,Te,'rx');
p(2).Color = [1 0.5 0];
p(2).LineWidth = 1 ;
p(3).Color = 'w';
p(3).Marker = '*';
p(3).MarkerEdgeColor = [0.2 1 0.5];
axis([0 1 min(Tf-273.15) max(Tf-273.15)],'square'),grid on
legend('UNIFAC T vs x1','UNIFAC T vs y1','Exp. T vs x1','Exp. T vs
y1','Location','NorthWest')
title('Diagrama del sistema Benzene(1) - n-Hexane(2) a 1 atm')
xlabel(' x,y fracción molar del Benzene ')
ylabel(' T, ºC ')
UNIVERSIDAD NACIONAL DEL CENTRO DEL PERÚ
FACULTAD DE INGENIERÍA QUÍMICA
E.A.P. INGENIERIA QUIMICA
SALIDA:
================================================================
Equilibrio Líquido - Vapor: Benzene(1) - n-Hexane(2) a 1 atm
================================================================
ESCUELA: INGENIERIA QUIMICA
sore
Modelo Termodinamico: UNIFAC
==========================================================
T ,ºC x1 y1 Gama 1 Gama 2
==========================================================
68.719 0.000 0.000 1.494 1.000
68.677 0.050 0.051 1.454 1.001
68.680 0.100 0.098 1.416 1.003
68.815 0.200 0.188 1.342 1.012
69.119 0.300 0.270 1.273 1.030
69.592 0.400 0.347 1.210 1.059
70.247 0.500 0.423 1.153 1.101
71.120 0.600 0.499 1.103 1.162
72.284 0.700 0.582 1.062 1.247
73.887 0.800 0.679 1.029 1.367
76.236 0.900 0.806 1.008 1.539
77.877 0.950 0.891 1.002 1.650
80.012 1.000 1.000 1.000 1.785
UNIVERSIDAD NACIONAL DEL CENTRO DEL PERÚ
FACULTAD DE INGENIERÍA QUÍMICA
E.A.P. INGENIERIA QUIMICA
GRAFICA:
http://www.ddbst.com/en/EED/VLE/VLEindex.php