You are on page 1of 7

literature Cited

Allen, J. L., Ph.D. dissertation, Clarkson College, 1964. Antonson, C. R., Dranoff, J. S., Chem. Eng. Progr. Symp. Ser. 63, No. 74, 61 (1967). Barrer, R. M., Ibbitson, D. A., Trans. Faraday SOC. 40, 195, 206 (1944). Barrer, R. M., Peterson, D. L., J . Phys. Chem. 68, 3427 (1964). Barrer, R. M., Riley, D. W., J . Chem. SOC.1948, 133. Barry, H. M., Chem. Eng. 67, 105 (Feb. 8, 1960). Brandt, W. W., Rudolf, W., J . Phys. Chem. Solids 25, 167 (1964); 2. Phys. Chem. (N.F.), 42, 201 (1964). Breck, D. W., Eversole, W. G., Milton, R. M., Reed, T. B., Thomas, T. L., J . A m . Chem. SOC.78, 5963 (1956). Cooper, D. E., Griswold, H . E., Lewis, R. M., Stokeld, R. W., Chem. Eng. Progr. 62 (4), 69 (1966). Crank, J., Mathematics of Diffusion, Oxford University Press, Oxford, 1945. Eberly, P. E., J . Phys. Chem. 65, 68 (1961). Flock, W., Wiss. 2. Tech. Hochsch. Chem. Leuma-Merseburg8 (4), 317 (1966). Franz, W. F., Christensen, E . R., May, J. E., Hess, H. V., Petrol. Refiner 38 (4), 125 (1959). Fukunaga, P., Hwang, K. C., Davis, S.H., Winnik, J., DESIGNDEVELOP. 269 7, IND. ENG. CHEM.PROCESS (1968). Griesmer, G. J., Avery, W. F., Lee, M. N. Y., Hydrocarbon Process. Petrol. Refiner 44 (6), 147 (1965). Habgood, H. W., Can. J . Chem. 36, 1384 (1958). Hougen, 0. A., Marshall, W. R., Chem. Eng. Progr. 43 (4), 197 (1947).

Kehat, E., Rosenkranz, Z., IND. ENG. CHEM. PROCESS DESIGN DEVELOP. 4,217 (1965). Michaels, A. S., Znd. Eng. Chem. 44, 1922 (1952). Minkoff, G. J., Duffett, R . H. E., Brit. Petrol., No. 13 (1964). Nelson, E. T., Walker, P. L,, J . Appl. Chem. 11, 358 (1961). OConner, J. G., Norris, M. S., Anal. Chem. 32, 701 (1960). Orbach, O., MSc. thesis, Technion-Israel Institute of Technology, 1966. Peterson, D. L., Redlich, O., J . Chem. Eng. Data 7, 570 (1962). Roberts, P. V., Ph.D. dissertation, Cornel1 University, 1966. Roberts, P. V., York, R., IND. ENG. CHEM. PROCESS DESIGN DEVELOP. 516 (1967). 6, Rosen, J. B., J . Chem. Phys. 20, 387 (1952). Satterfield, C. N., Frabetti, A. J., A.1.Ch.E. J . 13, 731 (1967). Schumacher, W. J., York, R., IND.ENG.CHEM.PROCESS 6, DESIGN DEVELOP. 321 (1967). Scott, K. A., Hydrocarbon Process. Petrol. Refiner 43, (3), 97 (1964). Sterba, M. J., Hydrocarbon Process. Petrol. Refiner 44 (6), 151 (1965). Tsuruizumi, A., Bull. Chem. SOC. (Japan) 34, 1457 (1961). C6 Zigenhaim, W. C., Refining Eng. 29 (8), (1957). RECEIVED review November 29, 1968 for ACCEPTED March 27, 1969
Work based in part on MSc. thesis of Michael Heinemann at the Technion-Israel Institute of Technology.




P .






ESSO Mathematics & Systems, Znc., Florham Park, N . J . 07932

The Newton-Raphson method is applicable to the problem of general, reliable, and flexible computer codes for the solution of chemical engineering design problems. Distillation is used as a n example and discussed in detail. The important points are the use of an arbitrary hierarchy of matrix decomposition for inverting the Jacobian of very large simulations, and the ability to exchange dependent and independent problem variables via matrix partition methods and readily to generate process sensitivities analytically. Programs using these techniques provide far more flexibility for the user than was previously possible.

DURINGlast decade, a number of numerical methods the

have been developed in engineering fields. One of the most powerful techniques is the so-called sparse matrix method used in conjunction with the Kewton-Raphson iterative procedure. Among the more complex problems in engineering are those of heat and material balance in chemical engineering design and simulation. This paper represents the first of three addressed to this problem.

A method has been developed that allows an arbitrary hierarchy of matrix decomposition for inverting the Jacobians of very large simulations. Furthermore, programs developed using this technique provide far more flexibility for the user than was previously possible. Heretofore, special methods have been devised for particular problems in reactor kinetics, heat exchange, distillation, chromatography, etc., primarily to get a first solution.
Ind. Eng. Chem. Process Des. Develop., Vol. 9,No. 1, January 1970

Industrially, however, a number of these simulations have become daily tools which must be available to the engineer to produce efficient, modern designs. I n general, these methods, when coded, result in programs which lack flexibility-i.e., the sets of independent and dependent variables are basically fixed. Moreover, the coded sets of dependent and independent variables are only occasionally the sets with which the designer is faced. T o answer the designers questions truly, there should be a measure of freedom in assigning the dependent and independent variables. Let us then phrase the objectives of industrially coded methods a s requiring: (1) generality, to accommodate the most arbitrary formulation of a unit operation, (2) reliability, to be operated by the engineer without the supervision of the coder, and (3) flexibility, to answer many types of questions about thk operation. Experience has shown the Newton-Raphson technique to be both the most general and reliable tool for solving difficult sets of nonlinear algebraic equations. Parenthetically, the corresponding implicit methods in the numerical solution of differential equations hold a similar position. I t is easy to state theoretically that Newton-Raphson can perform these tasks, but it is not easy to reduce this method to practice. To demonstrate these notions, we have developed a general algorithm for the distillation problem, capable of solving the full spectrum of towers from absorbers to superfractionators. Basically, we show how the Newton-Raphson procedure can be applied to a set of algebraic simulation equations so as to provide the aforementioned generality, reliability, and flexibility. These concepts have been applied to many other systems of equations.
Distillation Problem

Enthalpy Balance
L l j

- Ihl - 1JXl -1,J



[(LL+ SSLl)hL,j +

Liquid Mole Fraction Definition

x,,, =1
, = 1


Over-All Material Balance

L L, - - L , - SSL, - V , - SSV, + Vi - 1 + F = 0


These equations contain implicitly the relation for liquid-vapor equilibrium:

Y,, K , , X , , =
Furthermore, K , , , H,,, and h,, are to be considered as functions of temperature. The set of equations for a full column involves ( n + 3)m equations, which are nonlinear particularly in the product of loading and composition and in K , as a function of temperature. The variables involved in these equations include: (rn x n ) liquid mole fractions, ( m ) temperatures, ( m ) liquid loadings, ( m ) vapor loadings, heat duties, side stream rates, and feed rates, compositions, and enthalpies. The most convenient and logical set of dependent variables for this problem are the mole fractions, temperatures, and loadings; the independent variables then are the heat duties, side stream rates, and feeds. This problem can be solved by the Newton-Raphson iteration, in which the complete set of equations [ f ( @ , v )= 01 are linearized [ f ( @ , q )+ fa ( $ , q ) A @ = 01 to obtain successive corrections to the dependent variables:

Many methods have been developed for solving the distillation equations. The classic ones, the LewisMatheson (Lewis and Matheson, 1932) and the ThieleGeddes (Thiele and Geddes, 1933), have seen extensive improvements since they were first proposed more than 30 years ago. Amundson and Pontinen (1958), Greenstadt, Bard, and Morse (1958), Lyster, Sullivan, Billingsky, and Holland (1959), and Hanson, Duffin, and Somerville (1962) have developed extensions to these earlier methods. More recently, Wang and Olsen (1964) and Naphtali (1965) have used Newton-Raphson to solve the complete set of heat and material balance equations of a general distillation column. Their results have shown the method to be very reliable and general. However, the strict application of the method requires large storage capacity and long computing time for many practical towers.
Basic Equations

14 = -f;l(@,v)


@ q

= [fl, fz,. .
= =

[@], $I~,. .

.I - system equations

q 2 , . . .] -


- (dependent) state variables

(independent) control variables

Arrangement of Equations

A distillation column consisting of m stages and separating n components can, at steady state, be described by n-component material balances, an enthalpy balance, a mole fraction definition, and an over-all material balance for every stage. Specifically, for stage i and component j , these equations are: Component Material Balance

The key to the successful use of the Newton-Raphson in the distillation problem is to devise an economical method of solving the linearized set of equations; the key to the latter is to order the equations so as to take full advantage of the regular structure of the problem. One way Of ordering the equations is to group all of the equations describing a single stage together (Naphtali, 1965). An analysis of the solution time of this system shows the computation to be of the order m(n + 2). If, on the other hand, the component balances are grouped by component, the solution time is of the order n(m) + (am) (Wang and Olson, 1964). This is the structure used in this work. The former structure is most efficient in the superfractionator type of calculation (large number of trays, few components). This grouping of equations is also adaptable to systems with composition-dependent data (Naphtali, 1965). The latter structure is better for

Ind. Eng. Chem. Process Des. Develop., Vol. 9,No. 1, January 1970

the crude tower type (fewer trays, large number of components). Finally, for columns involving both a large number of stages, m > 50, and many components, n > 25, neither method is efficient. Figures 1 and 2 depict the vector-matrix representation of the linearized equations, grouped by component, for a three-component, four-stage (generalized to m stages in Figure 2) tower. The matrix has been partitioned into a 6 x 6 matrix of submatrices. The six horizontal partitions divide the matrix into convenient equation sets (from top to bottom) : the linearized component balances for each component, the linearized enthalpy balances, the mole fraction definitions, and the over-all material balances.
Basic Method of Solution

The direct inversion of the matrix is generally impractical because of its huge size. The inversion is therefore carried out by a partial triangularization of the matrix and the subsequent inversion of a much smaller matrix. The partial triangularization proceeds according to the following steps: 1. Premultiply the bottom row of submatrices (and the bottom row of the b vector) by K- (inverse of K ) .

2. Premultiply the bottam row by D I and subtract the result from the top row. 3. Premultiply the top row by A 4. Premultiply the top row by El and subtract the result from the fourth row. 5. Premultiply the top row by Ii and subtract the result from the fifth row. At this point, submatrices D1, l , and I I have been E eliminated. 6. Repeat steps 2 to 5 , using K to eliminate D2 and D3, A2 to eliminate E P and 1 2 , and A J to eliminate EJ and IJ. 7 . Premultiply the bottom row by H and subtract the result from the fourth row. The result of this partial triangularization is shown in Figure 3. Only the 2 m x 2m matrix shown in bold outline need be inverted to compute the iT,s and sV,s. The d , s and X,,,s are then readily obtained by backsubstitution. This constitutes one Newton-Raphson iteration. The process is continued until the iterations have converged. This represents a more generalized or hierarchical Gaussian elimination of matrices. rather than elimination of elements.

I 1 1 a 1 2 a13


FxF.l 0 0


521 b22 b21 b 2 2 b b

c 2 1 c22 c 2 1 c22
c c

c22 d 2 1 O22 d d



a 3 2 a33 a 3 1 a32 a33

b 3 1 b32 b31


FxF,3 0

a 1


12 1 3
11e12 e 1 3
122 2 3

I e 2 1 e22 23

e 3 1 e 3 2 e33


e e

f 1



9 ,





1 .o


-1.0 1.0


l k 1i i
1.0-1.0 -1.0 1.0
-1.0 1 . 0 -1.0



= -L

3,1=(V*SSV!Xg CI1=KX d1 = X 1
e l l = -Lh

=-ZLdh , dT

g1 =


Figure 1 . Newton-Raphson system for three-component, four-stage tower


Ind. Eng. Chern. Process Des. Develop., Val. 9, No. 1, January 1970


identity vatrix

Figure 2. Newton-Raphson system for three-component, rn-stage tower

Figure 3. Results of partial triangularization of NewtonRaphson matrix

The partial triangularization calculations, which are done one component a t a time, require -15m2 operations for each component, and the inversion step requires -9m3 operations. Crudely then, the whole calculation for each iteration involves about 15mzn + 9m3 floating point operations. This and storage requirements limit the algorithm to about 40 stages. This is similar to the Wang and Olson (1964) procedure.
Specification Constraints, Designers Problem

where f , @, and 7 are as previously defined, and g = [gl, gz,. . ] I . The Newton-Raphson problem is rewritten: .

f ( 4 , d + f@4 , 9 ) w + f7(4,dAs = 0 (


+ gQ(4,v)W~ (4,a)Alt = 0 +gn


The corrections to 4 and 7 are then obtained by solving the partitioned matrix equation:

The solution of the multistage, multicomponent separation problem is complete when the ( n + 3 ) m unknown, or dependent, variables of the tower meeting design requirements are known. The basic algorithm described above would be suitable for describing an existing column, in which the dependent variables would be tower compositions, temperatures, and loadings; the independent variables would consist of all of the heat duties, side stream rates, and feeds descriptions. I n a design study, however, product purities may become independent variables, and heat duties dependent variables. For example, the design may require a specified recovery ( R ) of a component in the distillate product, and the reboiler duty ( Q r ) may be unknown. The dependency of R and Qr as defined in the basic algorithm must be exchanged. This problem is usually resolved by case study. The main objection to the case study methods is that the basic algorithm must be solved many times. An alternative, much more efficient method, is the following. Start with the complete set (Equations 1 to 4) of enthalpy and material balances (f) as a function of the tower compositions, temperatures, and loadings (4). Now include the equations (9) which define the specifications on the dependent variables, and choose an equal number of independent variables (7) which are to be manipulated to achieve these specifications. An equation in g could, for example, correspond to a specified recovery ( R ) of component 5 in the bottoms, L,Xmj - R = 0, and 7 could be the condenser duty (QJ. I n general, the equations to be satisfied are:

Premultiplying both sides of Equation 7 by the matrix

f- i i
results in:


The solution for the corrections is then readily found to be:

Ad = -f-f - f-f Al?

6 7

Each iteration now consists of making changes in both independent (7) and dependent (4) variables as given by Equations 8a and b. Since there are rarely more than three or four specification Equations 5b and q,s, the only calculation of any consequence in Equations 8a and b is the inversion of f d . Hence, the solution of Equation 7 requires only a little more effort than does a KewtonRaphson iteration for the basic algorithm described previously. Moreover, these operations in no way interfere with the application of the efficient inversion procedure (f;) previously developed for the basic equations (the solution to the latter is merely the first term on the right-hand side of Equation 8b, where 7 is treated as a fixed parameter).

Ind. Eng. Chern. Process Des. Develop., Vol. 9,No. 1, January 1970

When this procedure has converged, the 7,s and 9)s will have assumed values such that specifications (Equation 5b) will have been met, and the tower will be completely heat and mass balanced (Equation 5a). Hence, the dependencies of the qs and the variables specified in Equation 5b will have been interchanged. Combinations of the dependent variables-e.g., V, K , X-as well as individual ones, can be interchanged with the qs. There are, of course, potential difficulties with this approach. The computation to a specified recovery of a component can be very nonlinear or even infeasible. While each step of the Newton-Raphson (A@, AT) usually has a good vector direction toward the solution, the vector magnitude is often too large. A fraction of the vector often reduces the error when the full magnitude does not. Finally, if the initial guess (qh,q,,) is close enough to the answer, this procedure converges rapidly.
Sensitivity of Solution to Parameters

enthalpy, total mass, and

i = n

, = I

x,., = 1

are written, not for each stage, but for groups of stages, called sections. The tower is divided into 1 of these sections; a typical section containing K stages is depicted in Figure 4. The enthalpy and total mass balances for this section are, respectively:

A very important result of this effort has been the ability to compute, analytically, the partial derivatives (sensitivities) of the solution to any parameter. The full value of this will be discussed in the second paper on generalized heat and material balance. Briefly, if the problem is to solve

L,-L,+K-Vi-,+ V ~ + K + I i + K
, = t L !

(SSL, + SSV,)
i t K

i - K

p - r + 1

= 0 (10)

f(h) = 0;
then from Newton-Raphson,

B =


The mole fraction restriction is written as:

p = i - L l ) = l

A 6 = -f;1(41,Bo)f(dL,Bo)
$1 1 = $ L + A#) The problem then is to determine the sensitivity of I$ to changes in 7. Differentiating AI$, with respect to 7 yields:

c 2 X,,=K


I n the limit, and f(@,,qo)


Relations 1, 9, 10, and 11 are mn + 31 equations for the mn + 3m unknowns. The additional 3 ( m - 1 ) relations needed to solve the problem are obtained from the following approximation: The ATS,AVS, and ALs vary linearly from stage to stage within each section. For the section shown in Figure 4,these relations are:

-+ 0 as i + a when the process converges, 0. Therefore, in the ith iteration:


- -f;l(dl,oO)

af(dL,V) [ aril,=

? .

Since the time-consuming step in this calculation-i.e., inverting the Jacobian (f,-)-has already been done in the course of solving the basic simulation equations, generating these sensitivities merely requires a small incremental effort to operate on a few extra vectors, a f j d v .
Extension of Algorithm to large Towers

j = 0 , 1, 2,. 1 .K
Equations 12 represent 3 ( m - 1 ) equations, which replace the 3 ( m - 1) balances in Equations 9, 10, and 11 which were not written. Once Equations 1, 9, 10, and 11 have

When a simulation involves more than 40 stages, the algorithm just described is limited by the computation effort. The limitations may be removed, however, by a modification of the basic Newton-Raphson scheme. The procedure consists of solving a smaller, approximate set of enthalpy and mass balances in which the temperature and loading profiles, in turn, are approximated by a series of line segments. The resulting solution, although an approximation to the tower, is very accurate with respect to the variables of interest-i.e., the product streams. Furthermore, by successive application of the procedure, an exact solution of the whole tower can eventually be obtained. All m x n of the component balances are written as before (Equation 1). Now, however, the equations for

Ind. Eng. Chern. Process Des. Develop., Vol. 9,No. 1, January 1970

been linearized, Equation 12 may be used to eliminate 3(m - I ) of the As in favor of the remaining 1 of them. For example, aLi + I , aL, 2,. . ,, aL, K - 1 are replaced + + by AL, and AL, + K. The linearized system for three components, m stages (compare with Figure 2) now takes the form shown in 1 Figure 5. I n this matrix, there are only 3 of the enthalpy, total mass, and 2X equations (Equations 9, 10, and 11) and only 31 of the ATS, AVs, and a L s . This system may be solved in a manner similar to the exact system (see Figure 3). The calculation time for this approximate system is the order of nml + (21)3 compared with nm2 + (2~72)~ the exact system. Hence, storage space and for running time permit up to 40 sections for this approximate algorithm, compared with a maximum of 40 stages for the exact method. When the initial temperature and loadings profiles are linear within each section, Equation 1 2 will force them to remain that way. Thus, the accuracy of the approximate solution depends on how well the true profiles can be fitted onto a series of straight-line segments. An exact solution results when the true profiles are exactly linear within each multistage section or when every section contains only one stage-i.e., number of stages = number of sections. Since profiles are most nonlinear where heat or mass enters or leaves a tower, errors can be minimized by placing most sections in the vicinity of feed, product, and heat duty stages. An additional benefit of clustering the sections in this way is that the solution is accurate for the product streams despite considerably larger errors for the internal streams. To be of most general use, the approximate algorithm has been extended to yield an exact solution. The objective is naturally to satisfy all of the equations, particularly the previously deleted enthalpy, total mass, and

equation set, those stages with greatest enthalpy, total mass, and

L j = 1

c xi,

.- 11

errors-that is, most of the sections are clustered in the areas of worst error. When the resectioned tower is then solved, the relations given by Equation 12 tend to rotate and translate the segments of the approximate profiles onto the true profile, thereby yielding an improved overall solution. The resectioning is repeated until the errors have become sufficiently small and the exact solution is obtained. Since the approximate solution is reasonably accurate, usually only one or two resectionings, each involving one or two iterations, a r e needed to obtain the exact solution. Hence, only a moderate additional effort is required for an exact solution. This algorithm can efficiently solve most towers by using 25 to 30 sections, although for very large towers, up to 40 sections may be necessary. Finally, the solution to the designers problem-i.e., interchange of dependent and independent variables-for this algorithm is handled in precisely the same way as for the exact algorithm. These methods have been programmed for the lBhl 360165. I n typical examples, the program converges tu the approximate solution in 5 to 15 Newton-Raphson iterations (at 2 to 20 seconds per iteration). The maximum error in the product streams (relative to the true answer) is -0.1%; the maximum error in the internal streams is -1%. After 1 to 2 resectionings involving a total of 2 to 4 more iterations, the solution is made essential11 exact (maximum error in all streams < 0.01%). Figures 6 and 7 illustrate the effect of the sectioning procedure on the vapor loading profile of an 80-stage


equations for the stages within a multistage section. The procedure used to solve this problem is to resection the tower in such a way as to weight more heavily in the

Exact Prof de


17 Sections 24 Sections





Figure 5 . Newton-Raphson system for m-stage tower divided into I sections


Figure 6. Effect of number of sections on loading profile of a deisopentanizer

Ind. Eng. Chem. Process Des. Develop., Vol. 9, No. 1, January 1970


of these streams. Finally, the approximate solution can be converted to an exact solution with only a moderate additional effort.
Acknowledgrnen t

We thank M. G. Kesler, L. T. Ung, and J. D. Simon who provided stimulating discussion, and Esso Mathematics & Systems, Inc., for permission to publish this work.




17 Sections 17 Sections, Re.aectioned Once !



1550 0



Figure 7. Effect of resectioning on loading profile of deisopentanizer

& J

basic distillation equation set feed rate, stage i design constraint equations molal liquid enthalpy component j , stage i molal vapor enthalpy component j , stage i equilibrium constant component j , stage i No. of sections liquid flow rate, stage i No. of stages No. of components heat duty, stage i liquid side stream rate, stage i vapor side stream rate, stage i temperature, stage i vapor flow rate, stage i liquid mole fraction component j , stage i independent variable manipulated to achieve design specifications state variables of system of equations (basic dependent variables) partial derivative of f , g with respect to 4,

deisopentanizer. The accuracy of the calculations can be improved by either increasing the number of sections used or resectioning the tower.

literature Cited

The Newton-Raphson method is applicable to the large number of equations required for the distillation simulation, if care is taken to discover efficient inversion procedures. Using a single, convenient, basic algorithm, it is possible to solve the equations for any desired set of dependent and independent variables, with only a slightly greater effort than is required to solve the basic algorithm. This procedure for obtaining a flexible algorithm is equally applicable to the algebraic simulation equations of any other process. Furthermore, sensitivities of the state variables to process parameters can be readily computed. For the distillation problem, the algorithm can be extended to most practical problems by a sectioning technique. A good approximation can be obtained by assuming sectionally linear temperature and loadings profiles. This approximation can be made accurate for the product streams by concentrating the sections in the neighborhood

Amundson, N. R., Pontinen, A. J., Ind. Eng. Chem. 50, 730 (1958). Greenstadt, J. L., Bard, Y., Morse, B., I d . Eng. Chem. 50, 1644 (1958). Hanson, D. N., Duffin, J. H., Somerville, G. F., Computation of Multistage Separation Processes, Reinhold, New York, 1962. Lewis, W. K., Matheson, G. C., I n d . Eng. Chem. 24, 494 (1932). Holland, Lyster, W. N., Sullivan, S. L., Billingsky, D. S., C. D., Petrol. Refining 38, 221 (1959). Naphtali, L. M., 56th A. I. Ch. E. meeting, San Francisco, May 1965. Thiele, E. W., Geddes, R. W., I d . Eng. Chem. 25, 289 (1933). Wang, Y. L., Olson, A. P., private communication, May 1964.

RECEIVED review January 31, 1969 for ACCEPTED September 9, 1969


Ind. Eng. Chem. Process Des. Develop., Vol. 9, No. 1 , January 1970