Process Modelling and Simulation
Process Modelling and Simulation
(RP 477)
By Cornelius
January 2024
COURSE OUTLINE
At the end of this course, students should be able to understand the :
Fundamentals of
Process models
Modelling, classification
examples of importance, Simulation of systems.
of models,
modelling of Reactors, Simulation strategies,
determination of the
Distillation columns, process simulator
process model, typical
furnaces, heat process simulation with
mathematical forms of
exchangers etc. software’s, integrated
models, component
Linearisation of non- computer aided design,
balance, energy balance,
linear
equation.
Course Assessments
Assessment of students
The student’s assessment will be in three forms:
Continuous
Assessment [40%]
• Laboratory practical
• Attendants
End of semester
(COMPULSORY) examination [60%]
• Quizzes, Test, Group
and project works,
assignments
Course Assessments
Assessment of Lecturer
At the end of the course each student will be required to evaluate the course and the
lecturer’s performance by answering a questionnaire specifically prepared to obtain the
views and opinions of the student about the course and lecturer. Please be sincere and
frank.
References
Introduction to Modelling and
Simulation
Process Modelling and Simulation
(RP 477)
January 2024
By Cornelius
Introduction to Modelling and Simulation
Basic Definitions
What is a model?
Model ≠ reality
A simplification
It helps to understand a real system
Model has its roots from the Latin word modus, which means a measure.
Model means a small representation of a planned or existing object
(Webster’s New World Dictionary).
Introduction to Modelling and Simulation
Basic Definitions
Examples of models
Introduction to Modelling and Simulation
Basic Definitions
Examples of models
Introduction to Modelling and Simulation
Basic Definitions
What is a system?
Example of a system?
(2)
➢ The mass balance equation may be developed with respect to the total
mass or the mass of individual components in a mixture.
➢ The balance equation that is derived with respect to total mass is known as
total mass balance or overall mass balance equation or total continuity.
(3)
➢ Now we wish to develop the mass balance equations for a mixture that has
total n number of components.
Introduction to Modelling and Simulation
Conservation Principle
➢ Employing Equation (3), we can obtain one total mass balance equation
along with n component mass balance equations (one for each component),
total (n + 1) equations.
➢ It should be noted that the total mass balance equation does not have any
generation or depletion term (both are always zero) because mass can never
be totally created or totally destroyed in a system that operates under
nonrelativistic conditions. But the mass of an individual component within a
system may change, for example, because of chemical reaction. One
component (say, reactant) that disappears may appear as another component
(product).
Introduction to Modelling and Simulation
Conservation Principle
(4)
(4)
➢ All the process variables we mentioned above, such as input, state, or output
variables, depend on time and/or spatial position.
➢ Therefore, they all are considered as dependent variables. Whereas, time and
the spatial coordinate variables are the independent variables.
Introduction to Modelling and Simulation
Model Representation
Figure 1.1.
Introduction to Modelling and Simulation
Model Representation
➢ In the process control, the input variables are again classified into two
categories: load variables (or disturbances) and manipulated (or
adjustable) variables.
Figure 1.1.
Introduction to Modelling and Simulation
Model Representation
Figure 1.1.
➢ For example, in Figure 1.1, the liquid volume (or height) in the tank can be
maintained (or controlled) by adjusting (or manipulating) the flow rate of the outlet
stream Fo. It implies that Fo is the manipulated variable, i.e., input variable.
Introduction to Modelling and Simulation
Model Representation
➢ Figure 2 shows the dependency of the output variable y on the state variable x.
In the pictorial illustrations, g has been considered as a nonlinear function of x.
g(x) = Cx...................................(6)
➢ that implies,
y = Cx........................................(7)
➢ When C is unity, the output variable and state variable are the same.
➢ The equations, which are derived by the application of the conservation principle
on the fundamental quantities to relate the state variables with the other variables
(including other state variables), are called state equations.
➢ Let us consider the example of the liquid tank (Figure 1.1). The principle of
conservation of mass implies;
➢ A process model is said to be linear if the model comprises of either linear AE(s)
or linear ODE(s) or both.
➢ On the other hand, the nonlinear model structure consists the nonlinear AE(s)
and/or nonlinear ODE(s). Also, the nonlinear models may include linear form of
equations.
Figure 3.
Introduction to Modelling and Simulation
Types of Mathematical Models
Figure 1.2
Introduction to Modelling and Simulation
Types of Mathematical Models
➢ P = P0 + h^…...................(10)
where, P = pressure at depth h (kg/m2) (depth is in m)
P0 = pressure above surface (kg/m2)
^ = liquid density (kg/m3)
➢ Equation 10 can used to calculate the pressure P at any liquid
depth h in the vessel. Figure 1.2
Introduction to Modelling and Simulation
Types of Mathematical Models
Figure 1.3
Introduction to Modelling and Simulation
Types of Mathematical Models
➢ (11)
➢ where, F = flow through valve (m3/s)
CV = valve coefficient (m3/(s)(kg/m2)1/2)
∆P = pressure drop across valve (kg/m2)
GF = specific gravity of liquid (dimensionless)
Figure 1.3
Introduction to Modelling and Simulation
Types of Mathematical Models
➢ A static model is one, which is developed based on the steady state information,
in which nothing changes with time.
➢ The static model is suitable to use only for steady state analysis.
➢ The static models do not provide satisfactory results in dynamic situations.
➢ Therefore, the dynamic model can be employed to predict the process behaviours
adequately at static as well as dynamic conditions.
➢ Many processes, such as batch reactors, batch distillation columns, etc., are
inherently dynamic. For these processes, it is essential to use the dynamic model
only
Introduction to Modelling and Simulation
Model Representation
(9)
Figure 1.1.
Introduction to Modelling and Simulation
Model Representation
(12)
➢ where, hs, Fis and Fos are the steady state values of
h, Fi and Fo respectively.
➢ Equation(12) is the static model or steady state Figure 1.1.
Figure 1.4
Introduction to Modelling and Simulation
Types of Mathematical Models
(15)
➢ Since the volumetric flow rates of inlet and outlet streams are equal (F), Equation
(15) implies that the volume of liquid mixture in the tank (V) remained constant.
Introduction to Modelling and Simulation
Types of Mathematical Models
➢ Lets develop the energy balance equation for the process example.
➢ From the principle of conservation of energy:
(16)
➢ After simplification,
(18)
➢ When the variables of a process vary with both spatial position and time, such a
process is referred to as distributed parameter system.
➢ There are more than one independent variable, and the observed process
variations are distributed among them.
➢ The mathematical model that represents a distributed system is called distributed
parameter model.
➢ This model typically takes the form of partial differential equations so that the
additional variation with spatial position be accounted for properly.
Introduction to Modelling and Simulation
Types of Mathematical Models
➢ The temperature does not change along the radius of the tube.
➢ Physical properties are assumed constant.
➢ The average velocity of the liquid (v) is assumed constant.
➢ The shell-side steam is assumed to be at a constant temperature Tst .
➢ The dynamics of the tube and shell walls are negligibly small. Any
accumulation of energy within the element is due entirely to the liquid
occupying the element, not in the heat exchanger wall.
Introduction to Modelling and Simulation
Types of Mathematical Models
➢ Based on these assumptions, let us develop the energy balance equation for the
heat exchanger. For the present case, Equation (16) becomes:
[Accumulation of energy] = [Input of energy] – [Output of energy] (19)
➢ Amount of energy out at Z + ϵZ with flowing liquid during the time period ϵt
Introduction to Modelling and Simulation
Types of Mathematical Models
➢ Q is the rate of heat transferred from the shell-side steam to the tube-side liquid
per unit heat transfer area
➢ D the external diameter of the tube and
➢ A the cross-sectional area of the tube.
Inserting the above terms into Equation (19), we obtain
(20)
Introduction to Modelling and Simulation
Types of Mathematical Models
➢ Rearranging, we have
(21)
➢ Dividing both sides of the above equation by ϵt ϵZ and then assuming and
we finally get
Introduction to Modelling and Simulation
Types of Mathematical Models
➢ Where
(22)
➢ U is the overall heat transfer coefficient between the steam and the liquid.
➢ The partial differential Equation (21) represents a distributed parameter model
because the liquid temperature T varies with two independent variables, time t
and length Z.
Introduction to Modelling and Simulation
Types of Mathematical Models
➢ The fundamental models are derived by applying the conservation principle and
may also include transport phenomena, reaction kinetics, and thermodynamic
(e.g. phase equilibrium) relationships.
➢ For example, Equation (18) represents a fundamental model for a stirred heating
tank since this model is constructed based on the principle of conservation of
energy.
Introduction to Modelling and Simulation
Types of Mathematical Models
➢ initial values of the dependent variables including the values of the inputs
as functions of time, and
➢ constant parameters.
➢ computer simulation is used extensively to analyze the dynamics of chemical
processes or aid in the design of controllers and study their effectiveness in
controlling a process.
Introduction to Modelling and Simulation
Uses of Simulated Process Model
➢ The equation or set of equations that consist the mathematical model do not
represent exactly the real process.
➢ In other words, the process model cannot incorporate all of the features of the
true process.
➢ The process model can be used for the following purposes:
➢ To improve understanding of the process
➢ To train plant operating personnel
Introduction to Modelling and Simulation
Types of Mathematical Models
In this chapter, we have studied about several important terms, such as model,
process model, system, etc., and their details. Then the general form of the
conservation principle is outlined in terms of three fundamental quantities—mass,
energy and momentum. Subsequently, different groups of variables including the
state variable, and the state equation are presented in detail with a liquid tank
example. Also, different types of modelling equations are discussed in brief. Next,
different types of mathematical models are explained by taking appropriate
chemical process examples. We have also studied briefly about the computer
simulation of the process model.
Batch Reactor
➢ The following cases are efficiently handled by the batch mode of operation;
➢ (i) Slow reactions are best handled in batch processing since temperature
and pressure are much easier to control in batch units
➢ (iii) Reactions in which oxygen from the air may interfere with.
Batch Reactor
➢ Although the batch reactor is very flexible, its operation and product quality
control are usually difficult. Batch processes are inherently transient in nature (no
steady state) and this behaviour leads to operation under a wide range of
conditions.
➢ However, a realistic dynamic process model can be used as a diagnostic tool to
identify the operating problems. Also, an efficient controller can maximize the
yield of desired product.
Batch Reactor
➢ In the present study, we will develop a mathematical model for a batch reactor. It
is recognized that the control of a batch reactor system provides an interesting
challenge in that the system has no steady state.
➢ We are interested to observe the closed-loop process response by implementing
a conventional proportional integral (PI) controller.
➢ Finally, the mathematical modelling of a semi-batch reactor will also be covered.
Batch Reactor
Batch Reactor Process Description
Figure 1.6
Batch Reactor
Batch Reactor Process Description
➢ Consider the following consecutive reactions that take place in the reactor:
➢ Again if we stop the reaction too early, the conversion of A may be very low.
➢ Therefore, there is an optimum time when we can stop the operation and get the
maximum amount of desired product. This time is known as batch time.
Batch Reactor
Mathematical Model For Batch Reactor
➢ Both the chemical reactions occurred in the example, batch reactor, are
exothermic.
➢ The reactor is well-insulated such that there is negligible heat exchange in
between the reactor and the external environment.
Batch Reactor
Mathematical Model For Batch Reactor
➢ The inlet and outlet coolant temperatures do not vary much due to a
sufficiently rapid flow rate of the coolant stream. Therefore, an average
water coolant temperature Tc is used in the mathematical model.
➢ The condensed steam is discharged at its saturation temperature
➢ We assume constant volume (V) reactor with constant mixture heat
capacity (Cp). i.e the volume refers to the volume of reaction mixture, not
the volume of reactor.
Batch Reactor
Mathematical Model For Batch Reactor
➢ The reactor contents are perfectly mixed and do not exhibit significant
gradients of species concentrations or temperature in any part of the
reactor.
➢ The overall heat transfer coefficient for heating jacket Uj is assumed
constant but the overall heat transfer coefficient for the cooling coil Uc is
assumed to be a function of the coolant flow rate Fc as:
(23)
Batch Reactor
Mathematical Model For Batch Reactor
(24)
(25)
Batch Reactor
Mathematical Model For Batch Reactor
➢ Since ρ is the mixture density and V is the mixture volume, and ρV becomes the
total mass inside the reactor. Substituting all these terms in Equation (25), we get
the total continuity equation as:
(26)
(27)
(31)
(33)
(34)
➢ For the sample batch reactor, the Arrhenius equation [Equation (34)] gives the
following forms:
(35)
(36)
➢ The above two equations have been used in the component continuity and
energy balance equations.
Batch Reactor
Mathematical Model For Batch Reactor
(37)
Batch Reactor
Mathematical Model For Batch Reactor
➢ Here, Aj and Ac are the heat transfer areas of the heating jacket and the cooling
coil respectively. Since we have assumed that the reactor is well-insulated and,
therefore, no heat exchange in between the reactor and the environment is
accounted.
Batch Reactor
Mathematical Model For Batch Reactor
➢ (–∆H1) and (–∆H2) are the exothermic heats of reaction for the two reactions.
➢ It is well-known that the heat of reaction is negative for the exothermic reaction
and positive for the endothermic reaction.
➢ Substituting all these energy terms in Equation (37), we obtain the following form:
(38)
Batch Reactor
Mathematical Model For Batch Reactor
➢ Rearranging,
(39)
➢ This is the energy balance equation for the sample batch reactor.
Continuous Stirred Tank Reactor
INTRODUCTION
➢ The continuous stirred tank reactor (CSTR) or backmix reactor is a tank type
reactor in which the contents are well stirred and it runs with continuous flow of
reactants as well as products.
➢ Also, the concentration and temperature of the material leaving the tank must be
exactly the same as those of the material in the tank.
➢ The CSTR is widely used for large-scale production, whereas the batch
processing is preferred in case of small-scale operation.
➢ If there is any fault in the plant, the process engineer may realize it through the
discrepancy between the model predictions and plant outputs. Then the
necessary corrective measures can be taken accordingly.
Continuous Stirred Tank Reactor
Process Description of Continuous Stirred Tank Reactor
➢ The assumptions made in the development of the reactor model are summarized
below.
➢ The heat losses from the process (well-insulated) to the atmosphere are
negligible.
➢ The mixture density (ρ) and heat capacity (Cp) are assumed constant.
➢ The mass of the metal walls is negligible so the thermal inertia of the
metal need not be considered.
➢ The exit stream has the same concentration and temperature as the entire
reactor liquid.
➢ The reactor is a flat-bottomed vertical cylinder and the jacket is around the
outside and the bottom.
Continuous Stirred Tank Reactor
Mathematical Model Development for Continuous Stirred Tank
Reactor
(40)
➢ We have assumed that the density of liquid inside the reactor is equal to the feed
density and is constant in time.
Continuous Stirred Tank Reactor
Mathematical Model Development for Continuous Stirred Tank
Reactor
➢ Now we need a hydraulic relationship between the reactor holdup (in terms of V
or h) and the exit flowrate Fo. We can assume (Stephanopoulos, 1998):
Continuous Stirred Tank Reactor
Mathematical Model Development for Continuous Stirred Tank
Reactor
➢ For the example CSTR, the above equation can be expressed as:
(41)
➢ Now inserting Equation (41) into Equation (9) and rearranging, we finally obtain
the following total mass balance equation:
(42)
Continuous Stirred Tank Reactor
Mathematical Model Development for Continuous Stirred Tank
Reactor
➢ Here, (–rA) is the rate of disappearance of species A. Substituting all these terms
(mol/time) in the basic balance Equation (24), we obtain
(43)
(44)
Continuous Stirred Tank Reactor
Mathematical Model Development for Continuous Stirred Tank
Reactor
(45)
(47)
➢ Substituting Equation (47) into Equation (46), we finally obtain the following
component mass balance equation:
(48)
Continuous Stirred Tank Reactor
Mathematical Model Development for Continuous Stirred Tank
Reactor
➢ Here, Ah is the heat transfer area and (–∆H) represents the heat of reaction.
Using Equation (24), we get the following form:
(49)
Continuous Stirred Tank Reactor
Mathematical Model Development for Continuous Stirred Tank
Reactor
(50)
➢ We have assumed that the example CSTR is a flat-bottomed vertical cylinder and
the jacket is around the outside and the bottom.
Continuous Stirred Tank Reactor
Mathematical Model Development for Continuous Stirred Tank
Reactor
Or Ah = Ac + 𝜋dh (4.13)
(52)
where d is the diameter of the cylindrical reactor. Many reactors are such that the
jacket is only around the outside, not around the bottom of the reactor, and then
Ah = 𝜋dh (53)
(4.14)
Continuous Stirred Tank Reactor
Isothermal Constant-holdup CSTRs
➢ Fig. 1.8 represents a simple CSTR considered where product B is produced
and reactant A is consumed in each of the three perfectly mixed reactors by a
first-order reaction occurring in the liquid.
➢ It is assumed that the temperatures and holdups (volumes) of the three tanks
can be different, but both temperatures and the liquid volumes are assumed
to be constant (isothermal and constant holdup).
➢ If the volume and density of each tank are constant, the total mass in each
tank is constant. Thus, the total continuity equation for the first reactor is
(54)
(55)
Continuous Stirred Tank Reactor
Isothermal Constant-holdup CSTRs
➢ We want to keep track of the amounts of reactant A and product B in each tank,
so component continuity equations are needed.
➢ However, since the system is binary and we know the total mass of material in
each tank, only one component continuity equation is required.
➢ We want to keep track of the amounts of reactant A and product B in each tank,
so component continuity equations are needed.
➢ However, since the system is binary and we know the total mass of material in
each tank, only one component continuity equation is required.
(56)
(57)
If the temperatures in the reactors are different, the k’s are different. The n refers to
the stage number.
Continuous Stirred Tank Reactor
Isothermal Constant-holdup CSTRs
➢ The volumes V, can be pulled out of the time derivatives because they are
constant.
➢ The flows are all equal to F but can vary with time. An energy equation is not
required because we have assumed isothermal operation.
➢ Any heat addition or heat removal required to keep the reactors at constant
temperatures could be calculated from a steadystate energy balance (zero time
derivatives of temperature).
Continuous Stirred Tank Reactor
Isothermal Constant-holdup CSTRs
➢ The three first-order nonlinear ordinary differential equations given in Eqs. (54)
are the mathematical model of the system.
➢ The parameters that must be known are V1, V2, V3, k1, k2, and k3.
➢ The variables that must be specified before these equations can be solved are F
and CA,. “Specified” does not mean that they must be constant.
➢ They can be time-varying, but they must be known or given functions of time.
They are the forcing functions.
➢ The initial conditions of the three concentrations (their values at time equal zero)
must also be known.
Continuous Stirred Tank Reactor
Isothermal Variable Holdups CSTRs
➢ If the previous example is modified slightly to permit the volumes in each
reactor to vary with time, both total and component continuity equations are
required for each reactor.
➢ To show the effects of higher-order kinetics, assume the reaction is now nth-
order in reactant A.
(58)
(59)
(60)
Continuous Stirred Tank Reactor
Isothermal Constant-holdup CSTRs
➢ Initial conditions for all the dependent variables that are to be integrated must be
given: CA1, CA2, CA3, V1, V2, and V3.
➢ Initial conditions for all the dependent variables that are to be integrated must be
given: CA1, CA2, CA3, V1, V2, and V3.
www.umat.edu.gh