Inside-Out Algorithms for Multicomponent Separation Process

Jul 23, 2009 - Abstract: Perspective. The use of a mathematical model on a computer to simulate a chemical process is now approximately two decades ol...
2 downloads 11 Views 1MB Size
6 Inside-Out Algorithms for Multicomponent Separation Process Calculations J. F. BOSTON

Downloaded by PURDUE UNIVERSITY on September 15, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

Massachusetts Institute of Technology, 20A-015, Cambridge, MA 02139

There are several characteristics common to the describing equations of all types of multicomponent, vapor-liquid separation processes, both single- and multi-stage, that make it possible to exploit the inside-out concept in similar ways to solve them efficiently and reliably. The equations have as common members component and total mass balance, enthalpy balance, constitutive and phase equilibrium equations. In addition, all such processes require K-value or fugacity coefficient and vapor and liquid enthalpy models. In all cases the describing equations have similar forms, and depend on the primitive variables (temperature, pressure, phase rate and composition) in essentially the same ways. Before presenting the inside-out concept, it will be useful to identify two classes of conventional methods and discuss their main characteristics. Conventional Methods Conventional methods for solving the coupled set of describing equations and thermo-physical property models are characterized by taking the primitive variables, or some subset of them, as the main iteration variables, and by working with the equations in essentially their "primitive" forms. Many methods have been proposed which may be regarded as conventional methods in this sense. For purposes of this paper, it is convenient to consider all conventional methods as members of one of two classes based on two fundamentally different approaches. Class I Methods. The methods of the first class are based on tearing and partitioning the system so that subsets of the primitive variables are paired with subsets of the equations through which they typically show their greatest effect. Perhaps the best-known example of this approach for multicomponent distillation is the method of Wang and Henke (1). 0-8412-0549-3/80/47-124-135$05.00/0 © 1980 American Chemical Society

In Computer Applications to Chemical Engineering; Squires, R., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Downloaded by PURDUE UNIVERSITY on September 15, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

136

COMPUTER APPLICATIONS TO

CHEMICAL ENGINEERING

Here the main iteration variables are the stage temperatures and inter-stage phase rates. The temperatures are paired with the combined constitutive and phase equilibrium equations, and the phase rates with the enthalpy and total mass balances. Unfortunately, this pairing is effective only for relatively narrowboiling systems, hence the method frequently f a i l s for wideboiling systems. Further, the computational procedure involves a lag of the K-value composition dependence from iteration to iteration, which makes the method unsuitable when the composition dependence is strong. The "sum-rates" method of Sujata (2.) also uses the temperatures and phase rates as iteration variables, but reverses the pairing. The temperatures are paired with the enthalpy balances, and the phase rates are corrected by summing the component flow rates resulting from solution of the combined component mass balance and phase equilibrium equations. This method is especially effective for wide-boiling systems, such as absorbers, but is not suitable for narrow-boiling systems. Tomich (2) presented a Class I method in which the pairing problem is avoided by adjusting the temperatures and phase rates simultaneously at each iteration. The adjustments are determined by considering simultaneously the system of equations consisting of the combined enthalpy and total mass balances, and the combined constitutive and phase equilibrium equations. The Jacobian of this system with respect to both temperatures and phase rates is i n i t i a l l y calculated by f i n i t e difference approximations, and i t s inverse is updated thereafter using the quasiNewton method of Broyden (4). The excessive computational effort associated with i n i t i a l evaluation and inversion of the Jacobian is a major disadvantage of this method. In addition, there is a composition lag like that of the Wang and Henke method which makes i t unsuitable for highly nonideal systems. Class I methods for single-stage processes have been discussed by several authors (5,6,7). While a detailed discussion will not be given here, i t is worth noting that the issues of composition lag and pairing of equations with their dominant variables arise in essentially the same ways, and are as important, as for multi-stage processes. Class II Methods. The methods of Class II are those that use the simultaneous Newton-Raphson approach, in which a l l the equations are linearized by a f i r s t order Taylor series expansion about some estimate of the primitive variables. In i t s most general form, this expansion includes terms arising from the dependence of the thermo-physical property models on the primitive variables. The resulting system of linear equations is solved for a set of iteration variable corrections, which are then applied to obtain a new estimate. This procedure is repeated until the magnitudes of the corrections are s u f f i ciently small.

In Computer Applications to Chemical Engineering; Squires, R., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Downloaded by PURDUE UNIVERSITY on September 15, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

6.

BOSTON

Inside-Out Algorithms

137

The system Jacobian is f u l l or nearly f u l l for single-stage processes, but has a stage-wise sparse structure for multi-stage processes. Tn the latter case advantage can be taken of the fact that the sparsity pattern is known a priori to develop efficient solution procedures. In most cases, the Jacobian has a block-tridiagonal structure which can be exploited as f i r s t shown by Naphtali and Sandholm (8). Hofeling and Seader (9) have recently presented an efficient sparse algorithm to handle cases in which there are side-strippers or pump-arounds which destroy the block-tridiagonal structure, causing additional " f i l l - i n " during the elimination process. Many other variations of the Newton-Raphson approach have been reported over the past few years (10-20) including applications to three phase d i s t i l lation (21) and to single-stage processes (22). One of the most important characteristics of the NewtonRaphson approach is that the convergence rate accelerates, becoming second order, as the solution is approached. This is at the same time an advantage and a disadvantage. If the i n i t i a l estimates of the iteration variables are close to the solution, convergence may be achieved in relatively few i t e r ations compared with other methods. On the other hand, i f they are far from the solution, the convergence rate may be exceedingly slow, and unstable behavior may result unless the vector of corrections is appropriately truncated. Perhaps the most undesirable feature of Newton-Raphson methods is that, when i t is not possible to provide sufficiently good i n i t i a l guesses, there i s l i t t l e recourse but to apply some other type of method. The Inside-Out Concept The development of the inside-out concept was motivated by the hope of overcoming the major d i f f i c u l t i e s of both the Class I and Class II methods without introducing significant new d i f f i c u l t i e s . The goals were to achieve: (1) Above a l l , robustness in the face of exceedingly poor i n i t i a l guesses. (2) Efficiency in terms of properly distributing and balancing the computational loads. (3) Generality in terms of applicability to a l l types of systems, i.e., narrow-boiling, wide-boiling, highly nonideal. (4) At least superlinear convergence rates as the solution is approached. The challenges presented by these goals are to exploit ones knowledge of how the system behaves and how i t is structured to select well-behaved iteration variables, and to recognize ways in which the equations can be beneficically rearranged and transformed to accommodate these variables. The concept was f i r s t presented and implemented by Boston and Sullivan (23), who demonstrated the exceptional s t a b i l i t y

In Computer Applications to Chemical Engineering; Squires, R., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

Downloaded by PURDUE UNIVERSITY on September 15, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

138

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

and efficiency of the resulting algorithm for multicomponent d i s t i l l a t i o n problems. The algorithm has since been extended by this author to handle absorption and reboiled absorption, and to make i t applicable to highly nonideal systems as well as narrowboiling and extremely wide-boiling ones. It has also been modified to accommodate water-hydrocarbon systems in which water phases occur on internal stages, and has been successfully adapted to provide a rigorous treatment of both multi-stage (2i) and single-stage (25) three-phase systems. Boston and Britt (Z) discussed the application of the inside-out concept to the single-stage two-phase flash. This algorithm has recently been modified in two ways. One modification enables i t to handle systems operating at near-critical conditions. The other is designed to solve the problem of simultaneous phase and chemical equilibrium. Finally, Boston (26) has shown how the inside-out concept can be adapted to solve multi-stage problems where i t is desired to determine a set of design variables within specified bounds to satisfy arbitrary design constraints, or to minimize an arbitrary function subject to equality and inequality constraints. In a l l of these implementations of the inside-out concept, there are six important common features. The f i r s t three of these will be listed and discussed in detail before considering the last three. They may be stated as follows: (1) Complex K-value and enthalpy models are used only to generate parameters for simple models. These param­ eters are unique for each stage of a multi-stage system. (2) These simple model parameters become the main (or "outer loop") iteration variables, the role played by the primitive variables temperature, pressure, vapor and liquid composition and phase rates in Class I and Class II methods. (3) The new outer loop iteration variables are relatively free of interaction with each other, and are relatively independent of the primitive variables, hence precise i n i t i a l i z a t i o n is not c r i t i c a l to good algorithm performance. Simple K-Value and Enthalpy Models. In general, K-values and enthalpies depend on the primitive variables through a set of models, referred to here as the "actual" thermo-physical property models, as follows: Κ.

= Κ .(Τ, Ρ, x, y)

(1)

H

=

H (T, P, x)

(2)

=

H (T, P, y)

(3)

Ί

L

Ί

L

V

In Computer Applications to Chemical Engineering; Squires, R., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

6.

Inside-Out Algorithms

BOSTON

139

While no assumptions are made in this paper about the specific forms of the actual K-value and enthalpy mdoels, i t is assumed that they exhibit r e a l i s t i c behavior. In developing a simple K-value model, i t is f i r s t recognized that the dependence of K-values on temperature is represented very well by a model of the form:

Downloaded by PURDUE UNIVERSITY on September 15, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

InKj

=

A

1

+ Β .(1/Τ-1/Τ*) Ί

where T* is some reference temperature, and B-j is largely independent of T. Because the magnitude of B does not vary widely from component to component, even in a wide-boiling system, i t is useful to define a reference K-value, K > as a weighted average of the form: b

lnK

=

b

ÇwilnKi

(4)

The w's are weighting factors, expressions for which have been derived elsewhere (Z) to make dlnK /dT an appropriate weighted average of the individual dlnKj/dT values. The dependence of K on Τ is then represented by the simple model: b

b

lnK

= A + B(l/T-1/T*)

b

(5)

where T* is a reference temperature. Just as the K's are strongly dependent on T, and for a highly nonideal system, on χ and y as well, K will also exhibit a strong dependence on these primitive variables. However, the coefficients A and Β will be only weakly dependent on T. Furthermore, since the Τ dependence of the K's is usually not strongly affected by composition, Β will also be only weakly dependent on χ and y. As a result of these weak dependencies, A and Β are excellent iteration variables. The values of A and Β may be determined by evaluating the K's at two temperature levels, while holding χ and y constant. The simple K-value model is completed by defining a set of relative v o l a t i l i t i e s : b

a

i

=

Ki/K

b

(6)

which are much less sensitive to Τ than the individual K's because a weighted average temperature dependence i s included in K . The (3) Calculate p, K , T, x, y using eqs. (20), (21), Downloaded by PURDUE UNIVERSITY on September 15, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

b

(5),

(22), (23), respectively.

(4)

Calculate M

(5)

Calculate hJ,

L>

My, H

IG

H°, àH

y9

àH

Hy, H

L

using eqs. (9), (10), (11), (12), (7), (8), respectively.

(6)

Calculate L and Ψ using eqs. (24), (25), respectively. |ψ| < ε

(7)

Assume new R and return to (3) until

(8)

Calculate Κ, H , Hy using actual models.

(9)

Calculate a, A,C.,Ê (and B, D, F f i r s t iteration

L

only).

(10) Assume new values of a, A,C.,Ε (and B, D, F f i r s t iteration only) and return to (2) until calculated values match assumed values.

Use

Broyden quasi-Newton method after f i r s t iteration.

In Computer Applications to Chemical Engineering; Squires, R., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980.

co ro Μ -Ό Η-Η CO Φ 3

2

-S Ο

outs ide 360/ 168.

C

ο. —I.

φ Ο Χ 3 r+ r+ -··

-ι. CO

—'· ~*S

CL

—» $U Φ —Ό 0>

Ο ί Γ+ — ' Γ+ —


3

-σ ο

3


Ό 3 Φ Τ3

φ

ΖΓ 3

-«·

a

r+

ro

r

t

—r- — ο ο

CL -< ο

ο ο

CO 3 3 t Q CQ CQ ~σ~σ Φ Φ Φ Φ Τ3 I —»ί —t —* CO 3 TD Ο Φ Φ —•3 Φ 3 C+

3

c

(Λ CU ^

-h

—J. Q_ Φ

3 Φ

CO

m

K-value model

xriler when present,

•H > CD Γ "

to

Activity coeffi cients Activity coefficients by Wilson equat ion. by Scatchard-Hildebrand equation. Vapor pressures by Liquid fugacity coef­ Antoine equatic η. Vapor phase ass umed f i cents by Chao Seader equation. ideal. Vapor fugacity coef­ f i cents by RedlichKwong equation.

H—I I—I

C

rt

ι

CO rt O) IQ Φ

Vapor enthalpy depar­ ture by Redlich-Kwong equation. Liquid enthalpy by corresponding states correlation.

ro

ο

vo

en

en

^1

rations

ro

CO

Ο —· ·

^ Ο -S _J.

3 0>

3

•σ Φ

~s ο cr

φ

3

to



"!·

^1

en

r+ Ξ Γ

m χ

c+ Φ

00

Dop

co

ro

en

)utside

oo

ο

CO

No. stages.

ro en

CO

en

ro

Enthalpy models

Vapor phase assumed ideal. Liquid enthalpy by polynomial in temp­ erature. ro

ο

cr>



Φ -S 0i C+

CO CQ _i. . CL Φ 3

-ι. Ο Ο —* · 3 Ο CO ο Γ\χσ ^

Ο

c+

CO —'· Ο

ro

3

Φ Ο

en

εηιψμο^ιγ

9fl

Downloaded by PURDUE UNIVERSITY on September 15, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

"S

c+

3 Γ+

w 3

ο " -s

>nen1

iden:

ο ο



pue

φ

In Computer Applications to Chemical Engineering; Squires, R., et al.; ACS Symposium Series; American Chemical Society: Washington, DC, 1980. Φ

cr

CO

inQ-dpisui

Noxsoa

9

146

COMPUTER APPLICATIONS TO CHEMICAL ENGINEERING

elements well enough in relatively few iterations. Therefore, not including composition effects in the simple K-value model actually represents a trade-off between the effects that the simple models ought to account for and the effects that the convergence procedure ought to account for. In multi-stage systems, on the other hand, strong nonidea l i t y is a more serious problem. In the f i r s t place, i t is not feasible to use Broyden's quasi-Newton method for convergence of the outer loop because there are too many parameters (N(N +3)), and the Jacobian is in general not sparse. The outer loop is therefore converged by either the bounded Wegstein method (27.), or by direct substitution with moderate damping. Secondly, because interactions among the parameters tend to propagate over several stages, strong nonidealities frequently lead to poor convergence behavior or even failure to converge. The d i f f i c u l t i e s associated with highly nonideal multi-stage systems have been overcome by introducing a simple model for the composition dependence of K-values. In keeping with the s p i r i t of the inside-out concept, the parameters of the simple model become outside-loop iteration variables, and are determined by applying the actual models only in the outer loop. Further, they are as independent as possible of the primitive variables. The basis of this approach is the representation of the K-value in terms of three factors as follows:

Downloaded by PURDUE UNIVERSITY on September 15, 2013 | http://pubs.acs.org Publication Date: May 30, 1980 | doi: 10.1021/bk-1980-0124.ch006

c

Ki

=

K

a

b

i Y i

*

(26)

where γ .* is a new quantity introduced to account for the composition dependence. For simplicity, the most frequent case is considered, where most of the nonideality arises from the liquid phase, and is represented by an activity coefficient model. In this case, Ύ .* is a pseudo-activity coefficient which is obtained from the actual activity coefficent model at a reference temperature T*: Ί

Ί

V

=

Ύ .(Τ*,χ) Ί

The objective is to substantially reduce the composition depend­ ence of the a's by using a simple model for Ύ .* in terms of parameters that will be well-behaved iteration variables. The treatment of Kb is the same as before, therefore