<<

Con~purers them. Engng, Vol. 14, No. 2. pp. 161-177, 1990 0098-I 354/90 %3.00 + 0.00 Printed an Great Britain. All rights reserved Copyright 6 1990 Pergamon Press plc

THE SEQUENTIAL-CLUSTERED METHOD FOR DYNAMIC

J. C. FAGLEY’ and B. CARNAHAN*

‘B. P. America Research and Development Co., Cleveland, OH 44128, U.S.A. ‘Department of , The University of Michigan, Ann Arbor, Ml 48109, U.S.A.

(Rrreiwd 28 May 1987; final revision received 26 June 1989; received for publicarion 11 July 1989)

Abstract-We describe the , development and testing of a prototype simulator to study problems associated with robust and efficient solution of dynamic process problems, particularly for systems with models containing moderately to very stiff ordinary differential equations and associated algebraic equations. A new predictor-corrector integration strategy and modular dynamic simulator architecture allow for simultaneous treatment of equations arising from individual modules (equipment units), clusters of modules, or in the limit, all modules associated with a process. This “sequential-clustered” method allows for sequential and simultaneous modular integration as extreme cases. Testing of the simulator using simple but nontrivial plant models indicates that the clustered integration strategy is often the best choice, with good accuracy, reasonable execution time and moderate storage requirements.

INTRODUCTION simulator and includes results of tests on simulator performance. Direct numerical comparisons of Two major stumbling blocks in the development alternative integration strategies are given for some of robust dynamic simulators are: relatively simple test plants. Conclusions and recom- (1) mathematical models for many important equip- mendations drawn from our experiences should be ment types give rise to quite large systems of ordinary of interest to other workers developing dynamic differential equations (ODES); and (2) these ODE simulation software. systems tend to be moderately to very stiff. The development of robust stiff numerical integrators and BACKGROUND introduction of more powerful computers (larger memories, faster processors, new architectures) The mathematical modeling of transient chemical during the past few years now make the dynamic process operations gives rise to differential/algebraic simulation of many plant operations a solvable prob- equation systems (principally from mass and energy lem. We need reliable, accurate dynamic chemical conservation laws) that must subsequently be solved plant simulators that make efficient use of these new during execution of a dynamic process simulator. computational tools and hardware. Special attention In some cases, the well-mixed assumption applies, must be given to the treatment of the large Jacobian and the system boundary may be taken around an matrices required by stiff-system algorithms, even for equipment subunit, or even an entire unit. Examples processes with only a few units. of such lumped parameter systems are stirred tank This paper describes study into efficient treatment reactors, mixers and individual stages in a of the dynamic chemical plant simulation task. The column. work involved design and construction of a prototype If spatial gradients within an equipment unit are simulator capable of handling chemical processes important, distributed parameter systems of equa- giving rise to large stiff ODE systems. This research tions arise. The unsteady-state modeling equations simulator employs test models for controllers, distil- are partial differential equations (PDEs), typically lation equipment and a double-pipe , parabolic or hyperbolic, that depend on the nature and makes extensive use of plex data structures for and level of detail of the model. Examples of dis- storing numerical integrator, process and physical tributed parameter systems are plug flow reactors, property system variables and constants. packed separation columns and heat exchangers. We implement a novel approach in modular Transient distributed parameter models can dynamic simulation, viz. a single simulator architec- usually be treated using the “method of lines” (Byrne ture that allows for simultaneous treatment of and Hindmarsh, 1977; Haydweiller et al., 1977; equations arising from individual modules (equip- Carver, 1979) in which spatial derivatives are approxi- ment units), clusters of modules, or in the limit, all mated by finite-differences. As a result, a single PDE modules associated with a process. This paper de- will be represented as a system of ODES, with time scribes the most important features of the prototype as the independent variable. By using the method of

161 162 .l. C. FAGLEY and B. CARNAHAN

lines, the dynamic model equation system for a Cuthrell (1985) and Biegler (1988) show that recycle chemical plant consists primarily of ODES that can convergence and optimization calculations can be be solved with a single numerical integrator. performed simultaneously using successive quadratic The overall equation system will also contain programming algorithms. algebraic equations that are linked to the ODE- Principal alternative steady-state simulator struc- dependent variables. Many of these associated tures are those incorporated into simultaneous simu- algebraic equations are required for physical or trans- lators, which come in several generic forms variously port property evaluation (e.g. equations of state called equation-based, simultaneous, simultaneous- might be used to determine densities). modular and modular-simultaneous (Perkins, 1983; Until fairly recently most simulator research efforts Biegler, 1983, Shacham et al., 1982; Stadtherr have focused on the modeling of steady-state process and Vegeais, 1986; Morton and Smith, 1989). In operations. Historically, early steady-state simulators these simulators, all (or almost all) of the equations (see reviews by Hlavacek, 1977; Motard et al., 1975), or simplified (frequently linearized) forms of the and the most popular commercial ones, employ a equations (including model equations, physical sequential-modular structure in which the procedure property equations, stream connection equations, for solving the model equations for an individual process specification equations, etc.) are solved equipment unit is incorporated into an individual simultaneously. subroutine associated with that unit and assigned to The simultaneous simulators have the prime virtue a unit program library. An executive routine calls that “simulation” and “design” problems can be upon the module subroutines in sequence (in an order solved in essentially the same way, provided that the specified by the user or determined by a flowsheet appropriate number (and combination) of variables analyzer), usually following material flow through have been assigned values to render the equations the process from feed to product streams. Typically solvable. The highly nested iterative structure needed the module routines (and occasionally the executive to solve “design” problems with sequential-modular program) call upon a physical property package to simulators is eliminated and optimization calcu- generate essential property values. lations can be performed using infeasible path If recycle streams are present, one or more algorithms (Hutchison et ai., 1986). streams are “torn” to render the system acyclic, and However, the simultaneous simulators have the sequential-modular solution strategy involves a their own problems, principally resulting from the multitiered iterative structure on calculation: (I) an numerical solution of the very large system of simul- outermost iteration involving solution of nonlinear taneous nonlinear equations generated. Usually equations associated with variables in the tom Newton or quasi-Newton algorithms are used to streams; (2) sequential calls upon the unit module solve these nonlinear equations. This requires routines; (3) possibly iterative solution of the mode1 repeated evaluation of the (partial derivative) ele- equations within a module; and (4) evaluation of ments in the Jacobian matrices for the equation physical properties needed by the modules during system (see later), and subsequent soIution of high- solution of the model equations (the property order sparse linear equation systems. Initial guesses evaluations may again involve iterative numerical must be provided by the user or generated by the methods). Many strategies have been developed for simulator for all (possibly thousands for large plants) optimal or near-optimal mod&e calculation ordering of the unknown process variables. (e.g. Duczak, 1986). Although most attention has been focused on “Design” problems (in which a sufficient number steady-state simulation and design, a few general- of input stream, output stream and equipment purpose dynamic process simulators (Ingels and parameters are specified to render the equation sys- Motard, 1970; Ham, 1971; Franks, 1972; Lopez, tem solvable for the remaining process variables) 1974; Barney, 1975; Patterson and Rozsa, 1980) have are not solved in a “natural” way by modular- been developed during the past 20 yr. The structures sequential simulators. Multiple versions of the same of most of these simulators are parallel to those for model equations (involving different “known” and the steady-state simulators, i.e. modular-sequential “unknown” variables) may be needed, increasing the and simultaneous. complexity of the modules. Or substantial low-level Virtually all modular dynamic simulators consist repetition of “simulation” unit module calculations of four principal parts: (1) unit model subroutines may be required to satisfy internal stream specifi- that incorporate the model equations for the associ- cations. Some design specifications (e.g. for process ated equipment types; (2) a physical property subsys- product streams) may even lead to iteration loops tem that provides estimates of densities, enthalpies, outside those required for converging the recycle vapor- distribution coefficients, etc.; (3) a calculations. Thus the overall computational scheme numerical integrator; and (4) a supervisory routine for design problems may involve nested iteration of that performs input/output operations and oversees a fairly high order. Process optimization may add execution of the simulation calculations. yet another level of iteration to the calculations, These simulators are called “modular” because although Biegler and Hughes (1983), Biegler and each piece of equipment in the physical plant has its Sequential-clustered method for plant simulation 163 dynamic behavior represented by a set of differential requires a supervisory program that keeps all units and algebraic equations incorporated into a unit or subsets at roughly the same time level, oversees model subroutine. The simulator framework is a extrapolation and interpolation of essential stream general one, i.e. once the unit model subroutines for parameter values and provides a strategy for retrac- “standard” unit types have been constructed, they are ing integration time steps when extrapolated values available in a unit model subroutine library, and may later prove to be inaccurate. be drawn together in different ways depending on the This approach is probably of greatest utility in layout of the plant being simulated and the particular cases where individual units display a weak inter- integration strategy used. dependence. When there is heavy coupling of plant The unit model routines use input (material units, and the units show a strong degree of inter- and information) stream and equipment parameter dependence through either material or information values, call upon the physical property system rou- (control signal) stream connections, extrapolation in tines as needed, and compute estimates of the deriva- time is often inaccurate, leading to retracing of tives for the ODE-dependent variables associated integration time steps. with the unit. The numerical integrator uses these Other novel approaches, developed in recent years, derivative estimates to generate updated values include: (1) partitioning of plant structure, with tear- for the ODE-dependent variables at discrete times, stream values guessed and iterated upon (Ponton, which are then used by the unit module routines 1983); (2) use of a two-tiered approach with separ- to calculate output stream parameter values. Unit- ation of flow- equations from composition- related algebraic equations are also solved during dependent equations (Ponton and Vasek, 1986); and each module call using appropriate, robust numerical (3) a technique that takes advantage of “latency”, the methods. property that only a few units in a process are usually The steady-state equation-based (simultaneous) dynamically “active” at any given time (Kuru and simulators can also be used to solve ordinary differ- Westerberg, 1985). ential equations in addition to nonlinear algebraic In each case, the structure of the simulator and the equations. The ODES are typically integrated using way in which the executive interacts with the unit predictor--corrector algorithms, which require, at modules is dictated by the adopted algorithm and its each time step, the iterative solution of the corrector implementation. In turn, the best application of each equations. Since the corrector equations are non- depends on the type of plant being simulated. The linear algebraic equations, they can be solved by the techniques which use stream tearing, extrapolation/ same (typically Newton or quasi-Newton) algorithm interpolation in time and iteration around recycle that is used to solve the other nonlinear algebraic loops are best suited to plants with minimal inte- equations for the process. gration of material, information (control) and energy From an aesthetic viewpoint, the generality of the flow. Conversely, the more rigorous approaches with simultaneous equation-based approach to solving global treatment of the ODE set tend to be better process problems is very attractive. Both steady-state suited for treating plants with a high degree of recycle and dynamic results can be produced, and because (material, energy and control signal) and which incor- all equations are being solved simultaneously, math- porate advanced, integrated control algorithms, i.e. ematical rigor is assured. feedforward and decoupling loops. In these highly Unfortunately, the addition of a potentially large integrated systems, accurate description of flow number of corrector equations (one for each ODE) to between the units is paramount in describing the an already large set of associated nonlinear algebraic interdependence of the units. equations leads to nonlinear equation systems of In this paper, another novel algorithm will be large order, for which our current methods are very introduced which incorporates the most global and heavily taxed and may not be sufficiently robust to mathematically rigorous technique, total simul- guarantee reliable performance. It is not clear from taneous integration, in the flexible sequential modu- the literature that large dynamic process plant models lar simulation framework. The simulator structure involving thousands of mixed algebraic and differ- that allows implementation of the simultaneous ential equations have been solved successfully and algorithm will also be described. consistently using this approach. In recent years, several new approaches (Palu- STIFFNESS sinski, 1985; Hillestad and Hertzberg, 1986; Liu and Brosilow, 1987) have been suggested to accomplish One of the more serious problems associated with dynamic simulation in a modular framework. First, dynamic simulation of complex processing plants is there is the technique of partitioning the flowsheet that the ODE system models for a wide variety of and identifying streams that interconnect units or chemical and chemical engineering problems are subsets of the plant units. Each unit or subset is moderate to very stiff (Barney, 1975; Johnson and integrated using a separate numerical algorithm, with Barney, 1976; Weimer and Clough, 1979). values of interconnecting stream parameters being Stiff problems are frequently encountered in interpolated/extrapolated in time. This technique modeling reactive systems, when kinetic rate con- 164 J. C. FAGLEY and B. CARNAHAN stants differ by more than one or two orders of with the system Jacobian matrix: magnitude (DeGrout and Abbott, 1965; Enright and %/a~, . (5) Hull, 1976; Guertin ef al., 1977). Stiff ODE systems [J,jl = also arise in simulating separation units, where trace Here y is a column vector of n ODE-dependent components on trays of a distillation column may variables, f is a column vector of n functional re- have response times several orders of magnitude lationships for the dependent variable derivatives and smaller than reboiler/condenser response times t is the independent variable, time. (Barney, 1975; Franks, 1972; Distefano, 1968; Mah The system Jacobian J is an n x n matrix of partial et al., 1962). derivatives; its n eigenvalues Li which ma contain Stiff equations almost always arise in dynamic both real and imaginary parts, [k = ti (- 111: chemical plant simulation involving solution of PDEs I,= -l/s,+kw,. by the method of lines. As the spatial mesh size for (6) method-of-lines treatment of PDEs is decreased, the For a stable system, all values of ~~ will be greater approximation of the spatial derivatives becomes than zero. The imaginary parts o, represent local more exact, but the resulting ODE set becomes oscillations in components of the solution of the more stiff. For example, for 1-D thermal diffusion ODE system. The stiffness ratio S is a standard with homogeneous Dirichlet boundary conditions, measure of the stiffness of the ODE system: theoretical analysis shows that the stiffness ratio increases as the square of the number of spatial S = =man/rmm (7) sections (Byrne and Hindmarsh, 1987). These types Here, rmax and rmln are the maximum and minimum of stiff problems have been encountered, for example, values of the r,. For S in the range l-10, the problem in modeling absorption columns and tubular set is nonstiff, and may be treated effectively with a reactors (Haydweiller er al., 1977). conventional nonstiff integration technique such as Several stiff numerical integration techniques have an Adams-Moulton predictor-corrector or explicit been developed in the past 20 yr or so: semi- and Runge-Kutta method. For S in the range 100-1000, fully-implicit Runge-Kutta techniques, exponential- the equation set is moderately stiff. For larger S, fitting methods, spline fitting approaches, higher- conventional techniques either cannot be used at all order derivative methods and linear multistep or are very inefficient; numerical stability consider- algorithms employing backward differences (Byrne ations dictate a very large number of very small and Hindmarsh, 1977). All of these stiff techniques integration time steps to complete the integration to remain stable for integration step sizes much larger a useful maximum time T. (Note: for nonlinear ODE than for classical Runge-Kutta and multistep algor- sets, the values of r, and therefore of S vary with ithms, so that even severely stiff stable problems time.) may be treated in a reasonable number of time steps. The term r,,, represents a slowly changing com- Of course small time steps must be used when ponent in the solution, while T,,, represents a rapid transients are significant, if these are to rapidly changing component. For conventional non- be computed accurately and observed. One feature stiff integrators (e.g. classical explicit Runge-Kutta common to stiff numerical integrators is that the or Adams-Moulton predictor-corrector methods of system Jacobian matrix plays a central role in the orders 4-6), the time step of integration must always solution algorithm. remain small (of the order of T,,,~”to maintain numeri- Currently, the most popular stiff integrators cal stability). However, integration must take place are those developed by Gear (1968, 1971). Gear’s over a relatively long time in order to determine the methods have been found by many workers to out- nature of the slowly varying components. perform other types of stiff integrators on a wide The predictor equations are used to generate initial variety of chemistry and chemical engineering prob- estimates of y at each new time level ti + , : lems. The Gear algorithms are linear, multistep predictor-corrector techniques, based on backward difference formulae. Gear integration, as imple- mented in the most popular stiff-system codes, has and the corrector equations are iterated to conver- many desirable features, including automatic startup, gence using a Newton-Raphson or quasi-Newton automatic step-size and method-order adjustment technique: capability and built-in error control (Hindmarsh, 1974a,b, 1977, 1979; Byrne and Hindmarsh, 1977, yj;+,” = yl”;, + (I - hc,J*)-’ 1987). It is a variable-step, variable-order algorithm. Consider the initial-value ODE problem: x ~co~(Yl’:,)-Yyl”:,+ 2 d,Y,,I-, (9) [ ,= I 1 dy Here, 6,, c,, and the (1s and ds are method constants, - = f(y, t>, dt h is the time step of integration (ti+, - ti). q is the method order and s is the Newton iteration counter. YW = Yo 7 (4) _J* is~_ the~___ Jacobian matrix evaluated at the current Sequential-clustered method for plant simulation 16.5 or some previous values of y and r. The method numerically integrate each ODE subset in sequence, is referred to as a quasi-Newton technique because usually in an order determined by the flow of material a single Jacobian matrix may be used for several (the path likely to be followed by a process disturb- corrector iterations at more than one integration time ance). In this way, all ODE subsets are kept at the step. same time level, and problems with interpolation/ extrapolation over more than one time step are avoided. The presence of recycle (either material or INTEGRATION STRATEGIES information, e.g. a control signal) can complicate this Dynamic simulators can be structured in either a approach, since it may be necessary to iteratively modular or equation-oriented fashion. Both have reprocess the entire module calculation sequence to advantages and disadvantages. For the process en- achieve required accuracy. This problem can be gineer, the modular approach is certainly easier to minimized by ordering the subsystem integration visualize, because processes are normally viewed as sequence based on the “tearing” of the cycle (in the networks of individual processing units and most of sense of modular-sequential simulation) following the the steady-state simulators in current industrial use unit in the cycle having the longest time constant are structured this way internally. In the remainder (Dudczak, 1986). of this paper, we address the problem of effective Each of these techniques has merits. The first dynamic simulation using a modular approach. approach tends to be favored in situations where Once a modular simulation framework and numeri- some ODE subsets are difficult to integrate (i.e. cal integrator have been selected, a strategy for require relatively small time steps) while other, large incorporating the integrator into the simulator struc- subsets are relatively easy to integrate. However, this ture must be adopted. In the past, two general approach tends to be unfavorable when the plant strategies have been used. The first general technique to be simulated has equipment units that show a high involves treating the ODE system arising from each degree of interdependence and are sensitive to the individual unit model subroutine separately with the dynamic behavior of one another. The work de- numerical integrator (Hlavacek, 1977) (possibly with scribed here is concerned with the second approach, different integrators for different units). Each piece of in which the solutions of the ODE subsets arising equipment gives rise to an individual ODE system from each piece of equipment are kept at the same which is a subset of the overall ODE system for the simulation time level. plant. The integration of the ODE subsets is sequenced Traditional modular integration such that each subset is solved individually over a One of the criticisms of the modular dynamic time horizon using a local time step. If the input simulation structure is that due to the modular variables for the units are fixed at their levels at the structure, where each type of equipment unit in the beginning of the time horizon interval, this approach physical plant has its behavior represented by a is equivalent to decoupling the units completely dur- procedure implemented as an individual subroutine, ing the time interval, a mathematically nonrigorous simultaneous treatment of the overall equation sys- approximation. tem is precluded. In other words, because the In a modification of this approach, the time equation subsystems for computing the derivatives behavior of stream variables, both information and solving any associated algebraic equations for (e.g. for control) and material, can be treated each plant unit lie in separate subroutines, they using interpolation in time (Liu and Brosilow, 1987). cannot be treated collectively. When materia1 recycle or information feedback The structure of most of the early modular (e.g. from a controller) occurs, the simulator must dynamic simulators reflects this approach. The simu- extrapolate in time to estimate at least some missing lators are constructed such that the unit model ODE-dependent variables, so that each ODE sub- subroutines make calls on the (one or more) numeri- set can be solved over a given time horizon with cal integrator. In this sense, the unit model routines different time steps (and possibly different integra- “drive” the numerical integrator, and this traditional tors). Algorithms must be developed for ODE subset modular (sequential) structure does preclude simul- sequencing, interpolation and extrapolation, for taneous treatment of the overall equation set. checking the accuracy of extrapolated values and for Consider, for example, a traditional modular simu- retracing of the integration calculations when ex- lation of the simple, generic plant shown in Fig. 1. trapolated values are later found to be insufficiently At each time step, the following procedure would accurate. This approach is certainly sounder math- be used: ematically than the completely decoupled one, but is still less rigorous than simultaneous solution of all The subroutine modeling the behavior of unit A equations. makes a call to the numerical integrator, provid- The second general strategy for employing a nu- ing derivative estimates [finequation (2)] to the merical integrator in a modular, dynamic simulation integrator. The numerical integrator then calcu- framework involves using the same time step to lates estimates of the ODE-dependent variables 166 J. C. FAGLEY and B. CARNAHAN

As a result, it is possible to accomplish the inte- gration using the traditional sequential approach (one unit assigned to each cluster) or using a simul- taneous approach (all units assigned to a single cluster) or a hybrid of these two approaches, which we call the “sequential-clustered” approach. In the sequential-clustered approach, the equation sub- systems in each cluster (containing one or more Fig. I. Schematic of a plant with three units and nine equipment units) are treated simultaneously, with streams. The system Jacobian matrix J is shown on the integration remaining sequential in nature from right: M is a submatrix of J; M? results from recycle cluster to cluster. stream 9. _ Several strategies for sequencing the integrator itself (for different kinds of integrator/interface calls) in equation (2) and control returns to the unit within the general structure described in the previous model subroutine for unit A. paragraph were postulated and tested as described 2. Same as Step I with the subroutine associated later. with unit B making a call to the numerical As an example of how this new modular simulator integrator. structure is used, consider simultaneous treatment of 3. Same as Step I with the subroutine associated the generic plant shown in Fig. 1. On each integration with unit C making a call to the numerical time step (here, assume that there are no algebraic integrator. equations containing variables associated with more than one unit) the following procedure would be used: Ne H modular integration approach The numerical integrator makes a derivative Instead of having the unit model subroutines evaluation request by calling the unit model drive the numerical integrator, it is possible to use subroutine interface program. the numerical integrator to drive the unit model The interface routine calls the unit model rou- subroutines. The only known application of this tine for unit A and the first n, derivatives are approach in the dynamic simulation context is evaluated. Similar calls are made to the routine described by Patterson and Rozsa (1980). In one for unit B and then for unit C, and the next nb version of their DYNSYL simulator, the integrator and last nE derivatives are evaluated. calls directly on single modules corresponding to Once all the derivative calculations have been individual process units in a modular-sequential made, control returns from the interface routine fashion, gathers system derivatives for all units and to the numerical integrator. then implements simultaneous integration for the full ODE equation set. In this way, all the derivative evaluations are The simulator structure developed in this work is available to the numerical integrator at once, and the organized such that the integrator makes indirect overall equation set may be treated simultaneously. calls on the unit model routines which are individu- A similar procedure is carried out when new esti- ally responsible for evaluating derivatives and solving mates of y are generated by the numerical integrator. any associated algebraic equations for that unit. The The routine interface program is used to transmit ODES and algebraic equations associated with an the new y-values to each individual unit model sub- individual process unit can be solved simultaneously; routine. in addition, ODES and algebraic equations associated Comparison of sequential and simultaneous integration with any “cluster” of units (where a cluster consists of as few as one unit and as many as all units in For sequential integration of the plant shown in the plant) can also be solved simultaneously by the Fig. 1, each of the three units are treated in sequence integrator. on each time step; the first n, ODES are numerically This strategy is implemented by: (1) creating an integrated for the time step, then the next nb and interface routine between the integrator and unit finally the last n,. During the corrector iterations for routines that is responsible for calling on units within each piece of equipment, three Jacobian submatrices a cluster collectively (a) first to solve all algebraic are used, denoted M, , M., and MS in Fig. 1. equations associated with the cluster, and (b) subse- For simultaneous integration of the same plant, n, quently to evaluate all derivatives associated with is equal to n, plus nb plus n,. Also, the overall n, x n, ODE dependent variables within the cluster; and Jacobian matrix shown in Fig. 1 is used. (2) modifying a standard integrator (we used a Gear The principal advantage of sequential integration integrator from Lawrence Livermore ) so is that smaller Jacobian submatrices are used. The that it can perform rigorous simultaneous integration number of individual derivative evaluations needed within each cluster, for as many as n individual to generate full submatrices by finite-differencing equation clusters, where n is the number of units (perturbation) is equal to ni + nt +nf. By com- in the plant. parison, generation of a full Jacobian matrix Sequential-clustered method for plant simulation 167 employed during simultaneous treatment requires both generating and inverting the Jacobian matrices. (n, + nb + n,)* individual derivative evaluations. Using sparse matrix techniques, the equations and In addition to the evaluation of the Jacobians, variables are re-ordered in a way that tends to inversion calculations (usually by LU decompo- minimize the number of calculations needed to sition) are also required. For a full Jacobian, the effectively invert the Jacobian matrix. number of such calculations is proportional to the Most sparse-matrix inversion techniques are cube of the matrix order. Thus, the inversion of based on the Markowitz criterion (Duff, 1981). which three small Jacobians will require far less work than selects the pivots for Gaussian elimination primarily for one large one. (This advantage for sequential on the criterion of reducing the number of fill integration is diminished somewhat for real systems, elements (nonzero elements generated where zero however, since actual plant Jacobians tend to be elements occur in the starting matrix). sparse, and sparse matrix methods can be used to Sparse matrix generation techniques (for finite- reduce the number of operations from the theoretical difference determination of system Jacobian matrix maximum.) elements) are also very useful and involve a two-step The advantage of simultaneous integration is process: (1) the full matrix is initially generated, that by treating the equation set as a whole, no column by column, and relationships between vari- inaccuracies are introduced by recycle streams. For ables and functions (which variables affect which example, for sequential integration of the example functions) are noted; this information is used to plant, when the first n, ODES are integrated on each determine groupings of variables that do not affect time step, old values for streams S, must be used the same functions so that several variables may because final corrected values will not be available be perturbed together; and (2) on subsequent until unit C is integrated on the time step. By evaluations of the matrix, the variable-groupings comparison, for simultaneous integration, recycle are employed. streams pose no special problem because all As a simple example of this technique, note that for equations are predicted and corrected as a group. a (tridiagonal system of equations, where variable i In summary, the sequential approach is a shortcut affects only functions (derivatives) i - 1, i and i + 1, technique which requires fewer calculations per time full Jacobian matrix generation by finite-differencing step, but may require small time steps (for a reinte- (perturbation) requires evaluation of each of the n gration over the time step to generate “matching” functions n times, for a total of n* t 1 evaluations. recycle stream parameters) for accurate treatment of If a sparse generation technique is used, only four recycle. The simultaneous approach is a more rigor- evaluations of the n functions would be needed. The ous technique, requiring more calculations per time three groupings would be: variables (1,4, 7, _ _ .), step, but remaining accurate for larger time steps, (2, 5, 8, . . .) and (3, 6,9,. . _). even when extensive recycle is present. Note that Another important consideration is the possibility recycle may be either recycle of material or feed- of using shortcut techniques to reduce the amount of back of information (e.g. a controller signal). Direct execution time spent estimating physical properties. comparison of simultaneous, sequential-clustered For plant of this type, we have found that and sequential integration in terms of execution these estimation calculations may consume 8&90% times, storage requirements and accuracy on two test of the total execution time. Obviously, there is great plants is described later on. incentive to try to reduce this percentage. Use of shortcut techniques may be regarded as a direct method of reducing physical property costs. OTHER CONSIDERATIONS Indirect techniques, such as employing efficient In designing a modular dynamic plant simu- numerical algorithms that complete the integration lator, two other considerations should be taken into with as few time steps (and therefore as few physical account. First, if simultaneous or sequential-clustered property evaluations) as possible may prove to be just integration is used, the resulting Jacobian (sub)- as effective. With the indirect approaches, the fraction matrices that arise can become quite large and there- of the total execution time spent estimating physical fore computationally expensive to invert. However, properties is not altered appreciably, but the total as plants are simulated that give rise to larger execution time is reduced. equation systems, the resulting Jacobian matrices tend to be more and more sparse. This is because SOLUTION STRATEGIES FOR ODES each ODE-dependent variable typically only appears in a few of the many ODES in the overall ODE We selected Gear’s BDF (backward difference system. formula) methods as the most suitable integrators As larger and larger plants are simulated, it for the various stiff systems encountered in many becomes more important to use sparse matrix tech- chemical processes. Having chosen the integrator, niques for solving the corrector equations at each we next attempted to find a suitable algorithm time step. These sparse inversion techniques can take for incorporating these linear, multistep predictor- advantage of the high fraction of zero elements in corrector algorithms into a simulator structure that 168 J. C. FAGLEY and B. CARNAHAN

Table 1. Results for four-tank problem of Fig. 2. for integration to time 200 h. e =normalized r.m.s. truncation error tolerance, sim = simultaneous. seq = sequential, n, - number of time steps, DE = number of derivativeevaluations, % increase= % increase in derivative evaluations beyond requirement for simultaneous integration e Method % DE Increase(%) Fig. 2. Four well-mixed tanks in series with recycle. 0.001 sim 151 6754 0.00 1 seq- I 977 35,988 432.8 0.00 1 seq-2 359 11,263 66.8 0.001 seq-3 231 7532 11.5 would allow for sequential, sequential-clustered or 0.001 scq-4 207 869 1 28.7 simultaneous integration strategies. 0.001 seq-5 172 7185 6.4 The objective of our preliminary testing was to 0.01 sim 98 4884 determine a single robust and accurate sequential 0.01 seq.4 128 5305 8.6 integration strategy for Gear’s methods (since se- 0.0 I seq-s 112 5085 4.1 quential integration will place the greatest strain on 0.1 sim 63 3861 method accuracy for systems containing recycle) and 0.1 seq.4 87 3873 0.3 then to incorporate this strategy into a prototype 0.1 seq-5 66 3873 0.3 chemica1 plant simulator. From the accuracy stand- point (particularly for processes containing material recycle or information feedback), it is clearly prefer- 5. Same as Scheme 3 except that a final corrector able to implement the predictor equations for all iteration is forced for all equations in each clusters before implementing the corrector equations cluster after the corrector cycle for each time for any clusters, and this strategy was used in all our step is completed. tests. These five strategies are referred to as “seq-1” to For preliminary screening of algorithms, the sim- “seq-5” in Table 1. Simultaneous (single-cluster) inte- plified plant shown in Fig. 2 was chosen; it consists gration of this plant was also carried out. The results of four well-mixed tanks in series with an internal of these various tests are summarized in Table 1 for recycle stream. The tank sizes were chosen such various values of e, the user-specified r.m.s. trun- that the governing ODE set had a stiffness ratio of cation error tolerance used by the Gear integrator. 5 x 106. From Table 1, we see that in each case the simul- The simplified plant was broken into two inte- taneous scheme requires the fewest number of time gration blocks or “clusters”: the first two tanks were steps to complete the integration. This is expected assigned to the first cluster, and the remaining two since it is the most rigorous approach. Also, note that tanks to the second cluster. Also, the composition sequential Scheme 5 fares the best of the sequential of the feed stream to the plant was perturbed at a schemes tested. This scheme was subsequently specified time with a step change (discrete jump), to adopted as the single sequential algorithm used in the determine the suitability of the Gear integrator for prototype MUNCHEPS (Modular Unsteady-State handling discontinuities. Chemical Engineering Process Simulator) described In all, five sequential integration schemes were in the rest of the paper. tested. In each case, the integration of equations in To review the principal features of the simulator cluster 1 preceded those in cluster 2 for a given time integrator: step; the predicted values of the recycle stream (stream 6) from the second cluster back to the first I. Predictors are used for all equipment units or were used in the first block’s corrector equations clusters of equipment units prior to initiating (implementing the predictor and corrector equations corrector iterations. over both clusters as described above). 2. Corrected values are used as soon as they are Other features of five sequential schemes are: available. 3. One extra corrector iteration is forced at the end 1. Predicted values of stream 3 are used in the of each time step. second cluster’s corrector equations. 2. Predicted values of stream 3 from the first While this third feature results in more derivative cluster are used in the second cluster’s corrector evaluations per time step (an extra number equal to equations on the first corrector iteration and the total number of ODES in the process), the corrected values are used thereafter. integration is completed in fewer (larger) time steps, 3. Corrected values of stream 3 from the first with net computational savings. Forcing this extra cluster are used in the corrector equations for corrector iteration and performing all predictor steps the second cluster. prior to beginning the iterative corrector steps helps 4. Same as Scheme 2 except that a final corrector very significantly to overcome the major weakness of iteration is forced for all equations in each sequential integration, inaccurate treatment of infor- cluster after the corrector cycle for each time mation and material recycle streams for large time step is completed. steps. Sequential-clustered method for plant simulation 169

Other conclusions drawn from this initial testing Table 2. Correspondence between original PDE quantities and method-of-lines ODE quantities with n method-of-lines segments are: Original PDE auantitv Method-of-lines ODE auantitv 1. The Gear integrator has little trouble in Axial distance I, dealing with step change forcing functions. The O

Fig. 3. Routine calling procedure for storing y values after a corrector iteration or for storing perturbed y values during 1. The Jacobian matrix J is updated only when the Jacobian element calculation. corrector equations fail to converge. 172 J. C. FAGLEY and B. CARNAHAN

2. Whenever hc,, changes by more than 2%, routine. For example, determination of component the nonzero elements of the matrix hc,J are balances on an individual tray in a distillation column resealed, and a new sparse matrix LU decompo- involve both liquid flows down from the tray above sition is performed using the currently saved and vapor flows upward from the tray below. calculation strategy. It was found that by using a two-round calling procedure, these types of problems could be over- Plex data structures were also incorporated into the come. For instance, suppose a new value of the Gear integrator to facilitate storage of numerical ODE-dependent variables are determined at a given integrator quantities for clustered sets of ODES. One time level. A first series of calls is then made to all tray feature of the original Gear integrator is that only one routines, and all vapor flows and liquid flows are type of call is made to the derivative evaluation determined. Subsequently, a second round of calls routine, independent of whether this call is made is made during which derivatives are determined. during a predictor step, a corrector step, a call to Since all liquid and vapor flows have been deter- evaluate derivatives for finite-difference Jacobian mined during the first round of calls, the derivatives matrix determination, a call after an unsuccessful may now be determined accurately. Details of this attempted step, etc. In the type of dynamic simulation two-round calling procedure are given in Fagley described here, it is important to distinguish among (1984). these and other types of calls because coupled alge- Another example involves control of liquid level braic equations are involved, some of which involve in a mixing tank. Calculation for material balance running sums. ODES for the tank requires that the outlet flow For example, the integral portion of the action rate be known, which in turn requires a known taken by a PID controller involves numerical esti- controller setting, which in turn relies on liquid level mation of the time integral in the offset of a sensed in the tank. On the first round of calls to the mixing process variable. Tn order to be able to estimate this tank

Condensate

Fig. 4. Layout of a seven-tray distillation column. Four PID controllers, denoted 1 to 4, are employed. Hashed lines denote information (controller signal) streams. accumulator. Details of the modeling equations (with taneous integration with a user-specified, normalized, a total of 38 ODES) used to describe the dynamic r.m.s. truncation error tolerance of 0.0005 was behavior of each piece of equipment, and further assumed to be the “exact” solution. “Error” refers discussion of the control strategy and system to the time-averaged absolute value of the normal- response, are given in Fagley (1984). ized error in the parameter values for the two Results are also shown for a second plant, consist- outlet streams (distillate and bottoms product): total ing of the seven-tray column shown in Fig. 4 with a double-pipe heat exchanger added to exchange heat between the cold feed entering the fraction- ation system and the hot liquid leaving the column bottoms. For this application, 10 method-of-lines sections were selected for the heat exchanger, so that the overall system size was 68 ODES, with 38 ODES for the column and 30 for the heat exchanger. As before, the results shown are for the plant simulated up to a simulation time of 25 min, with a feed rate perturbation introduced at a time of 3 min.

TEST RESULTS

The seven-tray plant of Fig. 4 was simulated using three different equipment grouping strategies: simultaneous (one integration block with 38 ODES); sequential-clustered (the reboiler and bottom three trays in one integration block and the condenser and top four keys in a second); and total sequential with nine integration blocks (one for each tray, one for the condenser and one for the reboiler). Fig. 5. MUNCHEPS topology of plant shown in Fig. 4. Table 4 gives a summary results for these tests. Each box represents a unit model routine. Streams denoted Execution times are for the Amdahl 5860 computer P are information streams containing , and are with a single scalar processor. Results for a simul- used to determine flowrates through . 174 J. C. FAGLEY and B. CARNAHAN

Table 4. Results for seven-tray plant of Fig. 4. sim, seq-clu, and seq Table 5. Integration statistics for seven-tray column of Fig. 4 with refer to simultaneous, sequential-clustered and sequential integra- e = 0.01. R = number of time steps, DE = number of derivative tion. respectively evaluations, JE = number of Jacobian matrix evaluations for each cluster in order Error CPU time storage e Method (%j (s) (kbvtel Method sim seq-clu seq 0.001 sim 0.030 14.6 286 seq-clu 0.10 12.3 228 “r 32 34 114 w 0.063 23.0 205 DE 3344 4417 13,532 0.0 I sim 0.42 4.85 286 JE 1 1.2 2, 18, 17, 16, 16, seq-clu 0.36 4.80 228 IS, 14, 14, 14 =q 0.79 16.1 205 % DE for JE 43 27 19 0.1 sim 0.78 3.67 286 CPU time (s) 4.85 4.80 16.1 srq-clu 1.8 3.45 228 sea 2.7 11.9 205 illustrates the tradeoff between cost (CPU time) and accuracy for the results shown in Table 4. molar flow rate, temperature, enthalpy and mole Table 5 shows final numerical integrator statistics fractions. for the three integration strategies with an error From Table 4, we see that: tolerance e of 0.01. Notice that simultaneous integration, being the 1. Simultaneous integration tends to be a little most rigorous technique, requires the fewest number more accurate than the other two techniques for of time steps to complete the simulation, though the a given value of error tolerance e. sequential-clustered method requires only a few 2. Simultaneous and sequential-clustered inte- more. The cost of evaluating the Jacobian (sub)- gration are roughly equivalent to each other and matrices is also clearly indicated in this table. Even superior to sequential integration in terms of though simultaneous integration requires only one execution time. Jacobian matrix evaluation, the evaluation of the 3. The simultaneous integration scheme requires elements in the relatively large 38 x 38 matrix the most storage. requires 43% of the total individual derivative The latter observation is to be expected, since storage evaluations. for a 38 x 38 Jacobian matrix (and other associ- By comparison, the sequential scheme requires its ated integrator arrays) must be assigned by the pre- nine Jacobian submatrices to be evaluated an average processor; much smaller Jacobian submatrices are of 16 times. However, these submatrices are rela- used in the other two cases. The fact that the simul- tively small (4 x 4 and 5 x 5) and evaluation of the taneous scheme requires only 40% more storage Jacobian elements by perturbation requires only than the sequential scheme indicates that a large 19% of the total individual derivative evaluations. portion of storage is being used to store the simu- Note that for this plant, the sum of the squares of lator object code. For larger plants, however, the the number of ODES in each piece of equipment difference in storage requirements between simul- (the total number of elements in all nine Jacobians) taneous and sequential integration will be much more is one-ninth the square of the sum (the number pronounced. of elements in the Jacobian for simultaneous In view of the results shown in Table 4 for this integration). plant, either simultaneous or sequential-clustered The second plant tested was the distillation system integration would be preferred, giving better accuracy of Fig. 4 with heat integration between the hot at less cost than for sequential integration. Figure 6 bottoms stream and the cold incoming feed. Three equipment-grouping strategies were used:

Simultaneous-one integration block with 68

0 Sequential - cludered ODES. * Simultaneou5 Sequential-10 integration blocks: one for the 0 sequsntiot 20 Li feed heat exchanger (30 ODES), one for the reboiler and one for the overhead condenser f \ J (5 ODES each) and one for each of the seven trays (four ODES each). 3 10 Sequential-clustered-three equipment clusters, 2 one for the feed-bottoms heat exchanger (30 0 ODES), one for the reboiler and bottom three

i. trays (17 ODES) and one for the overhead 01 1 I I condenser and top four trays (21 ODES). 1 2 3 Accuracy ( % error) The plant was tested with a normalized single-step truncation error tolerance of 0.01 specified for the Fig. 6. CPU time vs accuracy (Percentage error) for sequen- tial, sequential-clustered and simultaneous integration for numerical integrator. The results are summarized in the plant of Fig. 4. Table 6. Sequential-clustered method for plant simulation 17.5

Table 6. Integration statistics for seven tray column of Fig. 4 Table 8. Time statistics for sparse and full LU decompositmn and with feed heat exchanger. e = 0.01, n = number of time steps, equation solution for simultaneous (38 x 38 system) and sequential DE = number of derivative evaluations, JE = number of Jacobian (two 5 x 5 and seven 4 x 4 subsystems) integration of the seven-tray matrix evaluations for each cluster in order plant up to a simulation time of 3 min. Results are for simulation of seven-tray column with error tolerance e = 0.01 Method sim seq-clu seq Simultaneous intenration CPU time cs) Savines (%) n, 38 36 89 Full decomposition 0.500 DE 13.464 8687 18,184 Sparse decomposition 0.156 68.8 JE 2 1, I.1 3, 3, , 3, 3 Full solution 0.206 % DE for JE 68.7 20 21.5 Sparse solution 0.140 32.0 Storage (kbyte) 362 290 236 CPU tnne (s) 10.2 7.34 20.2 Total full 0.706 Total sparse 0.296 58.5

Sequential integration Note that the sequential-clustered scheme is par- Fult decomposition 0.041 I Sparse decomposition 0.0320 22.1 ticularly efficient for this problem, requiring 38% Full solution 0.189 less CPU time than the simultaneous run, and 64% Sparse solution 0.121 36.0 less CPU time than the sequential run. As before, Total full 0.230 the sequential-clustered approach makes good use Total sparse 0.153 33.5 of both execution time and storage. However, the benefits of sequential-clustered relative to simul- taneous integration are somewhat exaggerated here There are two approaches one might take to im- because, on average, we would expect the more prove overall execution times. One is to reduce the rigorous simultaneous approach to require fewer amount of calculation needed for each physical prop- Jacobian matrix evaluations. erty evaluation. This would require modification or Table 6 shows once again that the cost of evaluat- replacement of the property routines or some short- ing the large (68 x 68) Jacobian matrix is quite cut approach such as interpolation or extrapolation expensive in the simultaneous case, requiring over of infrequently computed property values, and would two-thirds of the individual derivative evaluations. reduce the percentage of execution time spent in the The large size of this Jacobian matrix is reflected in physical properties routines. the total storage requirements. The simultaneous Another way of decreasing overall execution time scheme requires an additional 53% memory and the is to use more efficient numerical integration tech- sequential-clustered approach an additional 23%, as niques so that a given simulation is accomplished in compared to the sequential case. fewer steps and, consequently, with the need for fewer The sequential scheme is particularly inefficient in physical property evaluations. This second method terms of execution time. This is due to the high degree would not necessarily show a change in execution- of recycle internal to the column. However, from time breakdown percentages. these results we may also conclude that the degree of Table 8 shows the relative advantage of using coupling is not great enough to demand simultaneous sparse matrix decomposition techniques. Note that treatment of the entire column and heat exchanger for the small Jacobian submatrices used in sequential (the results for all cases differ by less than 1%). integration, the savings in matrix decomposition and Table 7 shows the CPU time breakdown for simul- solution times are relatively small. By contrast, for taneous and sequential integration of the distillation the larger and more sparse Jacobian matrix used in test plant shown in Table 5. Note that in both cases, simultaneous integration, more pronounced savings most execution time is spent in computing physical in execution times are realized with the sparse tech- properties. We used a proprietary property package nique. As shown here, using a sparse technique for supplied by Professor Motard of Washington Univer- this 38 x 38 matrix results in a 58.5% saving in sity of St Louis for test purposes; although a new execution time. For larger systems, greater savings property system interface program was written for would be realized. the MUNCHEPS simulator, the property routines Table 9 summarizes one final set of numerical themselves were not modified. experiments performed on the seven-tray distillation plant. The strategy used in the original GEAR soft- ware involves updating the Jacobian matrix whenever Table 7. Breakdown (in percent) of CPU time for the simultaneous and sequential integration cases shown in Table 5 the corrector equations fail to converge or whenever the quantity hc, [see equation (9)] changes by more SlIllUltdlleOUS Sequential (%) (%) than 30%. Results using this strategy are reported as Physical properties 79.4 82.9 “Orig” in the table. Unit model routine calculations 5.7 4.7 After experimentation with other Jacobian matrix Plex structure storage/retrieval 4.2 4.3 recalculation strategies, we adopted a somewhat Sparse LU strategy/decomposition 3.9 0.8 Sparse LU solution 3.5 3.0 different approach and modified the integration Gear integrator 1.6 2.2 software accordingly. The Jacobian matrix is up- Supervisory routines 1.7 2.1 dated only when the corrector equations fail to Total 100.0 100.0 converge. Whenever the quantity hc, changes by 176 J.C. FACLEY and B. CARNAHAN

Table 9. Execution time statistics and storage requirements for three Testing of the simulator has also demonstrated the different Jacobian matrix updating strategies. Orig cases use the original Gear (Livermore) software heuristic (see text), New cases use benefits of sparse matrix solution techniques and the the modified updating criterion (seetext), Diag cases use the original benefits of a new Jacobian matrix updating strategy. heuristic wrth a diagonal Jacobian matrix approximation only. A sparse matrix grouped-variable Jacobian gener- Results are for simulation of sewn-tray column with error tolerance e =O.Ol ation technique would be beneficial especially for the

CPU time Increase storage sequential-clustered and simultaneous integration Method RUtI (s) (%) Wyte) approaches, but this feature is not currently incor-

Simultaneous New 4.85 286 porated into the prototype simulator. Orig Il.4 135 286 Additional testing of the simulator demonstrated Diag 132 2620 274 the use of the method of lines for treatment of Sequential New 16.1 205 distributed parameter models in the dynamic, modu- Orig 33.0 105 205 Diag 76.0 372 204 lar simulation framework. The resulting ODE sets were easily handled by the stiff integrator. In addition, experience in constructing and testing the more than 2%, the nonzero elements of the matrix simulator has shown that a preprocessor and plex hc,J are resealed (note that the Jacobian elements data structures are well suited to this type of simu- themselves need not be recalculated) and the resealed lation, allowing for enhanced flexibility and making matrix is decomposed. The results of these tests good use of available storage. (shown as “New” in the table) illustrate that the new

strategy is clearly superior, especially for simul- REFERENCES taneous integration (the “Orig” and “New” run Barney J. R., Dynamic simulation of large stiff systems. results are of comparable accuracy). Effectively the Ph.D. Thesis, McMastcr University, Hamilton, Ontario new strategy allows a calculated Jacobian matrix to (1975). be used over more steps (because of the resealing) Biegler L. T., Simultaneous modular simulation and opti- without sacrificing accuracy, and reduces the number mization. Proc. Second Int. Conf. on Foundations of Computer-Aided (A. W. Westerberg and of Jacobian evaluations required for the complete H. H. Chien, Eds), p. 369. CACHE, Austin (1983). integration. Biegler L. T., On the simultaneous solution and optimiz- Table 9 also includes results for cases where a ation of large scale enaineerina systems. Comput. them. diagonal approximation to the Jacobian matrix is Engng 12, 3cj7 (1988). - - - used (labelled “Diag”). While this strategy results in Biegler L. T. and J. E. Cuthrell, Improved infeasible path opimizalion for sequential modular simulators-I. The some storage savings, there is a heavy penalty in interface; II: The optimization algorithm. Compur. them. terms of increased execution time. It should be Engng 9, 245 (1985). mentioned here that all other results presented in this Biegler L. T. and R. R. Hughes, Process optimization: a paper have been obtained using the new Jacobian comparative case study. Compur. them. Engng 7, 645 (1983). matrix updating strategy. Byrne G. D. and A. C. Hindmarsh, Numerical Solution of S&IT Ordinary Difleren&iaI Equation Sets. AIChE Today Series, New York (1977). CONCLUSIONS Byrne G. D. and A. C. Hindmarsh, Stiff ODE solvers: a Design, construction and testing of a prototype review of current and coming attractions. J. Comput. Phys 70, I (1987). modular, dynamic, chemical plant simulator capable Carver M. B., FORSIM-VI: a program package for the of simulating plants that give rise to large, stiff automatic solution of arbitrarily-defined differential equation sets has revealed several features important eauations. Comput. Phys. Commun. 17, 239 (1979). to this type of simulation. First, total sequential, De&out J. J. and M. J: Abbott, A computation of one- dimensional combustion of methane. AIAA JI 3, 381 sequential-clustered and simultaneous integration in (1965). a single modular simulation framework has been Distefano G. P., Stability of numerical integration tech- demonstrated. Simultaneous treatment of two or niques. AIChE JI 14, 946 (1968). more individual unit model routines is made possible Dudczak J., Optimal structuring of modular computations through use of a novel simulator structure in which of chemical engineering systems. Comput. rhem. Engng 10, 7 (1986). the numerical integrator “drives” the unit model Duff I. S., Sparse Matrices and Their Uses. Academic Press, routines indirectly through an interface; the integra- New York (1981). tor incorporates features to allow for solution of Enright W. H. and T. E. Hull, Comparing numerical many potentially large ODE systems. methods for the solution of stiff systems arising in chem- istry. Numerical Method for Differential Systems (L. Subsequent testing of the simulator showed that a Lapidus and W. E. Schiesser, Ed?.). Academic Press, New well-chosen sequential-clustered scheme is often the York (1976). optimal choice, giving good execution time response Evans L. B., B. Joseph and W. D. Seider, System structures with moderate storage requirements and acceptable for . AIChE JI 23, 658 (1977). accuracy. The sequential-clustered approach allows Fagley J. C.. Flexibility and efficiency in modular dynamic chemical plant simulation. Ph.D. Thesis, University of for simultaneous treatment of units that display a Michigan (1984). strong interdependence, while integration remains Franks R. G. E.. Modeling and Simulation in Chemical sequential from cluster to cluster. Engineering. Wiley, New York (1972). Sequential-clustered method for plant simulation 177

Gear C. W., The automatic integration of stiff ordinary Liu Y. C. and C. B. Brosilow, Simulation of large differential equations. Infirm. Process. 68, 187 (1968). scale dynamic systems. Comput. them. Engng 11, 241 Gear C. W., Numerical Initial Value Problems in Ordinary (1987). Differential Equations. Prentice-Ha& New York (1971). Kuru S. and A. W. Westerberg, A Newton-based strategy Guertin E. W., J. P. Sorenson and W. E. Stewart, Exponen- for exploiting latency in dynamic simulation. Comput. tial collocation of stiff reactor models. Compuf. them. them. Engng 9, I75 (1985). Engng I, 197 (1977). Lopez L., DYSCO: an interactive executive program for Ham P. G., REMUS: the transient analysis of integrated dynamic simulation and control of chemical processes. chemical processes. Ph.D. Thesis, University of Pennsyl- Ph.D. Thesis, University of Michigan (1974). vania (1971). Mah, R. S. H., S. Michaelson and R. W. H. Sargent, Haydweiller J. C., R. F. Sincovec and L. Fan, Dynamic Dynamic behavior of multi-component multi-stage sys- simulation of chemical processes described by distributed tems. Numerical methods for solution. Gem. Engng Sci. and lumped parameter models. Comput. them. Engng 1, 1, 3 (1962). 125 (I977). Morton W. and G. J. Smith, Time delays in dynamic Hillestad H. and T. Hertzberg, Dynamic simulation of simulation. Comput. them. Engng 13, 631 (1989). chemical engineering systems by the sequential modular Motard R. L., M. Shacham and E. M. Rosen, Steady-state approach. Comput. &em. Engng 10, 377 (1986). chemical process simulation. AIChE Jt 21, 417 (1975). Hindmarsh A. C., Construction of math software, Part III. Palusinski 0. A., Simulation of dynamic systems using The control of error in the Gear package. Report UCID multirate integration techniques. Tracts. Sot. Comput. 30050 Part 3, Lawrence Livermore (1974a). Sim. 2, II (1985). Hindmarsh A. C., Gear ODE system solver. Report Patterson G. K. and R. B. Rozsa, DYNSYL: a general- UCID 3000, I. Rev. 3, Lawrence Livermore Laboratories purpose dynamic simulator for chemical processes. (1974b). Comput. them. Engng 4, 1 (1980). Hindmarsh A. C., Linear multistep methods for ODES.. Perkins J. D., Equation-oriented flowsheeting. Proc. Second Method formulations, stability, and the methods of Irtt. Conf- on Foundations oJ Computer-Aided Process Nordsieck and Gear. Report UCRL-5 I 186, Lawrence Design (A. W. Westerberg and H. H. Chien, Eds), p. 309. Livermore Laboratories (1977). CACHE. Austin (I 983). Hindmarsh A. C., Stiff system problems. Report UCRL- Ponton J. W., Dynamic process simulation using flowsheet 87406, Lawrence Livermore Laboratories (1979). structure. Compur. them. Engng 7, 13 (1983). Hlavacek V., Analysis of a complex plant-steady state and Ponton J. W. and V. Vasek, A two-level approach to transient behavior. Comput. &em. Engng 1, I (1977). chemical plant and process simulation. Comput. them. Hutchison H. P.. D. J. Jackson and W. Morton, The Engng 10, 277 (1986). development of an equation-oriented flowsheet simulator Shacham M. et al., Equation oriented approach to process and optimization package, I and II. Comput. Chem. llowsheeting. Comput. them. Engng 6. 79 (1982). Engng 10, I (1986). Shinskey F. G., Distillation Control. McGraw-Hill, New Ingels D. M. and R. L. Motard, PRODYC-a simulation York (1977). for process dynamics and control. Report Re. 4-70, Stadtherr M. A. and J. A. Vegeais, Recent progress in University of Houston (1970). equation-based process flowsheeting. Proc. I985 Summer Johnson A. I. and J. R. Barney, Numerical solution of Computer Simukztion Conf. Society for Computer Simu- large systems of stiff ordinary differential equations in a lation (1986). modular simulation framework. Numerical Merhods .for Weimer A. W. and D. E. Clough, A critical evaluation of D@rential Systems (L. Lapidus and W. E. Schiesser, the SIRK methods for stiff systems. AIChE JI 25, 730 Eds). Academic Press, New York (1976). (1979).