Fundamentals of Simulation
Fundamentals of Simulation
Chapter 1
Fundamentals of simulation
chemical processes
1.0 INTRODUCTION
The word simulation comes from the Latin simulatĭo, which means the action of simulating, that is,
to represent something, pretending or imitating what it is not, seen in this context, like the use of
simplified models to represent a specific process and thus be able to predict its
results. The simulation of chemical processes is naturally linked to the calculation of the
material, energy, and eventually momentum balances of a process, whose
structure and preliminary data of the teams that make it up are known, thus allowing
carrying out tasks such as analysis, evaluation, and obtaining estimated costs for various
viable and competitive alternatives for this process, as well as the evaluation and
optimization of an already established design for this process, in much shorter time periods
reduced. This is how process simulators have become the most important tool
important in the analysis and synthesis of chemical processes. Currently, there is
the existence of several efficient commercial simulators such as Aspen Plus, PRO II,
HYSYS and CHEMCAD, among others.
We can consider the simulation task as one in which we propose certain values.
from the entry to the simulator or simulation program to obtain certain results or values of
output, such that the behavior of the real system can be estimated under those conditions.
Simulation tools can be classified according to various criteria, such as:
Tables 1.2.1 to 1.2.3 summarize the main characteristics of the classifications of the methods.
of simulation.
1.2.2
Steady-state simulation Dynamic simulation
It involves solving the balances of a system without considering the time-dependent balances.
involve the time variable, so that the system represents the behavior of equipment.
of equations will want to study or reflect in the batch, or to analyze the evolution that
model the variations of the variables of manifest interest in the transient between two states
with the spatial coordinates (models a stationary for a piece of equipment or a complete plant.
distributed parameters); then it should be used In this case, the mathematical model will be
a system of differential equations constituted by a system of equations
partials (according to the number of ordinary differential coordinates whose differential variable is
spatially considered). Generally, in the case of parameter models over time
commercial simulators use models a uniforms. Otherwise, a resolution must be reached.
uniform parameters, that is, they do not vary with the system of differential equations with derivatives
time nor in some of the spatial coordinates. partials, covering both the coordinates
spatial like time.
Process Simulation in Chemical Engineering 3
The one that uses a deterministic model, that is, the one that uses a stochastic model, that is,
that in which the equations depend on that in which certain variables will be subject to
parameters and variables known with certainty, of such uncertainty, that can be expressed by
form in which there is no uncertainty nor laws of probability distribution functions. In this
probabilities associated with them. if the model results will be associated with
a law of probability.
Finally, the simulation of discrete events must also be mentioned, in which there are variables.
of interest that do not have a continuous behavior. There are numerous processes that only
They can be simulated from this point of view, for example, the simulation or design of batch plants.
multiproduct or multipurpose, or both simultaneously, have characteristics that impose
a discrete model to contemplate certain events of interest.
This book will only cover matters related to quantitative and deterministic simulations.
generally of the stationary type.
This section will primarily discuss the three types of existing simulators, namely,
global simulators, modular sequential simulators and modular hybrid simulators
sequential-simultaneous.
The notion of a general or global simulator of chemical processes must be distinguished from a
simulation program for isolated operational equipment or units. A global simulator or
general presents many other problems in addition to data input/output issues and of the
model of the equipment, as happens with operational units simulation programs
isolated; in addition, problems such as the following arise:
In short, there are many obstacles that must be overcome in order to design a simulator.
of general purposes. Within this context, it is very important to understand this
problematic to achieve a deeper understanding of how the main ones operate
commonly used commercial simulators for the simulation of chemical processes.
The following points will briefly describe the main structural aspects.
linked to the architecture of a typical chemical process simulation system.
Process simulators can be divided into the following types according to the philosophy under which
the mathematical model that represents the process to be simulated is proposed:
4 Chapter 1: Fundamentals of Chemical Process Simulation
Table 1.3.1 shows a comparative analysis between the main classes of simulators.
They can produce multiple solutions. Because the modules are oriented and
defined in a rigid way, it becomes impossible
If there are issues during the simulation, add additional constraints and/or variables.
It is difficult to assign the problem to a sector besides the analytical analytical expression of the
specific to the plant, o good to initialize optimization function, proceeding as
conveniently. if it were a black box, where things cannot be
manipulate the existing models.
It has a much higher convergence speed.
This approach assumes that the variables are known
As the system is designed to be equation-oriented, the input currents, that is, the supplies to
It is possible to incorporate the constraints of the equipment, and the currents must be calculated.
to define optimization problems in output form y the corresponding parameters of
directly, as it is only necessary to present the operation.
restrictions and the optimization function.
A flow order of the information must be established.
Basically, business process simulators are of the sequential modular type, which is why
every time a process flow diagram is assumed, a diagram is being specified that is
Know the information flow diagram (IFD). This diagram is mathematically a directed graph.
in which the nodes represent the equipment modules connected one to one through the
currents that link them, which are represented as directed arcs. Both the nodes and
information flows generally coincide with the teams and physical currents of the
plant, respectively. Figure 1 shows a generic process scheme and its respective
translation to the information flow diagram.
Process simulation in Chemical Engineering 5
PFD DFI
At times it will be necessary to represent a real team from the plant through the
connection of several modules available in the module library of the simulator. In this case
It is unlikely to find stages in the module library of a commercial simulator.
like those of the process, for which one must think of a way to model the process trying to
reproduce the behavior of the same by using the available modules. If this were not
If possible, a specific simulator programming should be resorted to.
The next problem is to calculate all the currents and parameters of the plant.
solving the modules one by one in a logical sequence so that even with recycling
the desired solution can be obtained. For this, an appropriate iterative method must be used,
defining cutting currents through the tearing of the flowchart. The cutting currents are
those whose values must be initially assumed by the user for the purposes of generating
a series; whose terms are obtained iteration by iteration by solving the entire plant one by one
the modules, in an ordered and acyclic sequence. The convergence criterion will be met
when the difference between the corresponding values of two consecutive iterations is smaller
to a user-defined margin of error. In this case, the mass balances are satisfied and
energy, for which the simulation has finished. To determine the cutting currents, definitions are established.
the operations of tearing, partitioning, and sorting. The first emphasizes the
identification of the currents that must necessarily be assumed by the user, to
declare them as iteration variables. Through partitioning and sorting, it transforms the
cyclical sequence in an acyclic or linear one, so the sequence of equipment for the
iterative resolution procedure.
Finally, we need to mention the third option of simulators, the hybrid simulators.
effect, it is possible to propose the development of simulators by combining the modular strategy and the
oriented towards equations in such a way as to take advantage of the positive aspects of both methodologies
the maximum possible. To do this, a group of variables is selected on which to proceed
according to global philosophy, that is, they will be resolved simultaneously, while for the rest it
maintains the modular philosophy, that is, it is about finding an acyclic sequence that provides
for its calculation, in each iteration, the values of the variables to be solved simultaneously. It is due to
what this philosophy is also known as two-tier or two hierarchical levels, as it
work on one with the variables treated simultaneously, and on the other sequentially. Another
the name by which this approach is known is modular sequential-simultaneous.
6 Chapter 1: Fundamentals of Chemical Process Simulation
The general or central logic of the simulator's administration includes the following items:
She is responsible for managing the different processes that must be executed to achieve the
simulation of a given process. Some of its specific functions are shown below:
They are a fundamental part of any simulator in general. It should be characterized by being flexible and
user-friendly, meaning it has an interface or window that allows both
introduce the data like the interaction in general with the simulator, in a pleasant way
pleasant for the user, regardless of their experience with the simulator.
The potential of this type of interfaces greatly facilitates the presentation of curves and
charts and access to specific information (equipment parameters, physicochemical data,
etcetera.
It is a priority to have a system for estimating physicochemical properties in order to be able to perform
process simulations, regardless of the chemical nature of the substances
involved (pure substances, homogeneous mixtures, heterogeneous mixtures, ideal, non-ideal,
solids, liquids, gases, electrolytes, non-electrolytes, etc.) and the situation at hand (reactions,
phase equilibria, among others).
Generally, commercial simulators always have the option to allow the user to
introduction of their own correlations in the event that they find the methods inapplicable
what the simulator has. It is not the purpose of this text to give the student lessons on
thermodynamics of solutions, reacting systems, and phase equilibria, as it is understood
that the study of these topics is part of the work of their profession.
Table 1.4.3.1 briefly mentions some of the standard equipment that have the
business and/or academic process simulators and their main characteristics.
8 Chapter 1: Fundamentals of Chemical Process Simulation
pressure drops.
Summing or mixing equipment They represent the connection of pipes whose fluids
they can have different compositions, temperatures and
states of aggregation, which must be considered the
phase equilibrium equations and material balance.
If necessary, the possibilities must be considered.
of reaction, and pressure drops.
Rigorous exchangers with given geometry This type of equipment estimates the behavior of the
fluids with greater rigor and with equations of
balance and much more complex functional relationships.
Includes the determination of the global coefficient of
transfer (U), calculating resistances a the
due transfer the hair coefficients,
a
materials of the tubes and the distribution and regime of
flow of circulating fluids.
Direct contact equipment between phases They involve separation operations by contact.
directly as they are: liquid-liquid extractions,
absorption, desorption, distillation, etc. There are so many
approximate methods as rigorous. It is recommended
use the short methods as the first estimate for
a rigorous calculation.
Flash separation equipment They simulate the sudden evaporation of one or several flows,
thus achieving their separation, either by contemplating
LLE, VLE or VLLE equilibria, including.
It is one of the most important as it allows us to know the
aggregation state of any current in any
instant.
Pumps and valves Both in the pump and in the valve, the variable of
design is the discharge pressure, without being considered
enthalpic changes due to pressure change.
More rigorous models are also considered.
depending on the simulator.
Process Simulation in Chemical Engineering 9
Compressors and expanders The most simplified version only has the design variable,
the discharge pressure (outlet). There are more complex models
they take into account polytropic compressions or expansions.
The idea of these modules is, just like many of the
previous ones, obtain the conditions of the output current.
Special equipment or controllers In certain simulators, there are 'controller' devices, whose
operation will be necessary to maintain certain values
chosen in the desired values. In simulation mode this
control operation can be reproduced based on the
following procedures:
This operation should not be confused with the actual control of the
plant to simulate, for control only makes sense if there is
variations of the variables over time. It is recommended to look at
the specific options of each simulator.
Feedforward controller modules They are used to set an operating parameter downstream in
the resolution sequence, according to the value it took from
a selected variable. From a conceptual point of view,
It is analogous to feedback, but here it is manipulated forward.
As seen in this section, sometimes when a module is not found in the library of
simulator modules, and the task of representing it as the union of several simple modules of
simulator fall very difficult or even, it is almost impossible, it is better to define a new module
in the simulator. The following section presents some of the general concepts to consider
account in the development of new modules for a modular sequential simulator.
10 Chapter 1: Fundamentals of Chemical Process Simulation
In general, the items to consider when approaching the development of simulation modules with the
object of using them coupled to the structure of a process simulator for purposes
the general ones are as follows:
Calculation levels:
At this point, the rigor of the calculation that is desired (degrees of simplification) is identified.
The information exchange diagram between the modules (which represent the operation of
the different teams) and the central system or logic of the simulator have a general structure
As shown in Figure 1.a, it can be observed that the inputs to the module consist of the
equipment parameters (which will be described later), the internal retention variables (for
example: the flow rate, concentration, and temperature profiles of a distillation tower for
to be used as initialization variables) and the input currents to the equipment.
In addition, the results of the calculation must be included in the output (e.g. total heat exchanged in
a heat exchanger) next to the output streams of the module, which in turn will be data
as input for the next team in the resolution sequence.
Process simulation in Chemical Engineering 11
This traditional scheme corresponds to the classical modular simulation, sequential in steady state.
Since the models proposed for each unit operation are independent of the system
The physicochemical principles to be employed make it possible to achieve generality and programming flexibility for the modules.
of teams, only taking into account an appropriate way of interaction between the sections that must
to perform physicochemical calculations and those responsible for solving balances and functional relationships
properly said. An important point in the new generation of simulators focused on management of
Large amounts of information involve its management and storage. In general, it must be
define some type of database administrator to achieve integration between the modules of
the central logic, execution, physicochemical programs, input/output of information, and the
data storage itself. Structural relationships can be consulted in the manuals that
they are provided with each commercial simulator. In Figure 1.b, a general scheme can be observed.
operation in which the flow of information is indicated when resolving a team or module.
12 Chapter 1: Fundamentals of chemical process simulation
Fig. VI.1.b. Outline for calculating each module or equipment of the simulator.