Professional Documents
Culture Documents
Contents
1 Introduction
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4
4
7
9
12
20
22
4 Summary
28
Introduction
A modern chemical plant consists of interconnected units such as heat exchangers, reactors, distillation columns, mixers etc. with high degree of integration to achieve energy
eciency. Design and operation of such complex plants is a challenging problem. Mathematical modeling and simulation is a cost eective method of designing or understanding
behavior of these chemical plants when compared to study through experiments. Mathematical modeling cannot substitute experimentation, however, it can be eectively used to plan
1
Distributed parameter models: These models capture the relationship between the
variables involved as functions of time and space.
Lumped parameter models: These models lump all spatial variation and all the variables involved are treated as functions of time alone.
The above two classes of models together with the various scenarios under consideration
give rise to dierent types of equation forms such as linear/nonlinear algebraic equations,
ordinary dierential equations or partial dierential equations. In order to provide motivation for studying these dierent kinds of equation forms, we present examples of dierent
models in chemical engineering and derive abstract equation forms in the following section.
Lumped parameter models, i.e., models developed by ignoring spatial variations of a physical quantity of interest, are very often used for describing steady state or dynamic behavior
of systems encountered in the process industry. For example, in a tank in which two or more
fluids of dierent concentrations and compositions are mixed, assuming that the contents of
the tank are well mixed and there is no spatial variation in the concentrations or temperature inside the tank considerably simplifies the model development. In this sub-section, we
examine some typical systems encountered in the process industry, which are modelled as
lumped parameter systems, and uncover the underlying abstract equation forms.
2.1
Plant wide or section wide mass balances are carried out at the design stage or later
during operation for keeping a material audit. These models are typical examples of systems
of simultaneous linear algebraic equations.
Example 1 Recovery of acetone from air-acetone mixture is achieved using an absorber
and a flash separator (Figure 2). A model for this system is developed under the following
conditions
All acetone is absorbed in water
Air entering the absorber contains no water vapor
Air leaving the absorber contains 3 mass % water vapor
4
= 205
where is the mass fraction of the acetone in the vapor stream and is the mass fraction
of the acetone in the liquid stream. Operating conditions of the process are as follows
Air inflow: 600 lb/hr with 8 mass % acetone
Water flow rate: 500 lb/hr
It is required that the waste water should have an acetone content of 3 mass % and we
are required to determine the concentration of the acetone in the vapor stream and the flow
rates of the product streams.
Mass Balance:
(Air)
092 = 097
(Acetone)
008 = 003 +
= 003
5
(2)
(3)
(4)
(5)
= 205
097 0
0
003 0615 =
0
(7)
have
092 600
008 600
500
(8)
The above model is a typical example of a system of linear algebraic equations, which
have to be solved simultaneously. The equation (8) can be represented in abstract form
as a set of linear algebraic equations
Ax = b
where x and b are ( 1) vectors (i.e., x b ) and A is an ( ) matrix.
6
(9)
2.2
Example 2 Consider the flash vaporization unit shown in Figure 4. A hydrocarbon mixture
containing 25 mole % of n-butane and 45 mole % of n-hexane is to be separated in a simple
flash vaporization process operated at 10 atm. and 2700 The equilibrium k-values at this
composition are reported in Table 1. Let represent the mole fraction of component in
the liquid phase and represent the mole fraction of component in vapor phase. Model
equations for the flash vaporizer are
Equilibrium relationships
( = 1 2 3)
(10)
(11)
=+
Component balance
= +
X
( = 1 2 3)
= +
(12)
(13)
(14)
= 1
(15)
2 (1 2 3 ) = 0
(16)
= 0
5 (1 2 3 ) = 0
(17)
which represent a set of coupled nonlinear algebraic equations. These equations have
to be solved simultaneously to find the solution vector
i
h
(18)
x = 1 2 3
( 1)
= 1 +
P
Using
= 1we have
( ) =
1=0
1 + ( ) ( 1)
8
(19)
(20)
2 (1 2 3 ) = 0
(21)
= 0
(22)
(1 2 3 ) = 0
Using vector notation, we can write
(x) = 0
;
x
h
i
x =
1 2
(23)
2.3
(24)
(25)
carried out in a batch reactor (see Figure 5). It is desired to find the kinetic parameters
and from the experimental data. The data reported in Table 2 is collected from batch
experiments in a reactor at dierent temperatures at time t = 0.
Substituting these values in the rate equation will give rise to N equations in three unknowns, which forms an overdetermined set of equations. Due to experimental errors in the
measurements of temperature and reaction rate, it may not be possible to find a set of values
of { } such that the reaction rate equation is satisfied at all the data points. However
one can decide to select { } such that the quantity
2
X
=
( ) exp(
)
(26)
=1
to denote the estimated reaction
is minimized with respect to { }. Suppose we use b
rate
b
=
exp(
)
(27)
then, the problem is to choose parameters { } such that the sum of the square of errors
between the measured and estimated rates is minimum, i.e.
( ) =
X
=1
[ (b
)]2
(28)
Equip. 1: 1 = |1 1 | 1 for 0 1 2
= 0 ()
Equip. 2: 2 = exp( 1
(2 5)2 ) for 0 2
2
Equip. 3: 3 = 32 63 + 8 for 0 3 4
P
Minimize = to find 1 2 and 3
Note that this is an example of a typical multi-dimensional optimization problem, which
can be expressed in abstract form as follows
x =
(x)
x
(29)
11
2.4
For most of the processing systems of interest to a chemical engineer, there are three
fundamental quantities: mass, energy and momentum. These quantities can be characterized by variables such as density, concentration, temperature, pressure and flow rate. These
characterizing variables are called as the state of the processing system. The equations
that relate the state variables (dependent variables) to the independent variables are derived
from application of conservation principles on the fundamental quantities and are called
the state equations.
Let quantity S denote any one of the fundamental quantities
Total mass
Mass of the individual components
Total energy
Momentum
Then, the principle of conservation of the quantity S states that:
Accumulation of S within a system
Flow of S into the system
=
Time Period
Time Period
Flow of S out of the system
Time Period
Amount of S generated within the system
+
Time Period
Amount of S consumed within the system
Time Period
Figure 6 shows a schematic diagram of a general system and its interaction with the external
world. Typical dynamic model equations are as follows:
Total Mass Balance
X
X
( )
=
:
:
( ) X
=
=
(30)
:
:
inlet
outlet
Density of the material in the system
Density of the material in the i inlet stream
Density of the material in the j outlet stream
Total volume of the system
Volumetric flow rate of the i inlet stream
Volumetric flow rate of the j outlet stream
Number of moles of the component A in the system
Molar concentration (moles /volume) of A in the system
Molar concentration (moles /volume) of A in the i inlet stream
Molar concentration (moles /volume) of A in the j outlet stream
Reaction rate per unit volume of the component A in the system
Specific enthalpy of the material in the i inlet stream
Specific enthalpy of the material in the j outlet stream
Internal, kinetic and potential energies of the system, respectively.
Amount of heat exchanged bet. the system & the surroundings per unit time
Shaft work exchanged between the system and its surroundings
( + + ) X
'
=
=
(31)
(32)
Now, flow out due to the gravity is also a function of height as per Bernoullis equation
=
Thus,
+ =
(33)
= + +
However, since the tank does not move
=
=0;
14
(34)
(35)
represents a reference temperature where the specific enthalpy of the liquid is assumed
to be zero. Now, using the energy conservation principle
( ( ))
= ( ) ( ) +
(36)
where Q is the amount of heat supplied by the steam per unit time. Assuming = 0, we
have
( )
= +
(37)
( )
=
+
=
+ ( )
= +
Or
= ( ) +
1
1
=
( ) = ( )
=
( ) +
(38)
(39)
= = 0
=
( ) +
=0
15
(40)
(41)
80
Temperature (0C)
78
76
74
Initial
Steady State
Final
Steady State
72
Transient Response
70
68
2
Time (min)
10
12
14
16
18
Level (m)
1
0.95
0.9
2
8
Time (min)
10
12
14
16
18
8
Time (min)
10
12
14
16
18
Temp. (0C)
78
76
74
72
70
68
2
2
2
= (1 2 ) 2 2
(43)
3
= (2 3 ) 3 3
3
(44)
( + 1 1 )
1 1
1
0
0
1
1
( + 1 2 )
0
2 + 0 0 (45)
2 =
0
1
( + 1 3 )
0
3
3
x = [1 2 3 ]
x
= Ax + B0
17
(46)
where matrices A and B are defined in the above equation. Now, suppose initially 0 = 0
till = 0, and, for 0, 0 was changed to 0 = 0. Then we are required to solve
x
= Ax;
x = x(0) = 0
(47)
and generate trajectories x() (i.e. 1 () 2 () and 3 ()) over the interval [0 ] This
is a typical problem of dynamic simulation of lumped parameter systems.
Example 7 Continuous Fermenter: Consider a continuously operated fermenter described by the following set of ODEs
= 1 ( ) = +
= 2 ( ) = ( )
(48)
(49)
= 3 ( ) = + ( + )
(50)
where represents the euent cell-mass or biomass concentration, represents the substrate concentration and denotes the product concentration. It is assumed that product
concentration () and the cell-mass concentration () are measured process outputs while
the dilution rate () and the feed substrate concentration ( ) are process inputs which can
be manipulated. Model parameter represents the specific growth rate, represents the
cell-mass yield, and and are the yield parameters for the product. The specific growth
rate model is allowed to exhibit both substrate and product inhibition:
=
2
+ +
(1
(51)
where represents the maximum specific growth rate, represents the product saturation
constant the substrate saturation constant and the represents substrate inhibition
constant Defining the state and input vectors as
i
h
h
i
; u =
(52)
x=
the above equation can be represented as
x
= (x u)
(53)
In abstract terms, the dynamic simulation problem can be stated as follows. Given the
time trajectories of the independent variables {u() : 0 }and the initial state, x(0),
of the system, obtain the state trajectories {x() : 0 } by integrating
x
= [x() u()] ; x = x(0) at = 0
(54)
where x represent the dependent or state variables and u denotes the independent inputs. As the independent variable trajectories are known a-priori while solving
the set of ODE-IVP, the problem can be looked at as -ODEs in variables with variable
coecients. Thus, the above problem can be re-stated as
x
= (x ) ;
x(0) = x0
(55)
In other words, forced dynamic systems can be looked upon as unforced systems with
variable parameters.
The model we considered above did not contain variation of the variables with respect to
space. Such models are called as Lumped parameter models and are described by ordinary
dierential equations of the form
1
= 1 (1 () 2 () () 1 () 2 () ())
= (1 () 2 () () 1 () 2 () ())
(56)
(57)
where 1 denote the state (or dependent) variables and 1 () () denote independent inputs (or forcing functions) specified for 0. Using vector notation, we can write
the above set of ODEs in more compact form as follows
x
= F(x u)
x(0) = x0
(58)
(59)
where
x() = [1 () ()]
(60)
u() = [1 () ()]
(61)
F(x u) = [1 (x u) (x u)]
and u() is a forcing function vector defined over = 0
19
(62)
Steady State Simulation Problem: If we fix the independent inputs at some constant value, say u() = u for 0then we can find a steady state solution, x = x
corresponding to these constant inputs by simultaneously solving nonlinear algebraic
equations
F(x u) = 0
(63)
obtained by setting x = 0 where 0 represents a 1 zero vector.
Dynamic Simulation Problem: Given input trajectories
u() = [1 () 2 () ()]
(64)
as a function of time for 0 and with the initial state x(0) integrate
x
= F(x u())
x() = [1 () 2 () ()]
(65)
(66)
2.5
(67)
Another important class of problems that arise in process engineering is a set of coupled
dierential algebraic equations. In this section, we discuss two examples belonging to this
class.
Example 8 The process is a continuously stirred tank reactor, where a feed with unknown
pH is flowing into the reactor. We add a basic solution, with known molarity, to the reactor
to maintain the pH at a desired level. The flow-rate of the basic solution is the manipulated
variable. The process is modelled using the following set of DAEs:
+
= ( + ) +
[ + ]3 + ( + + )[ + ]2 +
(68)
(69)
( + ) + = 0
where + is the concentration of the cation of the base in the CSTR and is the dierential
state variable, while hydrogen ion concentration, ( + ), is the algebraic state variable. The
parameters and initial conditions are summarized in Table 4.
20
0.005
+
0.086
+
0.01
0.0068
Example 9 The system presented here models the galvano-static charge process of a thin
film nickel hydroxide electrode. The rate of change of the mole fraction of nickel hydroxide
is (1 ) given by
1
1
=
(70)
1 + 2 = 0
(71)
where
1 = 1 [2(1 1 ) exp(
exp(
05
(2 1 )) 21
(72)
05
(2 1 ))]
(73)
(2 2 )) exp(
(2 2 ))]
where 2 is the potential dierence at the solid liquid interface. Equation (70) is the species
balance while equation (71) denotes the charge balance. 1 and 2 are derived from ButlerVolmer kinetics. The parameters and the initial conditions are summarized in Table 5.
2 = 2 [exp(
A general nonlinear DAE system of equations, which are often encountered in process
applications, can be described by the following general form of coupled dierential and
21
Initial Conditions
Value
96487 C/mol
8.314 J/molK
298.15 K
0.420 V
0.303 V
3.4g/3
92.7 g/mol
1 105 cm
1 105 2
1 104 2
1 108 2
Initial Value
0.35024
0.4074
0.5322
0.4254
algebraic equations
x()
= f(x z u)
g(xz u) = 0
(74)
x R are the dierential states of the process, z R are the algebraic states of the
process and u R are the input variables. It is important to note that the initial condition,
x(0) = x0 in this case has to be consistent with z(0) = z0 such that the algebraic constraints
are satisfied
g(x0 z0 u(0)) = 0
This class of problems needs separate treatment while developing numerical solution schemes.
Most of the systems encountered in chemical engineering are distributed parameter systems. Even though the behavior of some of these systems can be adequately represented by
22
(75)
:
cross section area of the inner tube.
:
average velocity of the liquid(assumed constant).
:
external diameter of the inner tube.
Dividing both the sides by () and taking the limit as 0 and 0, we have
( )
( )
=
+
= [ ]
(76)
(77)
Boundary conditions:
( = 0) = 1
Initial condition
( = 0 ) = 0 (0 )
(78)
= = ( )
(0) = 1
(79)
(80)
This results in an ODE-IVP, which can be solved to obtain steady state profiles () for
specified heat load and liquid velocity.
Dynamic Simulation
=
+
(81)
with
( 0) = 1 at = 0 and 0 : Boundary condition
: Initial temperature profile
(0 ) = 0 ()
(82)
(83)
This results in a Partial Dierential Equation (PDE) model for the distributed parameter
system.
Example 11 Now, let us consider the situation where a hot liquid is used on the shell side
to heat the tube side fluid (see Figure 11). The model equations for this case can be stated as
( )
( )
=
+ ( )
( )
( )
=
( )
( ) = [ ( ) ( )]
24
(84)
(85)
(86)
(0 ) = 0 ()
(0 ) = 0 ()
(87)
(88)
(89)
(90)
These are coupled PDEs and have to be solved simultaneously to understand the transient
behavior. The steady state problem can be stated as
( )
= [ () ()]
( )
= [ () ()]
(0) = 0 at = 0
(1) = 1 at = 1
(91)
(92)
(93)
(94)
Equations (91-92) represent coupled ordinary dierential equations. The need to compute
steady state profiles for the counter-current double pipe heat exchanger results in a boundary
value problem (ODE-BVP) as one variable is specified at = 0 while the other is specified
at = 1
Before we conclude this section, we briefly review some terminology associated with
PDEs, which will be used in the later modules.
Definition 12 Order of PDEs: The order of a PDE is defined as the highest order of
the derivative occurring in the PDE.
25
Definition 13 Degree of PDEs: Power to which the highest order derivative is raised is
defined as degree of a PDE.
Example 14 Consider the PDE
+ (2 2 ) = 3
(95)
= 2 2
(96)
2 2 + 2 2 = 0
Non homogeneous equations: Contain terms other than dependent variables
= 2 2 + sin
(97)
2 2 + 2 2 = sin sin
(98)
4
4 X
X
2
= [1 4 1 4 ]
=1 =1
(99)
(100)
Thus, are elements of a real symmetric matrix A. Obviously A has real eigenvalues. The
PDE is called
Elliptic: if all eigenvalues are either +ve or -ve.
Hyperbolic: if some eigenvalues are +ve and the rest are -ve.
Parabolic: if at-least one eigenvalue is zero.
The classification is global if are independent of , else it is local. Typical partial
dierential equations we come across in engineering applications are of the form
2 =
+ 2 + + (1 2 3 )
(101)
subject to appropriate boundary conditions and initial conditions. This PDE is solved in a
three dimensional region , which can be bounded or unbounded. The boundary of is
denoted by On the spatial surface we have boundary conditions of the form
(( )
b) + ( ) = ( )
(102)
where
b is the outward normal direction to and represents the spatial coordinate along
We can classify the PDEs as follows
Elliptic: = = 0
Parabolic: 6= 0 = 0
Hyperbolic: 0
Elliptic problems typically arise while studying steady-state behavior of diusive systems.
Parabolic or hyperbolic problems typically arise when studying transient behavior of diusive
systems.
27
Summary
This chapter introduces dierent basic forms of equations through examples of steady state
and dynamic models of simple unit operations in chemical processing. The following abstract
equation forms/formulations have been identified
Linear algebraic equations
Nonlinear algebraic equations
Optimization based estimation/formulations
Ordinary Dierential Equations: Initial Value Problem (ODE-IVP)
Dierential Algebraic Equations (DAE)
Ordinary Dierential Equations: Boundary Value Problem (ODE-BVP)
Partial Dierential Equations (PDEs)
Methods for dealing with numerical solutions of these abstract equation forms / formulations will be discussed in the subsequent chapters.
References
[1] Stephanopoulos, G., Chemical Process Control, Prentice-Hall, Englewood Clis, N. J.,
1984.
[2] Frank, R. G. E., Mathematical Modeling in Chemical Engineering, Wiley, New York,
1967.
28