 0 
0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 11 
12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 
-1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Plot" 0 13 1 {CSTYLE "" -1 -1 "" 
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }
{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Helvetica" 0 14 0 0 0 
0 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font
 2" -1 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 2 2 2 0 0 0 0 0 0 }0 0 0 
-1 -1 -1 0 0 0 0 0 0 -1 0 }}
{SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 33 "Phase Equilibria in Ideal \+
Systems" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 
11 "Ross Taylor" }}{PARA 0 "" 0 "" {TEXT -1 85 "Department of Chemical
 Engineering, Clarkson University, Potsdam, New York 13699-5705" }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 12 "Introduct
ion" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 209 "V
apor - liquid equilibrium data for two component or binary systems has
 been compiled by Gmehling and Onken (1977ff).  One of the data sets f
or benzene - toluene at a pressure of 101325 Pa is summarized below:" 
}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "b
tdata:=array([[0,0,383.75],[0.1,0.2080,379.35],[0.2,0.3720,375.35]," }
}{PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "                        [0.3,0.507
0,371.75],[0.4,0.6190,368.45],[0.5,0.7130,365.45]," }}{PARA 0 "> " 0 "
" {MPLTEXT 1 0 84 "                        [0.6,0.7910,362.55],[0.7,0.
8570,359.95],[0.8,0.9120,357.35]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 
63 "                        [0.9,0.9590,355.35],[1.0,1.0,353.25]]):" }
}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "print (btdata);" }}{PARA 
11 "" 1 "" {XPPMATH 20 "6#-%'MATRIXG6#7-7%\"\"!F($\"&v$Q!\"#7%$\"\"\"!
\"\"$\"%!3#!\"%$\"&Nz$F+7%$\"\"#F/$\"%?PF2$\"&Nv$F+7%$\"\"$F/$\"%q]F2$
\"&vr$F+7%$\"\"%F/$\"%!>'F2$\"&Xo$F+7%$\"\"&F/$\"%IrF2$\"&Xl$F+7%$\"\"
'F/$\"%5zF2$\"&bi$F+7%$\"\"(F/$\"%q&)F2$\"&&*f$F+7%$\"\")F/$\"%?\"*F2$
\"&Nd$F+7%$\"\"*F/$\"%!f*F2$\"&Nb$F+7%$\"#5F/Fho$\"&D`$F+" }}}{EXCHG 
{PARA 0 "" 0 "" {TEXT -1 356 "where column 1 of the above matrix is th
e mole fraction of benzene in the liquid, column 2 is the (measured) m
ole fraction of benzene in the vapor that is in equilibrium with the l
iquid and column 3 is the measured temperature in kelvin.  Note that t
he mole fraction of benzene in the vapor is always higher than the mol
e fraction of benzene in the liquid." }}{PARA 0 "" 0 "" {TEXT -1 0 "" 
}}{PARA 0 "" 0 "" {TEXT -1 303 "The prediction of equilibrium between \+
two phases is an important application of thermodynamics.  This articl
e shows how Maple can be used to perform some simple phase equilibrium
 calculations. In addition, we demonstrate how Maple can be used to cr
eate phase diagrams and interpret the data given above." }}{PARA 0 "" 
0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 22 "Theoretical Backgrou
nd" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 136 "Th
e mole fractions of the i-th component in two different phases in equi
librium with each other are related by the following expression:" }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "EQM
[i]:=y[i]=K[i]*x[i]: EQM[i];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/&%\"y
G6#%\"iG*&&%\"KGF&\"\"\"&%\"xGF&F+" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 
-1 315 "where the K[i] are the K-values or equilibrium ratios.  They a
re also referred to sometimes as K-constants although they are probabl
y the least constant property in all of  science and engineering. In f
act, K-values are, in general, complicated functions of temperature, p
ressure and the composition of both phases." }}{PARA 0 "" 0 "" {TEXT 
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 313 "It is beyond the scope of this
 document to discuss in detail the wide variety of models used by ther
modynamicists for calculating K-values.  We shall reserve such a discu
ssion for a later article.  We shall use some specific models for the \+
K-values later when the time comes to carry out some actual calculatio
ns." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 80 "In
 view of the way they are defined, the mole fractions of both phases s
um to 1." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 63 "Sumx:=sum(x[i],i=1..c)=1:  Sumy:=sum(y[i],i=1..c)=1: \+
Sumx,Sumy;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$/-%$sumG6$&%\"xG6#%\"iG/
F*;\"\"\"%\"cGF-/-F%6$&%\"yGF)F+F-" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 
-1 51 "where c is the number of components in the mixture." }}{PARA 0 
"" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 51 "There are 2c+2 va
riables in this set of equations: " }}{PARA 0 "" 0 "" {TEXT -1 34 "   \+
c mole fractions in the x-phase" }}{PARA 0 "" 0 "" {TEXT -1 34 "   c m
ole fractions in the y-phase" }}{PARA 0 "" 0 "" {TEXT -1 25 "   The sy
stem temperature" }}{PARA 0 "" 0 "" {TEXT -1 22 "   The system pressur
e" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 38 "Ther
e are only c+2 equations, however:" }}{PARA 0 "" 0 "" {TEXT -1 26 "   \+
c equilibrium equations" }}{PARA 0 "" 0 "" {TEXT -1 38 "   2 mole frac
tion summation equations" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "
" 0 "" {TEXT -1 135 "The number of variables that must be specified be
fore we can carry out any calculations is the difference between these
 two numbers, c." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" 
{TEXT -1 155 "Simple phase equilibrium calculations are based on findi
ng the roots of an objective function derived by subtracting the mole \+
fraction summation equations." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "Eqn:=Sumy-Sumx: Eqn;" }}{PARA 11 "
" 1 "" {XPPMATH 20 "6#/,&-%$sumG6$&%\"yG6#%\"iG/F+;\"\"\"%\"cGF.-F&6$&
%\"xGF*F,!\"\"\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "In what fo
llows we will assume that the x-phase is a liquid and the y-phase is a
 vapor." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 
25 "Bubble Point Calculations" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 627 "The bubble point temperature is the temp
erature at which the first bubble of vapor forms in a liquid as it is \+
heated.  To determine the bubble point of a liquid mixture we specify \+
c-1 mole fractions of the x-phase and the pressure (or temperature).  \+
The mole fraction of  component number c may be calculated from the su
mmation equation for the x-phase.  The remaining equations may then be
 solved for the mole fractions of the y-phase and for the system tempe
rature (or pressure).  We eliminate the vapor phase mole fractions fro
m the objective function above, noting that the mole fractions of the \+
x-phase sum to 1, to obtain" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "BPeq
n:=subs(\{EQM[i],Sumx\},Eqn): BPeqn;" }}{PARA 11 "" 1 "" {XPPMATH 20 "
6#/,&-%$sumG6$*&&%\"KG6#%\"iG\"\"\"&%\"xGF+F-/F,;F-%\"cGF-!\"\"F-\"\"!
" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 61 "We will now make a function o
f this expression for later use." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "fBP := proc(K,x,components) " }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "local i;" }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 29 "if type(components,`..`) then" }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 33 "  sum(K[i]*x[i],i=components) -1;" }}{PARA 0 "> " 0 "
" {MPLTEXT 1 0 4 "else" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "  convert
([seq(K[i]*x[i],i=components)],`+`)-1; fi;" }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 4 "end:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 
0 "" 0 "" {TEXT -1 43 "Example 1 - Bubble Point of an Ideal System" }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 263 "Estimate
 the bubble point of a mixture containing 20 mole percent benzene and \+
80 mole percent toluene.  Assume that the benzene - toluene system may
 be considered to behave as an ideal system; one where the K-values ar
e functions only of temperature and pressure:" }}{PARA 0 "" 0 "" 
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 153 "The K-values of benzene \+
and toluene will be calculated using Raoult's law with the vapor press
ures computed from the Antoine equation (Reid et al.,1987)." }}{PARA 
0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "Antoine :
= (T, A, B, C) ->  exp(A - B / (T + C));" }}{PARA 11 "" 1 "" {XPPMATH 
20 "6#>%(AntoineG:6&%\"TG%\"AG%\"BG%\"CG6\"6$%)operatorG%&arrowGF+-%$e
xpG6#,&9%\"\"\"*&9&F4,&9$F49'F4!\"\"F:F+F+" }}}{EXCHG {PARA 0 "" 0 "" 
{TEXT -1 97 "The Antoine coefficients for benzene and toluene are (rec
alculated from Gmehling and Onken, 1977)" }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 72 "AntA[benzene]:=21.06807; AntB[benzene]:=2948.78; AntC
[benzene]:=-44.563;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%%AntAG6#%(be
nzeneG$\"(2o5#!\"&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%%AntBG6#%(ben
zeneG$\"'y[H!\"#" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%%AntCG6#%(benze
neG$!&jX%!\"$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "AntA[tolue
ne]:=21.15917; AntB[toluene]:=3242.38; AntC[toluene]:=-47.181;" }}
{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%%AntAG6#%(tolueneG$\"(<f6#!\"&" }}
{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%%AntBG6#%(tolueneG$\"'QUK!\"#" }}
{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%%AntCG6#%(tolueneG$!&\"=Z!\"$" }}}
{EXCHG {PARA 0 "" 0 "" {TEXT -1 74 "which give the vapor pressures in \+
pascals if the temperature is in kelvin." }}{PARA 0 "" 0 "" {TEXT -1 
0 "" }}{PARA 0 "" 0 "" {TEXT -1 40 "The K-values may be expessed as fo
llows:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "component:=[benzene,tolue
ne]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "for i in component \+
do K[i] := Antoine(T,AntA[i],AntB[i],AntC[i]) / P: od;" }}{PARA 11 "" 
1 "" {XPPMATH 20 "6#>&%\"KG6#%(benzeneG*&-%$expG6#,&$\"(2o5#!\"&\"\"\"
*$,&%\"TGF0$!&jX%!\"$F0!\"\"$!'y[H!\"#F0%\"PGF7" }}{PARA 11 "" 1 "" 
{XPPMATH 20 "6#>&%\"KG6#%(tolueneG*&-%$expG6#,&$\"(<f6#!\"&\"\"\"*$,&%
\"TGF0$!&\"=Z!\"$F0!\"\"$!'QUK!\"#F0%\"PGF7" }}}{EXCHG {PARA 0 "" 0 "
" {TEXT -1 70 "We make functions of these expressions for help in late
r calculations." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "for i in compone
nt do Kvalue[i]:=unapply(K[i],T,P); od:" }}}{EXCHG {PARA 0 "" 0 "" 
{TEXT -1 118 "We continue by making a function from the bubble-point e
quation, incorporating the above expressions for the K-values:" }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "x:='x': BP2:=unapply(fBP(K,x,compon
ent),T,P,x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$BP2G:6%%\"TG%\"PG%
\"xG6\"6$%)operatorG%&arrowGF*,(*(-%$expG6#,&$\"(2o5#!\"&\"\"\"*$,&9$F
7$!&jX%!\"$F7!\"\"$!'y[H!\"#F79%F>&9&6#%(benzeneGF7F7*(-F16#,&$\"(<f6#
F6F7*$,&F:F7$!&\"=ZF=F7F>$!'QUKFAF7FBF>&FD6#%(tolueneGF7F7F>F7F*F*" }}
}{EXCHG {PARA 0 "" 0 "" {TEXT -1 378 "where the arguments to the Maple
 function are temperature (in kelvin), pressure (in pascals), and the \+
mole fractions of both components.  Note that we have retained the dep
endance on the mole fractions and pressure as well as temperature so t
hat we can use the same function to find the bubble point temperature \+
under other conditions.  We will need to this in the next example." }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 155 "Maple's \+
fsolve command is unable to find a zero to this function unless we tel
l it roughly where to look.  To help us locate the zero we plot the fu
nction " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 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"1nm\"zXu9c$F1$!1\\l7`_;cWF-7$$\"1+++&y))Ge$F1$!1.=(4\"QdeSF-7$$
\"1++DE&QQg$F1$!1Dr@CGvZOF-7$$\"1+]7y%3Ti$F1$!1_'=cVv)GKF-7$$\"1++v.[h
YOF1$!1=!f!3&o\"QFF-7$$\"1MLLQx$om$F1$!1eYvhjPtAF-7$$\"1++]P+V)o$F1$!1
jK)3B97v\"F-7$$\"1m;zpe*zq$F1$!1oDxx48a7F-7$$\"1++]#\\'QHPF1$!1^D'[@Fs
$o!#<7$$\"1L$e9S8&\\PF1$!1mD(>(*yS?\"Fhv7$$\"1+]i?=bqPF1$\"15^b@zZp\\F
hv7$$\"1LL$3s?6z$F1$\"1:DfXWmH6F-7$$\"1+]7`Wl7QF1$\"1E_.9+(R#=F-7$$\"1
nmm'*RRLQF1$\"1sJ58NaCDF-7$$\"1nmTvJgaQF1$\"1>MC7^QuKF-7$$\"1M$e9tOc(Q
F1$\"1,FZ9*RC0%F-7$$\"1+++&Qk\\*QF1$\"1v%*GJr`)z%F-7$$\"1LL3dg6<RF1$\"
15\"*QKKX\"p&F-7$$\"1nmmw(Gp$RF1$\"1PrHk6IDlF-7$$\"1+]7oK0eRF1$\"1<o:%
*32_uF-7$$\"1+](=5s#yRF1$\"1)3p4@%fw$)F-7$$\"$+%F*$\"1G0CG^;7%*F--%'CO
LOURG6&%$RGBG$\"#5!\"\"F*F*-%+AXESLABELSG6$%\"TG%!G-%%VIEWG6$;F(Ffz%(D
EFAULTG" 2 330 330 330 2 0 1 0 2 9 0 4 2 1.000000 45.000000 45.000000 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 73 0 0 0 0 0 }}}{EXCHG 
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 167 "from whi
ch we see that there is a zero somewhere between 370 and 400 K.  Now w
e can invoke the fsolve command and specify the range in which we know
 a solution exists." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "TBP:=fsolve(
BP2(T,101325,x),T,350..400): T[bubble]=TBP;" }}{PARA 11 "" 1 "" 
{XPPMATH 20 "6#/&%\"TG6#%'bubbleG$\"+#*op`P!\"(" }}}{EXCHG {PARA 0 "" 
0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 269 "Thus, the estimated
 bubble point of this mixture is 375.37 K.  This result compares quite
 favorably with the measured value of 375.35 K reported in the table. \+
 The mole fractions of benzene and toluene in the vapor in equilibrium
 with the liquid at this temperature are" }}{PARA 0 "" 0 "" {TEXT -1 
0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "y:='y': for i in component d
o y[i]=Kvalue[i](TBP,101325)*x[i]; od;" }}{PARA 11 "" 1 "" {XPPMATH 
20 "6#/&%\"yG6#%(benzeneG$\"+I$)*zu$!#5" }}{PARA 11 "" 1 "" {XPPMATH 
20 "6#/&%\"yG6#%(tolueneG$\"+t;+_i!#5" }}}{EXCHG {PARA 0 "" 0 "" 
{TEXT -1 95 "The experimental value for the mole fraction of benzene f
rom the table of data above is 0.3720." }}{PARA 0 "" 0 "" {TEXT -1 0 "
" }}{PARA 0 "" 0 "" {TEXT -1 155 "Exercise: Compute the bubble point t
emperature and vapor phase mole fractions for some of the other data p
oints from the table of data in the introduction." }}{PARA 0 "" 0 "" 
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 22 "Dew Point Calculations" }
}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 252 "The dew
 point of a vapor mixture is the point at which the first drop of liqu
id forms as it is cooled. The calculation of the dew point requires th
e specification of  the mole fractions of the vapor (y) phase and the \+
system pressure (or temperature).  " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }
}{PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "i:='i': DPeqn:=subs(\{x[i]=solve(E
QM[i],x[i]),Sumy\},Eqn): DPeqn;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/,&
\"\"\"F%-%$sumG6$*&&%\"yG6#%\"iGF%&%\"KGF,!\"\"/F-;F%%\"cGF0\"\"!" }}}
{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 62 "We
 will now make a procedure of this expression for later use." }}{PARA 
0 "> " 0 "" {MPLTEXT 1 0 28 "fDP := proc(K,y,components) " }}{PARA 0 "
> " 0 "" {MPLTEXT 1 0 8 "local i;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 
29 "if type(components,`..`) then" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 
33 "  1- sum(y[i]/K[i],i=components);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 
0 4 "else" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "  1-convert([seq(y[i]/
K[i],i=components)],`+`); fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end
:" }}}{EXCHG {PARA 2 "" 0 "" {TEXT -1 1 "\n" }}{PARA 0 "" 0 "" {TEXT 
-1 64 "Example 2 - Dew Point Temperature of a Benzene - Toluene Mixtur
e" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 138 "Est
imate the dew point temperature of a mixture of benzene (61.9 mole per
cent) and toluene (38.1 mole percent) at a pressure of 101325 Pa." }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 112 "We first
 make a function of the dew point equation using the Raoult's law K-va
lues we used in the prior example." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "DP2:=unapply(fDP(K,y,component),T,P
,y);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$DP2G:6%%\"TG%\"PG%\"yG6\"6$
%)operatorG%&arrowGF*,(\"\"\"F/*(&9&6#%(benzeneGF/-%$expG6#,&$\"(2o5#!
\"&F/*$,&9$F/$!&jX%!\"$F/!\"\"$!'y[H!\"#FB9%F/FB*(&F26#%(tolueneGF/-F6
6#,&$\"(<f6#F;F/*$,&F>F/$!&\"=ZFAF/FB$!'QUKFEFBFFF/FBF*F*" }}}{EXCHG 
{PARA 0 "" 0 "" {TEXT -1 107 "As before, we plot this function over a \+
range of temperatures to see approximately where the solution lies." }
}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "y[
component[1]]:=0.619: y[component[2]]:=1-y[component[1]]: " }}}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "plot(DP2(T,101325,y),T=350..450);" 
}}{PARA 13 "" 0 "" {TEXT -1 0 "" }}{PARA 13 "" 1 "" {INLPLOT "6%-%'CUR
VESG6$7S7$$\"$]$\"\"!$!19+jisc!3)!#;7$$\"1nm;arz@N!#8$!1i\"GJb))3!oF-7
$$\"1L$e9ui2a$F1$!1chd)H'*[x&F-7$$\"1nm\"z_\"4iNF1$!1ba*>!=Y4ZF-7$$\"1
mmT&phNe$F1$!1]D)RohIs$F-7$$\"1L$e*=)H\\g$F1$!1<]bxEF>GF-7$$\"1n;z/3uC
OF1$!1Cy9_$\\Y/#F-7$$\"1+]7LRDXOF1$!1I/dI)G7I\"F-7$$\"1n;zR'okm$F1$!1
\")*yGfX#)*e!#<7$$\"1+]i5`h(o$F1$\"1(ybqS#z:m!#=7$$\"1LL$3En$4PF1$\"10
Ya$)fZ.pFW7$$\"1nmT!RE&GPF1$\"17xdG5=,7F-7$$\"1++]K]4]PF1$\"1mp_\\t?O<
F-7$$\"1++]PAvrPF1$\"1\"*4^akAMAF-7$$\"1++]nHi#z$F1$\"1zAE%zo+o#F-7$$
\"1n;z*ev:\"QF1$\"1&\\%zX;BeIF-7$$\"1LL$347T$QF1$\"1n$>w%GVxMF-7$$\"1L
LLjM?`QF1$\"1L0#3O@'3QF-7$$\"1+]7o7TvQF1$\"1VuP%*>WoTF-7$$\"1LLLQ*o]*Q
F1$\"1Szlj^$eY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 2 9 0 4 2 1.000000 45.000000 45.000000 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "
" }}{PARA 0 "" 0 "" {TEXT -1 100 "Now we can ask Maple to compute a mo
re precise numerical approximation to the dew point temperature." }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "TDP:=fsolve(DP2(T,101325,y),T,350..
450): T[dew]=TDP;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/&%\"TG6#%$dewG$
\"+!32ao$!\"(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 226 "The computed es
timate of 368.54 K compares well with the measured value of  368.45 K \+
as reported in the table of data in the Introduction.  The mole fracti
ons in the liquid in equilibrium with the vapor at this temperature ar
e" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "x:='x': for i in component do \+
x[i]=y[i]/Kvalue[i](TDP,101325); od;" }}{PARA 11 "" 1 "" {XPPMATH 20 "
6#/&%\"xG6#%(benzeneG$\"+Z!ee)R!#5" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#
/&%\"xG6#%(tolueneG$\"+p>99g!#5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 
84 "The experimental value of the mole fraction of benzene from the ta
ble above is  0.4." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" 
{TEXT -1 30 "Example 3 - Dew Point Pressure" }}{PARA 0 "" 0 "" {TEXT 
-1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 203 "The bubble and dew point equat
ions can also be solved for pressure if the temperature is specified. \+
In this example we determine the pressure at which a mixture starts to
 condense at a fixed temperature." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "y:='y': fDP(K,y,component)=0;" }}
{PARA 11 "" 1 "" {XPPMATH 20 "6#/,(\"\"\"F%*(&%\"yG6#%(benzeneGF%-%$ex
pG6#,&$\"(2o5#!\"&F%*$,&%\"TGF%$!&jX%!\"$F%!\"\"$!'y[H!\"#F8%\"PGF%F8*
(&F(6#%(tolueneGF%-F,6#,&$\"(<f6#F1F%*$,&F4F%$!&\"=ZF7F%F8$!'QUKF;F8F<
F%F8\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "This expression can \+
be solved explicitly for pressure " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 
26 "Peqn:=P=solve(-\",P): Peqn;" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#/%
\"PG*&,&*&&%\"yG6#%(benzeneG\"\"\"-%$expG6#,$*&,&%\"TG$\"++q\"f6#\"\"!
$!++3pSU\"\"#F,F,,&F3$\"%+5F6$!&\"=ZF6F,!\"\"$\"+++++5!#9F,F,*&&F)6#%(
tolueneGF,-F.6#,$*&,&F3$\"++q!o5#F6$!+.kj()QF9F,F,,&F3F;$!&jX%F6F,F?F@
F,F,F?-F.6#,&FJF@F1F@F," }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 33 "We mak
e a function of this result" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "fP:=
unapply(rhs(Peqn),T,y):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 100 "and evaluate the function at a temperatu
re of 375 K for an equimolar mixture of benzene and toluene." }}{PARA 
2 "" 0 "" {TEXT -1 1 "\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "y[compo
nent[1]]:=0.5: y[component[2]]:=1-y[component[1]]:  P[dew]=fP(375,y);
" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/&%\"PG6#%$dewG$\"+h#Hc5\"!\"%" }}
}{EXCHG {PARA 0 "" 0 "" {TEXT -1 119 "Thus, an equimolar mixture of th
ese two components at 375 K will start to condense when the pressure r
eaches 110563 Pa." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" 
{TEXT -1 14 "Phase Diagrams" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 
0 "" 0 "" {TEXT -1 196 "Phase diagrams are a useful method of displayi
ng vapor liquid equilibrium data graphically.  We shall compute the VL
E curves for the benzene-toluene system that we have used in the above
 examples." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 
-1 560 "Computing the vapor - liquid equilibrium curves involves carry
ing out a series of bubble point or dew point calculations for mole fr
actions of one component from 0 to 1 (making sure that the mole fracti
ons of both components sum to 1).  We have chosen to use bubble-point \+
calculations in the following examples.  They are easier to perform th
an are dew point calculations (although there is no essential differen
ce in the degree of difficulty when Raoult's law is used to calculate \+
the K-values).  These calculations are carried out in the following ex
amples. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 
48 "Example 4 - Phase Diagrams for Benzene - Toluene" }}{PARA 0 "" 0 "
" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 333 "In the following seque
nce of Maple commands we carry out a series of bubble point calculatio
ns covering the range of liquid mole fractions of benzene from 0 to 1.
  The bubble point temperature is computed first and the vapor composi
tion follows from the equilibrium equation.  The results are stored in
 an array for later processing." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "
numpts:=31: pts:=array(1..numpts,1..3):" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 25 "for k from 1 to numpts do" }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 81 "   x[component[1]]:= evalf((k-1)/(numpts-1)): x[compo
nent[2]]:=1-x[component[1]]:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "   \+
TBP:=fsolve(BP2(T,101325,x),T,300..410): " }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 70 "   y[component[1]]:= Kvalue[component[1]](TBP,101325)
*x[component[1]]:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "   pts[k,1]:=x
[component[1]]: pts[k,2]:=y[component[1]]: pts[k,3]:=TBP: od:" }}}
{EXCHG {PARA 0 "" 0 "" {TEXT -1 271 "In order to display the measured \+
and calculated equilibrium data we have created the procedure Txyplot.
  This procedure makes use of  the function makepoints which takes as \+
input an array (or matrix) and returns a set of points that can be dis
played with the plot comand." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "mak
epoints := proc(A,j1,j2,i1,nrows)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 
"" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "#  Procedure to make a list of
 points for plotting purposes" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "# \+
 A       = matrix or array of data" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 
67 "#  j1, j2  = Column indeces of 1st and 2nd columns extracted from \+
A" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "#            to make the x and
 y coordinates of the points." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "# \+
           (optional, but j1 must be specified if j2 is given)." }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "#  i1      = Index of first row of \+
A for points extracted from A" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "# \+
           (optional but j1 and j2 must be given first)." }}{PARA 0 ">
 " 0 "" {MPLTEXT 1 0 55 "#  nrows   = Number of rows of matrix A to be
 extracted" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "#            (optiona
l, and can only be given as the fifth argument)." }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "   local col1, \+
col2, row1, nrowsA, i, lastrow, lrow, Indices;" }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 64 "    col1 := 1; col2 := 2; row1 := 1; lastrow:=linalg[
rowdim](A);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "    if nargs > 1 the
n col1 := j1;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "      if nargs > 2
 then col2 := j2;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "         if na
rgs > 3 then row1 := i1;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "       \+
     if nargs > 4 then lrow := row1 + nrows - 1;" }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 77 "               if lrow > lastrow then lrow := lastrow
; else lastrow := lrow; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "    fi;
 fi; fi; fi; fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "    [seq([A[i,c
ol1],A[i,col2]], i = row1..lastrow)];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 
0 4 "end:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 320 "The procedure Txypl
ot is designed to take binary VLE data (both computed and experimental
) that is stored in a Maple array (or matrix) with three columns: liqu
id mole fraction of component 1, vapor mole fraction of component 1 an
d temperature. This procedure is easily modified for systems with more
 than two components." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "Txyplot :=
 proc (calcdata, expdata)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "local \+
bubline, dewline, bubdata, dewdata, Txyplot1, Txyplot2;" }}{PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 79 "    bubline  := makepoints(calcdata,1,3): dewl
ine  := makepoints(calcdata,2,3):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 
76 "    Txyplot1 := plot(\{bubline,dewline\},0..1,axes=boxed,labels=[`
x, y`,`T`]):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "    if nargs > 1 th
en" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "       bubdata  := makepoints
(expdata,1,3): dewdata  := makepoints(expdata,2,3):" }}{PARA 0 "> " 0 
"" {MPLTEXT 1 0 60 "       Txyplot2 := plot(\{bubdata,dewdata\},0..1,s
tyle=point):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "    fi;" }}{PARA 0 "
> " 0 "" {MPLTEXT 1 0 77 "    if nargs = 1 then Txyplot1; else plots[d
isplay](\{Txyplot1,Txyplot2\}); fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 
4 "end;" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%(TxyplotG:6$%)calcdataG%(
expdataG6(%(bublineG%(dewlineG%(bubdataG%(dewdataG%)Txyplot1G%)Txyplot
2G6\"F0C'>8$-%+makepointsG6%9$\"\"\"\"\"$>8%-F56%F7\"\"#F9>8(-%%plotG6
&<$F;F3;\"\"!F8/%%axesG%&boxedG/%'labelsG7$%%x,~yG%\"TG@$2F89#C%>8&-F5
6%9%F8F9>8'-F56%FWF>F9>8)-FB6%<$FTFYFE/%&styleG%&pointG@%/FQF8F@-&%&pl
otsG6#%(displayG6#<$FgnF@F0F0" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "
" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "Txyplot(pts,btdata);" }}{PARA 
13 "" 1 "" {INLPLOT "6)-%'CURVESG6%7-7$\"\"!$\"1+++++]PQ!#87$$\"1+++++
++5!#;$\"1+++++]$z$F+7$$\"1+++++++?F/$\"1+++++]`PF+7$$\"1+++++++IF/$\"
1+++++]<PF+7$$\"1+++++++SF/$\"1+++++]%o$F+7$$\"1+++++++]F/$\"1+++++]aO
F+7$$\"1+++++++gF/$\"1+++++]DOF+7$$\"1+++++++qF/$\"1+++++]*f$F+7$$\"1+
++++++!)F/$\"1+++++]tNF+7$$\"1+++++++!*F/$\"1+++++]`NF+7$$\"\"\"F($\"1
+++++]KNF+-%'COLOURG6&%$RGBG$\"#5!\"\"F(F(-%&STYLEG6#%&POINTG-F$6%7-F'
7$$\"1++++++!3#F/F07$$\"1++++++?PF/F57$$\"1++++++q]F/F:7$$\"1++++++!>'
F/F?7$$\"1++++++IrF/FD7$$\"1++++++5zF/FI7$$\"1++++++q&)F/FN7$$\"1+++++
+?\"*F/FS7$$\"1++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$\"1+++LLLL8F/F]s
7$$\"1+++nmmm;F/Fbs7$F3Fgs7$$\"1+++LLLLBF/F\\t7$$\"1+++nmmmEF/Fat7$F8F
ft7$$Fg[lF/F[u7$$\"1+++nmmmOF/F`u7$F=Feu7$$\"1+++LLLLVF/Fju7$$\"1+++nm
mmYF/F_v7$FBFdv7$$\"1+++LLLL`F/Fiv7$$\"1+++nmmmcF/F^w7$FGFcw7$$\"1+++L
LLLjF/Fhw7$$Fj[lF/F]x7$FLFbx7$$\"1*****HLLLL(F/Fgx7$$\"1,++nmmmwF/F\\y
7$FQFay7$$\"1+++LLLL$)F/Ffy7$$\"1+++nmmm')F/F[z7$FVF`z7$$\"1+++LLLL$*F
/Fez7$$\"1+++nmmm'*F/Fjz7$FenF`[lFbq-%*AXESSTYLEG6#%$BOXG-%+AXESLABELS
G6$%%x,~yG%\"TG-%%VIEWG6$;F(Fen%(DEFAULTG" 2 330 330 330 2 0 1 0 2 9 
0 2 2 1.000000 45.000000 45.000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
1 1 0 0 0 0 0 0 0 0 0 0 }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 304 "This figure shows the calculated bubble-
point line (the lower curve) and the calculated dew-point line (upper \+
curve) as a function of the mole fraction of benzene (x-axis).  The ex
perimental data are shown as isolated points.  You can see that the da
ta are in good agreement with the calculated curves.  " }}{PARA 0 "" 
0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 166 "It is also useful t
o plot the vapor composition against the liquid composition on an x-y \+
diagram.  This is done with the procedure yxplot which is similar to T
xyplot." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "yxplot := proc (calcdata
, expdata)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "local yxline, diaglin
e, yxdata, xyplot1, xyplot2;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "   \+
yxline   := makepoints(calcdata,1,2):  diagline := makepoints(calcdata
,1,1):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 77 "   xyplot1  := plot(\{yxl
ine,diagline\},0..1,0..1,labels=[`x`,`y`],axes=boxed):" }}{PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 21 "   if nargs > 1 then " }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 41 "      yxdata   :=makepoints(expdata,1,2):" }}{PARA 0 
"> " 0 "" {MPLTEXT 1 0 52 "      xyplot2  :=plot(yxdata,0..1,0..1,styl
e=point):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "   fi;" }}{PARA 0 "> " 
0 "" {MPLTEXT 1 0 73 "   if nargs = 1 then xyplot1; else plots[display
](\{xyplot1,xyplot2\}); fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "end:
" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "yxplot(btdata);" }}
{PARA 13 "" 1 "" {INLPLOT "6'-%'CURVESG6$7-7$\"\"!F(7$$\"1+++++++5!#;$
\"1++++++!3#F,7$$\"1+++++++?F,$\"1++++++?PF,7$$\"1+++++++IF,$\"1++++++
q]F,7$$\"1+++++++SF,$\"1++++++!>'F,7$$\"1+++++++]F,$\"1++++++IrF,7$$\"
1+++++++gF,$\"1++++++5zF,7$$\"1+++++++qF,$\"1++++++q&)F,7$$\"1+++++++!
)F,$\"1++++++?\"*F,7$$\"1+++++++!*F,$\"1++++++!f*F,7$$\"\"\"F(FX-%'COL
OURG6&%$RGBG$\"#5!\"\"F(F(-F$6$7-F'7$F*F*7$F0F07$F5F57$F:F:7$F?F?7$FDF
D7$FIFI7$FNFN7$FSFSFW-Fen6&FgnF(FhnF(-%*AXESSTYLEG6#%$BOXG-%+AXESLABEL
SG6$%\"xG%\"yG-%%VIEWG6$;F(FXFep" 2 330 330 330 2 0 1 0 2 9 0 2 2 
1.000000 45.000000 45.000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 
0 0 20960 0 0 0 0 0 0 }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 
0 "" 0 "" {TEXT -1 327 "Note that the measured data points lie almost \+
exactly on top of the predicted equilibrium line.  The close agreement
 between the measured data and the calculated curves is an indication \+
that the benzene - toluene system is indeed nearly ideal and that Raou
lt's law may be used to estimate the equilibrium ratios of this system
." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 226 "Rao
ult's law only works for a few simple systems such as the benzene-tolu
ene mixture used in the preceding examples.  For non-ideal systems the
 K-values depend on composition and we must use different methods to e
valuate them." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" 
{TEXT -1 9 "Exercises" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 
"" {TEXT -1 374 "A great many other exercises can be based on the mate
rial presented above.  There are several other activity coefficient mo
dels that can be used as alternatives to the Van Laar model.  In addit
ion, there are hundreds of other binary mixtures for which data have b
een published. The data and the necessary model parameters have been c
ollected by Gmehling and Onken (1977ff). " }}{PARA 0 "" 0 "" {TEXT -1 
0 "" }}{PARA 0 "" 0 "" {TEXT -1 103 "For further reading (as well as a
 source of many other problems) we recommend the book by Walas (1985).
" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 10 "Refer
ences" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 117 
"Gmehling, J. and Onken, U. Vapor-Liquid Equilibrium Data Collection, \+
DECHEMA Chemistry Data Series, DECHEMA (1977ff)." }}{PARA 0 "" 0 "" 
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 115 "Reid, R.C., Prausnitz, J
.M., and Poling, B. Properties of Gases and Liquids, 4th Ed., McGraw-H
ill, New York (1987)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 
"" {TEXT -1 73 "Walas, S.M. Phase Equilibria in Chemical Engineering, \+
Butterworth (1985)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 
"" {MPLTEXT 1 0 0 "" }}}}{MARK "36 19 0" 0 }
