This document describes the calculation of a Pxy diagram for an acetone-water mixture at 65°C using the gamma-phi method with NRTL and virial equations of state truncated to two terms. It provides the necessary parameters and equations to calculate vapor pressures, activity coefficients, and phase equilibrium pressures in order to plot the pressure as a function of mole fraction and composition. The calculations are performed in a loop that iteratively solves for the pressure until convergence within 0.001 bars is reached.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
124 views3 pages
Gamma PhiFormulationVersion2
This document describes the calculation of a Pxy diagram for an acetone-water mixture at 65°C using the gamma-phi method with NRTL and virial equations of state truncated to two terms. It provides the necessary parameters and equations to calculate vapor pressures, activity coefficients, and phase equilibrium pressures in order to plot the pressure as a function of mole fraction and composition. The calculations are performed in a loop that iteratively solves for the pressure until convergence within 0.001 bars is reached.
%%%%%%%%%%%%%%% GAMMA-PHI SCHEME %%%%%%%%%%%%%%%%%%%% T = 65 + 273.15; %K PHI_OLD1 = 1; PHI_OLD2 = 1; Pgraph = []; y1graph = []; for x1 = 0:0.01:1 %%%%%%%%%%%%%%%%%%%% GAMMA CALCULATION (NRTL) %%%%%%%%%%%%%%%%%%%%%% b_12= 631.05 ;%cal/mol b_21= 1197.41 ;%cal/mol alpha= 0.5343; %%from Table in page 474 Tau_12= b_12/(R*T); Tau_21= b_21/(R*T); G_12= exp(-alpha*Tau_12); G_21= exp(-alpha*Tau_21); gamma1= exp(((1-x1)^2)*((Tau_21*((G_21/(x1+(1-x1)*G_21))^2)) + ((G_12*Tau_12)/( ((1-x1)+x1*G_12)^2)))); gamma2= exp(((x1)^2)*((Tau_12*((G_12/((1-x1)+(x1)*G_12))^2)) + ((G_21*Tau_21)/( ((x1)+(1-x1)*G_21)^2)))); %%%%%%%%%%%%%%% GAMMA-PHI SCHEME (BUBL P CALC) %%%%%%%%%%%%%%%%%%%% check = 10; while check ~= 1 P = x1.*gamma1.*P1sat./PHI_OLD1 + (1-x1).*gamma2.*P2sat./PHI_OLD2 ; %Calcula tion of guess P y1_old = x1.*gamma1.*P1sat./( PHI_OLD1.*P); %calculation for y1 PHI_1 = exp( (B11.*(P - P1sat) + P.*( (1-y1_old).^2 ).*delta_12)./(R.*T)); PHI_2 = exp( (B22.*(P - P2sat) + P.*( (y1_old).^2 ).*delta_12)./(R.*T)); P_new = x1.*gamma1.*P1sat./PHI_1 + (1-x1).*gamma2.*P2sat./PHI_2 ; %Calculati on of new P if abs(P-P_new) < 0.001 check = 1; Pgraph(end+1) = P_new; y1graph(end+1) = y1_old; else check = 10; PHI_OLD1 = PHI_1; PHI_OLD2 = PHI_2; end end end fprintf(' Table of Values \n'); fprintf(' P x1 y1 \n'); MATRIX=[ Pgraph; 0:0.01:1; y1graph;]; disp(MATRIX');
plot(y1graph,Pgraph, 0:0.01:1,Pgraph) xlabel('X1,Y1'); ylabel('Pressure in kPa'); title('Pxy diagram for acetone(1)/water(2) system at 65 degC '); legend('P-X1','P-Y1');