Sunteți pe pagina 1din 4

Pregunta 1:

clc
A=7.32729;
B=1687.45;
C=231.652;
P=520;
X1=1;
for T=0:0.1:400
%hallando la presión de vapor del butyl-2-propenoate
Pvp1=10^(A-B/(C+T));
%Hallando Y1
Y1=X1*Pvp1/P;
%Comprobar que Y1 es aproximadamente 1
f=abs(1-Y1);
if f<0.01
temp=T;
break
end
end
disp('La temperatura de ebullición (K) a 520 mmHg es:');
disp(temp+273.15);

La temperatura de ebullición (K) a 520 mmHg es:


407.1500
Pregunta 2:
function respuesta=Temperaturizador(x)
A=[6.90328 7.87863];
B=[1163.03 1473.11];
C=[227.4 230.0];
V1=78.218;
V2=39.556;
k1=-373.30;
k2=1703.68;
P=760;
R=1.9872;
for T=0:0.1:400
%hallando la presión de vapor del metanol
Pvp1=10^(A(1)-B(1)/(C(1)+T));
%hallando la presión de vapor del agua
Pvp2=10^(A(2)-B(2)/(C(2)+T));
A12=V2/V1*exp(-k1/(R*(T+273.15)));
A21=V1/V2*exp(-k2/(R*(T+273.15)));
%Hallando el coeficiente de actividad del metanol
G1=exp(-(log(x+A12*(1-x)))+((1-x)*((A12/(x+A12*(1-x)))-
(A21/(A21*x+(1-x))))));
%Hallando el coeficiente de actividad del agua
G2=exp(-(log((1-x)+A21*x))-(x*((A12/(x+A12*(1-x)))-
(A21/(A21*x+(1-x))))));
%hallando Y1 y Y2
Y1=G1*x*Pvp1/P;
Y2=G2*(1-x)*Pvp2/P;
%Comprobar que Y1+Y2 es aproximadamente 1
Z=Y1+Y2;
f=abs(1-Z);
if f<0.01
temp=T;
break
end
end
respuesta=[temp Y1 Pvp1 G1];
end

clc
P=760;
Tt=[];
Xt1=[];
Yt1=[];
Pvp1=[];
Gt1=[];
Z=[];
fprintf('X1 %d\t');fprintf('%8s\t','');
fprintf('T(°C) %d\t');fprintf('%8s\t','');
fprintf('T(K) %d\t');fprintf('%8s\t','');
fprintf('Pvp1 %d\t');fprintf('%8s\t','');
fprintf('Y1 %d\t');fprintf('%8s\t','');
fprintf('G1 %d\t');fprintf('\n');
indice=1;
for x1=0:0.2:1
Temp=Temperaturizador(x1);
Tt(indice)=Temp(1);
Xt1(indice)=x1;
Yt1(indice)=Temp(2);
Pvp1(indice)=Temp(3);
Gt1(indice)=Temp(4);
indice=indice+1;
end
TtK=Tt+273.15;
for e=1:length(Xt1)
fprintf('%1.4f\t',Xt1(e));fprintf('%1.0s\t','');
fprintf('%1.4f\t',Tt(e));fprintf('%1.0s\t','');
fprintf('%1.4f\t',TtK(e));fprintf('%1.0s\t','');
fprintf('%1.4f\t',Pvp1(e));fprintf('%1.0s\t','');
fprintf('%1.4f\t',Yt1(e));fprintf('%1.0s\t','');
fprintf('%1.4f\t',Gt1(e));fprintf('\n');
end
subplot(1,2,1), plot(Xt1,Yt1,[0 1],[0 1]);
title('Diagrama de equilibrio L-V Cloroformo(1) + Metanol(2)');
xlabel('X1');
ylabel('Y1');
legend('Ideal');
subplot(1,2,2), plot(Xt1,Tt,Yt1,Tt);
title('Diagrama de equilibrio L-V Cloroformo(1),Metanol(2) vs T');
xlabel('X1, Y1');
ylabel('T(°C)');
legend('Ideal Cloroformo','Ideal Metanol');

X1 T(°C) T(K) Pvp1 Y1 G1


0.0000 64.5000 337.6500 829.7286 0.0000 2.6362
0.2000 57.9000 331.0500 671.0642 0.3659 2.0718
0.4000 55.1000 328.2500 611.4482 0.5334 1.6576
0.6000 54.1000 327.2500 591.2004 0.6286 1.3468
0.8000 54.4000 327.5500 597.2183 0.7035 1.1190
1.0000 61.5000 334.6500 754.3307 0.9925 1.0000

S-ar putea să vă placă și