You are on page 1of 30

Process Modeling

Improving or understanding chemical process operation is a


major objective for developing a dynamic process model
2
Balance equations
Steady-state balance equations
Dynamic balances
mass or energy mass or energy
entering leaving 0
a system a system
( (
( (
=
( (
( (

rate of mass or energy mass or energy mass or energy
accumulation in entering leaving
a system a system a system
( ( (
( ( (
=
( ( (
( ( (

or or
dM dE dN
dt dt dt
Specify the system
Microscopic
Macroscopic
3
Integral balances and Instantaneous balances
or
in out
in in out out
dM
m m
dt
dV
F F
dt


=
=

Integral balances
Instantaneous balances
t t t t
in out
t t t
t t
M M m dt m dt
+ +
+
=


(F: volumetric flowrate)
(useful for distributed parameter system)
( )
in
m t
4
Material balances
Ex1. Liquid Surge Tank
rate of change of mass flowrate of mass flowrate of
mass of water in tank water into tank water out of tank
( ( (
=
( ( (

Develop a model that describes how the volume of tank varies as a function of time.
5
Assume 's are constant.
In order to solve the problem, we must specify the inputs:
( ) & ( ) and the initial condition (0).
Express the tank volume as , we obtain:
i i
i
i
i
dV
F F
dt
dV
F F
dt
F t F t V
V Ah
F dh
dt A

=
=

=
If we also know the flowrate out of the tank is proportional to
the height of liquid in the tank ( ), we have:
where state variable = the
= the
& = the
input vari

able
p
i
i
F
A
F
F
h
dh
h
h
d A A
F
A
t

=
arameters
V = state variable
F
i
, F = input variables
It may be desirable to have tank height, h, as the state variable
Modeling equations and variables
depend on assumptions and objectives
6
Ex 2. An isothermal chemical reactor
2 A B P +
Overall material balance
(1)
Assume = .
(2)
i i
i
i
dV
F F
dt
dV
F F
dt



=
=
Develop a model that describes how the reactor concentration of each species
varies as a function of time.
7
Recall the stoichiometric equation: 2 . A B P +
Component material balances
It is convenient to work in molar units when writing components
balances, particularly if chemical reactions are involved.
, with - (3)
, with = -2 (4)
, with (5)
A
i Ai A A A A B
B
i Bi B B B A B
P
i Pi P P P A B
dVC
FC FC Vr r kC C
dt
dVC
FC FC Vr r kC C
dt
dVC
FC FC Vr r kC C
dt
= + =
= +
= + = +
8
Expanding the LHS of Eq. 3.
(6)
Combine Eqs 2, 3 and 6:
( ) (7)
Similarly, we have:
( ) 2
( )
A A
A
i A
Ai A A B
i B
Bi B A B
i P
Pi P A B
dVC dC dV
V C
dt dt dt
F dC
C C kC C
dt V
F dC
C C kC C
dt V
F dC
C C kC C
dt V
= +
=
=
= +
V, C
A
, C
B
, C
P
= state variables
F
i
, F, C
Ai
, C
Bi
, C
Pi
= input variables
k = parameter
9
B
If the species B is maintained in a large excess,
i.e., C constant, what are the resultant equations?
C
A
can be solved independently
Simplifying Assumptions
Assume a constant volume
0 reduce one equation
dV
dt
=
1 1
- - where
A A B A B
r kC C k C k kC = =
0
B
dC
dt
=
1
( )
i A
Ai A A
F dC
C C k C
dt V
=
1
( )
i P
Pi P A
F dC
C C k C
dt V
= +
The resulting equations are
Q:
( )
1 B
k k C =
10
Ex 3. Gas Tank
Assumption: ideal gas law (IG)
3
or ( molar volume, e.g., cm /mol)
( / )
or
Assume T=constant,
or ( )
i i
i i
PV nRT Pv RT v
dn d PV RT
q q q q
dt dt
V dP dP RT
q q q q
RT dt dt V
= = =
= =
= =
Develop a model that describes how the pressure in the tank varied with time
P = state variable
q
i
, q = input variables
V, T, R = parameters
(q
i
, q : molar rate)
11
Constitutive Relationships (used in Ex.1 - 3)
- The required relationships, more than simple material balances, to
define the modeling equations.
Gas Law
3
2
IG law:
( molar volume, e.g., cm /mol)
VDW (van der Waal's) equation of state:
( )( )
Pv RT v
a
P v b RT
v
= =
+ =
12
Chemical reaction kinetics
reaction kinetics: A+2B C+3D
reaction rate (rate per unit volume, e.g., mol/(volume*time))
( )
where
=rate of reaction of A (mol A/(volume*time)
= reaction rate constant (e.g., (volume/mol
A A B
A
r k T C C
r
k

=
)/time)
=concentration of i (mol i/volume)
i
C
/
0
0
Arrhenius rate expression:
( )
where
= reaction rate constant ((volume/mol)/time)
=frequency factor or preexponential factor (same unit as )
=activation energy (cal/gmol)
=ideal gas co
E RT
k T k e
k
k k
E
R

=
nstant (1.987 cal/(gmol K))
=absolute temperature (K or R) T

r
B
= 2r
A
= -2kC
A
C
B
r
C
= -r
A
= kC
A
C
B
r
D
= -3r
A
= 3kC
A
C
B
13
Phase Equilibrium
Vapor Liquid Equilibrium (VLE)
where
= vapor phase mole fraction of component
= liquid phase mole fraction of component
= equilibrium constant for component
Ideal binary VLE using re
i i i
i
i
i
y K x
y i
x i
K i
=
1
2
lative volatility ( 1)
(based on light component)
1 ( 1)
K
K
x
y
x

= >
=
+
K
i
= f (C, T)
A constant relative volatility assumption is often made
14
Heat transfer
2
Rate of heat transfer
where
= rate of heat transfer from hot fluid to cold fluid (kJ/s)
= overall heat transfer coefficient (kJ/(s m K))
(function of fluid properties and velocities)

Q UA T
Q
U
A
=

2
= heat transfer area (m )
= temperature difference (K) T
through a vessel wall separating two fluid
(a jacketed reactor)
Flow through a valve
15
Liquid flow through a valve
( )
. .
where
= volumetric flowrate (gallon per minute, GPM)
= valve coefficient
= fraction of valve opening (0 x 1; stem position)
= pressure drop across the
v
v
v
v
P
F C f x
s g
F
C
x
P

=

valve (psi)
. . = specific gravity
( ) = flow characteristic (0 ( ) 1)
s g
f x f x
1
linear ( )
quick-opening ( )
equal-percentage ( )
x
f x x
f x x
f x

=
=
=
50 =
16
Material and energy balances
Necessary when thermal effect is important
Basics
2
or
where
(kinetic energy)
2
(potential energy)
For flowing systems (work with enthalpy)
1
or since
where
enthalpy per mass
internal energy
TE U KE PE TE U KE PE
mv
KE
PE mgh
P
H U PV H U PV U
V
H
U
= + + = + +
=
=
| |
= + = + = + =
|
\
=
= per mass
volume per mass V =
(per mass)
(usually neglected when there is thermal
effect; two orders of magnitude less than
internal energy)
17
Example
accumulation = in - out
i i
dV
F F
dt

=
Material balance
18
Energy balance
accumulation = in by flow out by flow + in by heat transfer
+ work down on system
The total work done on the system consists of shaft work and flow work:
(1)
Neglect the kinetic and potential energy:
(2)

i T i i i T
i i i T
T s i i
dTE
TE TE Q W F TE F TE Q W
dt
dU
F U F U Q W
dt
W W FP FP


= + + = + +
= + +
= + (3)
Substitute Eq 3 into Eq 2:
( ) ( ) (4)
i
i i i s
i
P dU P
F U F U Q W
dt


= + + + +
19
Since and neglects , Eq 4 can be rewritten as:
( ) ( ) (5)
Since is constant and does not change much
(good assumption for liquid system) , Eq 5 becomes:
s
i
i i i
i
H U PV W
P dH dPV P
F U F U Q
dt dt
V P
dH
d


= +
= + + +
( )
( )
(6)
The definitions for and are:
(7)
Select an arbitrary reference temperature and
assume the heat capacity is constant


ref
i i i
T
p p ref
T
i p i ref
F H F H Q
t
H H
H V H
H(T) c dT c T - T
H c T - T

= +
=
= =
=

(8)
20
Eq. 6 becomes:
( )
( ) ( ) (9)
Assume constant density and volume (so ).
( ) (10)
(11 ( ) )
p ref
i i p i ref p ref
i
p p i
i
p
dV C T T
F C T T F C T T Q
dt
F F
dT F Q
T T
dT
V C F C T T Q
d V V C
d
t
t

= +
=
= +
= +
Assumptions: 1. Neglect kinetic and potential energy.
2. Ignore the change in PV.
3. C
p
is not a function of temperature.
4. V is constant.
5. is constant.
21
Distributed parameter system
Tubular reactor
Mole balance of species A (assuming a first-order reaction)
( ) | ( ) | [( | | ) ]
Using the mean value theorem of integral and dividing by ,
( )[ | | ]
|
t t
A t t A t A V A V V A
t
A t t A t
A V
V C V C FC FC kC V dt
t
V C C
FC F
t
+
+ +
+
=

|
Dividing by and letting and go to zero,
with and , we have:
A V V A
A A
A
z
A z A
A
C kC V
V t V
C FC
kC
t V
dV Adz F Av
C v C
kC
t z
+



=

= =

=

V
V V + V
( )
mean value theorem of integral
( ) ( )
b
a
f t dt f x b a =

22
Similarly, the overall material balance can be found as:
If the density is constant: constant
To solve the problem, we must know initial condition
and boundary condition
z
z
A A
z A
v
t z
v
C C
v kC
t z

=

=

=

0
.
( , 0) ( )
(0, ) ( )
A A
A Ain
C z t C z
C t C t
= =
=
23
Dimensionless Form
Models typically contain a large number of parameters and
variables that may differ by several orders of magnitude.
It is often desirable to develop models composed of
Dimensionless parameters and variables.
( )
,0
Consider a constant volume, isothermal CSTR modeled
by a simple 1st order reaction:
( )
Defining / , we find:
( )
Let .
( )
( )
A
Af A A
A Af
f
res
f
dC F
C C kC
dt V
x C C
dx F F
x k x
dt V V
t t t V F
dx dx F dx F F
x k x
V
dt V d V V
d
F

= +
= =
= = = +

,0
steady-state feed concentration of A
Af
C =
,0 f Af Af
x C C =
residence time
res
t V F = =
24
One obtains:
(1 ) (1 )
( ) is a dimensionless term and which is also
/
Damkholer num
know
ber (D
n as
a).
(1 )
f f
f
dx Vk
x x x x
d F
Vk F
dx
x
k
F V
Da x
d

= + = +
= +
Remarks: This implies a single parameter, Da, can be used to characterize
the behavior of all 1
st
order, isothermal chemical reactions.
Explicit solution
Explicit solutions to nonlinear differential equations can
rarely be obtained (except for few examples).
i
F dh h
dt A A

= If there is no inlet flow,


25
General form of dynamic models
1 1 1 1
2 1 1 1
1 1 1
General models consist of a set of 1st order, nonlinear ODEs.
(often called as state space equation)
( , , , , , , , , )
( , , , , , , , , )
( , , , , , , , ,
h
s
)
w ere
n m r
n
n m r
i
m r
n
x f x x u u p p
x f x x u u p p
x f x x u u
x
p p
=
=
=
=


tate variables
input variable
paramete s
s
r
i
i
p
u
=
=
26
State variables
A state variable arises naturally in the accumulation termof a
dynamic material or energy balance.
(e.g. temperature, concentration )
Input variables
A input variable normally must be specified before a problem
solved or a process can be operated. Input variables are often
manipulated to achieve desired performance.
(e.g. flowrates, compositions, temperatures of streams )
Parameters
A parameter is typically a physical or chemical property value that
must be specified or known to solve a problem.
(e.g. density, reaction rate constant, heat-transfer coefficient)
27
Vector notation
General models consist of a set of 1st order ODEs.
( )
where
state variables
input variables
parameters
The above equation can also be used to solve steady-state problems.
0 ( ) 0
The s
=
=
=
=
= =
x f x, u, p
x
u
p
x f x, u, p

teady-state solutions are often used initial condition as the


for O
s
DEs.
28
State variable form for Ex.2
i
dV
F F
dt
=
( )
i A
Ai A A B
F dC
C C kC C
dt V
=
( ) 2
i B
Bi B A B
F dC
C C kC C
dt V
=
( )
i P
Pi P A B
F dC
C C kC C
dt V
= +
( )
( ) 2
( )
i
i
Ai A A B
A
i
B Bi B A B
i
P
Pi P A B
F F
V
F
C C kC C
C
V
F
C C C kC C
V
F
C
C C kC C
V

(
(
(
(
(

(
(
(
(
=
(
(
(
(
(
(
(
+
(
(

( )
( )
( )
( )
1 2
1
1
3 2 1 2 3 1
2
1
2
1
4 3 1 2 3
3 3
1
4
1
4 5 4 1 2 3
1
( ) , ,
, ,
( ) 2
, ,
, ,
( )
u u
x
u
u x p x x f
x
x
f
u
u x p x x
f x
x
f
u
x u x p x x
x

(
(
(
(
(
( (
(
( (
(
( (
= =
(
( (
(
( (
( (
(

(
(
+
(
(


x u p
x u p
x u p
x u p

4 states
5 inputs
1 parameter
29
Homework #1
1. Irreversible consecutive reactions ABC occur in a jacked, stirred-tank reactor
as shown in Figure. Derive a dynamic model based on the following assumptions,
and indicate the state variables, input variables, parameters.
(i) The contents of the tank and cooling jacket are well mixed. The volumes of
material in the jacket and in the tank do not vary with time.
(ii) The reaction rates are given by
(iii) constant physical properties and heat transfer coefficient can be assumed.
1
2
1 1 1
2 2 2
, heat of reaction
, heat of reaction
E RT
A
E RT
B
r k e C H
r k e C H

= =
= =
30
Homework #1
2. Consider a liquid flow system consisting of a sealed tank with noncondensible gas
above the liquid as shown in Figure. Derive a dynamic model relating the liquid
level h to the input flow rate q
i
. Is operation of this system independent of the
ambient pressure P
a
? What about for a system open to the atmosphere?
You may make the following assumptions:
(i) The gas obeys the ideal gas law. A constant amount of (m
g
/M) moles of gas are
present in the tank.
(ii) The operation is isothermal.
(iii) A square root relation holds for flow through the valve ( ).
v
q C P =

You might also like