Académique Documents
Professionnel Documents
Culture Documents
end
%% NRTL coeficientes de actividad
alf12=0.4758;
alf21=alf12;
Tao12=aij(1)/(1.9872*T);
Tao21=aij(2)/(1.9872*T);
G12=exp(-alf12*Tao12);
G21=exp(-alf21*Tao21);
lnca1=((x(2)^2))*(Tao21*(G21/(x(1) + x(2)*G21))^2 +
Tao12*G12/((x(1)*G12 + x(2))^2));
lnca2=((x(1)^2))*(Tao12*(G12/(x(2) + x(1)*G12))^2 +
Tao21*G21/((x(2)*G21 + x(1))^2));
ca1=exp(lnca1);
ca2=exp(lnca2);
%ca1=1;
%ca2=1;
%%
coefF=[1 1];
y1=x(1)*ca1*Psat(1)/(coefF(1)*p);
y2=x(2)*ca2*Psat(2)/(coefF(2)*p);
Norm=y1+y2;
y=[y1/Norm y2/Norm];
coefF=CoeffugVirial(p,T,Tc,w,zc,vc,y,pc,Psat);
%% Coeficiente de Fugacidad ecuacin virial
function cf= CoeffugVirial(p,T,Tc,w,zc,vc,y,pc,Psat)
%% Constantes
R=8.31447; %KPa m3/Kmol K
%% Calculo Tc de la mezcla
Tc11=(Tc(1)*Tc(1))^(0.5);
Tc22=(Tc(2)*Tc(2))^(0.5);
Tc12=(Tc(1)*Tc(2))^(0.5);
%% Temperaturas reducidad
Tr11=T/Tc11;
Tr22=T/Tc22;
Tr12=(Tr11+Tr22)/2;
%% Factores acentricos
w11=(w(1)+w(1))/2;
w22=(w(2)+w(2))/2;
w12=(w(3)+w(2))/2;
%% Factores de compresibilidad criticos
zc11=(zc(1)+zc(1))/2;
zc22=(zc(2)+zc(2))/2;
zc12=(zc(1)+zc(2))/2;
%% Volumenes criticos
vc11=(((vc(1))^(1/3)+(vc(1))^(1/3))/2)^3;
vc22=(((vc(2))^(1/3)+(vc(2))^(1/3))/2)^3;
vc12=(((vc(1))^(1/3)+(vc(2))^(1/3))/2)^3;
%% Presiones criticas
pc11=(zc11*R*Tc11)/vc11;
pc22=(zc22*R*Tc22)/vc22;
pc12=(zc12*R*Tc12)/vc12;
Psat1new=p/((x(1)*(ca1/coefF(1)))+(x(2)*(Psat(2)/Psat(1))*(ca2/coefF(2)))
);
Tnew=(b(1)/(a(1)-log(Psat1new)))-c(1);
errorT=abs(T-Tnew);
T=Tnew;
end
Tabla(j,:)=[x(1) y(1) T];
end
plot(Tabla(:,1),Tabla(:,3),Tabla(:,2),Tabla(:,3))
legend('Puntos de Burbuja','Puntos de Rocio')
xlabel('x_1,y_1')
ylabel('T [K]')
title('Temperatura vs x_1,y_1 (Liq ideal- Vapor ideal)')
Comparacin
Ideal Ideal vs Liq Ideal Vap Real
375
370
365
T [K]
X - T Ideal Ideal
Y - T Ideal Ideal
X - T Liq Ideal Vap Real
360
355
350
0
0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
X,Y
Comparacin
Ideal Ideal vs Liq Ideal Vap Real
375
370
365
360
T [K]
X - T Real Real
Y - T Real Real
350
345
340
0
0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
X,Y
Consistencia Termodinmica
Tabla 2. Datos experimentales
X1
0,083
0,128
0,181
0,241
0,309
0,406
0,546
0,61
0,66
0,679
0,69
0,742
0,821
0,88
0,886
0,91
0,961
0,961
0,969
X2
0,535
0,57
0,58
0,59
0,605
0,625
0,635
0,648
0,653
0,65
0,666
0,678
0,7
0,732
0,732
0,76
0,847
0,837
0,881
T
75,6
72
73,3
72,4
71,6
71,4
71,1
71,4
71,2
71,3
71,3
71,2
71,5
71,9
72,1
72,5
74,5
74,3
75,4
A12
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
1114,295
A21
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
1305,924
alfa 12
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
0,476
Tao 12
1,608
1,625
1,619
1,623
1,627
1,627
1,629
1,627
1,628
1,628
1,628
1,628
1,627
1,625
1,624
1,622
1,613
1,614
1,609
Tao 21
1,884
1,904
1,897
1,902
1,906
1,907
1,909
1,907
1,908
1,908
1,908
1,908
1,907
1,905
1,903
1,901
1,890
1,891
1,885
G12
0,4653
0,4616
0,4630
0,4620
0,4612
0,4610
0,4607
0,4610
0,4608
0,4609
0,4609
0,4608
0,4611
0,4615
0,4617
0,4621
0,4642
0,4640
0,4651
G21
0,4080
0,4042
0,4055
0,4046
0,4037
0,4035
0,4032
0,4035
0,4033
0,4034
0,4034
0,4033
0,4036
0,4041
0,4043
0,4047
0,4068
0,4066
0,4078
Ecuacin NRTL
CofAct 1
CofAct 2
1,6399
0,0656
1,4025
0,1125
1,1779
0,1713
1,0015
0,2351
0,8630
0,2992
0,7243
0,3793
0,5795
0,4879
0,5366
0,5261
0,5045
0,5577
0,4900
0,5725
0,4936
0,5688
0,4700
0,5940
0,4410
0,6264
0,4308
0,6380
0,4279
0,6412
0,4320
0,6357
0,4529
0,6086
0,4481
0,6144
0,4654
0,5934
Consistencia Termodinamica
2,1000
Ln Coeficiente de Actividad
1,6000
1,1000
Coeficiente Actividad 1
Coeficiente Actividad 2
0,6000
0,1000
0,1
-0,4000
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
X1
clc, clear
global experimentos
format
%% Acetato isobutilo (1)/ Acido actico (2)/ Agua(3)
%% Variables Prelocacin
xxA=zeros(13,3);
xxB=zeros(13,3);
TTB=zeros(13,1);
xAnew=zeros(1,3);
xB=zeros(1,3);
%% parametros NRTL
T=283.15; %K
Aij=[0 219.71 230.99; -81.017 0 1.1484; 2018.4 256.67 0];
alfa=[0 0.2 0.2; 0.2 0 0.2; 0.2 0.2 0];
%% Z Valores de composiciones
%z=[0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4;0.6 0.55 0.50
0.45 0.40 0.35 0.30 0.25 0.20 0.15 0.10 0.05 0.00;0.00 0.05 0.10 0.15
0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60]';
tolTA=1e-6;
tolx=1e-6;
for zz=1:13
%Z=z(zz,:);
zz=0;
Z=[1/3 1/3 1/3];
%% Asumisos x_Alfa y Teta_Alfa
xA=[0.5 0 0.5];
TA=0.5;
errorxA=1;
while errorxA>tolx
%% Calculamos x_Beta
for i=1:3
xB(i)=(Z(i)-TA*xA(i))/(1-TA);
end
%% Calculo de Coeficientes de actividad
gA=NRTL(xA,T,Aij,alfa);
gB=NRTL(xB,T,Aij,alfa);
function gamma=NRTL(x,T,Aij,alfa)
%% calculo de Tao
for i=1:3
for j=1:3
t(i,j)=Aij(i,j)/(1.9872*T);
end
end
%% calculos de G
for i=1:3
for j=1:3
G(i,j)=exp(-alfa(i,j)*t(i,j));
end
end
for i=1:3
sumaxtG=0;
for j=1:3
sumaxtG=sumaxtG+x(j)*t(j,i)*G(j,i);
end
sumaxG=0;
for k=1:3
sumaxG=sumaxG+x(k)*G(k,i);
end
%% Calculo suma total
sumatotal=0;
for j=1:3
sumaxGint=0;
sumaxtGint=0;
for k=1:3
sumaxGint=sumaxGint+x(k)*G(k,j);
sumaxtGint=sumaxtGint+x(k)*t(k,j)*G(k,j);
end
sumatotal=sumatotal+(x(j)*G(i,j)/sumaxGint)*(t(i,j)(sumaxtGint/sumaxGint));
end
%%
gamma(i)=exp((sumaxtG/sumaxG)+sumatotal);
end
%% Calculo de Ki
K=gA./gB;
%% Calculo de Teta N-R
errorTA=1;
while errorTA>tolTA
sumFTA=0;
sumFpTA=0;
for i=1:3
sumFTA=sumFTA+(Z(i)/(K(i)+(1-K(i))*TA));
sumFpTA=sumFpTA+(Z(i)*(1-K(i))/(K(i)+(1-K(i))*TA)^2);
end
FTA=sumFTA-1;
FpTA=-sumFpTA;
TAplus=TA-(FTA/FpTA);
errorTA=abs(TA-TAplus);
TA=TAplus;
end
for i=1:3
xAnew(i)=Z(i)/(K(i)+(1-K(i))*TA);
end
errorxA=max(abs(xAnew-xA));
xA=xAnew
end
xxA(zz,:)=xA;
xxB(zz,:)=xB;
TTB(zz,:)=1-TA;
end
xxA
xxB
TTB
%% Diagrama Ternario
[h,hg,htick]=terplot
hold on
hter1=ternaryc(xxA(:,1),xxA(:,2),xxA(:,3));
hter2=ternaryc(xxB(:,1),xxB(:,2),xxB(:,3));
set(hter1,'marker','o','markerfacecolor','none','markersize',4,'line','-'
)
set(hter2,'marker','o','markerfacecolor','none','markersize',4,'line','-'
)
hlabels=terlabel('Acetato isobutilo','Acido acetico','Agua');
%% Tie Lines
for i=1:13;
ternaryc(xxA(:,1),xxA(:,2),xxA(:,3));
ternaryc([xxA(i,1);xxB(i,1)],[xxA(i,2);xxB(i,2)],[xxA(i,3);xxB(i,3)]);
end
end
En los resultados se observ que la composicin global era igual a la composicin del
X_beta, no se logr graficar.
BIBLIOGRAFIA
1. Vapor-liquid equilibrium data collection, Gmehling, Jurgen, 19462. Liquid-liquid equilibrium data collection, Gmehling, Jurgen, 19463. Study of liquidliquid equilibrium of the systems isobutyl acetate + acetic acid
+ water and isobutyl alcohol + acetic acid + water at different temperatures,
Elsevier, 2008, pp 76 81
4. Equilibrio de Fases, Jaime Jaramillo
5. Introduccin a la termodinamica en Ingenieria Quimica, Smith Van Ness