Sei sulla pagina 1di 51

Chapter 3

By Hagos, 2019
Why a model is needed?

 To make quantitative predictions

about system behaviour
 To back up financial or other
 To optimize a new or existing
 To operate efficiently and safely an
existing process
 For illustration / teaching
Basic Concepts
Modeling Fundamentals
 Models are an integral part of any kind of human activity. However,
we are mostly unaware of this.
 Most models are qualitative in nature and are not formulated
 Such models are not reproducible and cannot easily be verified or
proven to be false.
 Models guide our activities, and throughout our entire life. We are
constantly modifying those models that affect our everyday
 The most scientific and technically useful types of models are
expressed in mathematical terms.
Modeling in Chemical Engineering

 The use of models in chemical engineering is well established, but the

use of dynamic models, as opposed to the more traditional use of
steady-state models for chemical plant analysis, is much more
 This is reflected in the development of new powerful commercial
software packages for dynamic simulation,
 Dynamic simulation can thus be seen to be an essential part of any
hazard or operability study, both in assessing the consequences of
plant failure and in the mitigation of possible effects.

 Dynamic simulation is thus of equal importance in large scale continuous

process operations, as in other inherently dynamic operations such as batch,
semi-batch and cyclic manufacturing processes.
 Dynamic simulation also aids in a very positive sense in enabling a better
understanding of process performance and is a powerful tool for plant
optimization, both at the operational and at the design stage.
 Large scale commercial software packages for chemical engineering dynamic
simulation are now very powerful and contain highly sophisticated
mathematical procedures, which can solve both for the initial steady-state
condition as well as for the following dynamic changes.

 They also contain extensive standard model libraries and the means
of synthesizing a complete process model by combining standard
library models.
 Other important aspects are the provision for external data
interfaces and built-in model identification and optimization routines,
together with access to a physical property data package.
 The complexity of the software, however, is such that the packages
are often non-user friendly and the simplicity of the basic modeling
approach can be lost in the detail of the solution procedures.
 The correct use of such design software requires a basic
understanding of the sub-model blocks and hence of the
methodology of modeling.
 Our simplified approach to dynamic modeling and simulation
incorporates no large model library, no attached database and no
relevant physical property package. Nevertheless quite realistic
process phenomena can be demonstrated, using a very simple
 Again this follows our general philosophy of starting simple and
building in complications as the work and as a full understanding of
the process model progresses. This allows the use of models to be an
explicit integral part of all our work.
Kapur (1988) has listed thirty-six characteristics or principles of
mathematical modeling. They can be summarized as follows:

1. The mathematical model can only be an approximation of real-life

processes, which are often extremely complex and often only
partially understood. Thus models are themselves neither good nor
bad but should satisfy a previously well defined aim.
2. Modeling is a process of continuous development, in which it is
generally advisable to start off with the simplest conceptual
representation of the process and to build in more and more
complexities, as the model develops.
3. Modeling is an art but also a very important learning process. One of
the most important factors in modeling is to understand the basic
cause and effect sequence of individual processes.
4. Models must be both realistic and robust.
General Aspects of the Modeling
 An essential stage in the development of any model is the formulation
of the appropriate mass and energy balance equations.
 To these there must be added appropriate kinetic equations for rates
of chemical reaction, rates of heat and mass transfer and equations
representing system property changes, phase equilibrium, and applied
 The combination of these relationships provides a basis for the
quantitative description of the process and comprises the basic
mathematical model.
 The resulting model can range from a simple case of relatively few
equations to models of great complexity.

 The greater the complexity of the model, however, the greater is

then the difficulty in identifying the increased number of parameter
 One of the skills of modeling is thus to derive the simplest possible
model, capable of a realistic representation of the process.

The application of a combined modeling and simulation approach leads to

the following advantages:

 Modeling improves understanding.

 Models help in experimental design.
 Models may be used predictively for design and control.
 Models may be used in training and education.
 Models may be used for process optimization.
General Modeling Procedure
 One of the more important features of modeling is the frequent need
to reassess both the basic theory (physical model), and the
mathematical equations, representing the physical model
(mathematical model), in order to achieve agreement, between the
model prediction and actual process behaviour (experimental data).
 The following stages in the modeling procedure can be identified:
1. The first involves the proper definition of the problem and hence
the goals and objectives of the study.
2. All the available knowledge concerning the understanding of the
problem must be assessed

3. The problem description must then be formulated in mathematical

terms and the mathematical model solved by computer simulation.
4. The validity of the computer prediction must be checked.
5. The model may now be used at the defined depth of development for
design, control and for other purposes.

Figure1: Steps
in model
Model Classification
 Some model types are inappropriate in certain circumstances, such as
a steady-state model for batch reactor startup analysis.
Table1: Model Classification
Characteristic Nature of Process
 Mechanistic models are also referred to as phenomenological models
because of their basic derivation from system phenomena or
mechanisms such as mass, heat and momentum transfer.
 Many commonplace models in process engineering applications are
derived from a knowledge of the underlying mechanisms.
 However, most mechanistic models also contain empirical parts such
as rate expressions or heat transfer relations.
 Mechanistic models often appear in design and optimization
 They can be termed "white box" models since the mechanisms are
evident in the model description.
 Empirical models are the result of experiment and observation,
usually not relying on the knowledge of the basic principles and
mechanisms which are present in the system being studied. They
employ essentially equation fitting where the parameters have little
or no physical meaning.
 Empirical models are widely used where the actual underlying
phenomena are not known or understood well.
 These models are often termed "black box" models, reflecting the
fact that little is known about the real mechanisms of the process.
 The most common form of model used in process engineering is a
combination of mechanistic and empirical parts and hence is termed
"grey box."
 Stochastic models arise when the description may contain elements
which have natural random variations typically described by
probability distributions.
 This characteristic is often associated with phenomena which are not
describable in terms of cause and effect but rather by probabilities
or likelihoods.
 Deterministic models are the final type of models characterized by
clear cause-effect relationships. Thus we can have a mechanistic
model with some stochastic parts to it. A very common occurrence is
a mechanistic model which includes empirical aspects such as
reaction rate expressions or heat transfer relationships.
Model Characteristics

 Here we consider some of the key characteristics which might

affect our modeling and analysis .
 Models can be developed in hierarchies, where we ca n have several
models for different tasks or models with varying complexity in
terms of their structure and application area .
 Models exist with relative precision, which affect how and where we
can use them .
 Models cause us to think about our system and force us to consider
the key issues.

 Models can help direct further experiments and in-depth

 Models are develop ed at a cost in terms of money and effort. These
need to b e considered in any application.
 Models are always imperfect. It was once said by George E. Box, a
well-known statistician, "All models are wrong, some are useful"!

 Models invariably require parameter estimation of constants within

the model such as kinetic rate constants, heat transfer and mass
transfer coefficients.
 Models can often be transferred from one discipline to another.
 Models should display the principle of parsimony, displaying the
simplest form to achieve the desired modeling goal.
 Models should be identifiable in terms of their internal parameters.
 Models may often need simplification, or model order reduction to
become useful tools.

 Models may be difficult or impossible to adequately validate.

 Models can become intractable in terms of their numerical solution.
We ca n keep some of these in mind when we come to develop models
of our own for a particular application.
A Systematic Approach to Model
The notion of a process system
 If we want to understand the notion of a process system , we can
start from the general notion of a system. This can be defined in an
abstract sense in system theory.
 A system is a part of the real world with well-defined physical
 A system is influenced by its surroundings or environment via its
inputs and generates influences on its surroundings by its outputs
which occur through its boundary. This is seen in Fig. 2

in S out Fig. 2: system

 A system is by nature a dynamic object.
 The system inputs u and the system outputs y can b e single valued,
giving a single input, single output (SISO) system.
 Alternately, the system can be a multiple input, multiple output
(MIMO) system. Both inputs and outputs are assumed to be time
dependent possibly vector-valued functions which we call signals.
 A process system is a system in which physical and chemical
processes are taking place, these being the main interest to the
 The system to be modeled could be seen as the whole process plant,
its environment, part of the plant, an operating unit or an item of
 To define our system we need to specify its boundaries, its inputs and
outputs and the physio-chemical processes taking place within the
 Process systems are conventionally specified in terms of a flowsheet
which defines the boundaries together with inputs and outputs.
 Information is normally available about the internal structure of the
system in terms of the operating units and their connections.
Process systems are conventionally specified in terms of a flowsheet
which defines the boundaries together with inputs and outputs.
 Information is normally available ab out the internal structure of the
system in terms of the operating units and their connections.
The Modeling Goal

 The modeling goal specifies the intended use of the model.

The modeling goal has a major impact on the level of detail and on the
mathematical form of the model which will b e built.
Analogous to the idea of a process system shown in Fig. 2, a model acts
in some way to mimic the behaviour of the real system it purports to
Thus, Fig. 3 shows the model with certain inputs and outputs. The use
of the model can take various forms dep ending up on what is assumed
to be known and what is to be computed.

Figure 3: General model schematic.


 Amongst the most important and widely used modeling goals in

process engineering are the following:
 Dynamic simulation: With the process model developed to represent
changes in time, it is possible to predict the outputs o given all inputs
i, the model structure M and parameters p.
 Static or steady-state simulation: Here, the process system is
assumed to be at steady state, representing an operating point of the
system. Again the simulation problem computes the output values o
given specific inputs i, a model structure M and its parameters p. This
is sometimes known as a "rating" problem.

 Design problem: Here, we are interested in calculating the values of

certain parameters p from the set of parameters p, given known
inputs i and desired outputs o and a fixed structure M. This type of
problem is normally solved using an optimization technique which finds
the parameter values which generates the desired outputs. It is also
called a "specification" problem.
A Systematic Modeling Procedure

 Like other engineering tasks, good practice requires models to be

constructed following a well defined sequence of steps.
 These steps are arranged in a "Seven (7) Step Modeling Procedure"
which is introduced below and shown schematically in Fig. 4.

Figure 4: Systematic model building steps

 However, it should b e noted that model development is inherently
iterative in its nature. One must usually return to and rep eat an earlier
step in case of any problems, unusual or unwanted developments later in
the process.
 No one gets it right first time!
 In fact, we never get a perfect model, just one that is usable.
 Before starting to setup a process model the problem definition should
be clearly stated.
 This defines the process, the modeling goal and the validation criteria.
 This is part of the formal description in the SEVEN STEP MODELING
PROCEDURE, which is given in the form of an algorithmic problem.

 In a formal description of an algorithmic problem, one should formally

specify the following items:
 the inputs to the problem in the given section,
 the desired output of the procedure in the Find or Compute section,
 the method description in the Procedure or Solution section.

 Applying the above principles to the general modeling procedure, the

following algorithmic problem statement can be constructed.

 Given:

 a process system
 a modeling goal
 validation criteria

 Find: a mathematical model

 Procedure:

 The model is built following a systematic procedure given below with

seven steps.
Seven Step Modeling Procedure

Fig. 5: model process

Seven Step Modeling Procedure
 The steps of the modeling procedure are as follows:.
 Define the problem
This step refines the sections already present in the problem
definition: the description of the process system with the modeling
goal. Moreover, it fixes
 the degree of detail relevant to the modeling goal and specifies:
inputs and outputs, hierarchy level relevant to the model or hierarchy
levels of the model in the case of hierarchical models
 the type of spatial distribution (distributed or lumped model)
 the necessary range and accuracy of the model and
 the time characteristics (static versus dynamic) of the process
Identify the controlling factors or

 Identify the controlling factors or mechanisms

 The next step is to investigate the physico-chemical processes and
phenomena taking place in the system relevant to the modeling goal.
 These are termed controlling factors or mechanisms. The most important
and common controlling factors include:
 chemical reaction
 diffusion of mass
 conduction of heat

 forced convection heat transfer

 free convection heat transfer
 radiation heat transfer
 Evaporation
 turbulent mixing
 heat or mass transfer through a boundary layer
 fluid flow
 As we consider the system under study, we recognize the following
 There is a set of all process characteristics which are never fully
 In the s et of all process characteristics for the system we often:
only identify and include in the model a subset of the essential
 This means that some essential characteristics for the application
can be missing from our model description; include non-essential
characteristics of the system in our models, which lead to
unnecessary complexity and/or model order (or size).

 We sometimes incorrectly identify process characteristics which are

actually not part of the system and include them in our model.
 The previous issues are often difficult to resolve and very dependent
on our understanding of the system and our insight into what is
 Model validation and the principle of parsimony, which seeks the
simplest representation for the task are the tools that need to be
employed to address these issues.

 It is very important to emphasize that one has to filter carefully the

set of all possible controlling mechanisms taking into account the
following key elements in the problem definition:

 the hierarchy level(s ) relevant to the model,

 the type of spatial distribution,
 the necessary range and accuracy,
 the time characteristics.
Example: Modeling example: CSTR
 Develop a process model of the continuously stirred tank for dynamic
prediction and control purposes following the SEVEN STEP MODELING
PROCEDURE with all of its ingredients.
Problem definition
 The process system to be modeled is a continuously stirred tank with
continuous fluid flow in and out and with a single first order chemical
reaction A → B taking place in an inert solvent.
 The tank is adiabatic with its wall perfectly insulated from the environment.
The flowsheet schematic of this tank is shown in the Fig. 4. (This
description of the process system is exactly the same as the Process
system section in the Problem definition of previous example)

 The modeling goal is to predict the behaviour of the principal mass

and energy states of the tank contents if the inlet concentration is
changed over a stated range. The accuracy of the predictions should
be ± 10% of the real process.
 Controlling factors or mechanisms
 chemical reaction
 perfect mixing
 Data for the problem

 No measured data is specified; therefore, we use the following

parameter type data:
 reaction kinetic data, heat of reaction
 physico-chemical properties
 equipment parameters from the literature or given by the process

 Process model
 Assumptions
 A1 : perfect mixing,
 A2 : constant physico-chemical properties
 A3 : equal inflow and outflow (implying constant liquid volume with V =
 A4 : single first-order exothermic reaction, A→ P,
 A5 : adiabatic operation.
Model equations and characterizing variables
Differential (balance) equations in molar units
dt = fAi − fA − rV ……………………………………………………………………..(1)
V ρcp dT
dt = fcpi ρi (Ti − T) + rV(−∆HR)………………………………....(2)
Constitutive equations.
r = k0e −E /(RT)CA …………………………………………………………………….(3)
mA = CAV ……………………………………………………………………………………..(4)
fAi = fCAi ……………………………………………………………………………………….(5)
fA = fCA …………………………………………………………………………………………(6)
 Variables Ti : inlet temperature [K]
t: time[s] ∆HR : heat of reaction [J/mol]
CA : concentration in the tank [mol E : activation energy [J/mol]
/m3]; k0 : pre-exponential factor [s −1]
V : liquid volume [m3]; R : universal gas constant, 8.314
f : volumetric flowrate [m3/s ]; [J/(molK)]
CAi : inlet concentration [mol/m3]; ρ : density of mixture [mol/m3]
r : reaction rate [mol/(s.m3)]; ρi : density of feed i [mol/m3]
cp : specific heat of mixture mA: moles of A [mol]
[J/(molK)]; fAi : inlet flowrate of species A
cpi : specific heat of feed i [mol/s]
[J/(molK)] ;
T : temperature in the tank [K];
Initial conditions:
 CA(0) = CAi , T(0) = Ti
Boundary conditions:
 none
 Values for the following parameters with 10% precision:
V , f , CAi , Ti , cp , cpi , ρ, ρi and for the reaction parameters with 30%
precision: k0, E, ∆HR
Solution procedure:
 Solve using an ODE or differential-algebraic equation solver.

 Model verification
 Implement model equations using structured programming principles
for every balance volume in the system.
 Provide measured data from pilot plant or real process.
 Analyze plant data quality.
 Carry out validation of predicted outputs from step test of system
using least squares estimation of error.
 Apply hypothesis testing to validate model based on least squares
 Refine model as required by performance criteria.