Documentos de Académico
Documentos de Profesional
Documentos de Cultura
CELSIUS.
%modelo NRTL (Acetona, Cloroformo, Benceno)
clear all
xi=[0.3 0.5 0.2]
T= 60 %C
NC= 3 %número de componentes
for i= 1:NC
for j= 1:NC
aij(i,j) =Cij(i,j) +Dij(i,j)*T
Tij(i,j) =Aij(i,j) +Bij(i,j)/T+Eij(i,j)*log(T)+Fij(i,j)*T
Gij(i,j) =exp(-aij(i,j)*Tij(i,j))
end
end
i=1
for j =1:NC
for k =1:NC
xkGki(k)=xi(k)*Gij(k,i)
xkGkj(k)=xi(k)*Gij(k,j)
end
xjTjiGji(j)=xi(j)*Tij(j,i)*Gij(j,i)
sumxkGkj= sum(xkGkj)
end
sumxkGki= sum(xkGki)
sumxjTjiGji= sum(xjTjiGji)
for i= 1:NC
for j= 1:NC
aij(i,j) =Cij(i,j) +Dij(i,j)*T
Tij(i,j) =Aij(i,j) +Bij(i,j)/T+Eij(i,j)*log(T)+Fij(i,j)*T
Gij(i,j) =exp(-aij(i,j)*Tij(i,j))
end
end
for i=1:NC
for j =1:NC
for k =1:NC
xkGki(k)=xi(k)*Gij(k,i)
xkGkj(k)=xi(k)*Gij(k,j)
end
xjTjiGji(j)=xi(j)*Tij(j,i)*Gij(j,i)
sumxkGkj= sum(xkGkj)
for m=1:NC
xmTmjGmj(m)=xi(m)*Tij(m,j)*Gij(m,j)
end
sumxmTmjGmj=sum(xmTmjGmj)
doblesuma(j)=((xi(j)*Gij(i,j))/sumxkGkj)*(Tij(i,j)-sumxmTmjGmj/sumxkGkj)
end
sumdoblesuma = sum(doblesuma)
sumxkGki= sum(xkGki) %Las sumas deben ponerse fuera del reciclo para que
todos los términos necesarios hayan sido calculados
sumxjTjiGji= sum(xjTjiGji)
gi(i)= exp(sumxjTjiGji/sumxkGki+sumdoblesuma)
end
NC=2
P=1 %bar
yi=[ 0.1 0.9]
fi= ones(1,NC)
for i= 1:NC
Tsati(i)=Bi(i)/(Ai(i)- log10(P))-Ci(i) %Temperatura saturaciòn
componente i
end
for i= 1:NC
yiTsati(i)=yi(i)*Tsati(i)
end
T=sum(yiTsati)
for i= 1:NC %Càlculo de alpha y G del modelo NRTL
for j= 1:NC
aij(i,j) =Cij(i,j) +Dij(i,j)*T
Tij(i,j) =Aij(i,j) +Bij(i,j)/T+Eij(i,j)*log(T)+Fij(i,j)*T
Gij(i,j) =exp(-aij(i,j)*Tij(i,j))
end
end
for i=1:NC
Psati(i)=10^(Ai(i)-Bi(i)/(T+Ci(i))) %Presión saturación componente i
end
CONTINUACION TROCIO
%Temperatura de rocío ELV (Equilibrio Líquido-Vapor) Acetona Cloroformo
clear all
Aij = [0 0.9646; 0.5382 0] %ctes modelo NRTL, se elimina la 3 fila y
columna (benceno-benceno) para realizar el equilibrio Acetona-Cloroformo
Bij=[0 -590.026; -106.422 0]
Cij=[0 0.3; 0.3 0]
Dij=[0 0; 0 0]
Eij=[0 0; 0 0]
Fij=[0 0; 0 0]
NC=2
P=1 %bar
y1=0
while y1< 1
yi=[y1 1-y1]
fi= ones(1,NC)
for i= 1:NC
Tsati(i)=Bi(i)/(Ai(i)- log10(P))-Ci(i) %Temperatura saturaciòn
componente i
end
for i= 1:NC
yiTsati(i)=yi(i)*Tsati(i)
end
T=sum(yiTsati)
errorT = 10
while errorT > 0.0001
for i=1:NC
Psati(i)=10^(Ai(i)-Bi(i)/(T+Ci(i))) %Presión saturación componente i
end
gi=ones(1,NC)
errorg=10
while errorg > 0.0001
for i=1 : NC
Xi(i)=(yi(i)*fi(i)*P)/(gi(i)*Psati(i))
end
for i =1:NC
Psatji(i) =(yi(i)*fi(i)*Psati(1))/(yi(i)*Psati(i))
end
Psatj=P*sum(Psatji)
Tc=Bi(1)/(Ai(1)-log10(Psatj))-Ci(1)
errorT=abs((Tc-T)/Tc)
T=Tc
end
plot(xi(1),T,'+')
plot(yi(1),T,'.')
hold on
y1=y1+0.01
end
%Se teoriza que está en términos del coef de actividad ya que ese no es
el intervalo de temperatura
%CORRECCION
%Temperatura de rocío ELV (Equilibrio Líquido-Vapor) Acetona Cloroformo
clear all
Aij = [0 0.9646; 0.5382 0] %ctes modelo NRTL, se elimina la 3 fila y
columna (benceno-benceno) para realizar el equilibrio Acetona-Cloroformo
Bij=[0 -590.026; -106.422 0]
Cij=[0 0.3; 0.3 0]
Dij=[0 0; 0 0]
Eij=[0 0; 0 0]
Fij=[0 0; 0 0]
while y1< 1
yi=[y1 1-y1]
fi= ones(1,NC)
for i= 1:NC
Tsati(i)=Bi(i)/(Ai(i)- log10(P))-Ci(i) %Temperatura saturaciòn
componente i
end
for i= 1:NC
yiTsati(i)=yi(i)*Tsati(i)
end
T=sum(yiTsati)
errorT = 10
while errorT > 0.0001
for i=1:NC
Psati(i)=10^(Ai(i)-Bi(i)/(T+Ci(i))) %Presión saturación componente i
end
gi=ones(1,NC)
errorg=10
while errorg > 0.0001
for i=1 : NC
Xi(i)=(yi(i)*fi(i)*P)/(gi(i)*Psati(i))
end
for i =1:NC
Psatji(i) =(yi(i)*fi(i)*Psati(1))/(gi(i)*Psati(i))
end
Psatj=P*sum(Psatji)
Tc=Bi(1)/(Ai(1)-log10(Psatj))-Ci(1)
errorT=abs((Tc-T)/Tc)
T=Tc
end
plot(xi(1),T,'+')
plot(yi(1),T,'.')
hold on
y1=y1+0.01
end
%Presión de rocío ELV (Equilibrio Líquido-Vapor) Acetona Cloroformo
%Presión de rocío ELV (Equilibrio Líquido-Vapor) Acetona Cloroformo
clear all
Aij = [0 0.9646; 0.5382 0] %ctes modelo NRTL, se elimina la 3 fila y
columna (benceno-benceno) para realizar el equilibrio Acetona-Cloroformo
Bij=[0 -590.026; -106.422 0]
Cij=[0 0.3; 0.3 0]
Dij=[0 0; 0 0]
Eij=[0 0; 0 0]
Fij=[0 0; 0 0]
NC=2
T=273.15 %K
yi=[0.1 0.9]
for i=1:NC
Psati(i)=10^(Ai(i)-Bi(i)/(T+Ci(i))) %Presión saturación componente i
end
gi=ones(1,NC)
fi= ones(1,NC)
for i= 1:NC
gifi(i)= (gi(i)*fi(i)/gi(i)*Psati(i))
end
sumgifi = sum(gifi)
P=1/sumgifi %bar, ecuación 5.2