Beruflich Dokumente
Kultur Dokumente
a r t i c l e i n f o a b s t r a c t
Article history: This paper deals with handling of the cubic equation of state (CEOS) in equation-oriented (EO) process
Received 16 March 2010 optimization. The roots of the CEOS are generally computed by subroutine-based calculations that involve
Received in revised form 21 July 2010 logical if-else conditions. This approach can lead to nonsmoothness and convergence issues when used
Accepted 23 July 2010
with gradient-based solvers in an EO framework. In this work, we propose a new general EO approach for
Available online 3 August 2010
selecting the appropriate root of the CEOS by incorporating derivative constraints specific to the desired
(vapor or liquid) phase. We prove that these constraints are capable of isolating the liquid, middle and
Keywords:
vapor root. The derivative constraints are tested using the EO phase-equilibrium formulation of Gopal
Cubic equation of state
Flash calculations
and Biegler (1999) which is suitably extended for handling CEOS and relaxing the derivative constraints
Complementarity constraints in the event of disappearance of phases. Using numerical examples involving simulation of flash vessels
Nonlinear programming and optimization of distillation column, it is demonstrated that the proposed EO formulation always
Process optimization selects the appropriate roots, handles missing phases on distillation trays and flash units, and is fairly
Simulation robust to different starting points in the phase envelopes.
© 2010 Elsevier Ltd. All rights reserved.
1. Introduction EOS (Chapman, Gubbins, Jackson, & Radosz, 1990) have been pro-
posed and developed in recent years, the use of CEOS has remained
An equation of state (EOS) is a thermodynamic equation that widespread because of several advantages such as simplicity of
relates two or more state functions (temperature, pressure, volume application, determination of few parameters and lower compu-
etc.) in order to describe properties of fluids and their mixtures. tational overhead.
The use of cubic equations of state (CEOS) became popular in the The SRK, PR and their variants are the most widely used cubic
modeling of natural gas systems in the 1970s because of their equations in the chemical and petroleum industry for process mod-
remarkable prediction of the phase behavior of hydrocarbon flu- eling, simulation and optimization. These CEOS can, in general be
ids. All CEOS have their foundation in Van der Waal’s EOS (Waals, expressed in the form 3 + a1 2 + a2 + a3 = 0 where is either vol-
1873), which was developed in the 1870s but was limited to pre- ume or compressibility factor and the corresponding coefficients
diction of thermodynamic properties of the vapor phase. The Soave are a function of temperature, pressure and composition of the
modification of the Redlich–Kwong (RK) equation (Soave, 1972) has thermodynamic system. The above equation can be solved either
been a major success in extending the application of CEOS from analytically or numerically and in either case, appropriate guide-
the prediction of vapor thermodynamic properties to vapor–liquid lines are employed to select the appropriate (vapor or liquid) root.
equilibria for non-polar and slightly polar components. Thereafter, Once the correct root is identified, the necessary thermodynamic
the Peng–Robinson (PR) EOS (Peng & Robinson, 1976) was devel- (enthalpy, entropy etc.) and vapor liquid equilibrium (fugacity
oped which had a superior accuracy near the critical region and a coefficient) properties can be easily calculated using explicit analyt-
better prediction of liquid density of most materials. Most of the fur- ical expressions for departure functions (Reid, Prausnitz, & Poling,
ther developments on the cubic equation on state have been related 2000) based on the chosen equation of state.
to modification of alpha functions and mixing rules, which has In contrast, our work focuses the systematic selection of appro-
improved their predictive capabilities further, particularly for polar priate root of the cubic equation in the context of an equation
mixtures. Although more theoretically based equations of state, oriented (EO) approach for process optimization.
such as the simplified-statistical-associating-fluid theory (SAFT) It is found that certain practical guidelines or heuristics are
always needed to select the appropriate root, i.e. to at least verify
its “correctness” if not isolating it from the other roots. However,
∗ Corresponding author. Tel.: +1 412 268 2232; fax: +1 412 268 7139. practical insights proposed to date are not mathematically or ther-
E-mail address: lb01@andrew.cmu.edu (L.T. Biegler). modynamically rigorous and may thus fail to find the right root (i.e.
0098-1354/$ – see front matter © 2010 Elsevier Ltd. All rights reserved.
doi:10.1016/j.compchemeng.2010.07.028
2086 R.S. Kamath et al. / Computers and Chemical Engineering 34 (2010) 2085–2096
middle root or no root, instead of the correct vapor or liquid root). as simultaneous or nested iterative loops based on the ordering of
Although the evaluation of the roots of a CEOS using analytical cal- these equations.
culations in an external procedure is well-studied, we argue that In the SM mode, the simulator is relatively easy to construct
it is not suitable for use with the EO approach. Thus, some type of and debug because of the tailored procedures for the blocks. How-
rigorous constraints are needed so that the CEOS can be expressed ever, because of the modular approach, derivatives for the implicit
in a fully EO form and easily integrated with the rest of the EO opti- models are not directly available and are usually supplied by finite
mization formulation. It is in this context that this work sheds new differences, which can lead to inaccuracy and round-off errors.
light by exploiting mathematical properties of the cubic equation Another drawback is that unit models need to be solved repeatedly
combined with physical insight about the nature of vapor and liquid and their intermediate failure can be detrimental to optimization.
roots. The second approach is the equation-oriented (EO) approach
In this work, new mathematically rigorous criteria for bound- (Westerberg & Berna, 1978) in which most (if not all) equations and
ing and selecting the correct root of the CEOS are developed, which variables corresponding to the unit operations are solved simul-
are convenient to implement in an equation-oriented optimiza- taneously and incorporated within the optimization problem. In
tion environment. We first present a brief background on the this approach, exact derivatives are directly available and the per-
sequential-modular (SM) and the equation-oriented (EO) approach formance of the optimization algorithms does not deteriorate due
for simulation and optimization of process flowsheets. The issues to round off errors in gradients. Compared to the SM approach,
involved in the evaluation of the roots of the CEOS in the context of this mode requires a more careful problem definition, initializa-
both these approaches are discussed. In particular, we put empha- tion by the user, and a robust general purpose nonlinear solver.
sis on handling the switch between one and three real roots in the Nevertheless, the EO approach is preferred for complex flowsheets
event of disappearing or missing phases and describe how the exist- with many nested recycle loops and implicit design specifications.
ing techniques lead to discontinuities when directly applied to the A comprehensive review of both these approaches as applied to
EO approach. We then present the theory section, where we show flowsheet optimization is provided in Biegler, Grossmann, and
that the first and second derivatives of the CEOS exhibit certain Westerberg (1997). The above descriptions would suggest that the
properties that can be exploited in order to isolate and select the analytical method will be suitable for the SM approach and the
desired vapor or liquid root. These properties are first proved for numerical method will be preferred for the EO approach. Surpris-
the case of three real roots and then extended to the case of only ingly, many of EO modeling tools used in the chemical industry such
one real root. We then illustrate how the phase-equilibrium for- as Aspen EO solver (AspenTech, 2006) and gPROMS (PSE, 2009) still
mulation of Gopal and Biegler (1999), which handles missing or evaluate the cubic equation using analytical calculations within
disappearing phase, can be extended to incorporate the CEOS as the an external procedure and the pros and cons of this integrated
thermodynamic model. It is shown that derivative constraints for approach need careful investigation.
the CEOS can be relaxed using the same slack variables that handle Obtaining the roots of the cubic equation has been well stud-
the missing phases in the formulation of Gopal and Biegler (1999). ied. The most widely used one is based on the analytic solution
The derivative constraints are tested within the extended EO for- of Cardano (Uspensky, 1964). It involves converting the general
mulation using three numerical case studies. The first two case cubic equation into the depressed form 3 + p + q = 0 without the
studies involves simulation of flash vessels in (P,T) and (P,Q) mode quadratic term. The further solution of the depressed cubic equa-
where the outlet phases (vapor or liquid or both) are not known a tion depends on the sign of the discriminant which identifies the
priori. These case studies demonstrate that the extended EO formu- number of real roots (one or three) as well as their distinctness
lation coupled with derivative constraints for the CEOS is robust to (all distinct or at least two are equal). The evaluation of the roots
different starting points in the vapor and liquid phases. The last case involves several if-else loops to handle issues like sign (positive,
study involves optimization of a single-feed distillation column to negative, zero) of discriminant and square and cubic roots of inter-
minimize the reboiler load while meeting the product purity spec- mediate variables (Perry & Green, 1997). While this method is easy
ifications. Using different cases for product purity constraints, we to implement in procedure-based modeling environments, there
show that our proposed formulation can detect optimal solutions are cases where it fails, or worse, predicts incorrect roots, mostly
involving flow conditions in the distillation column that include due to overflow and round-off errors (Herbison-Evans, 1986). For
both vapor and liquid, liquid only or vapor only, or neither. example, Zhi and Lee (2002) show that at low temperatures, the
analytical solutions of the CEOS lead to irrational results while an
2. Background iterative solution of the cubic equation produces valid results. A
careful implementation of the analytical method combined with
Before discussing the choice of implementation method for physical insight about the EOS can however reduce the occurrence
the CEOS, we briefly describe the two major approaches used of these failures (Hess, Su, & Shertukde, 2008; Salim, 2006). The
for process optimization in the chemical industry. The first is the presence of several if-else loops and intermediate variables, and
sequential modular (SM) approach (Biegler, 1989) where an opti- additional overhead to avoid round-off errors can make the analyt-
mizer is coupled with a simulator in which modules (e.g. equipment ical method computationally expensive; an iterative approach may
in a flowsheet) are solved sequentially as black-box models with be at least as efficient (Mathias, Boston, & Watanasiri, 1984).
numerical strategies that are specifically tailored for each unit Another serious limitation, which is valid only in the context
operation. In these formulations, the interaction between the sim- of EO optimization is that the if-else tests in the procedural cal-
ulator and the optimizer is either only through the degrees of culation can lead to discontinuous derivatives during transitions
freedom (feasible path method) or along with it, with some tear and between the roots, i.e. when the selected root changes from the case
additional design variables (infeasible path method). Moreover, of three distinct roots to (at least) two equal or only one real root. As
within the SM environment, a number of flash algorithms have a result, procedure-based analytical calculations may lead to non-
been proposed including the popular inside-out method (Boston smoothness and failure to satisfy the Karush–Kuhn–Tucker (KKT)
& Britt, 1978) and robust homotopy-continuation methods (Bausa conditions within an EO optimization framework. In this study, we
& Marquardt, 2000; Sun & Seider, 1995). Also, Gani, Muro-Sune, characterize these roots by inequality constraints and model the
Sales-Cruz, Leibovici, and O’Connell (2006) present a mathemat- appearance or disappearance of phases through explicit changes in
ical analysis of CEOS and other property models for both pure the active sets of these inequalities, in the KKT conditions of the EO
components and mixtures, and propose solution strategies such system.
R.S. Kamath et al. / Computers and Chemical Engineering 34 (2010) 2085–2096 2087
where is the either compressibility factor or volume in the context middle root is to compare its location with respect to the inflection
of the CEOS. The first and second derivatives are given by point. This is based on the following property:
f () = 3 2 + 2a1 + a2 (2) Theorem 2. For a cubic equation having three real roots, the inflec-
tion point is the arithmetic mean of all the three real roots.
f () = 6 + 2a1 (3)
Proof. The inflection point inf is defined as the point on the
We will show that properties of the first and second derivative can
curve at which the curvature changes sign. A necessary condi-
be used as constraints to isolate the roots of cubic equation, and
tion is that the second derivative also changes sign, i.e. f ( inf ) = 0.
thus appropriately select the vapor and liquid roots. We first prove
Using this necessary condition and (3) and (6), it is clear that
this for the case of three real roots and then extend it for the case
inf = (rL + rM + rV )/3.
of single real root.
Using the previous property, the expression for f (rM ) in (9) can
3.1. Case I: cubic equation having three real roots be rewritten as
r + r + r
L M V
Consider that the cubic Eq. (1) has three real roots rL , rM and rV f (rM ) = 6rM − 6 (11)
3
such that rL ≤ rM ≤ rV . Then, vapor and liquid roots can be defined
as follows: f (rM ) = 6 rM − inf (12)
Definition 1. The liquid root corresponds to the smallest real root, This suggests that if rM ≤ xinf , then f (rM ) ≤ 0 and vice versa. This
i.e. rL and the vapor root corresponds to the largest real root, i.e. rV . idea is also illustrated graphically in Fig. 3 for all possible cases
of relative locations of rM and inf . Since the sign of the second
The cubic equation can be constructed from the three real roots
derivative of middle root is uncertain, the middle root cannot be
as follows:
distinguished from the vapor root when f (rM ) ≥ 0 and from the
f () = ( − rL )( − rM )( − rV ) (4) liquid root when f (rM ) ≤ 0. Thus, although the second derivative
3 2 constraints are linear and computationally attractive, they are not
f () = − (rL + rM + rV ) + (rL rM + rM rV + rV rL ) − rL rM rV (5)
sufficient by themselves to isolate all the three real roots.
Comparing (1) and (5), the coefficients of cubic equation can be The first derivatives of the cubic equation when evaluated at
expressed in terms of the three real roots the roots also exhibit certain properties. These are stated in the
following theorem.
a1 = −(rL + rM + rV ) (6)
Theorem 3. For a cubic equation having three real roots, the first
a2 = rL rM + rM rV + rV rL (7) derivatives evaluated at the largest (vapor) and the smallest (liquid)
a3 = −rL rM rV (8) root are always non-negative while at the middle root, it is always
non-positive i.e. f (rV ) ≥ 0, f (rL ) ≥ 0 and f (rM ) ≤ 0.
The second derivative of the cubic equation when evaluated at the
roots has the special properties stated below: Proof. The first derivative at the vapor root is given by f (rV ) =
3rV2 + 2a1 rV + a2 . Substituting for a1 and a2 from (6) and (7) respec-
Theorem 1. For a cubic equation having three real roots, the second tively, we get
derivatives when evaluated at the largest (vapor) root and the smallest
(liquid) root are always non-negative and non-positive respectively i.e. f (rV ) = rV2 − rV rL − rV rM + rL rM (13)
f (rV ) ≥ 0 and f (rL ) ≤ 0.
f (rV ) = (rV − rM )(rV − rL ) (14)
Proof. Using (3), the second derivative at vapor root is
Since rV ≥ rM and rV ≥ rL , it follows that f (rV ) ≥ 0. Similarly, the first
given by f (rV ) = 6rV + 2a1 . Substituting for a1 from (6), we get
derivative at the liquid root is given by
f (rV ) = 4rV − 2rL − 2rM . Since rV ≥ rM ≥ rL , it follows that f (rV ) ≥ 0.
Similarly, the second derivative at the liquid root is given by f (rL ) = 3rL2 + 2a1 rL + a2 (15)
f (rL ) = 4rL − 2rM − 2rV . Since rL ≤ rM ≤ rV , it follows that f (rL ) ≤ 0.
f (rL ) = rL2 − rL rM − rL rV + rM rV (16)
The above mentioned property is illustrated in Fig. 2 for four f (rL ) = (rL − rM )(rL − rV ) (17)
different cases depending on the nature of the three real roots. It
Since rL ≤ rM and rL ≤ rV , it follows that f (rL ) ≥ 0. The same analysis
can be seen that in all cases, the second derivative property holds at
can be repeated even for the middle root. The first derivative in this
the vapor and liquid roots. Moreover, case (d) is special as all three
case is given by
roots are identical (critical point) and the theorem holds since the
2nd derivative is zero and is satisfied as an equality for both vapor f (rM ) = 3rM
2
+ 2a1 rM + a2 (18)
and liquid roots, which are now indistinguishable.
2
However, the middle root does not exhibit any such properties. f (rM ) = rM − rL rM − rM rV + rV rL (19)
This can be verified in Fig. 2 itself, where the middle root coincides
f (rM ) = (rM − rL )(rM − rV ) (20)
with vapor and liquid roots in cases (b) and (c) respectively, thus
acquiring the vapor or liquid property depending on the case. The Since rM ≥ rL and rM ≤ rV , it follows that f (rM ) ≤ 0.
reasoning applied in the previous proof when applied to the middle
root results in the following steps: This concept is illustrated in Fig. 4. As was demonstrated earlier for
second derivative constraints, this property too is consistent with
f (rM ) = 6rM − 2(rL + rM + rV ) (9) the critical point, and in general, cases where at least two roots coin-
cide and the first derivative is zero. Just like the second derivative
f (rM ) = 4rV − 2rL − 2rM (10)
constraints, the first derivative constraints by themselves are not
Eq. (9) suggests that f (rM )
does not have a fixed sign. Rather, sufficient to isolate all three roots. This is because the first deriva-
it depends on the relative distance of the middle root from the tive at the vapor and liquid roots have the same sign, and hence
remaining two roots. A better way to characterize the sign of the cannot be distinguished from each other.
R.S. Kamath et al. / Computers and Chemical Engineering 34 (2010) 2085–2096 2089
Fig. 2. Illustration of second derivative at vapor and liquid roots of a cubic equation having three real roots for (a) all distinct roots, (b) middle and liquid root coincide, (c)
middle and vapor roots coincide, and (d) all roots coincide.
Fig. 3. Illustration of how the sign of second derivative at middle root changes based on its location relative to other two real root.
3.2. Case of one real root Proof. For the case of one real root, the cubic equation can be
expressed as
The properties of the first and second derivatives demonstrated
for the case of three real roots can also be extended for the case f () = ( − r)( 2 + b1 + b2 ) = 0 (21)
of single real root. We first state the following property of the first
derivative. where r is the single real root while the two complex roots together
form the quadratic expression. The existence of two complex roots
of the quadratic equation 2 + b1 + b2 = 0 implies that b21 − 4b2 < 0.
The first derivative at the real root is given by,
Theorem 4. For a cubic equation having a single real root, the first
derivative evaluated at that root is always positive. f (r) = r 2 + b1 r + b2 (22)
2090 R.S. Kamath et al. / Computers and Chemical Engineering 34 (2010) 2085–2096
Fig. 4. Illustration of the behavior of first derivatives at the three real roots of a cubic equation for (a) all distinct roots, (b) middle and liquid root coincide, (c) middle and
vapor roots coincide, and (d) all roots coincide.
2
b1 b21 roots (or mathematically the sign of the second derivative at the
f (r) = r+ + b2 − (23) root) does not change as the physical system (or mathematically
2 4
the cubic equation of state) transitions from the case of three real
The first term in (23) is always non-negative while the second is roots to one real root. A sketch of this transition is shown in Fig. 6.
always positive since b21 − 4b2 < 0. Thus, it follows that f (r) > 0. When three real roots exist, the nature of the roots can be precisely
defined. As the system transitions from the three root case to the
As per the previous theorem, it does not matter which phase
case of a single (vapor or liquid) root due to a small change in any
(liquid or vapor) the real root corresponds to as both f (rL ) > 0 and
of the operating conditions (pressure, temperature, composition),
f (rV ) > 0 will be valid. Note that this property is the same as that
the nature of the derivatives at the roots does not change (as per
stated for the case of three real roots except for the condition of
our assumption), and hence the existing real root in the single root
strict inequality. The case of f (r) = 0 occurs only in the case of three
case obtains its nature from its corresponding root in the three root
real roots when at least two roots are identical. The second deriva-
case.
tive for the case of one real root also exhibits properties similar to
Although the second and first derivatives individually are not
that for three real roots. However, developing a mathematical proof
sufficient to isolate the roots, their simultaneous use can guarantee
for this is not trivial and hence this is stated below as a conjecture:
the isolation of the vapor and liquid root and also even the middle
Conjecture 1. For a cubic equation having a single real root, the root, if that is desired in the three root case. Based on these proper-
second derivative at that real root is positive if it corresponds to the ties, we can develop a more precise mathematical definition for the
vapor root and negative if it corresponds to a liquid root. vapor and liquid roots when using a thermodynamic model based
on the cubic equation of state. These definitions are as follows:
The behavior of the first and second derivatives for the case of
single (vapor or liquid) root is shown in Fig. 5. The presence of only
Definition 2. The root of the cubic equation of state that cor-
one real root does not allow any comparison, and hence the defini-
responds to a vapor is the one which satisfies all the following
tion for vapor and liquid roots that was used for the case of three
constraints: f(rV ) = 0, f (rV ) ≥ 0, and f (rV ) ≥ 0.
real roots is not applicable when there is only one real root. The only
way to identify whether the real root is a liquid root or a vapor root
would be to use second derivative constraints, i.e. the conjecture Definition 3. The root of the cubic equation of state that cor-
stated above. An intuitive proof can, however, be devised for the responds to a liquid is the one which satisfies all the following
above conjecture based on an assumption that the nature of the constraints: f(rL ) = 0, f (rL ) ≥ 0, and f (rL ) ≤ 0.
R.S. Kamath et al. / Computers and Chemical Engineering 34 (2010) 2085–2096 2091
Fig. 5. Illustration of the behavior of first and second derivatives of the cubic equation evaluated at the single (a) liquid root and (b) vapor root.
The decision regarding which type (vapor or liquid) of root needs is done by comparing with dew and bubble point temperature or
to be selected is always known a priori and based on that infor- pressure depending on the specifications. If the system is in a sin-
mation, appropriate constraints can be applied. For the sake of gle phase, only material and energy balances corresponding to the
convenience, the inequality constraints developed here are referred existing vapor or liquid phase are solved. If the system is indeed
henceforth in the paper as “derivative-based” constraints. in the 2-phase region, the phase equilibrium relation is also incor-
porated using various modular algorithms such as those based on
4. Formulation for flash calculations a function of vapor to feed ratio (Rachford & Rice, 1952), solving
the material and fugacity equations in different loops (Veeranna,
The effectiveness of the new proposed constraints in select- Husain, Subrahmanyam, & Sarkar, 1987) and the inside-out for-
ing the appropriate root is demonstrated using two example flash mulation (Boston & Britt, 1978). However, the use of a CEOS with
calculations. These calculations are an important set of phase equi- iterative phase equilibrium calculations have reported to cause
librium calculations that determine the state (vapor, liquid or trivial solutions (single root not corresponding to desired phase)
2-phase) of streams at some specified operating conditions. Flash and false convergence. These problems are mostly due to poor
calculations are part of many counter-current operations like distil- initial estimates of phase composition and operating temperature
lation, absorption and stripping, and thus the success of the above or pressure. Reid et al. (2000) suggest that the best way to avoid
proposed constraints in flash calculations will show that they can such problems is to provide sufficiently accurate initial guesses in
be easily extended to more complex unit operations. iterative calculations. If the available root is of the “wrong” type,
Flash calculations have mostly been performed using a sequen- different approaches have been tried such as choosing maximum
tial modular approach. As a first step, an initial check is performed or minimum points of cubic equation instead (Gundersen, 1982),
to ascertain whether the system is actually in 2-phase and this perturbing temperature, pressure or composition to get a root with
Fig. 6. Change in behavior of second derivative as the cubic equation transitions from the case of three real roots to a single real root which is (a) vapor and (b) liquid.
2092 R.S. Kamath et al. / Computers and Chemical Engineering 34 (2010) 2085–2096
“acceptable” properties (Khoury, 1982; Poling et al., 1981), and where f is the cubic equation for the compressibility factor. The
evaluating a pseudo root for the infeasible phase by variation of equation set given by (24)–(39) would be the most straightforward
complex roots of CEOS with pressure (Zhao & Saha, 1998). Based on extension of the formulation of Gopal and Biegler (1999) to han-
these strategies, algorithms have been devised to solve the CEOS dle the thermodynamics based on the CEOS. Eqs. (29) and (30) are
during the iterative flash calculations (Gundersen, 1982; Zhao & complementarity constraints, which means that at least one vari-
Saha, 1998). However, these algorithms include conditional tests able in these equations is at its lower bound of zero. When cases
(if-else logic), which are computationally unattractive for repeated of single phase are encountered, the VLE constraint is relaxed, i.e.
calculations and not well-suited for an EO framework. ˇ takes a value different from unity and the appropriate slacks
An alternative to the above procedural algorithms for flash and flows become zero. Specifically, ˇ < 1, sV = 0, and sL > 0 only
calculations is an EO formulation. The major issues in develop- when the vapor phase exists. Similarly, ˇ > 1, sL = 0, and sV > 0 only
ing an EO approach for handling phase equilibrium are that the when the liquid phase exists. Thus, the same constraints hold for
equilibrium equations are not valid in single phase regions, the all regions and phase transitions are handled without procedures.
number of phases is not known a priori, and switching between the Eqs. (34)–(36) will select the vapor root for the vapor outlet of the
phases leads to an implicit discontinuity. Gopal and Biegler (1999) flash while Eqs. (37)–(39) will select the liquid root for the liquid
developed an effective NLP formulation based on complementar- outlet.
ity constraints by extending ideas proposed in previous works The only concern yet to be addressed in the above extended for-
on this problem (Bullard & Biegler, 1993; Gopal & Biegler, 1997; mulation is regarding what root is selected when the vapor or liquid
Swaney & Kendlbacher, 1994). This EO formulation has been found outlet disappears during any iteration of the optimization (both in
to be robust enough for modeling and optimization of distillation a true sense or false sense due to bad initialization). We propose to
columns (Lang & Biegler, 2002; Raghunathan, Diaz, & Biegler, 2004). handle this scenario by relaxing the derivative-based constraints,
However, none of these contributions uses a CEOS for modeling the which can be linked to the flowrate of the “missing” phase, similar
thermodynamics of either phase and additional features for han- to that done for the VLE constraint in the EO formulation of Gopal
dling the CEOS are the basis of this work. The basic EO model for and Biegler (1999). Therefore, we propose the following modifica-
phase equilibrium remains unchanged, i.e. tions to above discussed EO formulation: replace Eqs. (28), (36) and
(39) by the following equations:
F =L+V (24)
−sL ≤ ˇ − 1 ≤ sV (40)
Fzi = Lxi + Vyi , i = 1, . . . , n (25)
f (zV ) ≥ −MsV (41)
yi = ˇKi (P, T, x) xi , i = 1, . . . , n (26)
f (zL ) ≤ MsL (42)
yi − xi = 0 (27)
i i
where M is a sufficiently large and positive real number. The
above modifications have several interesting features. The prop-
ˇ − 1 = sV − sL (28) erties of the original EO formulation by Gopal and Biegler (1999)
0 ≤ V ⊥ sV ≥ 0 (29) are retained and the same slack variables that “complement” the
flowrate of the outlets in the original formulation can be used in
0 ≤ L ⊥ sL ≥ 0 (30) relaxing the second derivative based constraints. It is worth men-
tioning that only the constraint based on the second derivative
0 ≤ x i , yi ≤ 1 (31)
needs to be relaxed and not the one corresponding to the first
L, V ≤ F (32) derivative, as the sign of first derivative is the same for the vapor
and the liquid roots, and it extends to the case of a single real root.
where V and L are flowrates of vapor and liquid outlets, yi and xi are Since the cubic equation has at least one real root, relaxing the sec-
mole fractions of component i in corresponding outlets, sV and sL are ond derivative constraint allows the optimizer to choose the only
slacks corresponding to vapor and liquid outlets, and ˇ is a corrector available root for the missing phase, and thus avoid infeasibility.
for relaxing the VLE constraint. If the CEOS is used for modeling the This allows a well-defined, continuous transition from one region of
thermodynamics of both phases, the equilibrium constant Ki in (26) the phase envelope to another. With the application of robust NLP
is given by, solvers, poor initialization during phase transition is not a major
concern, as will be shown in the subsequent numerical results.
iL
Ki = (33)
iV
5. Computational results
where iL and iV are fugacity coefficients of component i in the liq-
uid and vapor outlets respectively, and are explicitly dependent on To demonstrate the optimization-based formulation for CEOS
compressibility factors of the respective phases. The compressibil- we consider three general problem formulations: EO-based flash
ity factors are determined by incorporating the cubic equations and calculations, distillation optimization with disappearing phases on
derivative constraints specific to the outlet phases, i.e. the following trays and multi-stream hear exchangers.
constraints are added:
5.1. Flash simulations
f (zV ) = 0 (34)
Table 1
Behavior of slacks, selected roots of CEOS and iteration count as flash calculations in case study 1 transition from the liquid phase to the vapor phase as the heat duty is
increased.
Feed point 1 2 3 4 5 6 7
using smoothing functions (Gopal & Biegler, 1999; Lang & Biegler, The conventional (P,Q)-Flash simulations are now performed
2002), complementarity relaxation (Raghunathan & Biegler, 2003; with the EO optimization formulation where pressure P is set to
Raghunathan et al., 2004) and penalty terms in the objective func- be the same as the feed and the heat duty Q is slowly increased in
tion (Baumrucker, Renfro, & Biegler, 2008). In this work, the penalty small steps. This analysis is equivalent to heating a liquid mixture
formulation is preferred because of its robustness in conjunction at constant pressure, and therefore we expect that the system will
with the available NLP solvers. For an optimization problem of the move from the liquid phase into the 2-phase region, and finally
form: into the vapor phase. The goal of this exercise is to test the EO
min (w) formulation for flash calculation so that it converges successfully
s.t. g (w) ≤ 0 (43) to the correct output (phases, flows, compositions) for any given Q
0≤x⊥ y≥0 with special emphasis on correct choice of roots of CEOS using the
derivative constraints in their regular or relaxed form. This analysis
where w = [xT , yT , z T ]T the penalty formulation is given by is performed for two cases: first, using the same starting point, i.e.
feed point for all values of Q, and second, using the solution of the
min (w) + xT y
previous point as an initial guess for next small increment in Q.
s.t. g (w) ≤ 0 (44)
The results of this analysis are shown in Table 1. Seven addi-
x, y ≥ 0
tional points are generated by increasing Q. As can be seen, starting
If ≥ c , then, under mild conditions (Baumrucker et al., 2008), from the feed point (liquid) the system goes into the 2-phase region
the complementarity constraints will be satisfied at the solution. (between points 2 and 6 which are bubble and dew points), and
Here c is the threshold value of the penalty formulation, which then into the vapor phase. The last two rows describe the itera-
is often determined by trial and error. Thus, the final optimiza- tions needed to converge to the solution using the two previously
tion formulation for the simulation of the flash case studies has an described initialization strategies. The second to last row is an indi-
objective function of (VsV + LsL ), which is minimized subject to a cation of the robustness of the EO formulation, i.e. solutions even
set of constraints given by (24)–(27), (31)–(35), (37) and (38), and in vapor and 2-phase regions are easily obtained using the liquid
(40)–(42). phase as a starting point, whereas the last row suggests that the
For the flash case studies we use the interior point solver solver is able to reach the new solutions faster with a better initial
IPOPT (Wächter & Biegler, 2006). These were modeled and imple- guess. Another interesting observation is regarding the selection
mented in the GAMS optimization environment (version 23.0) and of “acceptable” roots for CEOS by the optimizer even during disap-
solved using IPOPT (version 3.5 using default options). The value pearance of phases, i.e. no vapor phase below point 2 and no liquid
of = 5 × 104 was found to be adequate to solve the case studies phase above point 5. Even though the second-derivative based
presented in this work. constraint was relaxed during the disappearance of a phase, the
correction ˇ for VLE and mole fractions corresponding to the miss-
5.1.1. (P,Q)-flash case study ing phase are fictitious, and the optimizer may alter their values in
The first case study involves a (P,Q)-Flash of a ternary system of order to choose a suitable value for the root of CEOS.
nitrogen (N2 ), oxygen (O2 ) and argon (Ar) with feed mole fractions
of 0.6, 0.35 and 0.05 respectively. The pressure and temperature of 5.1.2. (P,T)-flash case study
the feed are 7 bar and 95 K, respectively. Under these conditions, The second case study describes a (P,T)-Flash of a 5-component
the system is in the liquid phase. As a first step, the EO model for system of nitrogen (N2 ), methane (CH4 ), ethane (C2 H6 ), propane
flash is run in (P,T)-mode by setting the operating conditions for (C3 H8 ) and butane (C4 H10 ) with feed mole fractions of 0.025, 0.65,
flash to be same as that of the feed. In such a case, we know a 0.15, 0.15 and 0.025, respectively. The pressure and temperature
priori that the output should be only the liquid phase with the same of the feed are 55 bar and 300 K and under these conditions, the
composition as the feed, since the flash vessel is not performing system is in the vapor phase. The goal of the analysis is similar
any major operation on the feed. The purpose of this first step is to the previous case study except that the starting point is in the
to initialize and converge the EO formulation to a feasible solution vapor phase and the operating conditions are adjusted so that the
that is same as the feed conditions. Apart from the already known system traverses into the liquid phase while traveling through the
information about the liquid outlet, the variables such as ˇ, vapor 2-phase region. This is done by setting the operating pressure of the
composition yi , and vapor root zV of the CEOS corresponding to flash to be the same as that of the feed and reducing the operating
vapor phase will have some converged values, and although they temperature. The results for this case study are shown in Table 2 and
have no physical significance because of the missing vapor outlet, their interpretation is similar to that for the first case study. These
they take on realistic values at other operating conditions. We refer results reinforce the ideas that the EO formulation for the CEOS
to this output solution (numerical value of all variables in the EO always selects the appropriate root irrespective of the existence or
formulation) from the first step as the “feed point”. disappearance of phases and is robust to wide range of initialization
2094 R.S. Kamath et al. / Computers and Chemical Engineering 34 (2010) 2085–2096
Table 2
Behavior of slacks, selected roots of CEOS and iteration count as flash calculations in case study 2 transition from the vapor phase to the liquid phase as the temperature is
reduced.
Feed point 1 2 3 4 5 6 7
Table 3
Product purity constraints for the three cases of distillation column optimization.
is the first stage and total condenser is the last stage. The col-
umn is operated at a pressure of 6 bar and we neglect pressure reboiler load. Both liquid and vapor are present on all the stages and
drop across the column. A saturated liquid feed of 1 kmol/s enters their corresponding flows are shown in Fig. 7. Case (2) has a purity
on the 10th stage with mole fractions [0.46, 0.08, 0.46] for the specification only on the bottom product. Since medium purity is
components in the order given above. The column is modeled acceptable in this case, the reboiler load is lower as compared to
using the rigorous equilibrium stage concept with thermodynamics case (1). Also, since there is no specification for the top product, the
based on the SRK CEOS. The constants for physical and thermo- optimal solution that minimizes the reboiler duty has trays above
dynamic properties are retrieved from the Aspen Plus process the feed with no liquid outlet, as seen in Fig. 8. In the last case, the
simulator. feed composition itself satisfies the product purity constraint and
Both top (n-hexane) and bottom (n-nonane) products are
expected to contain small amounts of the intermediate boiling n-
heptane and the objective of the optimization formulation is to
minimize the reboiler duty (major operating cost) while satisfying
the purity constraints for the top and/or bottom products. Note that
this case study is very similar to the one described in Raghunathan
and Biegler (2003). Here the stages of the distillation column are
represented by the proposed extended EO formulation for flash
calculations coupled with the derivative constraints for the CEOS,
whereas Raghunathan and Biegler (2003) use the original EO for-
mulation of Gopal and Biegler (1999) with ideal thermodynamics.
We expect that our proposed formulation can identify and handle
missing vapor or liquid phases on certain trays during any itera-
tion of the optimization or at the optimal solution. To demonstrate
this capability, we present three cases differing in the minimum
purity specification for top and/or bottom products. The product
purity constraints and the optimal reboiler duty for these cases are
given in Table 3. It is observed that in all the three cases, the product
purity constraints are active at the optimal solution and the reboiler
duty always increases if a higher purity is desired. In case (1), a
tighter specification on top and bottom product demands a higher Fig. 8. Liquid and vapor flows in the column for case (2): medium bottom recovery.
R.S. Kamath et al. / Computers and Chemical Engineering 34 (2010) 2085–2096 2095
6. Conclusion
Gopal, V., & Biegler, L. T. (1999). Smoothing methods for complementarity problems Raghunathan, A., Diaz, M. S., & Biegler, L. T. (2004). An MPEC formulation for dynamic
in process engineering. AIChE Journal, 45, 1535–1547. optimization of distillation operation. Computers and Chemical Engineering, 28,
Gundersen, T. (1982). Numerical aspect of the implementation of cubic equation 2037–2052.
of state in flash calculation routines. Computers and Chemical Engineering, 6, Reid, R. C., Prausnitz, J. M., & Poling, B. M. (2000). The properties of gases and liquids.
245–255. McGraw-Hill Professional.
Herbison-Evans, D. (1986). Solving quartics and cubics for graphics, Research Report Salim, P. H. (2006). Comment on the paper of Zhi and Lee entitled “Fallibility of
CS-86–56. University of Waterloo. analytic roots of cubic equations of state in low temperature region”. Fluid Phase
Hess, T. M., Su, Y., & Shertukde, P. V. (2008). Method for providing robustness to the Equilibria, 240, 224–226.
solution of the cubic equation of state. US Patent 7349819 B2. Soave, G. (1972). Equilibrium constants from a modified Redlich–Kwong equation
Kamath, R. S., Grossmann, I. E., & Biegler, L. T. (2009). Modeling of multi-stream of state. Chemical Engineering Science, 27, 1197–1203.
heat exchangers with phase changes for cryogenic applications. In R. Alves, Sun, A. C., & Seider, W. D. (1995). Homotopy-continuation method for stability anal-
C. Oller, & E. C. Biscaia (Eds.), 10th international symposium on process systems ysis in the global minimization of the Gibbs free energy. Fluid Phase Equilibria,
engineering—PSE 2009 (pp. 921–927). Amsterdam: Elsevier. 103, 213–249.
Khoury, F. M. (1982). Calculate the right density. Hydrocarbon Processing, 6, 155–157. Swaney, R. E., & Kendlbacher, T. (1994). Robust solution of phase equilibrium calcu-
Lang, Y. D., & Biegler, L. T. (2002). Distributed stream method for tray optimization. lations. In Annual AIChE Meeting San Francisco,
AIChE Journal, 48, 582–595. Uspensky, J. V. (1964). Theory of equations. McGraw-Hill.
Lawal, A. S. (1987). A consistent rule for selecting roots in a cubic equation of state. Veeranna, D., Husain, A., Subrahmanyam, S., & Sarkar, M. K. (1987). An algorithm for
Industrial and Engineering Chemistry Research, 26, 857–859. flash calculations using an equation of state. Computers and Chemical Engineering,
Mathias, P. M., Boston, J. F., & Watanasiri, S. (1984). Effective utilization of equations 11, 489–496.
of state for thermodynamic properties in process simulation. AIChE Journal, 30, Viswanathan, J., & Grossmann, I. E. (1993). Optimal feed locations and number of
182–186. trays for distillation columns with multiple feeds. Industrial and Engineering
Peng, D. Y., & Robinson, D. B. (1976). A new two-constant equation of state. Industrial Chemistry Research, 32, 2942–2949.
and Engineering Chemistry Fundamentals, 15, 59–64. Waals, V. D. (1873). On the continuity of the gaseous and liquid states. PhD thesis.
Perry, R. H., & Green, D. W. (Eds.). (1997). Perry’s chemical engineers’ handbook. Universiteit Leiden, Leiden.
McGraw-Hill Professional. Wächter, A., & Biegler, L. T. (2006). On the implementation of a primal-dual inte-
Poling, B. E., Grens, E. A., & Prausnitz, J. M. (1981). Thermodynamic properties from a rior point filter line search algorithm for large-scale nonlinear programming.
cubic equation of state: Avoiding trivial roots and spurious derivatives. Industrial Mathematical Programming, 106, 25–57.
and Engineering Chemistry Process Design and Development, 20, 127–130. Westerberg, A., & Berna, T. (1978). Decomposition of very large-scale
PSE, gPROMS. (2009). www.psenterprise.com/gproms, 1997–2009. Process Systems Newton–Raphson based flowsheeting problems. Computers and Chemical
Enterprise. Engineering, 2, 61–63.
Rachford, H. H., & Rice, J. (1952). Procedure for use of electrical digital computers Zhao, E., & Saha, S. (1998). Applications of complex domain in vapor–liquid equi-
in calculating flash vaporization hydrocarbon equilibrium. Journal of Petroleum librium calculations using a cubic equation of state. Industrial and Engineering
Technology, 4, 19–20. Chemistry Research, 37, 1625–1633.
Raghunathan, A., & Biegler, L. T. (2003). MPEC formulations and algorithms in process Zhi, Y., & Lee, H. (2002). Fallibility of analytic roots of cubic equations of state in low
engineering. Computers and Chemical Engineering, 27, 1381–1392. temperature region. Fluid Phase Equilibria, 201, 287–294.