100% found this document useful (1 vote)
146 views56 pages

Chapter 2 - Mathematical Modelling

This document provides an overview of mathematical modeling of chemical processes. It discusses developing dynamic models from physical and chemical principles, the rationale for dynamic models, and a general strategy for deriving them. Key equations covered include mass balances, component balances, energy balances, and transport equations. The document also discusses modeling approaches, principles of model formulation, and a systematic approach for developing dynamic models. The overall intent is to help students understand mathematical modeling of chemical processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
146 views56 pages

Chapter 2 - Mathematical Modelling

This document provides an overview of mathematical modeling of chemical processes. It discusses developing dynamic models from physical and chemical principles, the rationale for dynamic models, and a general strategy for deriving them. Key equations covered include mass balances, component balances, energy balances, and transport equations. The document also discusses modeling approaches, principles of model formulation, and a systematic approach for developing dynamic models. The overall intent is to help students understand mathematical modeling of chemical processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

CEB2083 PROCESS INSTRUMENTATION & CONTROL

MAY 2020 SEMESTER

Chapter 2:
Mathematical Modelling of Chemical Processes

BY
Assoc. Prof. Dr Marappagounder Ramasamy / Dr Serene Lock /
Dr Mohd Hilmi Noh / Dr Nurul Aini Amran

UNIVERSITI TEKNOLOGI PETRONAS (UTP)


Chapter Objectives

End of this chapter, you should be able to:


1. Develop unsteady-state models (dynamic models) of chemical
processes from physical and chemical principles
2. Explain the rationale for dynamic models
3. Explain a general strategy for deriving dynamic models
Course learning outcomes

CLO1
Develop dynamic models of chemical processes

CLO2
Design feedback control systems using modern IT tools

CLO3
Select appropriate instruments for control systems
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.
Uses of mathematical models

DESIGN
Exploring the sizing and arrangement of processing equipment
for dynamic performance.

Studying the interactions of various parts of the


process, particularly when material recycle or heat
integration is used.

Evaluating alternate process and control structures and


strategies.

Simulating start-up, shutdown, and emergency


situations and procedures.
Uses of mathematical models

PLANT OPERATION

01 Troubleshooting and processing problems

02 Aiding in start-up and operator training

03 Studying the effects of and the requirements for expansion (bottle-


neck removal) projects

04 Optimizing plant operation

It is usually much cheaper, safer, and faster to conduct the kinds of


05 studies listed above on a mathematical model than experimentally on
an operating unit.
Principles of model formulation

The model equations are at best an


approximation to the real process 1
Adage: “All models are wrong, but
some are useful” 2
Inherently involves a compromise
between:
 model accuracy and complexity
 the time and effort required to
3
develop the model
Process modeling

Both an art and a science

Requires creativity to make simplifying


assumptions that result in an appropriate
model

Dynamic models of chemical processes


consist of ODEs and/or PDEs, plus related
algebraic equations (AEs)
A systematic approach for developing dynamic models

Draw a schematic diagram of the process and label all


01 process variables.

State the modeling objectives and the end use of the model.
02 They determine the required levels of model detail and
model accuracy

List all of the assumptions that are involved in developing


03
the model. Try for parsimony; the model should be no more
complicated than necessary to meet the modeling
objectives.
A systematic approach for developing dynamic models

Determine whether spatial variations of process variables


04 are important. If so, a partial differential equation model
will be required.

Write appropriate conservation equations (mass,


05 component, energy, and so forth).

Introduce equilibrium relations and other algebraic


06 equations (from thermodynamics, transport phenomena,
chemical kinetics, equipment geometry, etc.)

Perform a degrees of freedom analysis (Section 2.3) to


07 ensure that the model equations can be solved.
A systematic approach for developing dynamic models

Simplify the model.


08
 Arrange the equations so that the dependent variables
(outputs) appear on the left side and the independent
variables (inputs) appear on the right side.
 This model form is convenient for computer simulation
and subsequent analysis.

Classify inputs as disturbance variables or as manipulated


09
variables
Modeling approaches
Physical/chemical (fundamental, global)
 Model structure by theoretical analysis
• Material/energy balances
• Heat, mass, and momentum transfer
• Thermodynamics, chemical kinetics
• Physical property relationships
 Model complexity must be determined (assumptions)
 Can be computationally expensive (not real-time)
 May be expensive/time-consuming to develop
 Good for extrapolation, scale-up
 Does not require experimental data to develop (data required for
validation and fitting)
 Theoretical models of chemical processes are based on
conservation laws.
Mass balance
Conservation of Mass

 rate of mass  rate of mass  rate of mass 


    (2-6)
(2.1)
accumulation   in   out 

Conservation of Component i

rate of component i  rate of component i 


  
 accumulation   in 
(2.2)
rate of component i  rate of component i 
   (2-7)
 out   produced 
Energy balance
Conservation of Energy

rate of energy  rate of energy in  rate of energy out 


   
 accumulation   by convection   by convection 

net rate of heat addition   net rate of work 


   
  to the system from   performed on the system  (2-8)
 the surroundings   by the surroundings 
   
(2.3)
Energy balance

Total energy of a system, Utot

U tot  U int  U KE  U PE (2.4)


(2-9)

For the processes and examples considered in this


course, it is appropriate to make two assumptions:
 Changes in potential energy and kinetic energy can
be neglected
 The net rate of work can be neglected
Energy balance

• For these reasonable assumptions, the energy balance in Eq. 2.3 can
be written as

dU int
dt

  wH  Q  (2-10) (2.5)

  denotes the difference


U int  the internal energy of
between outlet and inlet
the system conditions of the flowing
H  enthalpy per unit mass streams; therefore
w  mass flow rate  
-Δ wH = rate of enthalpy of the inlet
stream(s) - the enthalpy
Q  rate of heat transfer to the system of the outlet stream(s)
Transport equations
1. Fick’s Law of Diffusion

• The mass transfer rate, NA (mol/s), for chemical species A at steady-


state is expressed as :

(1)

DAB = Diffusion coefficient (m2/s)


A = Mass transfer surface area (m2)
𝑑𝐶𝐴 𝑚𝑜𝑙/𝑚3
= Concentration gradient of species A in mixture ( )
𝑑𝑧 𝑚

• When surface area, A is divided on both sides of Eqn (1), it gives


the molar flux denoted as JA (mol/m2s).
Transport equations
2. Fourier’s Law of Heat Conduction

𝒒ሶ = Rate of heat transfer (J/s)


k = Thermal conductivity coefficient (W/mK)
A = Heat transfer area (m2)
T1 = Hot region temperature (K)
T2 = Cold region temperature (K)
z = Distance between transfer surfaces (m)
𝑑𝑇 𝐾
= Temperature gradient ( )
𝑑𝑧 𝑚
Transport equations
3. Newton’s Law of Cooling

• Applicable for convective heat transfer at low temperatures.


• According to this law, the rate of cooling of a body is proportional to
the temperature difference between the body and ambient conditions
and the heat transfer area

𝑞ሶ = ℎ𝐴 𝑇2 − 𝑇1
2
• h = heat transfer coefficient (W/m K)
• The effect of flow field on the heat transfer rate is included in the
heat transfer coefficient, h.
Transport equations
3. Mass Transfer

• For interphase molar flux of a species A is

(4)

where kc is mass transfer coefficient, and ΔcA is the difference between


the molar concentrations of the species in two phases across the surface.
Chemical kinetics
3. Rate of Reaction

• The constitutive relation for the reaction rate of an elementary


reaction

is of the form

Where
k is the reaction rate coefficient
cA and cB are concentration of A and B with a and b as stoichiometric coefficients
k0 is the pre-exponential factor
E is the activation energy
R is universal gas constant
T is absolute temperature
Black box (empirical) model

Large number of Can be obtained quickly


unknown parameters (e.g., linear regression)

Model structure is
Dangerous to extrapolate
subjective
Semi empirical model

1 Compromise of first two approaches

2 Model structure may be simpler

Typically 2 to 10 physical parameters estimated


3
(nonlinear regression)

4 Good versatility, can be extrapolated

5 Can be run in real-time


Semi empirical model

6 Linear regression model: y  c0  c1 x

7 Nonlinear regression model: y  c0  c1 x  c2 x 2

Number of parameters affects accuracy of model,


8 but confidence limits on the parameters fitted must
be evaluated

Objective function for data fitting – minimize sum of


9 squares of errors between data points and model
predictions (use optimization code to fit parameters)

10 Nonlinear models such as neural nets are becoming


popular (automatic modeling)
Development of dynamic models
Illustrative Example: A Blending Process

An unsteady-state mass balance for the blending


system:

rate of accumulation   rate of   rate of 


    (2.1)
(2-1)
 of mass in the tank   mass in   mass out 

or
d Vρ  (2.6)
 w1  w2  w (2-2)
dt
where w1, w2, and w are mass flow rates.
Development of dynamic models
A Blending Process

The unsteady-state component balance is:

d Vρx 
 w1 x1  w2 x2  wx (2.7)
(2-3)
dt

The corresponding steady-state model was derived in Ch. 1 (cf. Eqs.


1-1 and 1-2).

0  w1  w2  w (2-4)
(2.8)
0  w1 x1  w2 x2  wx (2-5)

28
The Blending Process Revisited

For constant ρ, Eqs. 2-6 and 2-7 become:

dV
  w1  w2  w (2.9)
(2-12)
dt

 d Vx 
 w1x1  w2 x2  wx (2-13)
(2.10)
dt
Equation 2-10 can be simplified by expanding the accumulation term
using the “chain rule” for differentiation of a product:

d Vx  dx dV
  V  x (2-14) (2.11)
dt dt dt

Substitution of (2-11) into (2-10) gives:


29
dx dV
V  x  w1x1  w2 x2  wx (2.12)
(2-15)
dt dt
The Blending Process Revisited

Substitution of the mass balance in (2-9) for in (2-12) gives:

dx
V  x  w1  w2  w   w1x1  w2 x2  wx (2.13)
(2-16)
dt

After canceling common terms and rearranging (2-9) and (2-13), a


more convenient model form is obtained:

dV 1
  w1  w2  w  (2-17)
(2.14)
dt 
dx w1 w2
  x1  x    x2  x  (2-18)
(2.15)
dt V  V
The Blending Process Revisited

The dynamic model in Eqs. 2-14 and 2-15 is in a convenient form for
subsequent investigation based on analytical or numerical techniques

Specify the inlet compositions (x1


and x2) and the flow rates (w1, w2 dV 1
  w1  w2  w 
and w) as functions of time. dt 
dx w w
 1  x1  x   2  x2  x 
dt V  V
Specify the initial conditions for
the dependent variables, V(0) and
x(0).

Determine the transient responses, V(t) and x(t)


The Blending Process Revisited
Dynamic models of representative processes
Stirred-Tank Heating Process

Figure 2.3 Stirred-tank heating process with constant holdup, V


Stirred-Tank Heating Process
Assumption
Perfect mixing
1
 The exit temperature T is also the temperature of the tank
contents.

2 The liquid holdup V is constant because the inlet and


outlet flow rates are equal.

The density ρ and heat capacity C of the liquid are


3 assumed to be constant.
 Temperature dependence is neglected.

4 Heat losses are negligible.


Stirred-Tank Heating Process
Model Development
• For a pure liquid at low or moderate pressures, the internal energy, Uint, is
approximately equal to the enthalpy, H
• H depends only on temperature
• We assume that Uint = H and where the caret (^) means per unit mass.

A differential change in temperature, dT, produces a corresponding change in


the internal energy per unit mass,

dUˆ int  dH
ˆ  CdT (2.16)
(2-29)

where C is the constant pressure heat capacity.

The total internal energy of the liquid in the tank is:

U int  VUˆ int (2-30) (2.17)


Stirred-Tank Heating Process

An expression for the rate of internal energy accumulation can be


derived from Eqs. (2-16) and (2-17):

dU int dT (2.18)
 VC (2-31)
dt dt

Note that this term appears in the general energy balance of Eq. 2-5.

Suppose that the liquid in the tank is at a temperature T and has an


enthalpy, Ĥ . Integrating Eq. 2-16 from a reference temperature Tref
to T gives,

ˆ H
H ˆ 
ref  C T  Tref  (2.19)
(2-32)
Stirred-Tank Heating Process

Without loss of generality, we assume that Hˆ ref  0 .


Thus, (2-19) can be written as:

H 
ˆ  C T T
ref  (2.20)
(2-33)

For the inlet stream: 


Hˆ i  C Ti  Tref  (2.21)(2-34)

Substituting (2-20) and (2-21) into the convection term of (2-5) gives:

       
 wHˆ  w C Ti  Tref   w C T  Tref 
  (2.22)
(2-35)

Finally, substitution of (2-18) and (2-22) into (2-5)


𝑑𝑇
𝑉𝐶 = 𝑤𝐶 𝑇𝑖 − 𝑇 + 𝑄
𝑑𝑡 (2.23)
Stirred-Tank Heating Process
𝑑𝑇
𝑉𝐶 = 𝑤𝐶 𝑇𝑖 − 𝑇 + 𝑄 (2.23)
𝑑𝑡
At steady state conditions,
0 = 𝑤𝐶 𝑇ത𝑖 − 𝑇ത + 𝑄ത (2.24)

(2-23) – (2-24) with 𝑄 = 𝑤𝑠 ∆𝐻𝑣



𝑑(𝑇 − 𝑇)
𝑉𝐶 = 𝑤𝐶 (𝑇𝑖 − 𝑇ത𝑖 ) − (𝑇 − 𝑇)
ത + (𝑤𝑠 − 𝑤
ഥ𝑠 )∆𝐻𝑣
𝑑𝑡

Define the deviation variables:


𝑦 = 𝑇 − 𝑇ത
𝑢 = 𝑤𝑠 − 𝑤ഥ𝑠
Stirred-Tank Heating Process

Assuming 𝑇𝑖 is not changing, i.e., 𝑇𝑖 − 𝑇ത𝑖 =0

𝑑𝑦
𝑉𝐶 = 𝑤𝐶 −𝑦 + ∆𝐻𝑣 𝑢
𝑑𝑡

Dividing by 𝑤𝐶 throughout, we get

𝑉 𝑑𝑦 ∆𝐻𝑣
= −𝑦 + 𝑢
𝑤 𝑑𝑡 𝑤𝐶
Stirred-Tank Heating Process
Define deviation variables (from desired operating/set point)
y  T T T is desired operating point
u  ws  ws ws (T ) from steady state
V dy H v H v V
 y  u note that  K p and  1
w dt wC wC w
dy
note when 0 y  K pu
dt
dy
1   y  K pu
dt
General linear ordinary differential equation solution: sum of exponential(s)
Suppose u  1 (unit step response)
  
t

y (t )  K p 1  e 1 
 
 
Stirred-Tank Heating Process
Solution of linear ODE: 𝑡 𝐾𝑝 𝑡
𝑦𝑒 𝜏1 =න 𝑒 𝜏1 𝑑𝑡
𝜏1
𝑑𝑦
𝜏1 = −𝑦 + 𝐾𝑝 𝑢
𝑑𝑡 𝑡 𝑡
𝑦𝑒 𝜏1 = 𝐾𝑝 𝑒 𝜏1 +C
Re-written as, with 𝑢 = 1
𝑡
−𝜏
𝑑𝑦 1 𝐾𝑝 𝑦 = 𝐾𝑝 + C𝑒 1
+ 𝑦=
𝑑𝑡 𝜏1 𝜏1
1 𝑡 Initial condition: 𝑦 𝑡 = 0 = 0
‫𝑡𝑑 𝜏׬‬
Integrating factor: 𝑒 1 =𝑒 𝜏1
𝐶 = −𝐾𝑝
𝑡 𝑑𝑦 1 𝜏𝑡 𝐾𝑝 𝑡 𝑡
−𝜏
𝑒 𝜏1 + 𝑒 1𝑦= 𝑒 𝜏1 𝑦 = 𝐾𝑝 − 𝐾𝑝 𝑒 1
𝑑𝑡 𝜏1 𝜏1
𝑡 𝑡
−𝜏
𝑑(𝑦𝑒 𝜏1 ) 𝐾𝑝 𝑡 𝑦 = 𝐾𝑝 1 − 𝑒 1
= 𝑒 𝜏1
𝑑𝑡 𝜏1
Stirred-Tank Heating Process
Example 1

Ti = 40 C, T = 90 C, Ti = 0 C
o o o V
2 104 kg
  4  2hr
w 10 kg hr
w s =0.83 106 g hr
H v =600 cal g H v 600(cal/g)
Kp   4
wC 10  10 3 (g/hr)  1 (cal/g o C )
C=l cal g o C
 6  10 5 ( o C hr/kg)
w=104 kg hr
 =103 kg m3 y  T T
V=20 m3 u  ws  ws
V  2 104 kg

Steady-state balance: The dynamic model is


dy
wC( T -Ti )=ws ΔH v 2 = -y + 6 10-5 u
dt
Example 1

Step 1: at t=0 double ws

T(0) = T y(0) = 0
ws
u = +0.83 10 g hr
6

ws
5
K pu  6  10  0.83  10 6

t=
 50 0

2
dy
dt
= -y + 50 
y = 50 l - e -0.5t 
o
Final T = y ss + T = 50 + 90 = 140 C
Example 1

New steady
Step 2: Maintain T = 140o C / 24 hr
state

Step 3: Then set u = 0, ws = 830 kg hr

dy
2 = - y + 6 10-5 u, y (0) = 50
dt

Solve for u = 0, y = 50e -0.5t


as t  , y0

How long to reach y = 0.5 ?

Self-regulating, but slow


Example 1

Step 4: How can we speed up the return from 140°C to 90°C?

ws = 0 g/hr u = -0.83 x 106 g/hr

2
dy
dt
= - y - 50 
y = - 50 l - 2e -0.5t 
𝑦 0 = 50

At steady state with ws =0, y  -50°C T  40°C

Now, find the time to reach y = 0.5?

Definitely much quicker than


the case u = 0
Process dynamics

• Process control is inherently concerned with unsteady state behavior,


i.e., "transient response", "process dynamics"

Stirred tank heater: Assume a "lag" between heating element


temperature Te, and process fluid temp, T.

Heat transfer limitation = he A(Te – T)

Energy balances
dT
Tank: wCTi  he A(Te  T )  wCT  mC
dt

Heating element: Q-he A(Te -T)=meCe


dTe
dt

At steady state : dT  0, dTe  0


dt dt
Process dynamics

Specify Q  Calculate T, Te

2 first order equations  1 second order equation in T

Relate T to Q (Te is an intermediate variable)

y=T-T u=Q-Q Ti fixed

m me C e d 2 y  me C e me C e m  dy 1
2
 
   
  y  u
he Ae dt  he Ae wC w  dt wC

Note Ce  0 yields 1st order ODE (simpler model)


Liquid storage systems

1
q= h Rv: line resistance
Rv
dh 1
A  qi  h (2 - 57)
dt Rv
linear ODE

If P  p  gh

q=Cv P-Pa Pa : ambient pressure

dh Non-linear
A  qi  Cv* ρgh  qi  Cv h (2-61)
dt ODE
Degrees of freedom analysis
List all quantities in the model that are known constants (or
1 parameters that can be specified) on the basis of equipment
dimensions, known physical properties, etc.

Determine the number of equations NE and the number of process


2 variables, NV. Note that time t is not considered to be a process
variable because it is neither a process input nor a process output.

3 Calculate the number of degrees of freedom, NF = NV - NE

Identify the NE output variables that will be obtained by solving


4
the process model

Identify the NF input variables that must be specified as


5 either disturbance variables or manipulated variables, in
order to utilize the NF degrees of freedom.
Degrees of freedom analysis for the Stirred-Tank Model

Parameters (3): V , ,C Variables (4): T , Ti , w, Q

Equation (1) : Eq. 2-23 NF = 4 – 1 = 3

The process variables are classified as:

Output variable: T Input variables : Ti, w, Q

For temperature control purposes, it is reasonable to classify the


three inputs as:
Disturbance variables : Ti, w
Manipulated variable : Q
Conclusion
You have been introduced to the:

Need for mathematical Tank heater example –


01 05
modeling model developed

Types of mathematical Second-order system


02 models 06

Linear and nonlinear


03 A systematic approach 07 systems

Blending example – Degrees of freedom


04 08
revisited
For Chapter 3

Kindly go through:

 Laplace Transforms
 Xerox Laplace Transform Table 3.1. Page 42-43, Seborg
Book 3rd Ed.

You might also like