You are on page 1of 16

7

Chemical Process Simulation



7.1 INTRODUCTION

In the ?reced,ing chapters, solution of mathematical models of specific unit op~ra.tlOns was described. A process plant consists of several processing units mterconnected by process streams. Design of a process plant includes no~ only solving the material and energy balance equations for all process um~s, .but.also eq~ipment sizing subject to design constraints, costing and opumization. A single computer package that can perform all the above tasks for a ~iven process is known as a computer aided process design packag~ or simply a process flowsheeting package. Individual process unit calculations are treated as building blocks or as equation sets that make up the overall process flowsheet.

We have seen how individual building blocks could be simulated on the computer. When all the blocks are interconnected the solution becomes more complex. Most process plants contain recycle streams and control loops, and solution of stream properties warrants iterative calculations. Efficient numerical methods are required for convergence. In addition, for the cal.culation of process unit performance, appropriate physical properties and thermodynamic data are required. Finally, there should be a master program that links all the building blocks, physical property data, thermodynamic calculations package and numerical routines and that supervises information flow. Optimization and economic analysis complete the picture. Although process flowsheeting programs were developed as a design tool, many of the programs operate in the simulation or performance calculations mode. In these programs, design calculations have to be ~erformed by what is known as iterated simulation, or running the simulation program for different values of system parameters until design conditions are met.

Computer simulation of steady state chemical processes is over two 500



CHEMICAL PROCESS SIMULATION

iOl

decades old. A review of the historical development can be found in Kehat and Shacham.' The literature on this subject has grown so rapidly in the last decade that a complete discussion is beyond the scope of this book. Several good reviews have appeared from time to time. I - 6 The principles of process flowsheeting are described by Westerberg et al.' In this chapter, a brief outline of the principles behind steady state process simulation is provided. The scope covers the basic concepts used in flowsheeting, decomposition of large systems, package programs available to the process engineer and some future trends.

7.2 PROCESS SIMULATION TECHNIQUES

Since the flow diagram of a process consists of a number of process units with interconnections, the mathematical representation of the system includes the following.

(a) Interconnection equations; these are the basic material and energy balance equations.

(b) Model equations; the model can be that of a mixer, reactor, heat exchanger, distillation column, etc. These have been dealt with in Chapters 3-6.

Three main techniques are available for simulating a process." These are the sequential modular approach, the simultaneous modular approach and the equation oriented approach.

7.2.1 Sequential Modular Approach

This method is the most commonly used technique in process simulation and is similar in principle to the traditional method of hand calculation of unit operations. The computer program that calculates the performance of a particular process is called a unit module. For each process unit in the flow diagram, there is a unit module. Given the values of input stream composition and flow rates, temperature, pressure, enthalpy and the equipment parameters, the unit module will calculate the properties of its outlet streams. The output stream for a unit will become the input stream for a downstream unit and the calculation proceeds as before until the process is completed.

A library of unit modules forms an important part of the simulation software. To solve the model equations and interconnection equations, numerical methods should be used. A library of numerical routines should

502

CHEMICAL PROCESS COMPUTATIONS

be provided. These would normally consist of solution procedures for a system of linear, non-linear and differential equations. To perform unit computations and solve the continuity equations for mass and energy, physical and thermodynamic property data is available through data banks and estimation routines. Many thermodynamic routines are given in Chapter 2.

The heart of the flowsheeting package is the executive program that controls the computation sequence. Besides the above routines, there are input and output routines and possibly programs for optimization and economic analysis. The basic components of a simulator are shown in Fig. 7.1.

The first step in any simulation is to generate a conceptual flow diagram of the process, showing the models and interconnections. In the conceptual flow diagram, two streams combining is normally represented as a mixer, and stream splitting is represented as a divider. The flow diagram of a process for isopropyl acetate is shown in Fig. 7.2. The process has four units and eight process streams. Properties of feeds SI and S2 must be

Nlrnerical.. Unit Physical.
Routines ~ule Property
Library Data Bcnk
t Thermo-
.... / dyanarric
Input r-- Package
Executive
Program
Output ---
1

SoluOOn
Optimi-
sation
Econaric
Analysis FIG. 7.1. Components of a simulation program.

l

CHEMICAL PROCESS SIMULATION

503

51
Acid
Alcohol Mixer 53 Reactor 54 5eparator
52 1
56 58
Acetate Water FIG. 7.2. Conceptual flow diagram for the isopropyl acetate process.

specified as input. All other streams are evaluated by simulation. The process has one recycle stream. The conversion level in the reactor should be specified for the design problem and the reactor size is computed. For performance calculations, the conversion is calculated from the reactor unit module.

When recycle streams are present, then iterative calculations are necessary as the calculated value for the recycle may differ from the initial estimation, for all units in the recycle loop. Iterations continue until the stream properties converge to a stable value, within a preset tolerance. Referring to Fig. 7.2, the calculations will proceed as follows.

(I) Given streams SI and S2' guess stream S7'

(2) Since all input streams are known, sequentially calculate the output streams S3' S4' S5' S6' S7' obtaining a new estimate of stream S7'

(3) If the two stream values for S7 are within a specified small tolerance, the calculations have converged. Otherwise the executive program estimates another value of stream S7 and repeats steps (2) and (3).

Various numerical techniques can be used to obtain successive estimates of stream S7' These are discussed in Section 7.4.3.

There are several advantages in the sequential modular approach. The flowsheet architecture is most easily understood as it closely follows the process flow diagram. Existing individual unit modules may be readily incorporated. Building blocks may be added to or removed from the flowsheet at ease. Besides, unit modules can be used at two different levels: a simple unit subprogram that does not entail detailed calculations, but performs simple mass and/or energy balances in the early design stage and a more sophisticated unit module either in the final design stage or in the simulation of an operating plant.

504

CHEMICAL PROCESS COMPUTATIONS

The sequential modular approach is not without its drawbacks. In a complex system consisting of a number of recycle streams, establishing the hierarchy of calculation order or precedence ordering and iterative solutions can be inefficient, unless some form of optimal sequencing is built into the executive program. Many widely used modern simulators like DESIGN 2000 (Chemshare, Texas, USA), PROCESS (Simulation Sciences, California, USA) and CONCEPT III (CAD Centre, Cambridge, UK) use the sequential modular approach incorporating optimal sequencing methods and efficient convergence promotion methods.

The major disadvantage of the sequential modular approach becomes apparent when it is used for design rather than performance calculations. In design, there are constraints imposed on the stream values and, therefore, model parameters have to be adjusted to meet the design specification. This would normally involve iterated simulations and would become computationally inefficient for large processes, with the number of iterations approaching 1000.

7.2.2 Simultaneous Modular Approach

The simultaneous modular approach is similar in principle to sequential modular. The steps involve the following.

(1) For the first iteration, make initial estimates of recycle stream values.

(2) Solve the problem using the sequential modular approach.

(3) Having obtained the first estimate of input and output values for each unit, construct a linear relationship between them, i.e. linearize the model equations.

(4) Since the interconnection equations are already linear, solve the whole system of model and interconnection equations simultaneously using matrix methods to obtain a new set of inlet stream values.

(5) If two successive iterates of assumed stream values converge within a preset tolerance, the simulation is complete. Otherwise, go back to step (2).

In the simultaneous modular approach, the calculations alternate between sequential modular and solution of linear equations and, thus, the computation time is reduced. Perhaps the greatest advantage of simultaneous modular approach is that it is easier to use for design problems. For example, the feed streams can be left unset and design

CHEMICAL PROCESS SIMULA nON

505

constraints on specific intermediate or outlet streams can be impo~ed during the generation of linearized model equations. Some packages like FLOWPACK II (ICI) use the simultaneous modular approach, even though, to the user, it would appear sequential modular." The simultaneous modular approach is described in detail by Umeda and Nishino,!" Westerberg et al.' and Biegler. II

7.2.3 Equation Oriented Approach

In process flowsheeting where design and opti~ization have t? be performed in the same program, because of linear and non-linear constraints imposed by the optimization problem, the modular approach becomes too cumbersome to use and iterated simulations may lead to prohibitively long computation times. To overcome this problem, the equation oriented or simultaneous algebraic approach was developed. The basis is that the entire process can be represented by a collection of nonlinear algebraic and differential equations, which are solved simultane~usly for all the unknowns. The equations consist of model equations, interconnection equations, design specifications and physical property and thermodynamic correlations. In the case of even a mediu~-sized ind~strial plant, the system may contain several thousand equatl?ns. By SUItable decomposition techniques, the equations can be solv.ed In ~odules. The state-of-the-art in equation oriented approach to simulation has been reviewed by Shacham el al.12 and Perkins.':' The major problem ~s the solution of very large systems of non-linear equations. Many algorithms are described by Sargent. 14

The feasibility of using equation oriented simulators for small stead~state and dynamic problems has been demonstrated successfully, but their implementation to large-scale problems is still currently under development. Some equation oriented simulators at an advanced stage of development are SPEEDUP (Imperial College, London),. AS~END (Carnegie-Mellon University, USA), FLOWSIM (University of Connecticut, USA) and QUASI LIN (CAD Centre).

7.3 PARTITIONING AND TEARING

The flowsheet of a large process consists of many process units, control variables and several recycle streams. For ease of computation, the process

506

CHEMICAL PROCESS COMPUTATIONS

flowsheet is decomposed into smaller subsystems. The system decomposition is known as partitioning and consists of two parts.

(I) Partitioning; where groups of units that must be solved together are identified in the flowsheet. There are no recycle streams between units in the groups.

(2) Precedence ordering; where the sequence of computations of the partitioned subsystems, and sequence within a given partition, are determined.

In calculating the process streams sequentially in accordance with the precedence ordering list, all the units constituting a recycle loop have to be solved first before the sequence can pass on to the next member in the list. At least one stream in the loop must be guessed before sequential calculations within the group can proceed. The method of choosing the stream as the guessed stream is called 'tearing' and the stream is called the 'tear stream'.

Some basic concepts of partitioning and tearing are described below.

7.3.1 Decomposition of Large Systems

F or partitioning a large system, the conceptual flow diagram of the process may be looked upon as a process flowsheet graph and the principles of graph theory are applied. Referring to Fig. 7.2, all units in boxes are nodes of the process graph and all the streams are the directed edges of the graph. Since the edges are directed, the graph is called a digraph or directed graph. When tracing a path from one node to another along the directed edges, if any node is encountered only once, then the path is called a simple path. If recycle streams are present, the path originating from a node will terminate at the same node. Such a path is called cyclic and all nodes in the cyclic path will constitute a cyclical net.

Partitioning consists of dividing the digraph of the process into the smallest possible blocks or subgraphs. Treating the block or subgraph as a single pseudo-node, the overall digraph, consisting of nodes, pseudo-nodes and the directed edges between them, is made acyclic. Sequential computation would now apply to the acyclic graph, noting that all the nodes and edges within a block have been solved together before proceeding to the next node or block.

The underlying structure of a digraph can be readily understood by the use of a process matrix. If a stream S j terminates on a node, an entry of + S j is made in the process matrix against that node; if the stream originates from that node, then an entry of - S j is made. As an illustration, consider

CHEMICAL PROCESS SIMULATION

507

Nitrobenzene

H drogen

Fluid Bed Reactor

Vaporiser

AnilineWater to Recovery

Recycle

Recycle H2

Purge

FIG. 7.3. Process for aniline manufacture.

the simplified flowsheet in Fig. 7.3 of a process for manufacture of aniline. IS The digraph of the process is shown in Fig. 7.4. There are 10 nodes and 18 streams in the digraph. The process matrix is shown in Table

7.1.

Path Tracing Method

Perhaps the simplest of available algorithms for partitioning and precedence ordering of a digraph is that of Sargent and Westerberg, 16 with its modification by Christiansen and Rudd. 17 This method makes use of the principles of list processing. The tracing starts from an arbitrary node and

FIG. 7.4. Process flowgraph of aniline process.

L
508 CHEMICAL PROCESS COMPUTATIONS
TABLE 7.1
PROCESS MATRIX FOR DIGRAPH SHOWN IN FIG. 7.4
Node Associated stream numbers
1 1 -3 10
2 3 -4
3 4 -5 -6
4 6 -7
5 7 -8 -9
6 2 8 -10
7 5 -11 -12
8 11 -13 -14 16
9 13 -15
10 15 -16 -17 -18 traces the path of a stream originating from that node. Each node encountered is placed in a list until a node already in the list is encountered again. Then all nodes in the list encompassed by the twice encountered node are lumped into a pseudo-node and the process matrix is updated. The lumped node is treated as a single node. In our example, the pseudo-node formed is [1-2-3-4-5-6]. This node replaces all the nodes in the loop. The individual nodes in the loop are deleted from Table 7.1 and only the streams into and out of the pseudo-node are retained. The exercise of tracing and forming pseudo-nodes is continued for all repeated nodes, until the entire digraph is made acyclic. The final precedence order list becomes [(1-2-3-4-5-6), 7, (8-9-10)]. There are two cyclical nets in the digraph.

An alternative to the path tracing method is to use the powers of the adjacency matrix method. The adjacency matrix represents the adjacency of nodes in a digraph. Details of this method, which is computationally less efficient, but easier to program, are discussed by Himmelblau and Bischoff'l" and Kehat and Shacham.1

7.3.2 Tearing

In calculating the process streams sequentially in accordance with the precedence ordering list, all the nodes in a group constituting the recycle loop have to be solved first before the sequence can pass on to the next member in the list. At least one stream in the cycle must be guessed or 'torn' and the loop made acyclic, before sequential calculations within the loop are possible. The guessed stream values are re-estimated and the calculations proceed iteratively until two successive iterates of the guessed stream converge within a preset tolerance.

CHEMICAL PROCESS SIMULATION

509

Considerable attention has been devoted to tearing of recycle loops in the literature. Various criteria have been suggested as the most suitable to minimize computational efforts. These criteria are:

(1) Minimum number of iteration streams.

(2) Minimum number of stream variables or iteration stream

parameters.

(3) Weighting of streams according to user's knowledge of streams.

(4) Minimum number of total loops torn.

Many tearing algorithms require the formation of a loop/stream matrix and hence information on all individual loops in a digraph. The loop/stream matrix is one whose rows correspond to individual loops in the digraph and columns correspond to streams in the loop. If a stream exists in a loop, then the matrix element takes on a value of I. Otherwise, a value of zero is assigned to the element. Weinblatt!" has proposed a path searching method to identify all the individual loops in a directed graph.

An efficient algorithm for criterion 1 was proposed by Barkley and Motard.i" If direct substitution is used for iterative calculations, then criterion (4) is the optimal tearing method. Details of a tearing algorithm according to criterion (4) are described by Upadhye and Grens ' ' and Westerberg et al. 7 The latter have shown that the sequence of calculations when using simple direct substitution is different from the sequence when acceleration methods are used for convergence.

In criterion (3) a weight is assigned to each stream. The weight can reflect the user's knowledge about the stream or can incorporate the degree of difficulty associated with converging that stream.

The four tearing criteria mentioned above were combined into a single expression by Pho and Lapidus. 22 If Wj is the integer weight associated with stream j and x. is a selection criterion of whether a stream is selected for tearing or not) (Xj = 1 if stream is torn, 0 otherwise), then the optimal

tearing criterion is

Min I WjXj j~1

with the constraints

j = 1,2, ... , n streams

(7.1 )

n

IajjXj~1 i=1,2, ... ,mloops

j~l

(7.2)

(7.3)

510

CHEMICAL PROCESS COMPUTATIONS

TABLE 7.2

WEIGHTS OF STREAMS FOR OPTIMAL TEARING

Criterion Weight

Tearing algorithm

(I) unity

(2) number of unknowns in the stream

(3) user defined

(4) number of loops torn by each stream

Barkley and Motard?" Pho and Lapidus+' Pho and Lapidus " Upadhye and Grens '!

where aji are the elements of the loop/stream matrix. Equations (7.1)-(7.3) form a linear integer programming problem for which analytical solutions are feasible only for small size loop/stream matrices. The weights take on the values as shown in Table 7.2.

The tearing algorithms proposed by Lee and Rudd+' and Upadhye and Grens 21.24 require the loop/stream matrix to be determined first.

An entirely different formulation of the tearing problem was proposed by Barkley and Motard 20 and Pho and Lapidus. 22 The process diagraph is now represented as a signal flow diagram where the streams become the vertices and the dependency between units becomes the edges. These methods do not require loop/stream matrix formulation and therefore computations are greatly simplified. Barkley and Motard/" describe an interval reduction procedure which implicitly imposes a weight of unity (criterion (I» on the streams. The Basic Tearing Algorithm (BTA) of Pho

FIG. 7.5. Signal flowgraph for aniline process.

1

CHEMiCAL PROCESS SIMULATION

511

and Lapidus+' is more general in that it encompasses all the four criteria in Table 7.2. The Pho-Lapidus method is described here at some length.

Signal Flow Graph

The signal flow graph is the dual of the traditional flowsheet graph. In the signal flow graph, which is also a digraph, the streams become the nodes and the edges indicate dependency. A directed edge from node (stream) ito node (strearnj j indicates that stream) is a physical output from a unit to which stream i is the physical input. The signal flow graph representation is very efficient in systems decomposition and to identify the tear streams for specified weights on the streams. Since it is intended to follow through the example of the aniline process (Fig. 7.3) and identify the tear streams, the signal flow graph for the process flow digraph in Fig. 7.4 is shown in Fig. 7.5. A stream/precursor matrix can be written down, similar to the process matrix in Table 7.1. This matrix is shown in Table 7.3.

Table 7.3 can also be represented by a stream adjacency matrix. If there is a directed edge between stream S, and stream S)n the signal flow graph, then a value of unity is placed in the appropriate element in the stream adjacency matrix. If there is no directed edge between S, and Sj' the element is left blank. The stream adjacency matrix is given in Table 7.4. The adjacency matrix can be compacted to exclude all interface streams (streams with either rows or columns with all blanks). The interface streams are 1,2,9,12, 17 and 18. The compacted adjacency matrix is shown below.

3 4 5 6 7 8 10 11 13 15 16
3
4
5
6
7
8
10
11
13
15
16 Basic Tearing Algorithm

The basic tearing algorithm (BTA) was developed by Pho and Lapidus." The algorithm scans the reduced adjacency matrix of the signal flow graph

SI2

CHEMICAL PROCESS COMPUTATIONS

TABLE 7.3
STREAM/PRECURSOR MATRIX FOR SIGNAL FLOW GRAPH (FIG. 7.5)
Stream Precursor Stream Precursor
I 10 2 8
2 II 5
3 I 10 12 5
4 3 13 II 16
5 4 14 II 16
6 4 15 13
7 6 16 15
8 7 17 15
9 7 18 15 TABLE 7.4

STREAM ADJACENCY· MATRIX FOR SIGNAL FLOW GRAPH (FIG. 7.5)

I 2 3 4 5 6 7 8 9

10 II 12 13 14 15 16 17 18

I 2 3 4 5 6 7 8 9 10 II 12 13 14 15 16 17 18 I

I I

CHEMICAL PROCESS SIMULATION

SI3

and identifies the streams that are ineligible for tearing and tags all tear streams. The steps are as follows:

(I) Input the weights of all streams and the stream adjacency matrix.

The stream/precursor matrix can be input instead of the adjacency matrix and the latter can be formed by the computer program.

(2) Compact the adjacency matrix by removing the rows and columns of interface streams.

(3) Pick a stream Sm from the adjacency matrix. If the matrix is empty, then go to step (9).

(4) Check whether the node Sm is ineligible. This is done by the following

method:

Sum the weights of all predecessors of Sm and those of all successors of Sm. The immediate successors are given by the non-zero elements in row m (set F J and the immediate predecessors are given by the non-zero elements in column m (set fp) of the adjacency matrix

(7.4)

Ws(Sn,) = L Wj

jer,

(7.S)

If w'm ~ W p(sm) or w'm ~ Ws(sm), then that node stream is ineligible. (S) If sm is not ineligible, then tag sm' cross out row m and column m in the adjacency matrix and go back to step (3). If sm is ineligible, then:

(a) Delete the row and column corresponding to s.; from the adjacency matrix (row m and column m).

(b) If Sm is dominated by its immediate successors, i.e. w'm < Ws(sm)' then for each stream Sj in F, modify the elements in column j by forming a Boolean sum with the corresponding elements in column m.

(c) If sm is dominated by its immediate predecessors, i.e. w'm < Wp(sm)' then for each stream Sj in fp, modify the elements in row j by forming a Boolean sum with the corresponding elements in row m. (d) Go to step (6).

If no ineligible streams can be found, then go to step (8).

514

CHEMICAL PROCESS COMPUTATIONS

(6) Examine the nodes for self-loop. A non-zero element in the diagonal of the adjacency matrix indicates a self-loop. If a self-loop is present, then declare the node as a torn stream and remove the corresponding row and column from the adjacency matrix.

(7) Remove all rows and columns that have all zero entries and go to step (3).

(8) The signal flow graph is not reducible by the BTA. Print out an appropriate error message, the most recent status of adjacency matrix and stop.

(9) Print out all the tagged (essential) stream nodes. These are the tear streams for the given weights.

Most moderately sized signal flow graphs can be reduced by the above algorithm. If none of the stream nodes can be identified as ineligible, then the algorithm fails. However, by the time this stage is reached, the graph is reduced to such a level that loops formed by two-way edges can appear. One of the streams of the two-way edges is selected for tearing (usually the stream with a lower weight) and after the adjacency matrix is reduced further, the BTA can be applied to the rest of the computations. Thus, the BTA and two-way edge reduction can together reduce most signal flow graphs. It should be noted that the optimal torn set obtained by PhoLapidus method is not unique. A different optimal set can be obtained by following other algorithms.

As an exercise, we can now apply the BT A to the reduced stream adjacency matrix of the signal flow graph shown in Fig. 7.5. To start with, assume that all weights are equal to unity. Stream S3 is ineligible because the sum of the weights of its predecessors or successors is equal to its own weight. Removing the row and column for S 3 and modifying column S4' we find that stream S4 is not ineligible. Tagging S4 and removing row and column S4' we are left with a number of rows and columns with only zeros. These are also deleted (S5' 56' S7' S8' SIO' S II)' The adjacency matrix reduces to a 3 x 3 matrix with streams 513, SIS and Si6"

13 15 16

13 15 16

[~ ~ !l

weights

Following our argument, we have two choices. If 513 is taken to be dominated by its immediate successors, then we are left with two-way edge (5 IS' 516) from which either can be torn, both being of the same weight.

CHEMICAL PROCESS SIMULATION

515

However, if 513 is assumed to be dominated by its predecessors, then we have 515 as non-ineligible and, thus, the final tear streams set is [54' 515l· Let us consider a situation where the weights are the number of components in the streams, based on the process in Fig. 7.3. The vector of weights is listed in Table 7.5.

Let us apply the BTA to the adjacency matrix in Table 7.4, after removing the interface streams and using the weights in Table 7.5. Since W3 < W4' its immediate successor, S3 is not ineligible and therefore it is tagged. Rowand column 53 are deleted.

TABLE 7.5

WEIGHTS FOR STREAMS IN SIGNAL FLOW GRAPH (FIG. 7.5)

Stream

Weight

Stream

Weight

3 4 5 6 7 8

2 5 4 1 1 1

10 11 13 15 16

2 3 3 3 2

The next step is to remove rows and columns with all zero entries. The final adjacency matrix reduces to

13

15 1 o o

16

weight 3

3

2

13 15 16

[~

!l

Now, w13 > W16' its immediate predecessor, and therefore 513 is ineligible. The matrix reduces to

15 16

15

[~

16

~]

weight 3

2

Removing 5 IS because of all zero column, we are left with 516 as the last tear stream. Therefore the tear set is now [53' SI6]'

It is interesting to compare the two sets of tear streams obtained with different vectors of weights. In the first case with all unit weights, we have to tear 54 and 515, which are the product streams from the reactor and the

516

CHEMICAL PROCESS COMPUTATIONS

crude still condenser, respectively. In the second case, we have to tear s 3 and s 16' which are the feed stream to the reactor and a recycle stream to the crude still, respectively. In the design problem, where the products are to meet d:sign specifications, it is better to tear product streams and impose the design constraints as initial guesses. In the simulation problem, where the performance of an operating plant is evaluated, it is preferable to tear the feed streams and calculate the product streams. If we decide beforehand, from a knowledge of the processes, that a certain stream c~nnot b~ torn, then it can be made an ineligible stream by ascribing a higher weight. Alternatively, if a stream is required to be torn because of our knowledge of the process, then it can be declared a torn stream and removed from the adjacency matrix.

. The basic tearing algorithm, together with the two-way edge reduction, is simple and easy to implement, fast to execute and does not require a knowledge of the loop/stream matrix. In addition, it has the flexibility of ascribing different weights to the streams.

7.4 THE FLOWSHEET SIMULATOR

Use of a simulation package for process design or process simulation has become a. commonplace activity with the process engineer. The programs are used In the following situations.

(I) In the initial stages of design, the program is used to calculate material and energy balances for alternative process flowsheets. At this stage, simple block diagrams of the process flowsheet are adequate.

(2) In the final stages of design, the simulator produces specifications for all process units and streams in the flowsheet. A detailed flowsheet of the process is required at this stage.

(3) The simulator applied to an operating plant helps to evaluate the performance of the plant and to compare against design specifications in order to identify areas for improvement.

(4) Changes in operating conditions can be simulated and bottlenecks in the plant can be identified for improving process efficiency.

The b~nefits of using a simulator at the design stage are capital saving thr~ugh Improved designs, engineering manpower savings via improved e.fficlency and. productivity, a significant reduction in process engineering time on routine calculations, consistency of data and techniques used

CHEMICAL PROCESS SIMULATION

517

\

throughout the design, and improved and quicker communication among process engineers at all company locations.

The number of steady-state process simulation packages have grown so rapidly in the last ten years that it is beyond the scope of this chapter to describe them in detail. Kehat and Shacham,' Flower and Whitehead," Motard et al.? Hlavacek" and Rosen" have reviewed the state-of-the-art from time to time. A number of available simulation programs have been compiled by Peterson et al.25 and Chen and Evans.l"

7.4.1 Structure of a Simulator

The basic function of all simulators is the calculation of mass and energy balances for the entire process, including recycle streams. From the early stage of having specific programs for simulating one process onone plant, the art of steady-state process flowsheeting has developed into an advanced form, where versatile programs can simulate a large number of processes and plants. Some of the details specific to a process that are not available in a general package may be supplied by the user, because of the flexible structure of many simulators.

The essential components of a flowsheeting package are shown in Fig. 7.1. The package can be a rigid structure or a flexible structure. Programs with a rigid structure are simple and straightforward. All that the user has to supply is the data and the executive handles the program in the same way, irrespective of the nature of the process simulated. Unfortunately, all unit modules have to be loaded into the computer main memory whether or not many of the routines are relevant for the process being simulated. As these programs grow to include more unit modules, physical and thermodynamic property estimations and wider output options, the complexity increases without the offsetting feature of flexibility. Fortunately, most modern simulators use a flexible or variable structure.

In a flexible structure simulator, a problem oriented language (POL) is used. The process topology can be explained by sentences. For instance, if a stream is split into two streams in the process without physical or chemical transformation, then the sentence for such an operation may read 'MODEL UNIT X BY DIVIDER'. The tag numbers of input and output streams for the unit will also be supplied to complete the topology. DIVIDER would be a unit module which performs the stream splitting function during the calculation stage. The POL normally generates a procedure oriented language (often FORTRAN) which is compiled, linked and executed. Only those modules that are actually needed are loaded. Data storage space may be allocated only as required by the size of the

518

CHEMICAL PROCESS COMPUTATIONS

problem. User supplied routines can be interfaced with the package. The variable structure simulator thus provides greater flexibility and modularity. An alternative to the POL is the user-written main program linking all unit modules through a series of CALL statements.

From Fig. 7.1, it is seen that the structure of a simulator essentially consists of five phases.

(I) Input

(2) Preprocessing (3) Calculation (4) Output

(5) Post processing

The input should consist of process topology, information on all input streams, design parameters of the units and convergence criteria. Process topology is defined through POL. Feed stream information consists offlow rate, number of components and composition, temperature and pressure. The components can be identified either through a code number or by name, in a form that the physical property data bank and thermodynamic package can recognize and supply a1l necessary information for the calculations. The design parameters of the units may be heat exchanger area, height of packing in an absorber or number of theoretical stages in a distillation column. Convergence criteria would normally be the tolerance on the convergence of recycle calculations, together with the method to be used for convergence acceleration. The maximum number of iterations permitted may also be specified.

The input data can be entered either in batch mode or interactive mode through a teletypewriter or CRT terminal, depending on whether or not the simulator offers the interactive flexibility. Most simulators execute in a batch mode, but some allow preparation of input data in a conversational mode.

The preprocessing stage consists of generating a main program from the POL in a procedure oriented language, compiling the program, loading all the required modules for the simulation, linking the main program and all subprograms. and allocating storage prior to execution. While the onus is on the user to check the input data and present them in the correct form required by the package, most simulators have extensive input data checking facilities as part of the preprocessing phase. Diagnostic error and warning messages are standard features of most simulators.

The calculation stage requires unit module algorithms or equation sets, physical property data, thermodynamic property estimation routines,

CHEMICAL PROCESS SIMULATION

519

numerical methods for convergence promotion and any user supplied algorithms (e.g. for a reactor, for which no standard module in the library is adequate).

In almost all simulators, a stream table is a common feature of the output. The table consists of stream flow rate, phase composition, temperature, pressure and enthalpy for all streams in the process. Operational data on process units like heat exchanger duty, condenser or reboiler duty for distillation, or utilities like cooling water, steam or fuel requirements can be optional output data. Almost all the early simulators accept Imperial units. Most recent simulators accept both Imperial and SI units. They can also perform some level of optimization. The post processing phase would generally constitute cost estimation and economic analysis.

A few current simulation packages widely used, either within the organization that developed it or by the public at large, are listed in Table 7.6. Most simulators are sequential modular in their approach, but a few equation oriented simulators that have appeared recently are also included. The state-of-the-art of the equation oriented approach is reviewed by Shacham et al+? and Perkins. 13

A number of packages developed mainly for teaching and research purposes like PACER, 27.28 CHESS29 and GEMCS28 are still being used at the university level. Many universities directly use industrial packages like PROCESS and FLOWTRAN 30 for teaching computer aided design. ICl's early version FLOWPACK I is being used at some universities in their undergraduate program.

The package ASPEN is available in a public version for a moderate price and many industrial organizations have purchased this version. Apart from simultaneous modularity, the power of ASPEN lies in its ability to handle solid phase processes, in addition to the heat and mass balances in gas/liquid systems offered by other packages. The solids handling unit operations include cyclones, electrostatic precipitators, venturi scrubbers, crushers, screens/classifiers, hydro cyclones, centrifuges and driers. The data bank includes properties of coal and coal-derivatives to be used for simulating coal conversion processes.

All simulators available for process flowsheeting are coded almost entirely in FORTRAN. The SPEEDUP package execution is mostly in PASCAL, with numerical routines supplied in FORTRAN. The simulator ASPEN uses a pie x data structure.v' Information is stored in blocks of contiguous locations known as beads. Beads of any desired length are created dynamically. Use of preprocessing and plex structuring has

520

CHEMICAL PROCESS COMPUTATIONS

«

C/l ::;

ci « U C/l ... ::;

I~~ ~ ~

.~ g

... .,

. 5

~

e

os

..c-l BO 1li:l.

..c .,

0"8 CQ e

=

. "'

-l .,

~.§

:s -0 0 ., ...

-OIl os e

]:;:;

:::I 'v;

a"g

os os

~ OIl

. _ e

c';::

o "'

u8

-0";

.,._

u - e e os ., ;> :s ~cr «1A

z « P:::

I~ o -l L.t..

oOe e os u.J0.

e~ ] :U 0 osU ~ ..; o - ;.."' ._ e

..c 0 UU

.. ~

~

« u

i c

.,

u c -c u

Ii:

u.J U Z o u

CHEMICAL PROCESS SIMULATION

521

..c

g

o

5.

0. os

e

.2 ~ .rs

... os .,

e

:.::l

'E c

.,

-c o e

.2 ~

:s eu.J

i c

.,

u c « u

'E c

.,

.t: o e

.2 ~

:s eu.J

e« ..9C1l u::; ::E .

I~ .~ 'til

OIl ... ., .,

e ;>

.... -

os t::

u::;

c z u.J

~

-e

-0 .,

C

.,

't: o

e

2 ~

:s sr u.J

522

CHEMICAL PROCESS COMPUTATIONS

eliminated dimensional constraints on the system. There is no limit to the maximum number of streams, components, unit modules, number of stages in a column, etc., except as limited by total computer memory. One would expect that the rich resources of the PLI I language would have been exploited in building new simulators. PLII offers a lot more flexibility than FOR TRAN, because of the former's ability to use structured variables and the preprocessor which is a part of the system software. With the help of the preprocessor, dynamic allocation of storage is greatly simplified and with the aid of pointer variables, list processing and plex structuring using PLII is far simpler than with FORTRAN.

7.4.2 Physical Properties and Thermodynamic Package

One of the primary requirements for a process simulation is the accuracy of thermodynamic and physical property data and the accuracy of estimation or correlation methods employed. An extensive survey of the methods and recommendations of correlations is provided by Reid et al.47 The numerical procedures involved in thermodynamic calculations are illustrated in Chapter 2.

Interfaced with the process simulator are two packages. One is the physical property data bank and the second is the thermodynamic package consisting of routines for estimating thermodynamic properties. The thermodynamic package can alone constitute about 80 per cent of the total computing time in some simulations. 7

Every physical property data bank must consist of the following basic

pure component properties:

molecular weight

normal boiling point and freezing point critical properties and acentric factor standard heat and free energies of formation vapour pressure correlation constants

heat of vaporization

Transport properties like viscosity, thermal conductivity and diffusivity can be either estimated using a routine or provided as correlations. Heat capacities are expressed in the form of a correlation against temperature, the constants being held in the data bank. P- V- T properties are calculated using an equation of state, most simulators offering a range of equations for the user to select from. Enthalpies and entropies are either estimated from an equation of state or the Mollier diagram is stored for each component in the form of a polynomial in temperature for the temperature

CHEMICAL PROCESS SIMULA TlON

523

range normally encountered. The latter approach saves the performing of lengthy calculations. In some cases, data on dipole moment and surface tension may be required. These are evaluated from appropriate correlations.

Several different correlations may exist for predicting a certain property and the user will have a choice of specifying a correlation to use as part of the input data. Many systems allow the user to specify one or more thermodynamic data overriding the information in the package.

The most important modules in a thermodynamic package are those predicting phase equilibria. Many commercially available packages like PROCESS have continually updated their thermodynamic data bank to afford most recent estimation methods like UNIF AC to be included. Some of the earlier packages developed by chemical corporations, mainly for inhouse use, still contain Van Laar and Margules constants for phase equilibrium calculations, mainly because these have been built over several years of experience.

The major drawback of most packages is their inability to handle vapour-solid and liquid-solid systems. The latest package ASPEN is specifically designed to include processes involving solids in addition to vapour and liquid systems.P

Many simulation packages like FLOWTRAN, PROCESS, CAPES, GMB, etc., have a small data bank containing the most commonly used compounds. The packages developed by chemical companies for in-house use normally contain an extensive data bank of all chemicals that those organizations deal with. Because of the extreme diversity of chemical systems that one might encounter, no data bank can be completely equipped with all chemicals. Many organizations have developed data base systems for physical and thermodynamic property data. These banks are commercially available to be used in conjunction with a process flowsheet simulator. A comprehensive list of these banks, both for industrial use and for teaching, are listed by Fair.48 Special data banks dealing with substances for newly emerging industries are being compiled. These include coal based syn-fuels"? and genetic engineering. 50 A data bank on environmentally important chemicals has been prepared by ECDIN. 51

A few commercially available data banks are listed in Table 7.7. The simulation package PROCESS also incorporates the bank of PPDS in its data bank.35 The chemical thermodynamic data centre at the National Bureau of Standards (NBS) in the USA has compiled an extensive data bank on inorganic and low molecular weight organic compounds, consisting of about 3700 compounds. 52 A special feature of the data bank

I

525

CHEMICAL PROCESS SIMULATION

524

CHEMICAL PROCESS COMPUTATIONS

N '"

-.: ....

<:3",

- .

"'..=;

.50-

:> ~

~:.E O~

o

~

~ c o u

.. '"

1A

~ ..c::

U

'o

d' .9 «i

....

o 0.. ....

8

z

~

f-;

~ L.Ll :I:

U

z

(5

U L.Ll

U 0::: f-;

c

C/'J

c

526

CHEMICAL PROCESS COMPUTATIONS

in CAPES is that it contains a chemical reaction system data bank, the stoichiometric coefficients of over 100 of the most important chemical reactions in the petrochemical industry.!?

7.4.3 Convergence Promotion Methods

We have seen that recycle calculations involve tearing a stream and converging the estimated and calculated values of the stream variables. The calculated values are obtained after working through the recycle loop. Ifwe set x as the estimated recycle values of all variables in the tear stream and ftx) as the calculated recycle values of all variables in the tear stream after calculating through the loop, then convergence is achieved when

f(x) = x

(7.6)

within a preset tolerance. The basic problem is then to solve the system of non-linear equations in eqn (7.6). Several solution methods have been developed, all requiring some form of iteration.

Direct Substitution Method

The direct substitution or successive substitution, as it is sometimes called, is the simplest of iterative methods. The method sets

(7.7)

where superscript r denotes rth iteration. In other words, new estimates ofx are the most recently calculated values of f(x). This method is mostly stable if the initial guess is close to the actual value, but the convergence is very slow and a large number of iterations are required.

Bounded Wegstein Method

The simple Wegstein method for a single variable is described in the Appendix. When the Wegstein procedure is used for a system of equations, it is applied to each equation in turn.

(i = 1,2, ... ,n)

(7.8)

where qj is an acceleration parameter for the ith variable

aj q.=-, aj-I

(7.9)

and

(7.10)

CHEMICAL PROCESS SIMULATION

527

For q, = 0 (i = 1,2, ... , n), eqn (7.8) reduces to direct substitution. Equation (7.8) is applied once every few steps to minimize computational efforts. Wegstein's method for a multivariable problem implicitly assumes that all the variables are uncoupled, which is often not true. Therefore, direct application of the Wegstein procedure may sometimes lead to instability. Rosen and Pauls36 suggested that the acceleration parameter must be bound between the limits

(7.11)

If qj is outside this range, then qj is set to zero, which is reverting to direct substitution for variable i. The bounding of qj improves the stability of iteration.

Dominant Eigenvalue Method

This method was first proposed by Orbach and Crowe. 58

(7.12)

where q is a scalar defined as

Ie q=-'-l Ie-

(7.13)

and z is an estimate of the dominant eigenvalue of the iteration matrix. The iteration matrix P is a matrix of linear terms, obtained from the approximation

x(r+ I) = Px(r) + c

(7.14)

Details of the derivation are given by Orbach and Crowe. 5 8 The estimate of maximal eigenvalue of P, namely A., is given by

Ilf(x(r) - f(x(r-I)II [x'? - x(r-I)II

where 11,11 is the Euclidean norm.

Almost all simulators provide the direct substitution and Wegstein or bounded Wegstein methods as part of the routines for recycle calculations. Not all simulators provide the dominant eigenvalue method. PROCESS is one simulator which offers the choice of dominant eigenvalue method. Bounded Wegstein is perhaps the most popular of the methods currently used.

(7.15)

528

CHEMICAL PROCESS COMPUTATIONS

Newton Methods

A successful variation of the generalized Newton method, namely that of Broyden.t'' has been extensively applied to solve eqn (7.6) simultaneously. Broyden's method is described in the Appendix and a computer program is listed in Program P-3.3.

Perkins"? has suggested the use of Broyden's method to solve simultaneously those equations resulting from torn . recycle streams and those resulting from design specifications, so that the sequential modular approach can be applied for the design problem.

The other quasi-Newton method is the secant method, which is quite successful in reducing the number of iterations required compared to the Wegstein method in a number of problems. The secant method for a single variable is described in the Appendix. The generalization to the multivariable case can be found in Westerberg et al.'

7.5 FUTURE TRENDS

Computer aided process design is still a rapidly growing field and there are several areas where much progress can be expected in the next decade. Steady-state simulators will continue to be improved to handle design, optimization and economic analysis. Along with larger and more robust packages for equation oriented simulators, the sequential modular systems could be modified to accommodate the design problem more effectively. Such an attempt is described by Perkins?" who used the CHESS simulator along with Broyden's algorithm to handle the design problem.

Two courses of action are currently being investigated. The first is the equation oriented approach to reduce run time dramatically and allow for efficient application of optimization techniques. A modularly organized equation oriented simulator has been proposed by Gorczynski et al.45 The library of unit modules returns equations to the executive program, which then solves the total set of equations describing the process. This method combines in itself a sequential modular concept together with the main equation oriented approach.

The second course of action is to use simplified optimization models for unit operations and thermodynamic calculations within the sequential modular framework. 61 There is enough scope for this approach, since many existing simulators can be extended to accommodate the optimization routines. A further refinement is to incorporate energy efficiency based on second law analysis.

L

CHEMICAL PROCESS SIMULATION

529

In the thermodynamic package, there is scope for expanding it to include solid-vapour and solid-liquid systems. At present, only ASPEN has the capacity to handle systems with solids. Another area where work is needed is electrolyte systems. With solid-liquid and solid-vapour handling capacity and data for electrolyte systems, the process simulator will have the capacity to simulate a variety of mineral processing operations and electrochemical processes. Currently, many of these problems are handled by user-written programs, either interfaced with a process simulator or on a stand-alone basis.

Dynamic simulation is another very important area where some work has been done and much work is under development. Dynamic simulation is required for studying process conditions during start-up and shut-down and process transients for designing a good control system. Two simulators have recently been developed for dynamic simulation. The SPEEDUP program by Perkins and Sargent41.42 uses an equation oriented approach and the DYNSYL described by Patterson and Rozsa'" uses a modular approach. The unit module provides time-derivative values of the timedependent variables whenever they are required by the integration section. An efficient general purpose unsteady state simulator as a complement to the steady state flowsheeting program is still under development.

There are two other major areas where much attention is being paid for developing the computer aided design package of the future. The first is the development of database technology. By using a data-centred approach, rather than a program-centred approach, existing program systems can be made to 'communicate' with each other and with the user. A system is being developed by fCl's design systems group.34.63 The process engineering database (PEDB) will be designed to handle entry, storage, retrieval and manipulation of numerical, text and drawing data. It can be accessed by the user or by other computer programs. The integration of chemical process design by database technology would help to perform all engineering functions with the help of a single data base, including mechanical, electrical, instrumentation, civil and structural design and plant layout. Some recent developments in data base technology have been compiled by Reklaitis and Siirola.P"

The second major avenue of future development is in the personal computer field. Development of microcomputer software to perform process simulation on desk-top computers will allow computer aided design tools to be more accessible to engineers working in small organizations. I t will also be used extensively for undergraduate education. A broad range of microcomputer software is currently available to perform

530

CHEMICAL PROCESS COMPUTATIONS

fluid flow, heat and mass transfer calculations, separation processes, reaction engineering calculations and thermodynamic estimations. The microCHESS flow sheet simulator has been developed to perform simple flowsheet calculations for systems of up to 100 streams and 20 cornponents.t" Some of the available software for microcomputing is reviewed by Bloomfieldr" The successful implementation of a flowsheeting program written in BASIC language on a desk-top computer is described by Vasek and Klemes.P" The PPDS data bank will be available on microcomputers shortly.

Finally, 3-D modelling software is on the horizon as a prospective candidate for electronic design of process plants. A few are already in the market. The advantages of 3-D computer modelling are that they generate process schematics, model equipment and plant layouts, design structural numbers, generate piping designs, extract piping isometrics, verify designs and document material requirements."? It is doubtful, however, whether 3-D modelling can ever do away with the need for physical models in plant design and layout.

The future development in computer aided process design is likely to be in two areas. The first is the further evolution of flowsheet simulators for main-frame computers. These simulators will have more robust algorithms, will handle a variety of substances (including solids and electrolytes) and will be capable of both design and simulation. The second significant area is in microcomputer software, where already many packages have appeared with varying degrees of complexity.

REFERENCES

I. Kehat, E. and Shacharn, M. Process Technol. International, 18(1973)(1/2), 35; (3), 115.

2. Evans, L. B., Steward, D. G. and Sprague, C. R. Chern. Eng. Progr., 64(4) (1968), 39.

3. Flower, J. R. and Whitehead, B. D., Chern. Engr. (Lond.), 272 (1973),208; 273

(1973), 271.

4. Hlavacek, V., Comput. Chern. Eng., 1 (1977), 75.

5. Motard, R. L., Shacham, M. and Rosen, E. M. AIChE J., 21 (1975), 417.

6. Rosen, E. M. In Computer Applications to Chemical Engineering, eds R. G.

Squires and G. V. Reklaitis, ACS Symp. Ser., 124 (1980), 3.

7. Westerberg, A. W., Hutchison, H. P., Motard, R. L. and Winter, P. Process Flowsheeting, 1979, Cambridge University Press, Cambridge.

8. Winter, P. Process Eng., 62(6) (1981),33.

9. Berger, F. and Perris, F. A. Comput, Chern. Eng., 3 (1979), 309.

CHEMICAL PROCESS SIMULATION

531

10. Umeda, T. and Nishino, M. Ind. Eng. Chern. Process Des. Dev., 11 (1972),153. II. Biegler, L. T. Paper presented at FOCAPD-83, June 1983, Snowmass.

12. Shacham, M., Macchieno, S., Stutzman, L. F. and Babcock, P. Comput .

Chern. Eng., 6 (1982), 79.

13. Perkins, J. D. Paper presented at FOCAPD-83, June 1983, Snowmass.

14. Sargent, R. W. H. In Foundations oj Computer Aided Chemical Process Design, 1981, Vol. 1, eds. R. S. H. Mah and W. D. Seider, Engineering Foundation, New York.

15. Albright, L. F., van Munster, F. H. and Forman, J. C. Chern. Eng., 74(23) (1967),253.

16. Sargent, R. W. H. and Westerberg, A. W. Trans. Inst. Chern. Engr., 42 (1964), 190.

17. Christiansen, J. H. and Rudd, D. F. AIChE J., 15 (1969), 94.

18. Himmelblau, D. M. and Bischoff, K. B. Process Analysis and Simulation, 1968,

John Wiley, New York.

19. Weinblatt, J. J -, ACM, 19 (1972), 43.

20. Barkley, R. W. and Motard, R. L. Chern. Eng. J., 3 (1972),265.

21. Upadhye, R. S. and Grens, E. A. AIChE J., 21 (1975), 136.

22. Pho, T. K. and Lapidus, L. AIChE J., 19 (1973),1170.

23. Lee, W. and Rudd, D. F. AIChE J., 12 (1966),1184.

24. Upadhye, R. S. and Grens, E. A. AIChE J., 18 (1972), 533.

25. Peterson, J. N., Chen, c-c. and Evans, L. B. Chern. Eng., 85 (1978) (13), 145; (15),69; (17),79; (19), 107.

26. Chen, C-C. and Evans, L. B. Chern. Eng., 86(11) (1979), 167.

27. Crowe, C. M., Hamielec, A. E., Hoffman, T. W., Johnson, A. I., Shannon, P.

T. and Woods, D. R. Chemical Plant Simulation, 1971, Prentice Hall, New Jersey.

28. Peters, N. and Barker, P. E. Chern. Engr. (Lond.), 283 (1974), 149.

29. Motard, R. L. and Lees, H. M. CHESS, Chemical Engineering Users Guide, 1971, University of Houston, Texas.

30. Seader, J. D., Seider, W. D. and Pauls, A. C. FLOWTRAN Simulation-An Introduction, 1974, CACHE Committee, Ulrich's Bookstore, Ann Arbor, Michigan.

31. Gallier, P. W., Evans, L. B., Britt, H. I., Boston, J. F. and Gupta, P. K. In Computer Applications to Chemical Engineering, eds R. G. Squires and G. V. Reklaitis, ACS Symp. Ser., 124 (1980),293.

32. Russell, R. A. Comput. Chern. Eng., 4 (1980), 167.

33. Evans, L. B., Boston, J. F., Britt, H. I., Gallier, P. W., Gupta, P. K., Joseph, B., Mahalec, V., Ng, E., Seider, W. D. and Yagi, H. Comput. Chern. Eng., 3(1979), 319.

34. Liles, J. A. Chern. Eng. Progr., 79(6) (1983), 43.

35. Brannock, N. F., Verneuil, V. S. and Wang, Y. L. Comput. Chern. Eng., 3

(1979), 329.

36. Rosen, E. M. and Pauls, A. C. Comput. Chern. Eng., 1 (1977), 11.

37. Maejima, T., Shindo,A. and Umeda, T. Chern. Econ. Eng. Rev., 5(2)(1973), 34.

38. CONCEPT-Mark III User Manual, 1973, Computer Aided Design Centre, Cambridge.

39. SYMBOL User Manual, 1973, Computer Aided Design Centre, Cambridge.

You might also like