Академический Документы
Профессиональный Документы
Культура Документы
TERMODINAMICA QUIMICA
INGENIERIA QUIMICA
UNIVERSIDAD DEL VALLE
EQUILIBRIO LIQUIDO - VAPOR CON LA CORRELACION DE HAYDEN
O’CONNELL Y ECUACION UNIFAC
GRUPO (CLASE #) RK QK
CH3(1) 0.9011 0.848
CH2 (2) 0.6744 0.5470
CH(3) 0.4469 0.228
OH (4) 1.0000 1.200
Parámetros de interacción
Program Termo_Hayden_OConnell;
{Programa para el calculo de los segundos coeficientes viriales con Hayden_Oconnell}
{Variables utilizadas en programa principal}
{Variables reales}
var n,z,O,P,Tsat1,Tsat2,Bij,T,y1,x1,O_1,O_2,gama_1,gama_2,Psat1,Psat2,Vsat1,Vsat2,
alfa11,alfa21,Omega_1,Omega_2,Er1,Er2,y1a,y2a,Td,Osat_1,Osat_2,B11,B22,y2:Real;
{Inicio del procedimiento que permite calcular los segundos coeficientes viriales}
{La funcion requiere valores iniciales dependiendiendo del coeficiente a calcular}
Procedure HOC(T,nii,njj,nij,Tci,Tcj,Pci,Pcj,Rdi,Rdj,ui,uj:Real);
{Variables del procedure HOC(Hayden_Oconnell)}
var
wii,wjj,oiip,ojjp,eiikp,ejjkp,c1i,c2i,ei,c1j,c2j,ej,oii,ojj,eiik,ejjk,wij,c1p,c2p,oijp,eijkp,ep,oij,eijk,Eij,uija,
Dhij,Aij,uijap,boij,Tija,invTijap,Bmetbouij,Bcheij,BijD,BFpolar,BFnonpolar,BijF:Real;
begin
{Codigo del programa}
{Calculo del factor acentrico para el componente puro }
wii := 0.006026*Rdi+0.02096*sqr(Rdi)-0.001366*sqr(Rdi)*Rdi;
wjj := 0.006026*Rdj+0.02096*sqr(Rdj)-0.001366*sqr(Rdj)*Rdj;
{Parametros del metodo _Hayden_Oconnell}
oiip := (2.44-wii)*exp((1/3)*ln(1.0133*Tci/Pci));
ojjp := (2.44-wjj)*exp((1/3)*ln(1.0133*Tcj/Pcj));
eiikp := Tci*(0.748+0.91*wii-0.4*nii/(2+20*wii));
ejjkp := Tcj*(0.748+0.91*wjj-0.4*njj/(2+20*wjj));
c1i := (16+400*wii)/(10+400*wii);
c1j := (16+400*wjj)/(10+400*wjj);
c2i := 3/(10+400*wii);
c2j := 3/(10+400*wjj);
if (ui<1.45) then
begin
ei := 0;
end
else if (ui>=1.45) then
begin
ei := 1.7473e7*sqr(sqr(ui))/((2.882-1.882*wii/(0.03+wii))*Tci*sqr(oiip)*sqr(sqr(oiip))*eiikp);
end;
if (uj<1.45) then
begin
ej := 0;
end
else if (uj>=1.45) then
begin
ej := 1.7473e7*sqr(sqr(uj))/((2.882-1.882*wjj/(0.03+wjj))*Tcj*sqr(ojjp)*sqr(sqr(ojjp))*ejjkp);
end;
{Parametros Ji y Li}
J1 := r1/(x1*r1+x2*r2);
J2 := r2/(x1*r1+x2*r2);
L1 := q1/(x1*q1+x2*q2);
L2 := q2/(x1*q1+x2*q2);
{Parametros Gik}
G1CH3 := v1CH3*QCH3;
G1CH2 := v1CH2*QCH2;
G1OH := v1OH*QOH;
G1CH := v1CH*QCH;
G2CH3 := v2CH3*QCH3;
G2CH2 := v2CH2*QCH2;
G2OH := v2OH*QOH;
G2CH := v2CH*QCH;
{Parametro tethak}
tethaCH3 := x1*G1CH3+x2*G2CH3;
tethaCH2 := x1*G1CH2+x2*G2CH2;
tethaOH := x1*G1OH+x2*G2OH;
tethaCH := x1*G1CH+x2*G2CH;
{Parametro sik}
s1CH3 := G1CH3*tCH3CH3+G1CH2*tCH2CH3+G1OH*tOHCH3+G1CH*tCHCH3;
s1CH2 := G1CH3*tCH3CH2+G1CH2*tCH2CH2+G1OH*tOHCH2+G1CH*tCHCH2;
s1OH := G1CH3*tCH3OH+G1CH2*tCH2OH+G1OH*tOHOH+G1CH*tCHOH;
s1CH := G1CH3*tCH3CH+G1CH2*tCH2CH+G1OH*tOHCH+G1CH*tCHCH;
s2CH3 := G2CH3*tCH3CH3+G2CH2*tCH2CH3+G2OH*tOHCH3+G2CH*tCHCH3;
s2CH2 := G2CH3*tCH3CH2+G2CH2*tCH2CH2+G2OH*tOHCH2+G2CH*tCHCH2;
s2OH := G2CH3*tCH3OH+G2CH2*tCH2OH+G2OH*tOHOH+G2CH*tCHOH;
s2CH := G2CH3*tCH3CH+G2CH2*tCH2CH+G2OH*tOHCH+G2CH*tCHCH;
{Parametro nk}
nCH3 := x1*s1CH3+x2*s2CH3;
nCH2 := x1*s1CH2+x2*s2CH2;
nOH := x1*s1OH+x2*s2OH;
nCH := x1*s1CH+x2*s2CH;
{Calculo de gama combinatoria que toma en cuenta las diferencia en forma y tamaño}
lngamaC_1 := 1-J1+ln(J1)-5*q1*(1-J1/L1+ln(J1/L1));
lngamaC_2 := 1-J2+ln(J2)-5*q2*(1-J2/L2+ln(J2/L2));
{Calculo de gama residual que estima las interacciones moleculares}
lngamaR_1 := q1*(1-ln(L1))-((tethaCH3*s1CH3/nCH3-
G1CH3*ln(s1CH3/nCH3))+(tethaCH2*s1CH2/nCH2-G1CH2*ln(s1CH2/nCH2))+(tethaOH*s1OH/nOH-
G1OH*ln(s1OH/nOH))+(tethaCH*s1CH/nCH-G1CH*ln(s1CH/nCH)));
lngamaR_2 := q2*(1-ln(L2))-((tethaCH3*s2CH3/nCH3-
G2CH3*ln(s2CH3/nCH3))+(tethaCH2*s2CH2/nCH2-G2CH2*ln(s2CH2/nCH2))+(tethaOH*s2OH/nOH-
G2OH*ln(s2OH/nOH))+(tethaCH*s2CH/nCH-G2CH*ln(s2CH/nCH)));
{calculo de los coeficientes de actividad para los componentes i}
gama_1 := exp(lngamaC_1+lngamaR_1);
gama_2 := exp(lngamaC_2+lngamaR_2);
Procedure ANTOINEP(P:Real);
{Variables del procedure ANTOINE}
var
a1,b1,c1,a2,b2,c2:Real;
begin
{Codigo del programa}
{Constantes conocidas}
a1 := 6.84498;
b1 := 1203.526;
c1 := 222.863;
a2 := 7.75634;
b2 := 1366.142;
c2 := 197.970;
Tsat1 := b1/(a1-log(P))-c1;
Tsat2 := b2/(a2-log(P))-c2;
end; {fin del procedure AntoineP}
Procedure SDOC(T:Real);
var
tao1,tao2,Za1,Za2,Tc1,Tc2,Tr1,Tr2,Pc1,Pc2,R:Real;
begin
{Codigo del programa}
{Constante conocidas}
R := 83.1434; {cm3*bar/(mol*K)}
Za1 := 0.2729;
Za2 := 0.2540;
Tc1 := 553.54;
Tc2 := 508.32;
Pc1 := 40.75;
Pc2 := 47.64;
Tr1 := T/Tc1;
Tr2 := T/Tc2;
if (Tr1<=0.75) OR (Tr2<=0.75) then
begin
tao1 := 1+exp((2/7)*ln(1-Tr1));
tao2 := 1+exp((2/7)*ln(1-Tr2));
end
else if (Tr1>0.75) OR (Tr2>0.75) then
begin
tao1 := 1.6+0.00693026/(Tr1-0.655);
tao2 := 1.6+0.00693026/(Tr2-0.655);
end;
Vsat1 := (83.1434*Tc1/Pc1)*exp(tao1*ln(Za1));
Vsat2 := (83.1434*Tc2/Pc2)*exp(tao2*ln(Za2));
end; {fin procedure SDOC}
Procedure Fugacidad(T,P,y1:Real);
var
B12,d12,R:Real;
begin
HOC(T,0,0,0,553.54,553.54,40.75,40.75,3.261,3.261,0,0);
B11 := Bij;
{Se llama la funcion HOC para B11 cuando i=1 j=2 a 360K}
HOC(T,0,1.32,0,553.54,508.32,40.75,47.64,3.261,2.726,0,1.66);
B12 := Bij;
{Se llama la funcion HOC para B11 cuando i=2 j=2 a 360K}
HOC(T,1.32,1.32,1.32,508.32,508.32,47.64,47.64,2.726,2.726,1.66,1.66);
B22 := Bij;
R := 83.1434; {cm3*bar/(mol*K)}
d12 := 2*B12-B11-B22;
O_1 := exp((P/(R*T))*(B11+sqr(1-y1)*d12));
O_2 := exp((P/(R*T))*(B22+sqr(y1)*d12));
end;
writeln('******************************************************************************
*************************** ');
writeln(' ');
writeln('DIGITE LA OPCION QUE MAS LE CONVENGA: ');
writeln('(1) GENERA UNA TABLA DONDE X1 VARIA DESDE 0 A 1.0 ACUMULANDO 0.05 ');
writeln('(2) GENERA LA RESPUESTA SEGUN LA COMPOSICION DESEADA: ');
read(O);
while (O=1) OR (O=2) do
begin
if O=1 then
begin
z:=21;
end;
if O=2 then
begin
z:=1;
end;
n:=1;
while n<=z do
begin
x1 := 0.05*(n-1);
if (O=2) then
begin
writeln('DIGITE LA COMPOSICION DESEADA: ');
read(x1);
end;
Er2 :=1;
{PASO 1}
ANTOINEP(P*750.0617);
T := x1*(Tsat1+273.15)+(1-x1)*(Tsat2+273.15);
{PASO 2}
ANTOINET(T-273.15);
UNIFAC(x1,T);
{PASO 3}
alfa11 := Psat1/Psat1;
alfa21 := Psat2/Psat1;
{PASO 4}
Omega_1 := 1;
Omega_2 := 1;
y1a := x1*gama_1*Psat1*0.001333224/(Omega_1*P);
y2a := (1-x1)*gama_2*Psat2*0.001333224/(Omega_2*P);
y1a := y1a/(y1a+y2a);
while (Er2>1e-6) do
begin
{PASO 5}
Fugacidad(T,P,y1a);
Osat_1 :=exp(B11*Psat1*0.001333224/(83.1434*T));
Osat_2 :=exp(B22*Psat2*0.001333224/(83.1434*T));
SDOC(T);
Omega_1 := O_1/(Osat_1*exp(Vsat1*(P-Psat1*0.001333224)/(83.1434*T)));
Omega_2 := O_2/(Osat_2*exp(Vsat2*(P-Psat2*0.001333224)/(83.1434*T)));
Er1 := 1;
while (Er1>1e-6) do
begin
{PASO 6}
y1 := x1*gama_1*Psat1*0.001333224/(Omega_1*P);
y2 := (1-x1)*gama_2*Psat2*0.001333224/(Omega_2*P);
y1 := y1/(y1+y2);
Fugacidad(T,P,y1);
Osat_1 :=exp(B11*Psat1*0.001333224/(83.1434*T));
Osat_2 :=exp(B22*Psat2*0.001333224/(83.1434*T));
Omega_1 := O_1/(Osat_1*exp(Vsat1*(P-Psat1*0.001333224)/(83.1434*T)));
Omega_2 := O_2/(Osat_2*exp(Vsat2*(P-Psat2*0.001333224)/(83.1434*T)));
{PASO 7}
Er1 := abs(y1-y1a);
y1a := y1;
end;
{PASO 8}
Psat1 :=P/((x1*alfa11)*gama_1/Omega_1+((1-x1)*alfa21)*gama_2/Omega_2);
Td := 1203.526/(6.84498-log(Psat1*750.0617))-222.863+273.15;
{PASO 9}
ANTOINET(Td-273.15);
alfa11 := Psat1/Psat1;
alfa21 := Psat2/Psat1;
UNIFAC(x1,Td);
{PASO 10}
Er2 := abs(Td-T);
T := Td;
end;
{PASO 11}
ANTOINET(T-273.15);
UNIFAC(x1,T);
Fugacidad(T,P,y1a);
Osat_1 :=exp(B11*Psat1*0.001333224/(83.1434*T));
Osat_2 :=exp(B22*Psat2*0.001333224/(83.1434*T));
SDOC(T);
Omega_1 := O_1/(Osat_1*exp(Vsat1*(P-Psat1*0.001333224)/(83.1434*T)));
Omega_2 := O_2/(Osat_2*exp(Vsat2*(P-Psat2*0.001333224)/(83.1434*T)));
y1 := x1*gama_1*Psat1*0.001333224/(Omega_1*P);
y2 := (1-x1)*gama_2*Psat2*0.001333224/(Omega_2*P);
y1 := y1/(y1+y2);
if (n=1) then
begin
write(' ');
write('x1 ');
write(' ');
write('y1 ');
write(' ');
write('PhiMini_1 ');
write('');
write('PhiMini_2 ');
write(' ');
write('PhiMayu_1 ');
write(' ');
write('PhiMayu_2 ');
write(' ');
write('Gama_1 ');
write(' ');
write('Gama_2 ');
write(' ');
write('T ,ºC ');
writeln(' ');
end;
write(' ');
write(x1:1:4);
write(' ');
write(y1:2:4);
write(' ');
write(' ');
write(O_1:2:4);
write(' ');
write(O_2:2:4);
write(' ');
write(Omega_1:2:4);
write(' ');
write(Omega_2:2:4);
write(' ');
write(gama_1:2:4);
write(' ');
write(gama_2:2:4);
write(' ');
write(T-273.15:2:4);
writeln(' ');
n:=n+1;
end;
writeln('DIGITE NUEVA OPCION ENTRE (1) O (2) O (3) PARA SALIR ');
read(O);
end;
end.
********************************************************************************
*************************
2
DIGITE LA COMPOSICION DESEADA:
0.17
x1 y1 PhiMini_1 PhiMini_2 PhiMayu_1 PhiMayu_
2 Gama_1 Gama_2 T ,║C
0.1700 0.4149 0.9695 0.9638 1.0008 0.9908
3.1242 1.0345 72.7638
DIGITE NUEVA OPCION ENTRE (1) O (2) O (3) PARA SALIR
85
80
Temperatura (ºC)
75
70
65 y1
x1
x1experimental
y1experimental
60
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x1 y1
0.990
0.985
Coeficiente de fugacidad parcial (φi)
0.980
0.975
φ1
φ2
0.970
0.965
0.960
0.955
0.00 0.20 0.40 0.60 0.80 1.00 1.20
y1
Fig No. 3 Фi Vs y1
1.035
1.030
1.025
1.020
1.015
Фi
1.010
PhiMayu_1
PhiMayu_2
1.005
1.000
0.995
0.990
0.985
0.00 0.20 0.40 0.60 0.80 1.00 1.20
Composición fase vapor y1
16.0
14.0
12.0
10.0
Coef. actividad (γi)
8.0
Gama_1
Gama_2
6.0
4.0
2.0
0.0
0.0 0.2 0.4 0.6 0.8 1.0 1.2
Composición fase líquida ( X1)
Fig No. 5 Diagrama de equilibrio XY
0.9
0.8
Fraciones molares fase gaseosa (Y1)
0.7
0.6
0.5
0.4
0.3
0.2
x1 = y1
Experimentales
0.1 x1 = y1=
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Fraciones molares fase líquida (X1)
BIBLIOGRAFIA