You are on page 1of 18

Innovation has always been an exciting and challenging part of engineering.

The
innovative engineer creates new processes and finds different
Processing conditions in order to increase profits. Often, evaluation of the
ideas for improvement is straightforward and immediately rewarding. This
is represented schematically in Fig. l.l(a). But an evaluation can be anything
but exciting when it involves the tedious task of long and repetitious calculations caused
by the recycle of energy or material. A representation of recycle
calculations is shown in Fig. I.l(b).

1.1 Satisfying an Engineering Need.

Recycle occurs frequently in chemical plants to conserve material and to


improve the overall efficiency. Such recycle, however, introduces calculational
difficulties. The engineer needs a technique to relieve him of the tedium of
repetitive recycle calculations and to free him for Creative work. Such a
technique should combine the speed of digital computers with methods of
handling information.

To see how the need can be satisfied, consider how an engineer presently
deals with calculations, whether they be done by hand or with the aid of
computers. To analyze processes in the search for improvements, the engineer devises a
mathematical description, that is to say, creates a simulation,
of the proposed innovations. Traditionally, in simulating any process, the
engineer starts with some input conditions and uses the principles of Unit
Operations to calculate the outputs from the first equipment unit or stage.
This is repeated for each succeeding unit with an output of one unit being
an input to the next. For example, the engineering flow diagram shown in
Fig I 2{b) might be used by an engineer to do material and energy balances
for the process shown in Fig. 1.2(a). He uses Fig. 1.2(b) to keep track of the
calculations and to summarize the results. While calculating the material
and energy flows, the engineer creates a simulation of the process shown in
Fig. 1.2(a). The simulation arrangement is shown in Fig. 1.2(c). For each
set of input conditions in streams 1, 2, and 3 there is a corresponding set of
calculated answers for streams 4, 5, and 6. The characteristics of this approach are:

1. The inputs lo each unit are used to calculate its outputs from the
principles of Unit Operations that describe the phenomena occurring
in the unit.
2. The processing sequence and arrangements among units must be
known.
3. The calculated outputs from one unit become the inputs to other
units.
4. The engineer must recognize when he has a trial-and-error or recycle
problem.
5. For these trial-and-error or recycle problems, the engineer tries to
specify the sequence in which calculations should be done to minimize
the work.
Of these characteristics, only the equipment (1), the arrangement of the equipment (2),
and the input to the plant vary from problem to problem. The rest
—the handling of numbers and the Information transmission from calculation
to calculation (3), the identification of recycle (4), and the specification of
the sequence in which calculations are performed (5)—are common to all

problems and can profitably be handled by an executive Computer program.


Such a program satisfies an engineering need because it relieves the engineer
of the bookkeeping and quickly handles the repetitive calculations required
for the once-dreaded recycle problems. With such a system the engineer
supplies the specified input conditions, indicates the equipment arrangement,
and supplies a mathematical model which describes the Unit Operation for
each equipment unit. This is shown in Fig. 1.3. The executive Computer
program is like a project director who obtains realistic results for the complete process
by requiring each engineer to supply him with the calculated
performance of one equipment unit.
The combination of a digital Computer and the information-handling
executive programs presents a powerful technique to both the industrial
engineer and the undergraduate student. The use of this tool makes possible
the solving of problems involving tens of thousands of numbers. For example, the
illustrative case presented later in this book required a solution
of approximately 500 simultaneous equations, many nonlinear, involving
about 1000 stream variables and 200 equipment parameters. A comprehensive executive-aided
Computer simulation can be used to predict the effect
of changing conditions, physical layout, and capacity, to do mass and
energy balances rapidly, to optimize the operation quickly and safely, to
detect and eliminate production bottlenecks, to provide depth of knowledge
about complete system behavior, to improve control and investigate the
feasibility of on-line Computer control, to facilitate cost calculations, Budget

control, and planning of operations, and to train operators and engineers.


Indeed, there are many purposes for developing a simulation. At one
extreme is a simple simulation which can show the process designer how the
equipment units interact and how sensitive the calculations are to changes
in design parameters. An example of this might be patching together in 10
to 40 man-hours a process mass balance from an existing library of programs
for various units. Although the questions that can be answered by this
simulation are not sophisticated, the answers are nevertheless valuable. At
the other extreme is a very accurate simulation for answering technically
sophisticated problems, A simulation to supply such answers may take two
to four man-years. This too is most valuable because without the Computer
such problems would simply not be attempted because they would be too
complex. However, for such ambitious projects it is financially attractive to
use an executive-aided Computer simulation, mainly for problems complicated by recycle,
for those involving many numbers, or for those requiring
an analysis of a large number of alternatives. For example, Fig. I.4(a) shows
a large sectioned distillation column. Because of the recycle, even such a
small system is a good problem to tackle with an executive-aided simulation.
However, the system shown in Fig. I.4(b) is probably not a candidate for an
executive-aided simulation because there is no recycle, there are relatively
few numbers involved, and hence an engineer might solve the problem more
cheaply without the executive-based system. Other factors which influence
the decision of whether or not to create a very accurate executive-aided
Computer simulation include a need for corroborating data, ready access
to a Computer, the ability to describe equipment behavior, and the availability of people
with computational and programming experience. An
elaboration of these factors is presented in Chapter 13.

However, gaining the advantages offered by the executive for either simple
or very accurate simulations requires strict discipline in supplying input
information to the system. Even though an executive-aided Computer simulation may demand
much time, skill, and computation, it is a'boon to the
engineer which, when correctly employed, can increase profits. The applicability will also
increase greatly as more use is made of digital computers for
everyday engineering. This book describes the approach to creating an
executive-aided digital Computer simulation of the steady-state operation
of a plant (hereafter referred to simply as a simulation), illustrates this
approach through a case study, and provides guidelines for using the principles to tackle
other steady-state problems.

1.2 What Is a Simulation?

Perhaps the easiest way to clarify the concept of a simulation ¡s to relate it


to the engineer's analysis of the process shown in Fig. 1.2(a). The engineer
calculates the overall mass balance by calculating for each unit in turn what
happens to the inputs to that unit. From the flow diagram he knows that the
mixer-reactor is followed by the heat exchanger. He first calculates the
answers for the units where all the inputs are known, in this case the reactor,
and then proceeds to calculate the behavior of the heat exchanger. He uses
Fig. 1.2(b) as a convenient place to store his answers, to relate answers to
flows in pipes, and to remind himself of the relationship among the units.
In a simulation, calculated outputs are also produced from given inputs,
but most of the decisions, bookkeeping, and calculations are done through
Computer programs rather than by hand. A simulation is a set of Computer
programs which calculates realistic values of the significant operating variables for the
process being simulated. An analogy between the simulation
and the real process is worth noting. Just as a plant is made up of equipment
units connected by pipelines, so a simulation consists of sets of calculations,
called Unit Computations, linked by streams that transmit information
unchanged between the different sets of calculations. Material flows through
the pipelines because of the laws dictated by nature; information flows,
through the stream network as prescribed through the executive program.

The simulation has three parts: the data set, the executive program, and
the sets of mathematical models called Unit Computations. The relation-
ship among these ¡s indicated in Fig. 1.3. The data set includes the input
conditions, the processing sequence, the order of calculation, and information pertaining
to the calculations in the Unit Computations. The executive
program, given the data set, calls upon different Unit Computations according to a
calculating sequence (which it cither devises or is given in the data
set) and calculates the values of operating variables for all streams in the
system. Consider now some characteristics of the executive program and the
Unit Computations and in particular the demands they place on the engineer
creating a simulation.

The executive program.

The executive program transmits information through the streams and


stores the calculated results. it can plan the sequence in which calculations
are to be done if it is requested to do so. For example, in Fig. I.2(c) the executive
program would supply the blackboard for storing the answers, would
know that the heat exchanger followed the reactor, and would know that
the behavior of the reactor would have to be calculated before the operation
of the heat exchanger could be predicted. Several executive systems exist:
CHESS, CHEOPS, UWOPS, CHIPS, FLEXIFLOW, POWERFACTS,
PACER, CHEVRON; Steward (1967), Evans, et al. (1968), and Rudd and
Watson (1968) review some of these. Many programs are proprietary. Today
the engineer’s job is mainly one of effectively selecting and using an existing
executive program. I le needs to know what the executive program can and
cannot do for him, the advantages and disadvantages of using a particular
program, the required formal for the input information, and the format
used in printing out the answers.

The Unit Computations.

A set of calculations that predicts what occurs within an equipment unit


is called a Unit Computation. Normally there is a one-to-one correspondence
between the Unit Computation and the plant equipment carrying out the
Unit Operation. For example, in Fig. 1.2(c), the Unit Computation for the
mixer-reactor calculates from the input information carried in streams 1 and
2 the exit conditions (stream variables) in stream 4. The values given for
stream 4 should be the same as the hand calculation reported in Fig. 1.2(b)
and the plant conditions of Fig. I.2(a).
The chemist with his atomic model kit often constructs replicas of an
infinite variety of molecules; the engineer can use his set of Unit Operations
to devise a new process or he can patch together Unit Computations to
calculate an existing process. This can be visualized as a building-block
approach.

Each block" or Unit Computation refers to only one Unit Operation,


for example, heat exchanger Unit Computation, reactor Unit Computation, and so on. Each
Unit Computation is self-contained, and once a collection of Unit Computations
representing most Unit Operations is available
a variety of processes can be quickly assembled by connecting the appropriate Unit
Computations together.
Consider briefly the concepts of creating a Unit Computation for the
heat exchanger of Fig. 1.2(c).
Assume this Unit Computation should calculate the exit temperature of
the hot process stream 6 of Hg. ].2(c). The familiar equation from the Unit
Operations of heat transfer

could be used. But (his would require a trial-and-error calculation which


is unnecessary since the concept of effectiveness factor has been reported
(Kays and London (1964)]. The exit temperature for this system can be calculated from

with NTU-UA/(WC)process fluid


U = overall heat transfer coefficient
A = exchanger arca
W = mass flow rate
C = specific heat
R = (WC)process fluid/(WC)water
From this simple set of equations the exit temperature can be calculated.
These equations, together with the necessary input-output formats imposed
by the executive program, make up the Unit Computation.
An engineer can be very flexible in writing the Unit Computation. It can
be general or specific, approximate or accurate, and based on fundamentals
or on statistical correlations. Following chapters describe how to choose the
model for a Unit Computation from the options available.
1.3 How To Create a Simulation
To create a simulation the engineer writes Unit Computations consistent
with a selected executive program. The task is complicated by the overwhelming amount of
detail due to the very complexity which warranted the use of
a Computer simulation in the first place. Handling these details requires
careful planning and allocation of time and people.
Figure 1.5 presents a suggested strategy for solving the problem; Fig.
1.6 shows a possible organization of the personnel. Figure 1.5 should be
examined in some detail. While the problem is being defied, the questions to
be answered are determined and the decision to adopt a simulation approach
is made based on economics and the availability of information, The planning stage
includes the organization of the personnel; training in the use of the
computer-based executive system chosen; agreement on lines of communication, the form of
reports, nomenclature, and job responsibility; construction
of a critical-path schedule; and the collection of additional background in-
formation, physical property data, and plant operating data used in building
and checking the models. The next stage is the development of the individual
Unit Computations. Two support activities—devising reasonable methods
for manipulating the physical properties and creating a simple simulation of
the plant to indicate areas where complications develop—should be done
concurrently since these necessary jobs are common to all the Unit Computations.

• The ratio is (W/C)smaller /(WC)|larger but for (his problem we assumed the process fluid
had the lower thermal capacity. Details are given in Sec. 7.3.

It is perhaps at this stage that the organization of personnel is most


important, provided, of course, that a simulation team is available. Figure 1.6
illustrates a reasonable organization for a team effort. One group maintains
close liaison with the computation center, writing extremely simple models
for all Unit Computations and simulating the complete plant. From this,
the group gains experience in how the system behaves and in the importance
of its interactions, and gains a feeling for the sensitivity of the system to the
accuracy of individual Unit Computations. Another group can develop a
physical property handling system that incorporates reliable tested data.
It is useful to create teams which devise individual Unit Computations in
their own fields of expertise. Models are prepared and tested for a variety of
conditions. It is essential that these teams be well informed about the accuracy
and variety of model needed, and about the activities of the other project
workers. All these activities need to be supervised by a team coordinator.

1.3 The Plan of the Book.

This book shows how to simulate a complex plant and how to use the result
to optimize plant operation. The general principles and guidelines are presented through a
case study, with the PACER executive program utilized
to develop a sophisticated simulation of a contact sulfuric acid plant. The
approach, the typical decisions, and the problems encountered are adequately
illustrated by the case provided. These principles are then summarized and
illustrations of how they can be extended to other problems are given.
Chapters 2 and 3 discuss what simulation entails, describe features
common to most executive programs that can be used, and give some details
of one particular executive program, PACER.
Chapters 4 to 11 outline the approach to the problem in detail. The
concrete example of simulation given with the PACER executive program
is the 315 ton per day contact sulfuric acid plant owned by Canadian Indus-
tries Ltd. in Hamilton, Ontario, Cañada.
Chapters 12, 13, and 14 discuss the application of the simulation work
for plant improvement and suggest ways the engineer can extend the techniques of
simulation. The problems at the end of each chapter also illustrate
the extension of the simulation techniques.
The emphasis throughout the book is on the strategy and approach lo the
problem; the case study of the acid plant with the PACER executive is the
medium through which the points are discussed.
From Plant
To Computer: 2
The Techniques of
Digital Simulation
as an example and consider many aspects of achieving and exploiting a
digital Computer simulation of such a plant.
An executive program as it is used in this book is a collection of sub-
programs which has some or all of the following features:
1. Modularity, which allows changes to be made in how units are connected, independently
of what the units are—provided information
is passed between units in a standard format;
2. Ability to determine a sequence of calculation of the Unit Computations;
3. Easy alteration of the parameters in Unit Computations, of the types
of Unit Computation, and of the connections between them;
4. Efficient solution of the case to give a meaningful answer;
5. Easy interpretation of the results of the simulation.
If the executive program is supplied with the feed conditions, with the types
of Unit Computation and how they are connected, and with the subroutines
needed, it must be able to produce the desired results.
Every executive program will have its own rules about how the data are
prepared, how the connections between units are recorded, and how the
Unit Computations must be written. Most executive programs either allow
the user to specify the sequence in which the calculations are to be done or
can automatically find a sequence for him. The hardest work in achieving a
simulation is to prepare the Unit Computations and to ensure that they
obey the rules of the particular executive program. Since a workable, if not
optimum, sequence of calculation can normally be specified by the user or
found by the executive, Secs. 2.4 and 2.5, which discuss planning of calculations, may be
omitted on first reading.
Whatever executive program is used and whatever Unit Computations
are written, there are several common problems in a simulation, namely,
the existence of recycle, the analysis of information flow, and the finding of
a way to do the calculations. These three topics are discussed in turn in the
rest of this chapter.

2.1 Developing a Description of


Information Flow
Information is a set of values for the variables of a process needed to describe
fully the state of a stream at any point in the process. Examples are flow rate,
temperature, pressure and composition of a process fluid, or temperature
and flow rate of saturated steam. Information can flow from place to place
not only through actual streams but through control lines, across heat
exchanger surfaces, and by any other mechanism which alters or fixes value
of stream variables. The study of information flow in a process is necessary
when recycle exists. Without recycle, calculations could be done one unit
after another with no repetition. Therefore recycle is discussed before Information flow
is examined.

The problem of recycle in chemical plants

Most chemical processes have recycle of either matter or heat. Recycle


means that a stream leaving a process unit affects a stream entering that unit.
For example, in Fig. 2.1 the output stream from the mixer affects its input
stream coming from the overhead of tower #2 because there is a connection through three
pieces of equipment. The output from a unit can only
be calculated if its input is known, but for a process with recycle its input is
only known once its output has been calculated. The classical chemical engineering
approach has been to assume values for as many streams as are
required to compute a unit and then proceed until the calculated values of
stream variables agree with the assumed values. Although steps can be taken
to accelerate the solution of a recycle problem, unaided convergence to
solution is still very widely used. Examples of typical recycles are:

1. The preheating of the feed of a distillation column by the bottoms


stream (recycle of heat); .
2. The use of sulfuric acid product to dry the air fed to the sulfuric acid
plant (recycle of material);
3. The generation of steam from the heat of combustion of sulfur which
is then used to drive the turbine supplying the air to support that
combustion (recycle of matter and heat).
As bases for further discussion, consider the process flow diagrams with
recycle shown in Figs. 2.1 and 2.2 and called Plants A and B, respectively.
The first, Plant A, includes several different Unit Operations and has recycle
of material. The second, Plant B, consists of simple mixers and surge tanks
and is used in Sec. 2.4 to discuss planning the calculation.

Mixing—a simple Unit Operation

As a typical element of a recycle process in Fig. 2.2, consider the mixer,


shown in Fi». 2.3. In each such mixer the agitation is assumed to be sufficiently intense
so that the output streams are at exactly the same concentration as the contents of the
tank. In addition to combining all the input
streams to a uniform mixture, the mixer splits the outflow into two streams.
Two control valves are shown on the output streams to indicate that the
relative amounts of fluid in the outputs can be varied. The mixer is assumed
to operate in the steady State so that there is no accumulation in the tank,
or alternatively, the capacity of the mixer is assumed to be very small.
Temperature changes are ignored in this simple case.

If the input stream flows and compositions are known and if the proportion of the total
flow rate leaving in each output stream is specified, then the
flows in the output streams can be calculated by a simple material balance.
Note that just as the physical tank “solves” simultaneously the material
balances for every component, so the model of the tank solves the equations
for material balance simultaneously.
The Unit Computation.

The physical mixer can be modeled by a Unit Computation called


MIXER. Thus the streams into the mixer of Fig. 2.3 carry information about
flow rate and composition. The mixer modifies this information and puts it
in the output streams. A stream can then be seen as a carrier information
and an equipment unit as a modifier of information and puts it

in the output streams. A stream can then be seen as a carrier of information


and an equipment unit as a modifier of information. They can be represented
schematically with lines for streams and a diamond for the mixer, as shown
in Fig. 2.4. The arrows show the direction of material flow. Associated with

each equipment unit or Unit Computation is a set of equipment parameters


such as the proportion of the total flow in each output stream of the mixer.
Other examples of equipment parameters would be the heat transfer coefficient of a heat
exchanger or the bed depth of a catalytic reactor. A one sentence abstract for the Unit
Computation MIXER is as follows. Given the flows in any number of input streams and the
equipment parameters specifying the proportion of the flow in each output stream, find the
flows in the several output streams by simple material balance.
The Computer programming necessary to implement this simple Unit.
Computation is straightforward. Note that MIXER, can be used for mixing
or splitting streams in such a way that all the output streams have identical
composition and temperature.

From the abstract for this modular Unit Computation, it is seen that
given the input streams and the equipment parameters, one can calculate
the output streams. This is the basic form of the Unit Computation for
simulating the flow behavior of an equipment unit for specified operating
conditions. The more general rule is much more flexible than this and later
chapters will give examples. Some predetermined rule, stating which information is known
and which to be calculated, is essential to the programmer
before he can write any Unit Computation.
A Unit Computation is in general any set of mathematical manipulations
for calculating output information from given input information. Thus a
Unit Computation is an information modifier in that it receives information
from its input streams, modifies it, and supplies the modified information
to its output streams. To simplify later discussions, a set of distinctive symbols will be
adopted for the various types of Unit Computation, as shown
in Fig. 2.5.

Modularity means that each Unit Computation must be written so that


the calculation is independent of the source of the input information and the
use of the output information. Then, provided that the information is passed
between units in an agreed format, any Unit Computation could be connected to any other.
This is analogous to agreeing to use a standard electric
Socket and plug so than any electrical device can be connected to any other
one. Furthermore, a given Unit Computation may be used for several different
equipment units of the same basic type in the same processing scheme,
thereby greatly reducing the required programming effort

2.2 From Process to Information Flow


Diagram.

A process flow diagram depicts the equipment and pipes which make up
the plant. The pipes are shown as arrows pointing in the direction of material
flow. Such a diagram can be encoded in numerical form for use in the Computer. This is
done in two steps; first, an information flow diagram is con-
structed from the process flow diagram, and then this diagram is put in
numerical form. The first step is discussed here and the second in Sec. 2.3.

Two examples of a process

In Fig. 2.2 a simple process flow diagram is shown in which the units of
equipment are either mixers, as shown in Fig. 2.3, or storage tanks. The
units have been conveniently numbered. The flow diagram in Fig. 2.2 is
intended to show several features of the connections between units which_
could be found in any flow diagram. It should be emphasized that the process
is discussed here only for the connections between units and not for the
composition changes effected by the units themselves.

The flow of material in pipes is a flow of information between units of


equipment. The unit of equipment produces a physical or chemical changes
in the flowing material and is an information modifier. These concepts have
been most fruitful in simulating chemical plants and are defined and amplified below. _
A stream is any connection between Unit Computations in which the
values of the stream variables (or information) required to describe its State
do not change. The stream variables are those quantities which are needed
to specify the State of the stream for the purposes of the simulation. A typical
set of stream variables includes temperature, pressure, and the flow rate of
every component. However, the temperature of a coolant or the pressure of
an instrument air line may be all that is needed. Additional quantities may
be included for convenience among the stream variables, such as total
enthalpy or total flow rate, which could be calculated from other stream
variables. A stream is considered "known” if it is a feed, if its variables have
been calculated as the output of some unit, or if it is temporarily assumed.
Equipment units, or Unit Computations, modify information received
from input streams and place it in output streams. Some examples of such
units are a pump (pressure modifier), a heat exchanger (temperature modifier),
a reactor (composition modifier by chemical change), and an absorber
(composition modifier by physical means). Some Unit Computations do not

exist in the plant but may be useful in the simulation, such as a cost calculator,
a unit to guarantee overall material balance, to optimize the yield of a product , or to
convert the units of measurement. Sometimes one process unit,
for example a multibed reactor, may be split into several Unit Computations, one for each
bed. Some process units may be ignored in the simulation,
such as a surge tank, which does not modify information in a steady-state
process since volume and composition are constant. However, a surge, tank
would be included even here if capital costs were being computed. What
Unit Computations are chosen for the simulation depend on the objectives
of the study and the accuracy of the data.

The information flow diagram represents the flow of information via


streams between Unit Computations. It is constructed as follows:
1. Each Unit Computation is represented by a suitable symbol.
2. Each symbol is given the name of a Unit Computation.
3. The flows of information between units are drawn as directed lines
(streams) between symbols, with arrows indicating the direction of
information flow.
4. The streams and symbols are separately numbered, usually ascending
in the direction of flow. The numbering is arbitrary, but no two
symbols or no two streams may have the same number.
For example, the information flow diagrams corresponding to Figs. 2.1 and
2.2 are Figs. 2.6 and 2.7, respectively.

Although the information flow diagram will generally resemble the process flow diagram,
there will be differences in that some streams and units
are not in both diagrams. Thus the surge tanks of Fig. 2.2 are absent in
Fig. 2.7 because the process is in steady state and capital cost is ignored.
Some extra flows may be added to the information flow diagram for
special purposes. Examples are cost flows, passage of information used to
accelerate the calculations, and flow of pressure information in the direction
opposite to material flow. The last example is discussed in more detail in
Sec. 9.5.

You might also like