You are on page 1of 43

P

r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
1
6/10/2014
Chapter 2
Mathematical Modeling of
Chemical Processes
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
2
6/10/2014
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
4. Carry out simulation studies (Solution of the dynamic
models that consist of sets of ODEs and AEs)
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
3
6/10/2014
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
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
4
6/10/2014
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
simulations and procedures.
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
5
6/10/2014
Uses of mathematical models
Plant operation:
Troubleshooting and processing problems
Aiding in start-up and operator training
Studying the effects of and the requirements for
expansion (bottle-neck removal) projects
Optimizing plant operation
It is usually much cheaper, safer, and faster to
conduct the kinds of studies listed above on a
mathematical model than experimentally on an
operating unit.
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
6
6/10/2014
Principles of Model Formulation
The model equations are at best an
approximation to the real process.
Adage: All models are wrong, but some are
useful
Inherently involves a compromise between
model accuracy and complexity
the and effort required to develop the
model
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
7
6/10/2014
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
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
8
6/10/2014
A Systematic Approach for Developing
Dynamic Models
1. State the modeling objectives and the end use of
the model. They determine the required levels of
model detail and model accuracy.
2. Draw a schematic diagram of the process and label
all process variables.
3. List all of the assumptions that are involved in
developing the model. Try for parsimony; the
model should be no more complicated than
necessary to meet the modeling objectives.
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
9
6/10/2014
Systematic Approach
4. Determine whether spatial variations of process
variables are important. If so, a partial differential
equation model will be required.
5. Write appropriate conservation equations (mass,
component, energy, and so forth).
6. Introduce equilibrium relations and other algebraic
equations (from thermodynamics, transport
phenomena, chemical kinetics, equipment
geometry, etc.).
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
10
6/10/2014
A Systematic Approach
6. Perform a degrees of freedom analysis (Section
2.3) to ensure that the model equations can be
solved.
7. Simplify the model.
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.
8. Classify inputs as disturbance variables or as
manipulated variables.
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
11
6/10/2014
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 obtain
Good for extrapolation, scale-up
Does not require experimental data to obtain (data
required for validation and fitting)
Theoretical models of chemical processes are based on
conservation laws.
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
12
6/10/2014
Mass Balance
Conservation of Component i
rate of mass rate of mass rate of mass
(2-6)
accumulation in out

=
` ` `
) ) )
(2.1)
rate of component i rate of component i
accumulation in
rate of component i rate of component i
(2-7)
out produced

=
` `
) )

+
` `
) )
(2.2)
Conservation of Mass
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
13
6/10/2014
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 sys
the surroundings


`

)
tem (2-8)
by the surroundings
(2.3)
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
14
6/10/2014
Energy Balance
Total energy of a system, U
tot
int
(2-9)
tot KE PE
U U U U = + +
(2.4)
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
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
15
6/10/2014
Energy Balance
For these reasonable assumptions, the energy balance in Eq.
2-3 can be written as
int
the internal energy of
the system
enthalpy per unit mass
mass flow rate
rate of heat transfer to the system
U
H
w
Q
=
=
=
=
( )
denotes the difference
between outlet and inlet
conditions of the flowing
streams; therefore
- wH = rate of enthalpy of the inlet
stream(s) - the enthalpy
of the outlet stream(s)
A =
( )
int
(2-10)
dU
wH Q
dt
= A +
(2.5)
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
16
6/10/2014
Black box (empirical)
Large number of unknown parameters
Can be obtained quickly (e.g., linear
regression)
Model structure is subjective
Dangerous to extrapolate
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
17
6/10/2014
Compromise of first two approaches
Model structure may be simpler
Typically 2 to 10 physical parameters estimated
(nonlinear regression)
Good versatility, can be extrapolated
Can be run in real-time
linear regression
nonlinear regression
Semi-empirical
2
2 1 0
x c x c c y + + =
( )
t /
1
t
e K y

=
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
18
6/10/2014
Semi-empirical
Number of parameters affects accuracy of model,
but confidence limits on the parameters fitted must
be evaluated.
Objective function for data fitting minimize sum of
squares of errors between data points and model
predictions (use optimization code to fit parameters)
Nonlinear models such as neural nets are becoming
popular (automatic modeling)
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
19
6/10/2014
Development of Dynamic Models
An unsteady-state mass balance for the blending system:
rate of accumulation rate of rate of
(2-1)
of mass in the tank mass in mass out

=
` ` `
) ) )
( )
1 2

(2-2)
d V
w w w
dt
= +
(2.1)
(2.6)
where w
1
, w
2
, and w are mass flow rates.
or
I llustrative Example: A Blending Process
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
20
6/10/2014
Blending Process
The corresponding steady-state model was derived in
Ch. 1 (cf. Eqs. 1-1 and 1-2).
1 2
1 1 2 2
0 (2-4)
0 (2-5)
w w w
w x w x wx
= +
= +
(2.8)
(2.7)
( )
1 1 2 2

(2-3)
d V x
w x w x wx
dt
= +
The unsteady-state component balance is:
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
21
6/10/2014
Equation 2-10 can be simplified by expanding the
accumulation term using the chain rule for
differentiation of a product:
The Blending Process Revisited
1 2
(2-12)
dV
w w w
dt
= + (2.9)
( )
1 1 2 2
(2-13)
d Vx
w x w x wx
dt

= +
(2.10)
For constant , Eqs. 2-6 and 2-7 become:
Substitution of (2-11) into (2-10) gives:
(2.12)
1 1 2 2
(2-15)
dx dV
V x w x w x wx
dt dt
+ = +
(2.11)
( )
(2-14)
d Vx
dx dV
V x
dt dt dt
= +
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
22
6/10/2014
Blending Process Revisited
Substitution of the mass balance in (2-9) for in (2-12) gives:
(2.13) ( )
1 2 1 1 2 2
(2-16)
dx
V x w w w w x w x wx
dt
+ + = +
After canceling common terms and rearranging (2-9) and
(2-13), a more convenient model form is obtained:
(2.14)
(2.15)
( )
( ) ( )
1 2
1 2
1 2
1
(2-17)
(2-18)
dV
w w w
dt
w w dx
x x x x
dt V V


= +
= +
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
23
6/10/2014
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 (x
1
and x
2
) and the flow
rates (w
1
, w
2
and w) as functions of time
Specify the initial conditions for the dependent variables,
V(0) and x(0)
Determine the transient responses, V(t) and x(t)
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
24
6/10/2014
Blending Process Revisited
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
25
6/10/2014
Dynamic models of representative
processes
Stirred-Tank Heating Process
Figure 2.3 Stirred-tank heating process with constant holdup, V.
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
26
6/10/2014
Assumptions:
Perfect mixing
The exit temperature T is also the temperature of
the tank contents
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
assumed to be constant
Temperature dependence is neglected
Heat losses are negligible
Stirred-Tank Heating Process
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
27
6/10/2014
Stirred-Tank Heating Process

int

(2-29) dU dH CdT = = (2.16)
Model Development
For a pure liquid at low or moderate pressures, the internal
energy, U
int
, is approximately equal to the enthalpy, H
H depends only on temperature
We assume that U
int
= 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,
where C is the constant pressure heat capacity.
(2.17)
int int

(2-30) U VU =
The total internal energy of the liquid in the tank is:
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
28
6/10/2014
Stirred-Tank Heating Process
An expression for the rate of internal energy accumulation
can be derived from Eqs. (2-16) and (2-17):
(2.18)
int
(2-31)
dU dT
VC
dt dt
=
Note that this term appears in the general energy
balance of Eq. 2-5.
(2.19)
( )

(2-32)
ref ref
H H C T T =
Suppose that the liquid in the tank is at a temperature T
and has an enthalpy, . Integrating Eq. 2-16 from a
reference temperature T
ref
to T gives,
H

P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
29
6/10/2014
Stirred-Tank Heating Process
Without loss of generality, we assume that .
Thus, (2-19) can be written as:
0

=
ref
H
(2.20)
( )

(2-33)
ref
H C T T =
(2.21)
For the inlet stream: ( )

(2-34)
i i ref
H C T T =
Substituting (2-20) and (2-21) into the convection term
of (2-5) gives:
(2.22)
( ) ( ) ( )

(2-35)
i ref ref
wH w C T T w C T T
( (
A =

Finally, substitution of (2-18) and (2-22) into (2-5)
(2.23) ( )
(2-36)
i
dT
V C wC T T Q
dt
= +
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
30
6/10/2014
Stirred-Tank Heating Process
1
1
is desired operating point
( ) from steady state
V
note that and
w
dy
note when 0
dt
General linear ordinary differential equation solution:
s s
s
v v
p
p
p
y T T T
u w w w T
H H V dy
y u K
w dt wC wC
y K u
dy
y K u
dt

t
t
=
=
A A
= + = =
= =
= +
1
sum of exponential(s)
Suppose u 1 (unit step response)
( ) 1
t
p
y t K e
t

=
| |
= |
|
\ .
Define deviation variables (from desired operating/set point)
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
31
6/10/2014
Stirred-Tank Heating Process
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
32
6/10/2014
Example 1:
6
s
v
o
4
3 3
3
4
w =0.83 10 g hr
H =600 cal g
C=l cal g C
w=10 kg hr
=10 kg m
V=20 m
2 10 kg V

A
=
4
4
V 2 10 kg
2hr
w 10 kg hr

t

= = =
C 0 = C, 90 = C, 40 =
o
i
o o
i
T T T '
The dynamic model is
u 10 6 + -y =
dt
dy
2
5 -

s s
w w u
T T y
=
=
Steady-state balance:
v s i
H w )= -T T wC(
hr/kg) ( 10 6
) (cal/g 1 (g/hr) 10 10
) cal/g ( 600
o 5
o 3 4
C
C wC
H
K
v
p

=
-
=
A
=
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
33
6/10/2014
Example 1:
0 = y(0) T = T(0)
Step 1: at t=0 double w
s
hr g 10 +0.83 = u
6

50 + -y =
dt
dy
2
C 140 = 90 + 50 = T + y = T
o
ss
Final
( )
-0.5t
e - l 50 = y
t = 0
w
s
s
w
50
10 83 . 0 10 6
6 5
=
=

u K
p
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
34
6/10/2014
Example 1:
hr 24 / C 140 =
o
T Step 2: Maintain
New steady
state
Step 3: Then set
hr kg 830 = 0, =
s
w u
50 = (0) , 10 6 + - = 2
5 -
y u y
dt
dy

Solve for u = 0
0 , as
50 =
-0.5
y t
e y
t
How long to reach y = 0.5 ?
Self-regulating, but slow
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
35
6/10/2014
Example 1:
Step 4: How can we speed up the return from 140C to
90C?
Now, find the time to reach y = 0.5?
w
s
= 0 g/hr u = -0.83 x 10
6
g/hr
50 - - = 2 y
dt
dy
( )
t
e y
-0.5
- l 50 - =
At steady state with w
s
=0, y -50C T 40C
Definitely much quicker
than the case u = 0
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
36
6/10/2014
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 T
e
, and process fluid temp, T.
Heat transfer limitation = h
e
A(T
e
T)
Energy balances
Tank:
Heating element:
dt
dT
C -T)=m A(T Q-h
e
e e e e
0 0, = =
dt
dT
dt
dT
e
At steady state :
dt
dT
mC wCT T T A h wCT
e e i
= + ) (
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
37
6/10/2014
Process Dynamics
Specify Q Calculate T, T
e
2 first order equations 1 second order equation in T
Relate T to Q (T
e
is an intermediate variable)
fixed
i
T Q - u=Q T y=T-
Note C
e
0 yields 1st order ODE (simpler model)
u
wC
y
dt
dy
w
m
wC
C m
A h
C m
dt
y d
A h
C m m
e e
e e
e e
e e
e e
1
2
2
= +
|
|
.
|

\
|
+ + +
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
38
6/10/2014
Liquid storage systems
h
R
1
= q
v
R
v
: line resistance
57) - (2
1
h
R
q
dt
dh
A
v
i
=
linear ODE
pressure ambient :
a a v
P P-P q=C
gh p P + =
If
*
(2-61)
i v i v
dh
A q C gh q C h
dt
= =
Non-linear
ODE
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
39
6/10/2014
Degrees of Freedom Analysis
1. List all quantities in the model that are known constants
(or parameters that can be specified) on the basis of
equipment dimensions, known physical properties, etc.
2. Determine the number of equations NE and the number
of process 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.
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
40
6/10/2014
Degrees of Freedom
4. Identify the NE output variables that will be obtained
by solving the process model.
5. Identify the NF input variables that must be specified as
either disturbance variables or manipulated variables, in
order to utilize the NF degrees of freedom.
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
41
6/10/2014
Degrees of Freedom Analysis
for the Stirred-Tank Model
, , V C
Parameters (3):
, , ,
i
T T w Q Variables (4):
Equation (1) : Eq. 2-23 NF = 4 1 = 3
The process variables are classified as:
Output variable: T Input variables : T
i
, w, Q
For temperature control purposes, it is reasonable to classify
the three inputs as:
Disturbance variables : T
i
, w
Manipulated variable : Q
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
42
6/10/2014
Conclusion!
Need for mathematical modeling
Types of mathematical models
A systematic approach
Blending example revisited
Tank heater example model developed
Second-order system
Linear and nonlinear systems
Degrees of freedom
P
r
o
c
e
s
s

D
y
n
a
m
i
c
s

a
n
d

C
o
n
t
r
o
l
CCB3013 - Chemical Process Dynamics, Instrumentation
and Control
43
6/10/2014
For Chapter 3
Go through Laplace Transform
Xerox Laplace Transform Table 3.1
page 54-55, Seborg Book

You might also like