0% found this document useful (0 votes)
2 views13 pages

cae.22411

This research article presents a numerical technique for teaching phase equilibria of ternary liquid systems using particle swarm optimization and the arc-length continuation method. It discusses the application of NRTL and UNIQUAC models to compute liquid-liquid equilibrium data for various industrially relevant mixtures. The paper aims to enhance graduate-level chemical engineering education by demonstrating advanced programming techniques in MATHEMATICA and MATLAB.

Uploaded by

Zakaria Binous
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views13 pages

cae.22411

This research article presents a numerical technique for teaching phase equilibria of ternary liquid systems using particle swarm optimization and the arc-length continuation method. It discusses the application of NRTL and UNIQUAC models to compute liquid-liquid equilibrium data for various industrially relevant mixtures. The paper aims to enhance graduate-level chemical engineering education by demonstrating advanced programming techniques in MATHEMATICA and MATLAB.

Uploaded by

Zakaria Binous
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Received: 15 October 2020 | Revised: 17 February 2021 | Accepted: 4 March 2021

DOI: 10.1002/cae.22411

RESEARCH ARTICLE

Application of graduate‐level numerical tools to teach


phase equilibria of liquid ternary systems

Housam Binous1 | Khalifa Mejbri2 | Ahmed Bellagi2

1
Chemical Engineering Department,
National Institute of Applied Sciences & Abstract
Technology, University of Carthage, The present paper describes a numerical technique to compute phase
Tunis, Tunisia
2
equilibria of ternary liquid systems. First, particle swarm optimization is
Energy Engineering Department, Ecole
Nationale d'Ingénieurs de Monastir— used to estimate the binary interaction parameters of the NRTL (Non‐
ENIM, University of Monastir, Monastir, Random Two Liquid) and UNIQUAC (Universal Quasi‐Chemical) models.
Tunisia
We show how the arc‐length continuation method allows the calculation
Correspondence of the liquid–liquid equilibrium diagram for any ternary system. A
Housam Binous, Chemical Engineering total of seven case studies of industrially important mixtures are
Department, National Institute of Applied
described. Both Type I systems (oleic acid–water–ethanol, water–1‐
Sciences & Technology, University of
Carthage, BP 676 ‐ 1080 Tunis, Tunisia. propanol–toluene, DEC–ethanol–water, water–propionic acid–n‐hexane,
Email: [email protected] and water–TMA–benzene) and Type II mixtures (water–1‐butanol–n‐
hexane) are discussed. In addition, a system with temperature‐dependent
behavior (n‐hexane–methyl cyclopentane–aniline) is studied. The nu-
merical techniques and the thermodynamic problem involved in this pa-
per are suitable for a first‐year graduate‐level course in chemical
engineering. All computer coding is based either on MATHEMATICA © or
MATLAB ®.
This is an ideal opportunity to introduce graduate students to
advanced commands and programming syntax of state‐of‐the‐art mathe-
matical software.

KEYWORDS
arc‐length continuation, graduate chemical engineering thermodynamics, liquid–liquid
equilibrium data, MATHEMATICA© and MATLAB®, NRTL and UNIQUAC models

1 | INTRODUCTION Industrial LLExt is applied to both biochemical


(production of vanilla, vitamin A and E, penicillin, etc.)
Liquid–liquid extraction (LLExt) as opposed to distillation and petrochemical processes (extraction of aromatics
is of industrial interest whenever [24,25,36,36,39,40,43] from paraffin; separation of organic acids, such as formic
acid, acetic acid, or benzoic acid from their aqueous so-
• A high‐boiling component, present in a small con- lutions; of fatty acids from oil, etc.).
centration in an aqueous solution, is to be recovered. Reliable design calculation for an extraction pro-
Using distillation is energetically prohibitive because cess requires accurate liquid–liquid equilibrium (LLE)
of the high heat of vaporization of water. data. Frequently, such data cannot be accurately pre-
• Temperature‐sensitive compounds are to be separated. dicted from theory [17,35]. Hence, the normal proce-
• Azeotropic mixtures or mixtures of close‐boiling dure is to collect some experimental data and then
compounds are to be treated. correlate them against standard thermodynamic
Comput Appl Eng Educ. 2021;1–13. wileyonlinelibrary.com/journal/cae © 2021 Wiley Periodicals LLC | 1
2 | BINOUS ET AL.

models, such as Non‐Random Two Liquid (NRTL) or relevant mixtures that have been successfully bench-
Universal Quasi‐Chemical (UNIQUAC), which will be marked against corresponding experimental data. The
discussed below. Prediction of new LLE data for tern- benefits that mathematical software and numerical
ary mixtures requires solving a set of iso‐activity techniques bring to chemical engineering education is
equations under mass/mole balance constraints. made clear throughout the paper and build on an edu-
However, and whenever possible, the results obtained cational theme that has been advocated in the past by
by the application of such models are to be validated by many authors [6,11,12,14,14,15,18,18,26,29,32,40]. The
comparison with experimental data. version of MATHEMATICA© and MATLAB®, adopted in the
For ternary mixtures, isobaric‐isothermal LLE are present study, is v.12 and R2017b, respectively. Note that
represented graphically on a triangular diagram, where the various Mathematica notebooks and m‐files used in
the apexes represent the pure components, the sides of this study are compatible with prior versions of these two
the corresponding binary mixtures, the area inside the technical computing environments.
triangle, and the composition range of the ternary
mixture.
Bimodal curves are classified into three types based 2 | THERMODYNAMIC MODELS
on the number of miscible pairs. Mixtures, which exhibit
closed miscibility gaps, are termed Type 0 systems. These Thermodynamic equilibrium at fixed temperature T and
mixtures form an immiscible island. In such cases, a pressure P of a heterogeneous two‐phase liquid mixture
heterogeneous region of two immiscible or partially involving three chemical species (a solvent, a diluent,
miscible liquids is enclosed by a homogeneous liquid and a solute) imply the iso‐activity condition ai = x i γi for
region. The island type or Type 0 systems have two plait any component i present in both phases (′, ″),
points, which limit the tie lines on both sides of the is-
x i′ γi′ = x i″ γi″ for i = 1…3, (1)
land [35,39,42]. At a plait point, the composition of the
two phases become identical and hence further separa- where x i is the mole fraction of component i and γi , is its
tion is impossible. Mixtures labeled as Type I are systems activity coefficient.
where the solvent and diluent show partial miscibility The choice of a thermodynamic model or fluid
while the solvent and the component to be extracted are package requires some experience. Hence, most stu-
completely miscible. Type I systems exhibit a unique dents face some difficulty in the selection of the
plait point. Finally, in Type II systems, the solvent is proper model that is adequate for the chemical system
partially miscible with the two other components. Such under investigation. If mixtures deviate strongly from
systems exhibit no plait points. ideal behavior, they exhibit liquid‐phase splitting. If
In previous studies, the complex homotopy con- such is the case, to evaluate γi and perform LLE cal-
tinuation method was the method of choice for analyzing culations, two thermodynamic models are commonly
LLE [21,41]. The simpler arc‐length continuation tech- applied: NRTL and UNIQUAC models. The Margules
nique has been applied rarely to LLE data computa- model, which was derived before the NRTL and
tions [9]. UNIQUAC models, can also predict LLE and
The objective of the present paper is to introduce the vapor–liquid‐liquid equilibrium (VLLE) data, but it is
arc‐length continuation technique for LLE calculations seldom used nowadays. Finally, the Wilson model is
to engineering students. We will demonstrate the ap- only applicable to homogeneous systems and fails to
proach with several examples in which the bimodal detect liquid‐phase splitting.
curves and as many tie lines as needed can be predicted. According to the NRTL approach [2,4,17,22,28,30,31,
The paper is organized into the following five sec- 33,33,35], the activity coefficient γi of component i is
tions. First, a short description of the thermodynamic expressed as
models that will be used is given (i.e., the NRTL and 3
UNIQUAC models). The subsequent section lists the ∑ τji Gji xj ⎡
governing equations. Then, we introduce the reader to 3 x j Gij
the arc‐length continuation method and the particle
ln γi =
j =1
3
+ ∑ j =1 ⎢⎢ 3
⎣ ∑k =1 Gkj xk
swarm optimization (PSO) numerical techniques. In our ∑ Gki xk
k =1
discussion of the arc‐length continuation technique, we
⎛ ⎤
∑ τ G x ⎞
N3
draw on previous work in which the method has been
⎜τij − k =1 kj kj k ⎟ ⎥ , (2)
⎜ ⎟
used to solve various chemical engineering problems ∑k =1 Gkj xk ⎠ ⎥⎦
N3

[9,10,13,13,20,23,27]. The last section of this paper con-
tains the generated LLE data for seven industrially where Gij = e (‐aij τij).
BINOUS ET AL. | 3

∆ gij 3 3
τij = T is correlated to the interaction parameter
∆gij between different components i and j . For i = j , ∑xi′ = 1; ∑xi″ = 1. (8)
i =1 i =1
∆gii = 0 and hence, τii = 0 and Gii = 1. αij is the non-
randomness parameter (αij = αji ). Note that five equations from this six‐equation set
The activity coefficient γi in the UNIQUAC model are, however, independent as the summation of the
[2,4,17,23,28,30,31,33,33,35] is given by the equation Equation (7) over the index i , and using the summation
identities in Equation (8) results in Equation (6). To solve
γi = γiC γiR, (3)
for the eight unknowns of the problem (six‐mole frac-
where is the combinatorial contribution to γi and γiR .
γiC tions x i′ and x i″ as well as the molar quantities n′ and n″)
The residual contribution γiC depends on some geome- three more equations are needed. These are precisely the
trical properties of the component as expressed by the equilibrium condition given by Equation (1).
relative van der Waals surface area qi and volume ri . In a For computational purposes, it is convenient to sim-
mixture, the individual relative van der Waals char- plify the equations set. First, we set n = 1 and n″ = σ and
acteristics become hence, n′ = 1 − σ . We also introduce the quantity Ki ,
ri qi which is the ratio of the activity coefficients of compo-
Vi = 3
; Fi = 3
. nent i in the two phases:
∑rj xj ∑ qj xj γi′
j =1 j =1 Ki = i = 1…3. (9)
The above expression results for the combinatorial γi′′
contribution The mole fraction constraints given by Equation (8)
are further used to eliminate x 3′ and x 3″. We obtain finally
⎛ V V⎞
ln γiC = 1 − Vi + ln Vi − 5qi ⎜1 − i + ln i ⎟ . (4) an algebraic equations system in three unknowns ( x1′, x 2′ ,
⎝ Fi Fi ⎠ and σ ):
The energetic interactions between the components
ξ1
of a mixture are taken into account by the residual part x1′ = ,
γiR of the activity coefficient (
1 + K1 − 1 σ )
⎛ 3 ⎞ ξ2
⎜ ∑ τji qj xj ⎟ x 2′ = ,
R

ln γi = qi ⎜1 − ln
j =1
−∑
3 τij qj x j ⎟
⎟ , (5)
(
1 + K2 − 1 σ )
3 j =1 3
⎜ ⎟
⎜ ∑ qj xj ∑ τkj qk xk ⎟ x 3′ = 1 − x1′ − x2′ =
ξ3
⎝ ⎠
j =1 k =1

where τij = e (−Δuij / T ) with Δuij standing for the binary


(
1 + K3 − 1 σ )
1 − ξ1 − ξ2
interaction energy between unlike components i and j . = . (10)
The case i = j implies that ∆uii = 0 and hence, τii = 1. (
1 + K3 − 1 σ )
Note that the above system of equations is highly
3 | GOVERNING E QUATIONS nonlinear due to the dependence of the activity coeffi-
cients on mole fractions. The above set of equations have
Suppose we have a liquid mixture involving three che- been advocated by many authors. For the solution of
mical species (a solvent, a diluent, and a solute), which, such a system of equations, numerous numerical algo-
at specified temperature T and pressure P , splits into two rithms can be applied. One can, as in [8], use the built‐in
liquid phases in equilibrium. Suppose further this mix- MATHEMATICA© command FindRoot. However, this
ture contains n moles and its overall molar composition method, similar to other iterative methods (Newton‐
is given by ξ1, ξ2 , and ξ3. Raphson, etc.), is successful only when a good initial
If the amounts of the phases are respectively n′ and guess is used.
n″, the molar balance equations of this system can be As stated earlier, the goal of the present paper is not
expressed as just to present a procedure to calculate one equilibrium
situation but to predict complete bimodal curves as well
n′ + n′′ = n, (6)
as tie lines. The approach is based on the arc‐length
x i′ n′ + x i″ n″ = ξi n i = 1…3, (7) continuation technique, which is, we think, more ap-
propriate for our purposes. In particular, a continuation
4 | BINOUS ET AL.

method avoids the problem of finding good start values value of ξ2 (overall mole fraction of component 2). Two
for each new iteration. solution routes can alternatively be used; the MATHEMA-
TICA© commands Findroot or FindMinimum. This
solution will be our initial condition in the upcoming
4 | NUMERICAL P ROCEDURES part. In Part III, finally, ξ2 is set as a function of the arc‐
length parameter, s . The auxiliary equation (Equation 15)
4.1 | Arc‐length continuation method is added to the system defined in Part II. Hence, we get a
system of differential algebraic equations, which is
Let us consider the following parametric system of N readily solved using NDSolve.
nonlinear equations, written in vector representation
[9,18,41].
F (m; φ) = 0. (11)
4.2 | PSO

φ is a parameter on which the solution depends. The In optimization, one attempts to find a global or local
components of vectors F and m are, respectively, minimum of a function on a given set. If such function is
F = (f1 , f2 , …, fN ) and m = (m1, m2, …, mN ). The objective not convex, then the classical deterministic algorithms
is now to obtain a solution of such a system as a continuous (e.g., the fixed step steepest descent algorithm, the opti-
function of φ. In the arc‐length continuation method, un- mal step steepest descent algorithm, the conjugate gra-
known variables and parameter φ are set as a function of dient method…) may be stuck in a local minimum and
the arc‐length, represented by s in the following. fail to find the global minimum. Hence, to find the global
Let us suppose for a particular value φ0 of the para- minimum, heuristic strategies that scan the search space
meter φ, the equations set (11) has a solution m 0 , more or less successfully have been developed. Among
these strategies, we find:
F (m 0; φ0 ) = 0 (12)

and that the solution m is an analytic function of φ (i.e., 1. Ant colony optimization
continuous and differentiable). In this case, a neighbor- 2. Simulated annealing
ing solution m = m (φ) can be calculated by constructing 3. Tabu search
a Taylor expansion about φ0 . For a multivalued function 4. Genetic algorithms
of φ, the solution can be parameterized in term of arc‐ 5. Swarm‐based optimization algorithms (e.g., PSO)
length s on the solution curve. Therefore, we can write: 6. Memetic algorithms
m = m (s ), φ = φ (s ). (13)
We owe PSO to the pioneering work in 1995 of
So that Equation (11) become Kennedy and Eberhart [1,19]. PSO algorithms imitate the
social behavior patterns of organisms that live and in-
F (m (s ), φ (s )) = 0. (14)
teract within large groups, such as flocks of birds,
To solve Equation (14), one more relation is needed. swarms of bees, ant colonies, schools of fish, and so forth.
The appropriate auxiliary equation is given by the defi- The method randomly creates a large number of poten-
nition of the arc‐length: tial solutions or particles. These particles evolve through
the search domain using their coordinates and velocities.
dm dm ⎛ dφ ⎞2
. + ⎜ ⎟ = 1. (15) A swarm is an ensemble of such particles. The individual
ds ds ⎝ ds ⎠
and the social behaviors, embedded in the optimization
The system to solve Equations (14) and (15) is now a algorithm, fix the convergence to the global optimum.
differential‐algebraic equations (DAE) set in (N + 1) The algorithm can be implemented using classical
unknowns. In this article, we solve it using the built‐in mathematical software such as MATLAB® or MATHEMATICA©.
MATHEMATICA© function NDSolve.
The computational procedure for the proposed
method is schematically described in the Appendix. The 5 | CASE STUDIES
process can be divided into three main parts. Part I in-
volves fixing some calculation parameters, such as the 5.1 | Oleic acid–water–ethanol
temperature, the binary interaction parameters for the
NRTL or UNIQUAC model, as well as ξ1 (mole fraction of Esters from long‐chain fatty acids and alkyl alcohols are
component 1 in the heterogeneous mixture). Part II is proposed as constituents of biodiesel. In the production
dedicated to the solution of Equation (14) for a fixed process of these compounds, the esterification reaction
BINOUS ET AL. | 5

phase. It is, therefore, important to investigate before-


hand the partition of the alcohol between the two coex-
isting phases to assess the viability of the envisaged
esterification process. In the present case, the partition of
a particular alcohol, ethanol, between the organic oleic
acid phase and the aqueous phase at 40°C and under
1 atm. is considered [34]. The binodal curve of this
ternary system is of Type I: solvent (water) and diluent
(oleic acid) are immiscible under test conditions, while
the solute (ethanol) is completely soluble in both of
them. Such systems exhibit a plait (critical) point where
both phases become indiscernible. Figure 1 depicts the
experimental data [34] in comparison with the generated
binodal curve obtained basing on the NRTL parameters
F I G . 1 Binodal curve of the system oleic acid‒water‒ethanol at of the authors [34]. We notice a good concordance be-
a temperature of 40°C and a pressure of 1 atm. Dots and dashed tween calculated and experimental solubility data.
lines: experimental tie lines data [36]; blue curve: calculated Figure 2 shows that the predicted distribution curve of
miscibility limit line the alcohol between the aqueous and oleic acid phase
accurately reproduces with the experimental findings.
For this first case study, we compared the arc‐length
continuation calculation of one particular tie line to its
counterpart obtained by the direct approach. To do so,
we applied two commonly used nonlinear algebraic
equations solvers: FindRoot of MATHEMATICA© and fsolve
of MATLAB®. Table 1 indicates, as expected, excellent
agreement between all three approaches. Similar com-
parisons for the subsequent case studies consistently
showed excellent agreement between the proposed ap-
proach and the direct route.

5.2 | Water–1‐propanol–toluene
F I G . 2 Partition curve of ethanol (EtOH) between organic and
aqueous phases at 40°C and 1 atm. Dots: experimental data [36]; The binodal curve of this ternary system is Type I. For
blue line: calculated partition curve
this ternary mixture, a large experimental data bank is
available [37], but interaction parameters for the stan-
generates water as a by‐product, which then forms a dard thermodynamic models are missing. Here, we ap-
distinct second phase. If the reactant alcohol is more plied PSO to compute these parameters for both the
soluble in the aqueous phase than in the organic phase, NRTL (∆gij ) and UNIQUAC (Δuij ) models. To reduce the
the esterification reaction rate can decline due to de- dimensions of the optimization search domain for the
creased alcohol concentration in the reacting organic NRTL model, we have set all three nonrandomness

TABLE 1 Case study 1: Comparison between the arc‐length continuation method and the direct calculation using fsolve and
FindRoot

Water‐rich phase composition in mole % Acid‐rich phase composition in mole %


Water Oleic acid Water Oleic acid
Arc‐length continuation 72.49069949 0.222699722 43.06657100 10.68764039
fsolve 72.49069774 0.222700029 43.06656911 10.68764110
FindRoot 72.49069939 0.222699721 43.06657098 10.68764041
−9 −12 −10
Absolute error 1.01473 × 10 8.37823 × 10 1.84706 × 10 2.01431 × 10−10
6 | BINOUS ET AL.

T A B L E 2 Case study 2: Binary interaction parameters for the T A B L E 4 Case study 2: Relative van der Waals surface area qi
NRTL model (∆gij ) with 1‐propanol (1), toluene (2), and water (3) and volume ri with 1‐propanol (1), toluene (2), and water (3)
i/j 1 2 3 i qi ri
1 0 260.43 1157.4 1 2.512 2.779
2 90.84 0 1215 2 2.967 3.922
3 −302.23 845.05 0 3 1.399 0.920
Abbreviation: NRTL, Non‐Random Two Liquid.

investigation of its extractive separation using ethanol


parameters equal to 0.2 in the text thereafter. It took 50 as a solvent from the aqueous esterification product
iterations and 100 particles for our PSO coding, which is mixture DEC–water is therefore of interest. The com-
based on MATLAB®, to generate the binary interaction putation of the solubility equilibrium of this hetero-
parameters given in Table 2 for the NRTL model. The geneous ternary system at 23°C and 1 atm. is performed
goodness of our fit was measured by calculating the root‐ using the UNIQUAC model with the parameters given
mean‐square deviation (rmsd), which was equal in reference [5]. Figure 5 depicts the calculated binodal
to 0.937%. curve of this ternary system (of Type I) and the under-
For the UNIQUAC model, 50 iterations and 100 lying experimental data. We notice again a good con-
particles were sufficient to produce the binary interaction cordance between the two sets of data.
parameters given in Table 3. The calculated rmsd was
equal to 1.796%. This value is quite small but slightly
higher than what we have found for the NRTL model. 5.4 | Water–1‐butanol–n‐hexane
Table 4 provides the individual relative van der Waals
characteristics. The main use of 1‐Butanol or n‐butanol is in the pro-
The calculation results are shown in Figures 3 and 4. duction of varnishes. The alcohol itself as well as many of
The former depicts the predicted bimodal curve based on its esters are also used as a solvent. Recently, 1‐Butanol
the UNIQUAC model in comparison with the experi- has also been proposed to be used as biofuel in replace-
mental data and the latter distribution curve of the al- ment of gasoline and diesel fuel and as an additive to the
cohol between the immiscible phases. A good agreement latter to reduce soot emissions. Furthermore, n‐butanol
between predicted and experimental findings is noticed occurs in a number of alcoholic beverages as it is natu-
in both graphs. rally produced during the fermentation of sugars and
carbohydrates. In this case study, we investigate the ex-
traction equilibrium of n‐butanol from water (diluent)
5.3 | DEC–ethanol–water using n‐hexane as a solvent at a temperature of 25°C and
atmospheric pressure. Experimental data for the solubi-
Diethyl carbonate (DEC), a rich oxygenated organic lity limit and tie lines are taken from reference [37]. The
compound, of chemical formula C═O(OCH2CH3)2; it is binodal curve is of Type II: under the considered condi-
the ester of carbonic acid and ethanol used as a solvent tions, n‐hexane and water are immiscible; n‐butanol, on
in special applications and as a component of electro- the other hand, is totally soluble in n‐hexane but exhibits
lytes in lithium batteries. The solvent has also been a miscibility gap with water.
proposed to be used as a fuel additive to improve the Similarly to case study 2, because of missing binary
octane number in gasoline products [5]. The interaction parameters, we have again used PSO to
compute these parameters for both the NRTL (∆gij ) and
UNIQUAC (Δuij ) models. The calculations took 25
T A B L E 3 Case study 2: Binary interaction parameters for the iterations and 100 particles for our PSO coding in MATLAB®
UNIQUAC model (Δuij ) with 1‐propanol (1), toluene (2), and to generate the binary interaction parameters given in
water (3)
Table 5 for the NRTL model. For the UNIQUAC model,
i/j 1 2 3 30 iterations and 100 particles produced the binary in-
1 0 −688.55 132.51 teraction parameters given in Table 6. The calculated
rmsd were both quite small and equal to 0.241% and
2 586.17 0 747.89
0.277% for the NRTL and UNIQUAC models, respec-
3 −243.54 1222.8 0 tively. Finally, Table 7 provides the individual relative
Abbreviation: UNIQUAC, Universal Quasi‐Chemical. van der Waals characteristics.
BINOUS ET AL. | 7

F I G . 3 Binodal curve of the system water‒1‐propanol‒toluene F I G . 5 Binodal curve of the system water‒ethanol‒DEC at 23°C
at 25°C and a pressure of 1 atm. Dots and dashed lines: and a pressure of 1 atm. Dots and dashed lines: experimental tie
experimental tie lines data [37]; blue curve: calculated miscibility lines data [38]; blue curve: calculated miscibility limit line
limit line

T A B L E 5 Case study 4: Binary interaction parameters for the


Figure 6 depicts the quasi‐perfect agreement between NRTL model (∆gij ) with 1‐butanol (1), n‐hexane (2), and water (3)
the calculated bimodal curve and the tie lines using the i/j 1 2 3
UNIQUAC model and the experimental findings.
1 0 1322.5 1470.1
2 −535.09 0 1351
5.5 | Water–propionic acid– n‐hexane 3 −266.26 1275.3 0

Propionic acid is primarily used for its antimicrobial prop-


erties, as a preservative for human and animal foods in- T A B L E 6 Case study 4: Binary interaction parameters for the
hibiting the growth and proliferation of molds and many UNIQUAC model (Δuij ) with 1‐butanol (1), n‐hexane (2), and
other kinds of fungi. In some industrial production pro- water (3)
cesses (e.g., microbial production), the propionic acid is i/j 1 2 3
obtained as an aqueous solution and is then separated from
1 0 167.9 370.41
water by extraction. We consider here its extraction equi-
librium using n‐hexane as solvent at 25°C under 2 28.263 0 685.62
3 −55.236 1562.8 0

T A B L E 7 Case study 4: Relative van der Waals surface area qi


and volume ri with 1‐butanol (1), n‐hexane (2), and water (3)

i qi ri
1 3.052 3.454
2 3.855 4.4499
3 1.399 0.920

atmospheric pressure [46]. Figures 7 and 8 show the cal-


culation results using the parameters of the authors [46] in
comparison with experimental data. It is noticed that the
F I G . 4 Partition curve of alcohol between organic and aqueous bimodal curve (Figure 7) is accurately predicted. The dis-
phases for case study 2. Dots: experimental data [37]; blue line: tribution curve (Figure 8), however, is less accurate pri-
calculated partition curve marily because of the quality of the thermodynamic model
8 | BINOUS ET AL.

F I G . 6 Miscibility limit curve of the system water‒1‐butanol‒n‐


hexane at 25°C and a pressure of 1 atm. Dots and dashed lines:
experimental tie lines data [37]; blue curve: calculated bimodal
curve; blue segments: calculated tie lines

F I G . 8 Partition curve of propionic acid between organic and


used (UNIFAC [17,28,30,33,35]), a totally predictive model aqueous phases for case study 5. Dots: experimental data [39]; blue
based on the group contribution concept. line: calculated partition curve

and 100 particles to generate the binary interaction


5.6 | Water–TMA–benzene parameters given in Table 8 for the NRTL model. For the
UNIQUAC model, 100 iterations and 100 particles pro-
In this case study, we focus attention on the extraction of duced the data given in Table 9. The calculated rmsd was
tri‐methylamine from its aqueous solution using benzene equal to 1.792% and 0.867% for the NRTL and UNIQUAC
as a solvent. Tie lines data are available [35], but inter- models, respectively. Finally, Table 10 provides the in-
action parameters are missing. dividual relative van der Waals characteristics.
The same PSO procedure as in cases 2 and 4 yielded Figures 9 and 10 display the calculation results using
the binary interaction parameters for both the NRTL the UNIQUAC model in comparison with the experi-
(∆gij ) and UNIQUAC (Δuij ) models. It took 38 iterations mental data. As is evident in Figure 9, the Type I binodal
curve is faithfully reproduced. The distribution curve of
the solute between the coexisting phases (Figure 10) is
less accurately predicted.

5.7 | n‐Hexane–methyl
cyclopentane–aniline

This last case study is pedagogically interesting as it il-


lustrates the temperature effect on the binodal curve for

T A B L E 8 Case study 6: Binary interaction parameters for the


NRTL model (∆gij ) with TMA (1), water (2), and benzene (3)
i/j 1 2 3
1 0 527.29 292.23
F I G . 7 Miscibility limit curve of the system water‒propionic 2 363.14 0 1031.7
acid‒n‐hexane at 25°C and a pressure of 1 atm. Dots and dashed
3 −1006 1694 0
lines: experimental tie lines data [39]; blue curve: calculated
bimodal curve Abbreviation: NRTL, Non‐Random Two Liquid.
BINOUS ET AL. | 9

T A B L E 9 Case study 6: Binary interaction parameters for the


UNIQUAC model (Δuij ) with TMA (1), water (2), and benzene (3)
i/j 1 2 3
1 0 −836.51 −455.95
2 195.31 0 1373.9
3 −1304.3 406.51 0
Abbreviation: UNIQUAC, Universal Quasi‐Chemical.

T A B L E 10 Case study 6: Relative van der Waals surface area qi


and volume ri with TMA (1), water (2), and benzene (3)

i qi ri
1 2.636 2.988
2 1.399 0.920
3 2.400 3.187

F I G . 10 Partition of the solute (TMA) between organic and


the classical liquid ternary system n‐hexane–methyl
aqueous phase. Dots: experimental data [2]; blue curve: calculated
cyclopentane–aniline. Experimental data [16] reveal
distribution line
that by increasing the temperature, the solubility limit
curve is transformed from Type II to Type I. At 25°C, the
binary systems n‐hexane–aniline and methyl At the higher temperature of 45°C, the solubility limit
cyclopentane–aniline are only partially miscible: the bi- curve is Type I.
nodal curve is of Type II. By increasing the temperature The calculated binodal curves and tie lines [9] were
to 34.5°C, the solubility gap between solute (methyl cy- obtained using the UNIQUAC model and PSO for the
clopentane) and solvent (aniline) is almost closed. The estimation of the binary interaction parameters. The re-
plaint (or critical) point of the curve is now located on sults are depicted in Figure 11. As can be observed, the
the triangle side representing the binary system methyl calculated curves are in good agreement with the ex-
cyclopentane–aniline. The solvent‐dilute binary, how- perimental data.
ever, is still only partially miscible. The binodal curve at
34.5°C exemplifies the transition between Types II and I.
6 | N U M E R I C A L M E TH O D S I N
THE C HEMICAL E NGINEERING
GR AD UATE PRO G RAM

Often chemical engineering problems require optimization


techniques to find optimal operating conditions, maximize
a cost function, or minimize utility usage. Moreover, they
may need to estimate model parameters from experimental
data. Hence, most graduate‐level numerical methods
courses train students to complete such tasks using either
deterministic (when a local minimum is sufficient or when
the problem is convex) or stochastic algorithms (when the
problem is nonconvex and global minimum is desired). It is
also customary for chemical engineers to perform sensi-
tivity analyses to determine how a chemical system evolves
if parameters are modified. Such calculations are readily
accomplished using a homotopy continuation method or
F I G . 9 Binodal curve of the system water‒TMA‒benzene at the less complex arc‐length continuation technique. In the
25°C and a pressure of 1 atm. Dots and dashed lines: experimental present paper, we choose to emphasize two numerical
tie lines data [2]; blue curve: calculated bimodal curve techniques, namely PSO and arc‐length continuation.
10 | BINOUS ET AL.

F I G . 11 Binodal curves and tie lines of the system n‐hexane‒methyl cyclopentane‒aniline at 25°C, 24.5°C, and 45°C, respectively. Blue
dots and dashed lines: experimental tie lines data [40]; red curves and segments: calculated miscibility curves and tie lines

These techniques were shown to be successful in solving a The computed results were successfully bench-
classical graduate‐level problem in chemical engineering marked against experimental data. Mastering this new
thermodynamics, namely liquid‐phase equilibria of ternary approach requires minimal effort from students and
mixtures. In this study, we successfully benchmark our provides an easy way to generate an extensive library of
LLE predictions with experimental data from many in- LLE data for various industrially relevant mixtures.
dustrially relevant ternary systems. The generic computa- It is worth mentioning that state‐of‐the‐art research on
tional problem discussed in this paper can readily be LLE calculations is now focusing on ternary and quaternary
assigned to graduate student in either their numerical systems involving new extraction solvents (e.g., ionic li-
methods or applied thermodynamics courses during their quids [43–45] and natural deep eutectic solvents [7,36]).
first year of study in the Master of Science program. The Moreover, we firmly believe it is possible to successfully
authors firmly believe students can expand their knowledge apply our computational methodology to ternary systems
of mathematical software (e.g., MATHEMATICA© and MATLAB®) involving ionic liquids by proper choice of the thermo-
by being exposed to the type of chemical engineering pro- dynamic model (e.g., electrolyte‐NRTL or MSA‐NRTL). We
blems discussed in this paper. plan to present such treatment in a subsequent paper.
It is the authors' belief that this new approach can
contribute to enhanced usage of advanced mathematical
7 | CONCLUSION techniques in graduate‐level chemical engineering edu-
cation, such as thermodynamics and numerical methods
In this paper, we have shown that LLE computations courses.
can be readily implemented in the chemical en- In closing, we should note that the various MATHE-
gineering curriculum. The preferred method proposed MATICA© codes, written for the considered seven case
in this paper is based on the application of the arc‐ studies in this paper, are available upon request from the
length continuation technique, which can be im- corresponding author.
plemented in software, such as MATHEMATICA © or
MATLAB ®. We illustrated the approach with LLE data AC KNOW LEDGM ENTS
for the following ternary mixtures: The Tunisian Ministry of Higher Education is duly ac-
knowledged for allowing Dr. Housam Binous to take a
1. Type I systems: sabbatical leave in the academic year 2020–2021 to
a. oleic acid–water–ethanol complete this paper.
b. water–1‐propanol–toluene
c. DEC–ethanol–water C O NF L I C T O F I N T E R E S T S
d. water–propionic acid–n‐hexane The authors declare that there are no conflict of interests.
e. water–TMA–benzene
2. Type II systems: water–1‐butanol–n‐hexane DATA AVAILABILITY STATEMENT
3. Systems with temperature‐dependent behavior: The computer notebooks and coding are available upon
n‐hexane–methyl cyclopentane–aniline request from the corresponding author.
BINOUS ET AL. | 11

ORCID 17. J. Gmehling, M. Kleiber, B. Kolbe, and J. Rarey, Chemical


Housam Binous http://orcid.org/0000-0002-3196-1870 thermodynamics for process simulation, 2nd ed., Wiley‐VCH
Verlag, Wheinheim, 2019.
18. B. G. Higgins and H. Binous, A simple method for tracking
REFERENCES
turning points in parameter space, J. Chem. Eng. Jpn. 43
1. J. Kennedy and R. Eberhart, Particle Swarm Optimization, (2010), no. 12, 1035–1042.
Proceedings of the 1995 International Conference on Neural 19. J. Kennedy and R. Eberhart, Swarm intelligence, Morgan
Networks, vol. 4, IEEE Press, New York, 1995, pp. 1942–1948. Kaufmann, San Francisco, 2001.
https://doi.org/10.1109/ICNN.1995.488968 20. M. Kubíček and M. Holodniok, Evaluation of Hopf bi-
2. D. S. Adams and J. M. Prausnitz, Statistical thermodynamics of furcation points in parabolic equations describing heat and
liquid mixtures: A new expression for the excess Gibbs energy of mass transfer in chemical reactors, Chem. Eng. Sci. 39
partly or completely miscible systems, AIChE J. 21 (1975), 116–128. (1984), no. 3, 593–599.
3. L. Alders, Liquid‐liquid extraction. Theory and laboratory practice, 21. D. Laiadi, A. Hasseine, and A. Merzougui, Homotopy method
Elsevier Pub. Co., Amsterdam, London, New York, 1959. to predict liquid‐liquid equilibria for ternary mixtures of (wa-
4. J. Alvarez Juliá, C. R. Barrero, M. E. Corso, M. D. C. Grande, ter + carboxylic acid + organic solvent), Fluid Phase Equilib.
and C. M. Marschoff, On the application of the NRTL method to 313 (2012), 114–120.
ternary (liquid + liquid) equilibria, J. Chem. Thermodyn. 37 22. Z. Li, K. A. Mumford, Y. Shang, K. H. Smith, J. Chen,
(2005), no. 5, 437–443. Y. Wang, and G. W. Stevens, Analysis of the nonrandom two‐
5. I. C. Arango Montoya, J. M. Gonzalez, and A. L. Villa, Liquid‐ liquid model for prediction of liquid‐liquid equilibria, J. Chem.
liquid equilibrium for the water + diethyl carbonate + ethanol Eng. Data 59 (2014), no. 8, 2485–2489.
system at different temperatures, J. Phys. Chem. Ref. Data 57 23. W.‐J. Lin, J. D. Seader, and T. L. Wayburn, Computing multiple
(2012), 1708–1712. solutions to systems of interlinked separation columns, AIChE J.
6. R. Baur, J. Bailey, B. Brol, A. Tatusko, and R. Taylor, Maple 33 (1987), no. 6, 886–897.
and the art of thermodynamics, Comput. Appl. Eng. Educ. 6 24. W. L. McCabe, J. C. Smith, and P. Harriot, Unit operations of
(1998), no. 4, 223–234. chemical engineering, McGraw‐Hill Education, New York,
7. F. Bezold and M. Minceva, Liquid‐liquid equilibria of n‐ NY, 2005.
heptane, methanol and deep eutectic solvents composed of car- 25. A. Mersmann, M. Kind, and J. Stichlmair, Thermal separation
boxylic acid and monocyclic terpenes, Fluid Phase Equilib. 477 technology: Principles, methods, process design, Springer‐
(2018), 98–106. Verlag, Heidelberg, Germany, 2011.
8. H. Binous, Liquid‐liquid equilibrium and extraction using 26. Z. Nasri and H. Binous, Applications of the soave‐redlich‐
Mathematica®, Comput. Educ. J. 16 (2006), no. 1, 78–81 kwong equation of state using mathematica, J. Chem. Eng. Jpn.
9. H. Binous and A. Bellagi, Calculation of ternary liquid‐liquid 40 (2007), no. 6, 534–538.
equilibrium data using arc‐length continuation, Eng. Rep. 3 27. M. J. Okasinski and M. F. Doherty, Thermodynamic behavior
(2021), no.2. https://doi.org/10.1002/eng2.12296 of reactive azeotropes, AIChE J. 43 (1997), no. 9, 2227–2238.
10. H. Binous and A. A. Shaikh, Introduction of the arc‐length con- 28. B. E. Poling, J. M. Prausnitz, and J. P. O'Connell, The properties of
tinuation technique in the chemical engineering graduate program gases and liquids, 5th ed., McGraw‐Hill, New York, NY, 2001.
at KFUPM, Comput. Appl. Eng. Educ. 23 (2015), no. 3, 344–351. 29. L. M. Porto and R. H. Ogeda, Java applets for chemical reaction
11. H. Binous, A. A. Shaikh, and A. Bellagi, Chebyshev orthogonal engineering, Comput. Appl. Eng. Educ. 6 (1998), no. 2, 67–77.
collocation technique to solve transport phenomena problems 30. R. C. Reid, J. M. Prausnitz, and B. E. Poling, The properties of
with matlab® and mathematica, Comput. Appl. Eng. Educ. 23 gases and liquids, 4th ed., McGraw‐Hill, New York, NY, 1987.
(2015), no. 3, 422–431. 31. H. Renon and J. M. Prausnitz, Local compositions in thermo-
12. N. Brauner and M. Shacham, Numerical experiments in fluid dynamic excess functions for liquid mixtures, AIChE J. 14
mechanics with a tank and draining pipe, Comput. Appl. Eng. (1968), no. 1, 135–144.
Educ. 2 (1994), no. 3, 175–183. 32. R. Rodrigues, R. P. Soares, and A. R. Secchi, Teaching chemical
13. F. Chen, R. S. Huss, M. F. Doherty, and M. F. Malone, Multiple reaction engineering using emso simulator, Comput. Appl. Eng.
steady states in reactive distillation: Kinetic effects, Comput. Educ. 18 (2010), no. 4, 607–618.
Chem. Eng. 26 (2002), no. 1, 81–93. 33. S. I. Sandler, Chemical and engineering thermodynamics, 3rd
14. F. Cruz‐Peragón, J. M. Palomar, E. Torres‐Jimenez, and ed., John Wiley & Sons, New York, 1999.
R. Dorado, Spreadsheet for teaching reciprocating engine cycles, 34. J. S. Santos, A. P. L. Craig, J. M. O. Santana, A. F. Santos,
Comput. Appl. Eng. Educ. 20 (2012), no. 4, 681–691. M. F. Heredia, M. L. Corazza, E. Franceschi, and C. Dariva,
15. M. B. Cutlip, J. J. Hwalek, H. E. Nuttall, M. Shacham, J. Brule, Liquid−liquid equilibrium for ternary systems containing water,
J. Widmann, T. Han, B. Finlayson, E. M. Rosen, and R. Taylor, oleic acid, and alcohols at 313.15 K. Effect of alcohol chain
A collection of 10 numerical problems in chemical engineering length, J. Phys. Chem. Ref. Data 60 (2015), 2050–2056. https://
solved by various mathematical software packages, Comput. doi.org/10.1021/je501174y
Appl. Eng. Educ. 6 (1998), no. 3, 169–180. 35. J. D. Seader, E. J. Henley, and D. K. Roper, Separation process
16. B. D. Darwent and C. A. Winkler, The system n‐hexane‒methyl principles, chemical and biochemical, 3rd ed., John Wiley &
cyclopentane‒aniline, J. Phys. Chem. 47 (1943), 6, 442–454. Sons, New York, 2011.
12 | BINOUS ET AL.

36. H. Shekaari, M. T. Zafarani‐Moattar, and B. Mohammadi,


Diplôme d'ingénieur in biotechnology from the Ecole
Liquid‐liquid equilibria and thermophysical properties of tern-
ary mixtures {(benzene/thiophene) + hexane + deep eutectic des Mines de Paris and a Ph.D. in chemical
solvents}, Fluid Phase Equilib. 509 (2020), 112455. engineering from the University of California at
37. A. Skrzecz, D. Shaw, A. Maczynski, and A. Skrzecz, IUPAC‐NIST Davis. His research interests include the applications
solubility data series 69. Ternary alcohol–hydrocarbon–water sys- of computers in chemical engineering.
tems, J. Phys. Chem. Ref. Data 28 (1999), no. 4, 983–1235.
38. J. Stichlmair and H. E. Steude, Abtrennung und Rückgewinnung
von Stoffen aus Abwasser und AbfallflüssigkeitenStofftrennverfahren
Dr. Khalifa Mejbri is an Assistant
in der Umwelttechnik, GVC.VDI‐Gesellschaft Verfahrenstechnik Professor of energy engineering at the
und Chemieingenieurwesen, Düsseldorf, 1990, pp. 175/205. National Engineering School of Monastir
39. R. E. Treybal, Liquid extraction, McGraw Hill, New York, —University of Monastir, Tunisia. His
NY, 1951. research interests encompass Thermody-
40. L. G. S. Vasconcelos, J. J. N. Alves, A. C. B. de Araújo, and namics, Heat Transfer, Pinch Technol-
R. P. Brito, McCabe‐Thiele method revisited ‐ solving binary
ogy, High Energy Performance Buildings & HVAC
distillation problems with nonconventional specifications,
Systems, and Renewable Energy.
J. Chem. Eng. Jpn. 41 (2008), no. 9, 933–938.
41. S. K. Wasylkiewicz, L. N. Sridhar, M. F. Doherty, and
M. F. Malone, Global stability analysis and calculation of Dr. Ahmed Bellagi is an Emeritus
liquid−liquid equilibrium in multicomponent mixtures, Ind. Professor of chemical and energy engi-
Eng. Chem. Res. 35 (1996), no. 4, 1395–1408. neering at the Ecole Nationale d'Ingé-
42. R. Wennersten, Solvent extraction principles and practice, re-
nieurs de Monastir, University of
vised and expanded, Taylor & Francis, New York, NY, 2004.
43. Y. Xu, D. Meng, H. Li, X. Yu, Z. Zhu, Y. Wang, Y. Ma, and J. Gao,
Monastir, Tunisia, since 1992. Prior to
Mechanism Analysis for Separation of Cyclohexane and tert‐ that, he has been a Professor of chemical
Butanol System via Ionic Liquids as Extractants and Process Opti- engineering at the Ecole Nationale d'Ingénieurs de
mization, ACS Sustain. Chem. Eng. 7 (2019), no. 24, 19984–19992. Gabès. He received his Ph.D. in 1979 from the
44. Z. Zhu, W. Bai, Y. Xu, H. Gong, Y. Wang, D. Xu, and J. Gao, Rheinisch‐Westfälische Technische Hochschule at
Liquid‐liquid extraction of methanol from its mixtures with Aachen—Germany. His research interests mainly
hexane using three imidazolium‐based ionic liquids, J. Chem.
focus on Process Thermodynamics, Absorption Re-
Thermodyn. 138 (2019), 189–195.
frigeration and Solar Cooling, Modeling and Simula-
45. Z. Zhu, Y. Xu, H. Li, Y. Shen, D. Meng, P. Cui, Y. Ma,
Y. Wang, and J. Gao, Separation of isopropyl alcohol and iso- tion of Unit Operations and Processes. He has
propyl ether with ionic liquids as extractant based on quantum supervised 35 Master degree and 20 Ph.D. theses.
chemical calculation and liquid‐liquid equilibrium experiment, Professor Bellagi has written over 100 publications.
Sep. Purif. Technol. 247 (2020), 116937. Recently, his pedagogical interests focus on the
46. D. Özmen, U. Dramur, and B. Tatli, Liquid‐liquid equilibria of development of Demonstrations for chemical engi-
propionic acid‐water‐solvent (n‐hexane, cyclohexane, cyclohex- neers using the software Mathematica® in collabora-
anol and cyclohexyl acetate) at 298.15 K, Braz. J. Chem. Eng. 21
tion with Dr. H. Binous and Professor B. G. Higgins.
(2004), 4, 647–657.
(http://demonstrations.wolfram.com/author.html?
author=Housam+Binous).
AUTH OR BI OGRAPH IES

Dr. Housam Binous has been a visiting


How to cite this article: H. Binous, K. Mejbri,
Associate Professor at the King Fahd
and A. Bellagi, Application of graduate‐level
University of Petroleum & Minerals. He
numerical tools to teach phase equilibria of liquid
is now a full‐time faculty member at the
ternary systems, Comput. Appl. Eng. Educ. (2021),
National Institute of Applied Sciences
1–13. https://doi.org/10.1002/cae.22411
and Technology in Tunis. He earned a
BINOUS ET AL. | 13

APPENDIX ξ2
x 2′ =
1 + (K 2 − 1)σ
ξ3 1 − ξ1 − ξ
2
Part 1 x 3′ = 1 − x1′ − x2′ = =
1 + (K 3 − 1)σ 1 + (K 3 − 1)σ

1. Select a value of temperature.


2. Write the NRTL or UNIQUAC equations predicting the
Part III
activity coefficient.
3. Set the values for thermodynamic model parameters.
4. Choose an arbitrary value of ξ1.
6. ξ2 is our parameter φ. Set this parameter as function of s ,
the arc length, φ = φ(s ).
7. Add the auxiliary equation to the system in part II
where m = (x 1′, x 2′, x 1′′, x 2′′, σ )
Part II
dm dm ⎛ dφ ⎞2
. +⎜ ⎟ =1
ds ds ⎝ ds ⎠
5. Use FindRoot or FindMinimum to solve equations set (10) 8. Use NDSolve to solve the system of Differential Algebraic
in order to find a particular solution for a value of your Equations starting with the solution found in Part II (i.e. at
choice for ξ2 (i.e. an initial solution used in Part III). s = 0 ). Hence we determine for all s ,
ξ1
x1′ = (x 1′(s ), x 2′(s ), x 1′′(s ), x 2′′(s ), φ(s ))
1 + (K1 − 1)σ
9. Use ParametricPlot to draw the LLE diagram.

(Continues)

You might also like