You are on page 1of 19

Process Control for Chemical Engineers:

Dynamic Modeling

Muhammad Mufti Azis, Ph.D


Danang Tri Hartanto, M.Eng
Department of Chemical Engineering,
Faculty of Engineering
Universitas Gadjah Mada, Indonesia
Learning Outcome:
• To explain types and working principles of
measurement systems, controllers, control valves, and
process control.
• To develop mathematical and transfer function models
for dynamic processes.
• To predict process stability and dynamic responses, and
to design feedback control system.
• To combine and adapt the advantages and limitation
of some process control strategies.
Learning Objective:
• Student should be able to develop a dynamic model in
time domain
• Student should be able to implement mass and energi
balance to develop a mathematical model
• Student should be able to solve the dynamic model to
describe step change in a computational software
Agenda:

• Introduction: Mathematical Model


• Mass and Energy Balances
• Example 1: Stirred Tank Heater
• Example 2: Modeling Van de Vusse Reactor
• Example 3: Modeling Chemostat
Introduction: Mathematical Model

• Definition of a Mathematical Model (Eykhoff, 1974)


“a representation of the essential aspects of an existing system (or a system to be
constructed) which represents knowledge of that system in a usable form”
• Everything should be made as simple as possible, but no simpler.
• The model equations are at best an approximation to the real process.
• Adage: “All models are wrong, but some are useful.”
• Modeling inherently involves a compromise between model accuracy and
complexity on one hand, and the cost and effort required to develop the model,
on the other hand.
• Process modeling is both an art and a science. Creativity is required to make
simplifying assumptions that result in an appropriate model.
• Dynamic models of chemical processes consist of ordinary differential equations
(ODE) and/or partial differential equations (PDE), plus related algebraic equations.
Introduction: Mathematical Model

Chem. Eng . Mathematical Simulated


Analyses Decision
Phenomenon Model Result

It requires:
• Strong fundamental knowledge in Chem. Eng.
• Strong computational skill and math concept
• Imagination skill
• Ability to simplify a problem (taking appropriate assumptions)

Here at UGM, we have 6 chemical engineering tools:


• Mass balance
• Energy balance
• Rate processes
• Equilibrium
• Economic
• Humanity
Mass Balance

Input System Output

• Overall mass balance: for any system, the total mass going into the system must
equal the total mass coming out of the system plus any accumulation of mass in
the system.
Batch system: mass (m) in kg.
Continuous system: mass flowrate (𝑚)ሶ in kg/s
• Component mass balance: for any component in a system, the total mass of
that component going into the system must equal the total mass of that
component coming out of the system plus any accumulation of that component
in the system
• For any system (or sub-system), the number of mass balance equations = the
number of components in the product
• One mass balance equation can be written for each component

𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝐼𝑛 − 𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝑜𝑢𝑡 = 𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝐴𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛


Energy Balance

Input System Output

• Energy balance: for any system, the energy going into the system must equal
the energy coming out of the system plus any accumulation of energy in the
system.
• Only ONE energy balance equation is written for any system (or sub-system)
irrespective of the number of component in the product(s)
• Once mass anad energy balance equation are written, make sure that the
number of equations and number of unknowns are equal
• For heat balance, we can write general formula as:

𝑅𝑎𝑡𝑒 𝑜𝑓 𝐻𝑒𝑎𝑡 𝐼𝑛 − 𝑅𝑎𝑡𝑒 𝑜𝑓 𝐻𝑒𝑎𝑡 𝑜𝑢𝑡 = 𝑅𝑎𝑡𝑒 𝑜𝑓 𝐻𝑒𝑎𝑡 𝐴𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛


Example 1: Stirred Tank Heater

We will develop a dynamic model for a stirred tank heater by setting up the heat and
material balance equations for the case where the volume might change (since flow out
of the tank can be controlled by a valve)
Example 1: Stirred Tank Heater
The overall mass balance on this system will be:
𝑑(ρ1 𝑉)
= ρ0 𝐹0 − ρ1 𝐹1
𝑑𝑡
Where the volume in the tank,V, might be changing with time (since the liquid level
might be changing). If we simplify the physical properties by assuming a constant liquid
density, ρ1=ρ0=ρ, and if the valve has a linier flow characteristics: F1=α.h, then:

𝑑(ρ1 . 𝐴𝑐 . ℎ)
= ρ0 𝐹0 − ρ1 𝐹1
𝑑𝑡
Or it can also be written in a form of:
𝑑ℎ αℎ 𝐹0
+ =
𝑑𝑡 𝐴𝑐 𝐴𝑐
Example 1: Stirred Tank Heater
The energy balance will be:
𝑑(ρ1 𝑉𝐻1 )
= ρ0 𝐹0 𝐻0 − ρ1 𝐹1 𝐻1 + Q
𝑑𝑡
We can split apart the time derivative term:

𝑑(𝐻1 ) 𝑑(ρ1 𝑉)
ρ1 𝑉 + 𝐻1 = ρ0 𝐹0 𝐻0 − ρ1 𝐹1 𝐻1 + Q
𝑑𝑡 𝑑𝑡

And then insert the mass balance ODE for the second time derivative:
𝑑(𝐻1 )
ρ1 𝑉 + 𝐻1 (ρ0 𝐹0 − ρ1 𝐹1 ) = ρ0 𝐹0 𝐻0 − ρ1 𝐹1 𝐻1 + Q
𝑑𝑡

Doing a little bit of math gives:


𝑑𝐻1
ρ1 𝑉 = ρ0 𝐹0 (𝐻0 −𝐻1 )+ Q
𝑑𝑡
Example 1: Stirred Tank Heater

We would still like to convert the enthalpy terms into terms that directly relate to
temperature. Even with a temperature dependent heat capacity the time derivative can
be split into:
𝑑𝑇1
ρ1 . 𝑉. 𝐶𝑝1 = ρ0 𝐹0 (𝐻0 −𝐻1 ) + 𝑄
𝑑𝑡
If we assume that the heat capacities are constant and that there is no reaction, then:
H(T) = 𝐶𝑝 𝑇 − 𝑇𝑟𝑒𝑓 + 𝐻𝑟𝑒𝑓
As a result:
𝐻𝑟𝑒𝑓,1 = 𝐻𝑟𝑒𝑓,0
𝑑𝑇1

ρ1 . 𝑉. 𝐶𝑝 ෢ 0 − 𝑇1 ) + 𝑄
= ρ0 𝐹0 𝐶𝑝(𝑇
𝑑𝑡
by assuming a constant liquid density, ρ1=ρ0=ρ and we obtain:
𝑑𝑇1

ρ. 𝑉. 𝐶𝑝 ෢ 0 −𝑇1 ) + 𝑄
= ρ 𝐹0 𝐶𝑝(𝑇
𝑑𝑡
Example 1: Stirred Tank Heater
Summary for the dynamic model of level and temperature for this system:

• From overall mass balance:


𝑑(ℎ)
𝐴𝑐 = 𝐹0 − αℎ
𝑑𝑡
• From energy balance:

𝑑𝑇1

ρ. 𝑉. 𝐶𝑝 ෢ 0 −𝑇1 ) + 𝑄
= ρ 𝐹0 𝐶𝑝(𝑇
𝑑𝑡
We can also write in a more operational form as:
𝑑ℎ 𝐹0 αℎ
= −
𝑑𝑡 𝐴𝑐 𝐴𝑐
𝑑𝑇1 𝐹0 (𝑇0 − 𝑇1 ) 𝑄
= −
𝑑𝑡 𝐴𝑐 . ℎ ෢
ρ. 𝐴𝑐 . ℎ. 𝐶𝑝
Example 2: Modeling Van de Vusse Reactor

In an ideal CSTR, we would like to run a reaction scheme consisting of following


irreversible reactions namely Van de Vusse reaction:
𝑘1 𝑘2
A՜𝐵՜𝐶
𝑘3
2A ՜ 𝐷
This scheme was presented by Van de Vusse (1964) and it was found that the production of
cyclopentinol from cyclopentadiene is based on such a reaction scheme, where
A=cyclopentadiene, B=cyclepentenol, C=cyclopentanediol and D=dicyclopentadiene. In
this system, we assume that the feedstream only contains component A. In addition, we
also assume that the reactor operates under isothermal condition and the reaction rate
follows elementary reaction rates.
Example 2: Modeling Van de Vusse Reactor

We can now set up mole balance for component A as:


𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝐼𝑛 − 𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝑜𝑢𝑡 = 𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝐴𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛
𝑑𝐶𝐴
𝐹𝑖𝑛 . 𝐶𝐴0 − 𝐹𝑜𝑢𝑡 . 𝐶𝐴 − 𝑘1 𝐶𝐴 +𝑘3 𝐶𝐴2 𝑉=𝑉
𝑑𝑡
By assuming constant liquid volume, we can set Fin=Fout=F.
In addition, we can define residence time, τ=V/F, to obtain:

𝐶𝐴0 𝐶𝐴 2
𝑑𝐶𝐴
− − 𝑘1 𝐶𝐴 −𝑘3 𝐶𝐴 =
τ τ 𝑑𝑡
Similarly, we can set up component mole balance for B, C and D:
𝑟𝐴 𝑟𝐵
𝐶𝐵 𝑑𝐶𝐵 𝑘1 𝑘2
=
0− + 𝑘1 𝐶𝐴 −𝑘2 𝐶𝐵 = −1 1 Stoichiometry
τ 𝑑𝑡 A՜𝐵՜𝐶 𝑟𝐵 𝑟𝐶 Concept
𝐶𝑐 𝑑𝐶𝐶 =
−1 1
0 − +𝑘2 𝐶𝐵 =
τ 𝑑𝑡
𝑘3 𝑟𝐴 𝑟𝐷
𝐶𝐷 1 2
𝑑𝐶𝐷 2A ՜ 𝐷 =
0− + 𝑘 𝐶 = −2 1
τ 2 3 𝐴 𝑑𝑡
Example 3: Modeling Chemostat

Develop a chemostat/fermentor model which consists of two mass balances, one for cell
mass (or yeast),Cc, and the other for glucose (or substrate), Cs. The reactor operates
under steady state condition and isothermal. It receives continuous supply of substrate.
The outlet of reactor consists of unreacted substrate and a portion of cell. The cell
growth (rg) follows Monod kinetics which can be described as:
𝜇 𝑚𝑎𝑥 ∙ 𝐶𝑆
𝑟𝑔 = 𝜇 ∙ 𝐶𝐶 𝜇=
𝐾𝑚 + 𝐶𝑆
Example 3: Modeling Chemostat
Let’s set up mole balance for the cell as:
𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝐼𝑛 − 𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝑜𝑢𝑡 = 𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝐴𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛
𝑑𝐶𝐶
0 − 𝐹𝑣 𝐶𝑐 + 𝜇 ∙ 𝐶𝐶 𝑉 = 𝑉
𝑑𝑡
𝜇 𝑚𝑎𝑥 ∙ 𝐶𝑆 𝑑𝐶𝐶
0 − 𝐹𝑣 𝐶𝑐 + ∙ 𝐶𝐶 𝑉 = 𝑉
𝐾𝑚 + 𝐶𝑆 𝑑𝑡

Let’s define Dilution Rate (D), D=Fv/V, to obtain:


𝜇 𝑚𝑎𝑥 ∙ 𝐶𝑆 𝑑𝐶𝐶
0 − 𝐷 ∙ 𝐶𝑐 + ∙ 𝐶𝐶 =
𝐾𝑚 + 𝐶𝑆 𝑑𝑡

There is no cell in The dynamic of cell


the inlet flow The rate of cell concentration in the
growth. reactor
The amount of cell
in the outlet flow
(withdrawn from the
reactor) To avoid wash-out: The rate of cell growth >
the rate of cell withdrawn from the reactor
Example 3: Modeling Chemostat
We can now set up mole balance for glucose (substrate) as:
𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝐼𝑛 − 𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝑜𝑢𝑡 = 𝑅𝑎𝑡𝑒 𝑜𝑓 𝑀𝑎𝑠𝑠 𝐴𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛
1 𝑑𝐶𝑆
𝐹𝑣𝐶𝑠0 − 𝐹𝑣𝐶𝑠 − 𝜇 ∙ 𝐶𝐶 𝑉 = 𝑉
𝑌𝑋𝑆 𝑑𝑡
1 𝜇𝑚 𝑎 𝑥 ∙ 𝐶𝑆 𝑑𝐶𝑆
𝐹𝑣𝐶𝑠0 − 𝐹𝑣𝐶𝑠 − ∙ ∙𝐶 𝑉=𝑉
𝑌𝑋𝑆 𝐾𝑚 + 𝐶𝑆 𝐶 𝑑𝑡

Let’s define Dilution Rate (D), D=Fv/V, to obtain:

1 𝜇𝑚 𝑎 𝑥 ∙ 𝐶𝑆 𝑑𝐶𝑆
𝐷𝐶𝑠0 − 𝐷𝐶𝑠 − ∙ ∙ 𝐶𝐶 =
𝑌𝑋𝑆 𝐾𝑚 + 𝐶𝑆 𝑑𝑡

The amount of substrate The amount of The dynamic of


in the inlet flow substrate needed for substrate
cell growth rate. concentration in the
Note that YXS is the reactor
The amount of yield of cell over
substrate in the substrate
outlet flow
Example 3: Modeling Chemostat
Summary from model development in a Chemostat:

• Dynamic model for cell concentration


𝜇 𝑚𝑎𝑥 ∙ 𝐶𝑆 𝑑𝐶𝐶
0 − 𝐷 ∙ 𝐶𝑐 + ∙𝐶 =
𝐾𝑚 + 𝐶𝑆 𝐶 𝑑𝑡
• Dynamic model for substrate concentration
1 𝜇𝑚 𝑎 𝑥 ∙ 𝐶𝑆 𝑑𝐶𝑆
𝐷𝐶𝑠0 − 𝐷𝐶𝑠 − ∙ ∙𝐶 =
𝑌𝑋𝑆 𝐾𝑚 + 𝐶𝑆 𝐶 𝑑𝑡
• These two differential equations are highly non-linear. It can be solved simultaneously using an
ODE Solver (Easy!).
• There are a number of rate growth kinetics (not only Monod) such as: Tessier, Contois, Moser,
Webb, Gompertz, Logistic, etc.
• Cell maintenance term is often included in the mass balance of substrate. It reflects the amount
of substrate needed for cell maintenance.
• The rate of cell death term can also be included in the cell balance.
• Cell metabolism often produced a desired product. If there is a product, an additional differential
equation should be set up. The product is often produced during growth phase (primary
metabolism). However, some products can also be produced during stationary phase
(secondary metabolism)

You might also like