Вы находитесь на странице: 1из 9

CHE513 –Advanced Chemical Engineering Thermodynamics - Term Project – Sem.

181

Equilibrium calculations for mixtures of n-Hexane and Benzene using


Extended Van Laar model

Syed Samsamuddin g201803440, Hassam Mazhar g201803660


Department of Chemical Engineering, King Fahd University of Petroleum & Minerals (KFUPM), Dhahran, Saudi Arabia

Abstract – Vapor-Liquid Equilibrium calculations are presented for a different binary and ternary
mixtures. Extended Van Laar model which accounts for temperature dependence of the energy
parameter as proposed by Y. Peng was used to calculate the activity coefficient and some of the
results were reproduced. Systems which illustrated azeotropic behavior were added with suitable
solvent to enhance the separation process. The recommended solvent for n-hexane – benzene is
ethylenediamine (EDA) as suggested by C. Cumming et. al. Due to limited availability of experiment
data to estimate the binary interaction parameters of n-hexane-benzene-EDA mixture, a different
ternary mixture of n-hexane – benzene- cyclohexane was used to verify the calculation approach
and to validate the robustness of the Extended Van Laar model for multicomponent systems. The
predicted bubble temperatures were then compared to the available experimental data. The results
showed good agreement of the predicted bubble temperatures and the vapor-liquid mole fractions
with the experiment values. Copyright © 2018

Keywords: VLE, LLE, Benzene, Hexane, Cyclohexane, Sulfolane, Binary, Ternary, EDA

Nomenclature
VLE Vapor Liquid Equilibrium
II. Introduction
LLE Liquid-Liquid Equilibrium Vapor-Liquid Equilibrium is very important, in
NRTL Non-Random Two Liquid
EDA Ethylene Diamine particular for chemical engineers because of its wide
applications such as for the design of distillation
I. Objectives columns and other related separation processes. It
also renders a scope for improving the separation
The objectives of this work are to: processes based on the phase behavior. The accuracy
1. Reproduce VLE (Vapor-Liquid-Equilibrium)
of the VLE calculations is based on the ideality of the
data for different binary mixtures viz. n- mixture in vapor as well as in the liquid phase.
hexane – benzene, benzene, – n-heptane, Selection of appropriate models to account for the
benzene – cyclohexane and hexane – non-ideality will help improve the VLE calculations.
cyclohexane using Extended Van Laar Models The non-ideality of the mixture is characterized by
for activity coefficient as presented by Ding- the activity coefficient of the mixture in modified
Yu Peng [1]. Rault’s Law. There are several models available to
2. Perform VLE calculations for ternary mixture
calculate the activity coefficient such as NRTL,
n-hexane, benzene, and the selected solvent. Wilson, Margules, and Van Laar etc.
3. Adjust the operating conditions to get LLE
In this project, a model proposed by Ding-Yu Peng
(Liquid-Liquid-Equilibrium) for ternary called Extended Van Laar model was used to
mixture n-hexane, benzene, and solvent and perform the VLE calculations for different binary
perform LLE calculations to analyze this and ternary mixtures. In comparison to the original
separation process based on extraction. Van Laar model, the Extended Van Laar model
4. To replace the solvent with a salt to carry the
accounts for the temperature dependence of the
LLE calculations. energy parameter (a) as opposed to Van Der Waal’s
1
CHE513 –Advanced Chemical Engineering Thermodynamics - Term Project – Sem. 181

approach which considers the energy parameter as a UNIFAQ models to estimate the activity coefficient
constant for any given system thus making the and perform VLE calculations for binary systems.
Extended Van Laar model applicable for systems Liquid-Liquid-Extraction becomes more important
exhibiting both positive and negative deviations for systems in which vapor-liquid equilibrium
from Raoult's Law. separation is difficult because of azeotrope formation
The vapor-liquid equilibrium for the selected for systems with very close boiling points i.e. relative
binary system n-hexane (1) and benzene (2) was volatility becomes 1 at certain saturation
studied. To this system, a solvent was introduced to temperatures. J. Chen et. al. [10] presented Liquid-
analyze the system behavior for ternary VLE. By liquid equilibrium of multi-component systems. The
adjusting the temperature and pressure, LLE equilibrium calculations were performed using
calculations were performed for the same ternary NRTL models. A. Kareem et. al. [11] studied the
system to analyze this separation process based on LLE for a ternary system of n-hexane, benzene with
extraction. Furthermore, the ternary LLE phosphonium based deep eutectic solvent.
calculations can be extended by replacing the solvent Ionic liquids may be used for liquid-liquid
with a suitable ionic liquid to enhance the separation. extraction as an alternative to routine solvents. Ionic
liquids are the subject of recent studies because the
III. Literature Review use of ionic liquids provides alternative methods of
separations which may be more economical
VLE calculations for non-ideal systems require the providing ease of recovery from the extract [12] [13].
use of robust models to account for the non-ideality. In this work, a binary mixture of n-hexane and
There are several models available throughout the benzene was selected to perform VLE calculations
literature. Of them, the most common are Van Laar using Extended Van Laar model. Bubble T
[2], Margules [3], Wilson [4], NRTL [5] etc. These calculations were performed at atmospheric
models relate the Excess Gibb’s Free Energy to pressure. A solvent was introduced to this binary
activity coefficient as a function of liquid mole mixture and ternary calculations were performed at
fractions. P. Colburn et. al. [6] offered ways to the same operating pressure. For this ternary mixture,
evaluate the experimental data to Vapor-Liquid the operating conditions were changed to perform the
Equilibrium. The Extended Van Laar model as LLE calculations.
proposed by Ding-Yu Peng provides a reliable model
for systems showing deviation from Raoult's law IV. Methodology
while accounting for the temperature dependence of
energy parameter used in the Van Der Waal’s The modified Raoult's Law for calculations of liquid
equation of state. Ding-Yu Peng’s work provides (x) and vapor (y) compositions is given by:
experimental evidence for the accuracy of this 𝑦𝑖 𝑃 = 𝑥𝑖 𝛾𝑖 𝑃𝑖𝑠𝑎𝑡 (1)
model. It was also extended to ternary & where 𝛾𝑖 is the activity coefficient of the species (i),
multicomponent systems and compared to P and 𝑃𝑖𝑠𝑎𝑡 are the operating and saturation pressures
experimental data. His model requires the knowledge respectively.
of the interaction parameter between binary pairs of
molecules for accurate results to calculate the excess The Excess Gibbs Energy for the binary system is
Gibb’s free energy. extended to the multicomponent system as suggested
There have been several works done for the VLE by Y. Peng is given by:
calculations of the selected system of n-hexane and
benzene [7] [8] [9]. S. Govindaswami et. al used 𝐺 𝐸 ∑𝑁−1 𝑁
𝑖=1 ∑𝑗=𝑖+1 𝑥𝑖 𝑥𝑗 𝑏𝑖 𝑏𝑗 𝜀𝑖𝑗
Wilson models for estimating the activity coefficient =
𝑅𝑇 ∑𝑁𝑖=1 𝑥𝑖 𝑏𝑖
for the binary and ternary system. A. Harris et. al.
Where 𝜀𝑖𝑗 is the interaction parameter between
used NRTL model for the activity coefficient of Four
component i and j and b is the size parameter
Binary Systems at 363.15 K. S. Nebig et. al. used the
2
CHE513 –Advanced Chemical Engineering Thermodynamics - Term Project – Sem. 181

calculated from the Peng-Robinson equation of state was found that our T-x-y calculations were in good
given by: agreement with the first four plots reported by Y.
0.07796 𝑅𝑇𝑐 Peng.
𝑏=
𝑃𝑐
Where 𝑇𝑐 and 𝑃𝑐 are critical temperature and pressure
respectively.

And the activity coefficient is given by:

𝑁
𝑏𝑘 𝐺𝐸
𝑙𝑛𝛾𝑘 = 𝑁 (∑ 𝑥𝑖 𝑏𝑖 𝜀𝑖𝑘 − )
∑𝑖=1 𝑥𝑖 𝑏𝑖 𝑅𝑇
𝑖=1
𝑖≠𝑘

The value of the interaction parameters at 101.3 kPa


reported by Y. Peng is given in below table:

TABLE I
INTERACTION PARAMETERS Figure 1: T-x1-y1 for Benzene (1) and n-Heptane (2) at
Component Component 53.33kPa
102 𝜀12
1 2
n-Hexane Benzene 0.4909
n-Heptane Benzene 0.4962
Cyclohexane Benzene 0.4283
Cyclohexane n-Hexane 0.0265

𝑁
𝑡𝑖𝑠𝑎𝑡 𝑇𝑒𝑠𝑡𝑖𝑚𝑎𝑡𝑒 = ∑ 𝑥𝑖 𝑡𝑖𝑠𝑎𝑡
From Antoine eqn. 𝑖=1

𝑃𝑖𝑠𝑎𝑡
Calculate 𝛾𝑖 , 𝑃𝑖𝑠𝑎𝑡 𝛼=
𝑃𝑗𝑎𝑠𝑡

Figure 2: T-x1-y1 for Benzene (1) and Cyclohexane (2) at


𝑃 101.33kPa
Calculate New T 𝑁𝑒𝑤 𝑃1𝑠𝑎𝑡 = 𝑥2 𝛾2
Until T converges 𝑥1 𝛾1 +
𝛼

Algorithm for Bubble Temperature calculation

V. Results and Discussions

V.1. VLE Binary Mixtures


The Extended Van Laar models were tested for
different binary mixtures by reproducing VLE
plots of T-x-y for Benzene – n-heptane, Benzene-
cyclohexane, n-hexane - cyclohexane and n-
hexane – benzene. The binary interaction
parameters used were presented by Y. Peng which Figure 3: T-x1-y1 for Hexane (1) and Cyclohexane (2) at
101.33kPa
were calculated using Barker’s method [13]. It

3
CHE513 –Advanced Chemical Engineering Thermodynamics - Term Project – Sem. 181

approach, a different ternary system was selected to


perform the Ternary VLE calculations.
The algorithm for the calculations is similar to a
binary system as mentioned in the previous section.
The Matlab code used for the calculations is attached
at the end of this paper. The Matlab code is a
combination of a function file & main file. The
function file called ‘vlet’ consists of the iterative
loops. The function consists of inter loops which
perform the bubble temperature calculations for
every possible combination of component liquid
mole fractions, i.e. x1, x2 and x3. The generated data
was exported to Excel for data analysis. The data was
Figure 4: T-x1-y1 for Hexane (1) and Benzene (2) at filtered to remove the redundant and physically
101.33kPa unrealizable combinations of the liquid mole
fractions. The resultant data provided the range of
The reliability of our VLE calculations was verified
Bubble Temperatures for the ternary mixture of
with the experimental data. For Benzene – n-Heptane
Hexane, Benzene, and Cyclohexane. The calculated
the source of the experimental data was Nielsen et.
bubble temperatures were verified against
al. [14], for benzene-cyclohexane was Richards et.
experimental data as reported by Li et. al [18] as
al. [15], for Hexane – Cyclohexane was Ridgway et
depicted in figure 5.
al. [16].
The system of our interest is Hexane (1) and
Benzene (2). The VLE calculations were performed
for this system and then compared to the ■ - Tcalc

experimental data as reported by Ridgway et al. It


can be observed from the plotted figures that the
calculations are accurate. The VLE binary figures
were reproduced using the new Matlab code which
was developed as per the Bubble T calculation
algorithm. The Matlab code is attached at the end of
this paper. The error tolerance for the iterations was
set to be less than 0.0001 before the desired bubble
temperature is converged.

V.2. VLE Ternary Mixtures

The VLE calculation for the binary mixture Hexane Figure 5: VLE - Ternary Bubble T calculations for
Hexane-Benzene-Cyclohexane
(1) and Benzene (2) was extended to ternary systems.
Initially, a Matlab program was developed to
V.3. LLE Ternary Mixtures (Solvent Extraction)
perform the calculations. The Extended Van Laar
model in ternary form was used to calculate the Ethylenediamine (EDA) is miscible with benzene
activity coefficient. The suggested solvent for while immiscible in hexane. It is a potential solvent
Ternary VLE of Hexane and Benzene mixture is for Benzene – Hexane separation. The saturation
Ethylene-diamine as recommended by C. Cumming temperature at atmospheric pressure is 117 degC.
[17]. Due to unavailability of literature for the above The VLE operating conditions of the Hexane –
solvent, the calculations were tested for the different Benzene – EDA ternary system can be changed to get
ternary system. In order to validate our calculation LLE by changing the temperature to be well below

4
CHE513 –Advanced Chemical Engineering Thermodynamics - Term Project – Sem. 181

the lowest saturation temperature of the VLE. So far


in the literature, there seems to be limited evidence [7] Roger A. Harris‡, Roland Wittig, “Vapor-Liquid
Equilibria for Four Binary Systems”, J. Chem. Eng. Data,
reported about the research done on LLE using this 2003, 48 (2), pp 341–343.
ternary system.
[8] S. Govindaswamy, AN. Andlappan, “Vapor-Liquid
VI. Conclusions & Recommendations Equilibrium Data at Atmospheric Pressure for the
Ternary”, Department of Technology, Annamalai
University, Annamalainagar-608101
The Extended Van Laar model was reproduce the
VLE T-x-y curves for n-hexane – benzene, benzene, [9] Silke Nebig, Rainer Bölts, “Measurement of vapor–
– n-heptane, benzene – cyclohexane and hexane – liquid equilibria (VLE) and excess enthalpies (HE) of
binary systems”, Fluid Phase Equilibria Volume 258,
cyclohexane and compared to the experimental
Issue 2, 15 September 2007, Pages 168-178
values. The Extended Van Laar model was found be
in good approximation with the experimental results. [10] Jian Chen, Li-PingDuan, “Liquid–liquid equilibria
Furthermore, predicted VLE data of ternary of multi-component systems”, Fluid Phase Equilibria
Volume 173, Issue 1, 5 August 2000, Pages 109-119
system of n-hexane, benzene and cyclohexane was
compared to experimental data reported by Li et. al. [11] A. Kareema,∗, Farouq S. Mjalli, “iquid–liquid
The predicted bubble temperatures were in very good equilibria for the ternary system”, J. Chem. Eng. Data,
agreement with the experimental values. 2018, 63 (3), pp 613–624.
The LLE and ternary VLE and calculations of the [12] Alberto Arce a, Martyn J. Earle, “Separation of
proposed system n-hexane, benzene and aromatic hydrocarbons from alkanes using the ionic
ethylenediamine (solvent) can be produced using the liquid 1-ethyl-3-methylimidazoliumbis{(trifluoromethyl)
same approach provided in the Matlab program upon sulfonyl}amide” Green Chem., 2007, 9, 70-74.
availability of the experimental data to estimate the [13] Ionic Liquids in Synthesis, ed. P. Wasserscheid and
binary interaction parameters, as required by the T. Welton, Wiley-VCH, Weinheim, 2003 [13]
Extended Van Laar model. J. A. Barker, “Determination of activity coefficients from
total pressure measurements”, Aust. J. Chem., vol. 6, pp.
207-210, August 1953.
REFERENCES
[1] Peng, D.-Y. (2010). Extending the Van Laar Model to [14] R. L. Nielsen and J. H. Weber, “Vapor-liquid
Multicomponent Systems. The Open Thermodynamics equilibria at subatmospheric
Journal, 129-140. pressures. Binary and ternary systems containing ethyl
alcohol, benzene, and n-heptane”, J. Chem. Eng. Data,
[2] J. J. van Laar, “Über Dampfspannungen von binären vol. 4, pp. 145-151, April 1959
Gemischen (The vapor pressure of binary mixtures)”, Z.
Physik. Chem., vol. 72, pp. 723-751, May 1910. [15] A. R. Richards and E. Hargreaves, “Vapor-liquid
equilibria of close-boiling binary hydrocarbon mixtures”,
[3] M. Margules, “Über die Zusammensetzung der Ind. Eng. Chem., vol. 36, pp. 805-808, September 1944
gesättigten Dämpfe von Mischungen”, Sitzungsber Akad.
Wiss. Wien, Math. Naturw. Klasse, II, vol. 104, pp. [16] K. Ridgway and P. A. Butler, “Some physical
1243-1278, 1895 properties of the ternary system benzene-cyclohexane-n-
hexane”, J. Chem. Eng. Data, vol. 12, pp. 509-515,
[4] G. M. Wilson, “Vapor-liquid equilibrium. XI. A new October 1967
expression for the excess free energy of mixing”, J. Am.
Chem. Soc., vol. 86, pp.127-130, January 1964 [17] C. Cumming F. Morton, “Separation of benzene
and n‐hexane by means of ethylenediamine as a solvent:
[5] H. Renon and J. M. Prausnitz, “Local compositions in Molar solutropy” Volume3, Issue8, August 1953 Pg.
thermodynamic excess functions for liquid mixtures”, 358-366
AIChE J., vol. 14, pp. 135-144, January 1968
[18] I. P.-C. Li, J. Polak, and B. C.-Y. Lu, “Ternary
[6] H. C. Carlson and A. P. Colburn, “Vapor-liquid vapor-liquid equilibria for n-hexane + cyclohexane +
equilibria of nonideal solutions. Utilization of theoretical benzene”, J. Chem. Thermodynamics, vol. 5, pp. 417-
methods to extend data”, Ind. Eng. Chem., vol. 34, 424, May 1974
pp.581-589, May 1942

5
CHE513 –Advanced Chemical Engineering Thermodynamics - Term Project – Sem. 181

Matlab Codes:

VLE Binary Calculations Matlab Code:

Main File:
clc
clear

%Hexane, Benzene:
[T11,X11,Y11] = vleb(1.0132,0.004909, 507.6,30.25, 13.8193, 2696.04, 224.317,562.2, 48.8,
13.7819, 2726.81, 217.572);
subplot(2,2,1)
plot(X11,T11)
hold on
plot(Y11,T11);
hold on

TexpHBK = [353.25 350.75 348.25 344.05 342.55 341.95 341.95];


TexpHB = TexpHBK-273.15;
x1expHB = [0 0.073 0.172 0.4620 0.692 0.962 1];
y1expHB = [0 0.14 0.268 0.54 0.725 0.964 1];

plot(x1expHB,TexpHB,'*', y1expHB, TexpHB,'*')

%Hexane, Cyclo-hexane:
[T12,X12,Y12] = vleb(1.0132,0.000265, 507.6,30.25, 13.8193, 2696.04, 224.317,553.6,
40.73, 13.6568, 2723.44,220.618);
subplot(2,2,2)
plot(X12,T12)
hold on
plot(Y12,T12);
hold on

TexpHCK = [353.87 352.65 351.35 347.85 346.85 343.20 341.85];


TexpHC = TexpHCK-273.15;
x1expHC = [0.00 0.082 0.167 0.438 0.523 0.877 1];
y1expHC = [0 0.121 0.226 0.523 0.602 0.904 1];

plot(x1expHC,TexpHC,'*', y1expHC, TexpHC,'*')


hold on

%Benzene, Cyclo-hexane:
[T13,X13,Y13] = vleb(1.0132,0.004283, 562.2, 48.8, 13.7819, 2726.81, 217.572,553.6,
40.73, 13.6568, 2723.44,220.618);
subplot(2,2,3)
plot(X13,T13)
hold on
plot(Y13,T13);
hold on

TexpBCK = [353.85 352.65 352.05 350.65 350.55 352.45 353.25];


TexpBC = TexpBCK-273.15;
x1expBC = [0 0.101 0.171 0.428 0.571 0.945 1];
y1expBC = [0 0.131 0.211 0.445 0.564 0.926 1];

plot(x1expBC,TexpBC,'*', y1expBC, TexpBC,'*')


hold on

%Benzene, Heptane:
[T14,X14,Y14] = vleb(0.5333,0.004962, 562.2, 48.8, 13.7819, 2726.81, 217.572,540.2,
27.40, 13.8622, 2910.26, 216.432);
subplot(2,2,4)
plot(X14,T14)
hold on
plot(Y14,T14);
hold on

6
CHE513 –Advanced Chemical Engineering Thermodynamics - Term Project – Sem. 181

TexpBH = [77.9 73.9 70.6 64.4 63.3 60.8 60.3];


x1expBH = [0 0.1 0.2 0.5 0.6 0.9 1];
y1expBH = [0 0.218 0.373 0.66 0.727 0.916 1];

plot(x1expBH,TexpBH,'*', y1expBH, TexpBH,'*')


hold on

Fuction File:
function [T1,X1,Y1] = vleb(P,e12,Tc1,Pc1,A1,B1,C1,Tc2,Pc2,A2,B2,C2)

%Temperature are in K, Pressure are in bar, Antoine Constants for deg C & kPA

Pkpa = P*100;%Kpa
Pc2kpa = Pc2*100;
Pc1kpa = Pc1*100;
R = 8310;
%Initial Guess for Saturation Temperatures in deg C:

t1sat = ((B1/(A1-log(Pkpa)))-C1);
t2sat = ((B2/(A2-log(Pkpa)))-C2);

% Peng Robinson Constants for the size terms:


b1 = (0.07780*R*Tc1)/Pc1kpa;
b2 = (0.07780*R*Tc2)/Pc2kpa;

x1= 0; % initial value for x1 calculations will be repeated until x1 = 1;


cx = 0;
output = zeros(100,3);

while x1<=1;
cx=cx+1;
T = zeros(100,1);%Changing T to vector;
c = 0; % counter;
tol = 1;
%initial guess for temperature
T(1) = (x1*t1sat) + ((1-x1)*t2sat);

while tol>0.0001;% accuracy of the iteration


c=c+1;

GeRT = (x1*(1-x1)*b1*b2*e12)/(x1*b1+((1-x1)*b2));
gamma1 = exp((b1/((x1*b1)+((1-x1)*b2)))*(((1-x1)*b2*e12)-GeRT));
gamma2 = exp((b2/((x1*b1)+((1-x1)*b2)))*((x1*b1*e12)-GeRT));

P1sat = exp(A1-(B1/(T(c)+C1)));
P2sat = exp(A2-(B2/(T(c)+C2)));

Alpha = P1sat/P2sat;

P1sat1 = Pkpa/(x1*gamma1+(((1-x1)*gamma2)/Alpha));
T(c+1) = (B1/(A1-log(P1sat1))-C1); % in degree C
tol = abs(T(c)-T(c+1));
end
y1 = (x1*gamma1*P1sat1)/Pkpa;
output(cx,1) = T(c+1);
output(cx,2) = x1;
output(cx,3) = y1;
x1=x1+0.01;
end

T1 = output(:,1);
X1 = output(:,2);
Y1 = output(:,3);

7
CHE513 –Advanced Chemical Engineering Thermodynamics - Term Project – Sem. 181

VLE Ternary Matlab Code:

Main File:

clc
clear

%Hexane, Benzene, Cyclohexane:


[T11, X11, Y11, X22, Y22, X33,Y33] = vlet2(1.0132,0.004909,0.000265,0.004283,507.6,30.25,
13.8193, 2696.04, 224.317,562.2, 48.8, 13.7819, 2726.81, 217.572,553.6, 40.73, 13.6568,
2723.44,220.618 );

O = [T11 X11 X22 X33 Y11 Y22 Y33];

Function File:

function [T1,X1,Y1,X2,Y2,X3,Y3] =
vlet(P,e12,e13,e23,Tc1,Pc1,A1,B1,C1,Tc2,Pc2,A2,B2,C2,Tc3,Pc3,A3,B3,C3)

%Temperature are in K, Pressure are in bar, Antoine Constants for deg C & kPA
Pkpa = P*100;%Kpa
Pc2kpa = Pc2*100;
Pc1kpa = Pc1*100;
Pc3kpa = Pc3*100;
R = 8310;

%Initial Guess for Saturation Temperatures in deg C:

t1sat = ((B1/(A1-log(Pkpa)))-C1);
t2sat = ((B2/(A2-log(Pkpa)))-C2);
t3sat = ((B3/(A3-log(Pkpa)))-C3);

% Peng Robinson Constants for the size terms:


b1 = (0.07780*R*Tc1)/Pc1kpa;
b2 = (0.07780*R*Tc2)/Pc2kpa;
b3 = (0.07780*R*Tc3)/Pc3kpa;

x1= 0; % initial value for x1 calculations will be repeated until x1 = 1;


output = zeros(1000000,7);

cx1=0;
while x1<=1;
x2 = 0;
cx1=cx1+1;

while x2<=1

x3=abs(1-x1-x2);
cx=cx1;
while x3<=1;
T = zeros(1000000,1);%Changing T to vector;
cx=cx+1;
tol = 1;
%initial guess for temperature
T(1) = (x1*t1sat) + (x2*t2sat)+(x3*t3sat);
c = cx; % counter;
while tol>0.0001;% accuracy of the iteration
c=c+1;

GeRT =
((x1*x2*b1*b2*e12)+(x2*x3*b2*b3*e23)+(x1*x3*b1*b3*e13))/((x1*b1)+(x2*b2)+(x3*b3));
gamma1 = exp((b1/((x1*b1)+(x2*b2)+(x3*b3)))*((x2*b2*e12)+(x3*b3*e13)-
GeRT));
gamma2 = exp((b2/((x1*b1)+(x2*b2)+(x3*b3)))*((x1*b1*e12)+(x3*b3*e23)-
GeRT));

8
CHE513 –Advanced Chemical Engineering Thermodynamics - Term Project – Sem. 181

gamma3 = exp((b3/((x1*b1)+(x2*b2)+(x3*b3)))*((x1*b1*e13)+(x2*b2*e23)-
GeRT));

P1sat = exp(A1-(B1/(T(c)+C1)));
P2sat = exp(A2-(B2/(T(c)+C2)));
P3sat = exp(A3-(B3/(T(c)+C3)));

Alpha12 = P1sat/P2sat;
Alpha13 = P1sat/P3sat;

P1sat1 = Pkpa/((x1*gamma1)+((x2*gamma2)/Alpha12)+((x3*gamma3)/Alpha13));
T(c+1) = (B1/(A1-log(P1sat1))-C1); % in degree C
tol = abs(T(c)-T(c+1));
end

y1 = (x1*gamma1*P1sat1)/Pkpa;
y2 =(x2*gamma2*P2sat)/Pkpa;
y3 = 1-y2-y1;

output(c,1) = T(c+1);
output(c,2) = x1;
output(c,3) = y1;
output(c,4) = x2;
output(c,5) = y2;
output(c,6) = x3;
output(c,7) = y3;
format shortg
A = [T(c+1) x1 x2 x3 y1 y2 y3]
x3 = x3+0.01;
end
x2 = x2+0.01;
end
x1=x1+0.01;
end
T1 = output(:,1);
X1 = output(:,2);
Y1 = output(:,3);
X2 = output(:,4);
Y2 = output(:,5);
X3 = output(:,6);
Y3 = output(:,7);

Вам также может понравиться