Anda di halaman 1dari 8

clear all; clc; clf

disp('******************************************************************')
disp('+++++++++++++EQUILIBRIO LIQUIDO VAPOR - ISOBARICO+++++++++++++++++')
disp('******************************************************************')
disp('************************CS2-CCL4**********************************')
%CONSTANTES DE ANTONIE
%PARA EL SULFURO DE CARBONO
antonieA_CS=15.9844;
antonieB_CS=2690.85;
antonieC_CS=-31.62;
%PARA EL TETRACLORURO DE CARBONO
antonieA_CCL4=15.8742;
antonieB_CCL4=2808.19;
antonieC_CCL4=-45.99;
%PRESIN DEL SISTEMA
P1=input('ingrese valor de presion en mmHg P=');%mmHg
P2=input('ingrese valor de presion en mmHg P=');%mmHg
P3=input('ingrese valor de presion en mmHg P=');%mmHg

%CALCULOS PARA LA PRESION 1


%HALLAMOS LAS TEMPERATURAS DE EBULLICIN
TebCS2=((antonieB_CS)/(antonieA_CS-log(P1)))-antonieC_CS;
TebCCL4=((antonieB_CCL4)/(antonieA_CCL4-log(P1)))-antonieC_CCL4;
%POSTULAMOS LAS TEMPERATURAS
T=[TebCS2:1:TebCCL4];%en K
n=length(T);%CONTEO DE DATOS DE T

for c=1:n
%CALCULO DE LAS PRESIONES DE SATURACIN
PSATcs(c)=exp(antonieA_CS-antonieB_CS/(T(c)+antonieC_CS));
PSATccl4(c)=exp(antonieA_CCL4-antonieB_CCL4/(T(c)+antonieC_CCL4));
%CALCULO DE LAS FRACCIONES MOLARES
Xcs(c)=(P1-PSATccl4(c))/(PSATcs(c)-PSATccl4(c));
Ycs(c)=(PSATcs(c)/P1)*Xcs(c);
%CALCULO DE LOS COEFICIENTES
Kcs(c)=PSATcs(c)/P1;
Kcl4(c)=PSATccl4(c)/P1;
end
disp('---------------------------------------------------------------------------------')
disp(' T PSATcs2 PSATccl4 Xcs2 Ycs2 Kcs2 Kccl4')
disp('---------------------------------------------------------------------------------')
for c=1:n
fprintf('%10.6f %10.6f %10.6f %10.6f %10.6f %10.6f
%10.6f\n',T(c),PSATcs(c),PSATccl4(c),Xcs(c),Ycs(c),Kcs(c),Kcl4(c))
end

%CALCULOS PARA LA PRESION 2


%HALLAMOS LAS TEMPERATURAS DE EBULLICIN
T2ebCS2=((antonieB_CS)/(antonieA_CS-log(P2)))-antonieC_CS;
T2ebCCL4=((antonieB_CCL4)/(antonieA_CCL4-log(P2)))-antonieC_CCL4;
%POSTULAMOS LAS TEMPERATURAS
T2=[T2ebCS2:1:T2ebCCL4];%en K
m=length(T2);
%Modelo
for z=1:m
P2SATcs(z)=exp(antonieA_CS-antonieB_CS/(T2(z)+antonieC_CS));
P2SATccl4(z)=exp(antonieA_CCL4-antonieB_CCL4/(T2(z)+antonieC_CCL4));
X2cs(z)=(P2-P2SATccl4(z))/(P2SATcs(z)-P2SATccl4(z));
Y2cs(z)=(P2SATcs(z)/P2)*X2cs(z);
K2cs(z)=P2SATcs(z)/P2;
K2cl4(z)=P2SATccl4(z)/P2;
end
disp('---------------------------------------------------------------------------------')
disp(' T2 P2SATcs2 P2SATccl4 X2cs2 Y2cs2 K2cs2 K2ccl4')
disp('---------------------------------------------------------------------------------')
for z=1:m
fprintf('%10.6f %10.6f %10.6f %10.6f %10.6f %10.6f
%10.6f\n',T2(z),P2SATcs(z),P2SATccl4(z),X2cs(z),Y2cs(z),K2cs(z),K2cl4(z))
end

%CALCULOS PARA LA PRESION 3


%HALLAMOS LAS TEMPERATURAS DE EBULLICIN
T3ebCS2=((antonieB_CS)/(antonieA_CS-log(P3)))-antonieC_CS;
T3ebCCL4=((antonieB_CCL4)/(antonieA_CCL4-log(P3)))-antonieC_CCL4;
%POSTULAMOS LAS TEMPERATURAS
T3=[T3ebCS2:1:T3ebCCL4];%en K
i=length(T3);
%Modelo
for j=1:i
P3SATcs(j)=exp(antonieA_CS-antonieB_CS/(T3(j)+antonieC_CS));
P3SATccl4(j)=exp(antonieA_CCL4-antonieB_CCL4/(T3(j)+antonieC_CCL4));
X3cs(j)=(P3-P3SATccl4(j))/(P3SATcs(j)-P3SATccl4(j));
Y3cs(j)=(P3SATcs(j)/P3)*X3cs(j);
K3cs(j)=P3SATcs(j)/P3;
K3cl4(j)=P3SATccl4(j)/P3;
end
disp('---------------------------------------------------------------------------------')
disp(' T3 P3SATcs2 P3SATccl4 X3cs2 Y3cs2 K3cs2 K3ccl4')
disp('---------------------------------------------------------------------------------')
for j=1:i
fprintf('%10.6f %10.6f %10.6f %10.6f %10.6f %10.6f
%10.6f\n',T3(j),P3SATcs(j),P3SATccl4(j),X3cs(j),Y3cs(j),K3cs(j),K3cl4(j))
end

%GRAFICAMOS Xcs2 - Ycs2 vs T


plot(Xcs,T,'b');
hold on
plot(Ycs,T,'g');
hold on
plot(X2cs,T2,'r');
hold on
plot(Y2cs,T2,'k');
hold on
plot(X3cs,T3,'c');
hold on
plot(Y3cs,T3,'m');

xlabel('Xcs2-Ycs2')
ylabel(' T (K) ')
title('ELV ISOBRICOO DE CS2 - CCL4')
legend('540 mmHg','','780 mmHg','','1200 mmHg','')
grid
hold off
disp('---------------------------------------------------------------------------------')

RESULTADOS

+++++++++++++EQUILIBRIO LIQUIDO VAPOR - ISOBARICO+++++++++++++++++

************************CS2-CCL4**********************************

ingrese valor de presion en mmHg P=520

ingrese valor de presion en mmHg P=760

ingrese valor de presion en mmHg P=3800


ELV ISOBRICOO DE CS2 - CCL4
420
540 mmHg

400 780 mmHg

1200 mmHg
380
T (K)

360

340

320

300
0 0.2 0.4 0.6 0.8 1 1.2 1.4
Xcs2-Ycs2

clear all; clc; clf

%CONSTANTES DE ANTONIE
%PARA EL COMPONENTE A
antonieA_A=18.3036;
antonieB_A=3816.44;
antonieC_A=-46.13;
%PARA EL COMPONENTE B
antonieA_B=16.8080;
antonieB_B=3405.57;
antonieC_B=-56.34;
%HALLAMOS LAS TEMPERATURAS DE EBULLICIN
%PRESION
P1=520; %ATMOSFERICA
TebCS2=((antonieB_A)/(antonieA_A-log(P1)))-antonieC_A
TebCCL4=((antonieB_B)/(antonieA_B-log(P1)))-antonieC_B
%POSTULAMOS LAS TEMPERATURAS
T=[TebCS2:1:TebCCL4];%en K
n=length(T);
%Modelo
for c=1:n
PSATA(c)=exp(antonieA_A-antonieB_A/(T(c)+antonieC_A));
PSATB(c)=exp(antonieA_B-antonieB_B/(T(c)+antonieC_B));
XA(c)=(P1-PSATB(c))/(PSATA(c)-PSATB(c));
YA(c)=(PSATA(c)/P1)*XA(c);
KA(c)=PSATA(c)/P1;
KB(c)=PSATB(c)/P1;
end
disp('----------------------------------------------------------------')
disp(' T PSATA PSATB XA YA KA
KB')
disp('-----------------------------------------------------------------')
for c=1:n
fprintf('%10.6f %10.6f %10.6f %10.6f %10.6f %10.6f
%10.6f\n',T(c),PSATA(c),PSATB(c),XA(c),YA(c),KA(c),KB(c))
end
plot(XA,T,'b');
hold on
plot(YA,T,'g');
xlabel('XA-YA')
ylabel(' T (K) ')
title('DIAGRAMA DE EQUILIBRIO T-X,Y')
grid

grid on

DIAGRAMA DE EQUILIBRIO T-X,Y


380

378

376

374

372
T (K)

370

368

366

364

362
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
XA-YA

TebCS2 = 362.8530

TebCCL4 = 379.0153
---------------------------------------------------------------------------------

T PSATA PSATB XA YA KA KB

---------------------------------------------------------------------------------

362.853027 520.000000 298.065713 1.000000 1.000000 1.000000 0.573203

363.853027 540.099945 309.031977 0.913013 0.948304 1.038654 0.594292

364.853027 560.843341 320.326669 0.830185 0.895392 1.078545 0.616013

365.853027 582.246140 331.957157 0.751303 0.841237 1.119704 0.638379

366.853027 604.324554 343.930913 0.676165 0.785814 1.162163 0.661406

367.853027 627.095062 356.255507 0.604581 0.729096 1.205952 0.685107

368.853027 650.574406 368.938608 0.536371 0.671057 1.251105 0.709497

369.853027 674.779596 381.987988 0.471366 0.611670 1.297653 0.734592

370.853027 699.727909 395.411516 0.409404 0.550907 1.345631 0.760407

371.853027 725.436890 409.217163 0.350335 0.488742 1.395071 0.786956


372.853027 751.924356 423.412999 0.294014 0.425147 1.446008 0.814256

373.853027 779.208392 438.007195 0.240306 0.360094 1.498478 0.842322

374.853027 807.307357 453.008020 0.189083 0.293554 1.552514 0.871169

375.853027 836.239884 468.423845 0.140223 0.225500 1.608154 0.900815

376.853027 866.024878 484.263137 0.093610 0.155902 1.665432 0.931275

377.853027 896.681519 500.534465 0.049137 0.084731 1.724388 0.962566

378.853027 928.229265 517.246498 0.006700 0.011960 1.785056 0.994705


clc,clear all, clf
%CONSTANTES DE ANTONIE
%PARA A
antonieA_A=15.8742;
antonieB_A=2808.19;
antonieC_A=-45.99;

XA=[0:0.1:1];

KA=[2.66 2.287 2.05 1.825 1.65 1.46 1.35 1.26 1.18 1.12 1.0];%KA=[2.66
2.27 2.04 1.83 1.64 1.45 1.35 1.26 1.18 1.12 1.00];

n=length(KA);
%a 350 K

Tc=350;
Xa=0.5074;
Ya=0.7443;
%CALCULAMOS LA PRESION DEL SISTEMA
%CALCULO DE LA PRESION DE SATURACION A 350 K
Psat350=exp(antonieA_A-((antonieB_A)/(Tc+antonieC_A)));
%CALCULO DE LA PRESION DEL SISTEMA
disp('Presion del sistema')
P=(Xa*Psat350)/Ya

%Modelo
for c=1:n
YA(c)=XA(c)*KA(c);
PsatA(c)=KA(c)*P;
T(c)=((antonieB_A)/(antonieA_A-log(PsatA(c))))-antonieC_A;

end
disp('----------------------------------------------------------------')
disp(' T PSATA XA YA KA')
disp('----------------------------------------------------------------')
for c=1:n
fprintf('%10.6f %10.6f %10.6f %10.6f
%10.6f\n',T(c),PsatA(c),XA(c),YA(c),KA(c))
end
plot(XA,T,'b');
hold on
plot(YA,T,'g');
xlabel('XA-YA')
ylabel(' T (K) ')
title('DIAGRAMA DE EQUILIBRIO T-X,Y')
grid
hold off

Presin del sistema

P = 520.0330

---------------------------------------------------------------------------------

T PSATA XA YA KA

---------------------------------------------------------------------------------

370.937461 1383.287705 0.000000 0.000000 2.660000

365.354113 1189.315406 0.100000 0.228700 2.287000

361.429494 1066.067592 0.200000 0.410000 2.050000

357.363185 949.060173 0.300000 0.547500 1.825000

353.921355 858.054403 0.400000 0.660000 1.650000

349.845128 759.248139 0.500000 0.730000 1.460000

347.291371 702.044512 0.600000 0.810000 1.350000

345.077375 655.241544 0.700000 0.882000 1.260000

343.002309 613.638907 0.800000 0.944000 1.180000

341.371947 582.436928 0.900000 1.008000 1.120000

337.892303 520.032972 1.000000 1.000000 1.000000


DIAGRAMA DE EQUILIBRIO T-X,Y
375

370

365

360
T (K)

355

350

345

340

335
0 0.2 0.4 0.6 0.8 1 1.2 1.4
XA-YA

Anda mungkin juga menyukai