Beruflich Dokumente
Kultur Dokumente
Hamza J. Magnier
Dr Hamza J. Magnier
AMRSC AMIChemE
PhD Chemical Engineering | MSc Chemical Engineering and Design
1
“All models are wrong,
Hamza J. Magnier
but some are useful.”
Adage
2
Lecture 2
Chapter 2
Learning outcomes
Derivation of unsteady-state models from chemical
and physical principles
Hamza J. Magnier
The unsteady state model are called dyn mic models
First present the rational of dynamic models
Then present General Strategy for deriving them from first
principles (ex conserv tion laws)
Finally, describe how dynamic models that consist of set if
ordinary differential equations and algebric relashionship can
be solved numerrically using computer simulation
This chapter is concerned in Develop theoretical models from
3
first principles
Why do we use models?
• Improve understanding of the process.
Investigate transient behavior without disturbing the
process
• Train plant operating personnel.
Hamza J. Magnier
Process simulator
• Develop a control strategy for a new
process. Evaluate lternative control strategies
• Optimize process operating conditions.
recalculate the optimum operating conditions periodically
in order to maximize profit or minimize cost.
4
Types of models
Theoretical Empirical Semi-empirical
Use principles in Fitting experimental Data Combine the 2
Chemistry, Physics
Biology?!
Advantages Incorporate theoretical
aHamzJ. Magnier
Physical insight into
Process behavior knowledge
Applicable over a wide E sier to develop Can be extrapolated over
range of conditions a wide range of operating
conditions
Less development effort
Disadvantages than Theoretical Models
Too expensive? Do not extrapolate well
Time consuming? Small range of data
Missing data (kinetics)? compared to the Most Used 5
operating conditions
Ø Black box (empirical)
• Large number of unknown parameters
• Can be obtained quickly (e.g., linear regression)
• Model structure is subjective
Chapter 2
• Dangerous to extrapolate
Hamza J. Magnier
Ø Semi-empirical
• Compromise of first two approaches
• Model structure may be simpler
• Typically 2 to 10 physical parameters estimated
(nonlinear regression)
• Good versatility, can be extrapolated
6
• Can be run in real-time
• linear regression
y = c0 + c1 x + c2 x2
• nonlinear regression
(
y = K 1− e−t /τ )
Chapter 2
Hamza J. Magnier
but confidence limits on the p rameters 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
p rameters)
• nonlinear models such as neural nets are
becoming popular (automatic modeling)
7
Chapter 2
Hamza J. Magnier
Uses of Mathematical Modeling
• to i prove understanding of the process
• to optimize process design/operating conditions
• to design a control strategy for the process
• to train operating personnel 8
Theoretical Models of
Chemical Processes
Chapter 2
J.Magnier
Mathematical Model (Eykhoff, 1974)
“a representation of the essential aspects of an existing
Hamza
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.
9
General Modeling Principles
• The model equations are at best an approximation to the real
process. Nothing but a mathematical abstraction of real
process
• Adage: “All models are wrong, but some are useful.”
• Modeling inherently involves a compromise between model
J.Magnier
Chapter 2
accuracy and complexity on one hand, and the cost and effort
• Process odeling is both an art and a science. Creativity is
Hamza
required to ake simplifying assumptions that result in an
appropriate odel. Science is required to predict process
behavior from alternative models. Otherwise: Rigorous but
complicated? Or Overly simplistic?!
• Dynamic models of chemical processes consist of ordinary
differential equations (ODE) and/or partial differential equations
10
(PDE), plus related algebraic equations.
Table 2.1. A Systematic Approach for
Developing Dynamic Models from first
principles
1. State the modeling objectives and the end use of the model.
They determine the required levels of model detail and model
Chapter 2
J.Magnier
accuracy.
2. Draw a schematic diagram of the process and label all
Hamza
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.
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,
11
energy, and so forth).
Does an
answer
Table 2.1. (continued) exist?
6. Introduce equilibrium relations and other algebraic
equations (from thermodynamics, transport phenomena,
chemical kinetics, equipment geometry, etc.).
7. Perform a degrees of freedom an lysis (Sect on 2.3) to
Chapter 2
J. Magnier
8. Simplify the model. It is often possible to arrange the
Hamza
equations so that the dependent variables (outputs) appear
on the left side nd the independent variables (inputs) appe
r on the right side. This model form is convenient for
computer simulation and subsequent analysis.
9. Classify inputs as disturbance variables or as
manipulated variables.
12
Modeling Approaches
Hamza J. Magnier
§ 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
13
(data required for validation and fitting)
• Conservation Laws
Theoretical models of chemical processes are based
on conservation laws.
Conservation of Mass
rate of mass rate of mass rate of mass (2-6)
Chapter 2
= in − out
Hamza J. Magnier
accumulation
Conservation of Component i
r te of component i rate of component i
accumulation = in
J. Magnier
net rate of heat addition net rate of work
Hamza
the surroundings by the surroundings
convection H
a
m
za
J.
M
ag
ni
er
16
the enthalpy of inlet and outlet streams
The Energy Balance
GENERAL REACTOR HEAT BALANCE
&
Q
Chapter 2
In
Out
Hamza J. Magnier
n
i0 ni
H
i0 Hi
&
Ws
17
Figure 8-1 Energy balance on a well-mixed open system: schematic.
Rate of Rate of flow Rate of work Rate of energy Rate of energy
accumulation = of heat to the - done by the + added to the + leaving the
of energy system from system on the system by system by
within the the surroundings mass flow into mass flow out
system surroundings the system of the system
dE & E −& E
sys
= Q −W + n n
Chapter 2
in in ou ou
dt t t
Hamza J. Magnier
dE & & +
sys =Q −W s ∑ ni 0 Hi0 −
∑ni Hi
m m
dt i=1 i=1
We will assume the contents of the system volume are well mixed,
an assumption that we could relax but that would require a couple
18
more slides to develop, and the end result would be the same!
Evaluating the Work Term
Hamza J. Magnier
Flow work = W (Work required to get the mass - # of moles – in and
out of the sys)
Shaft work = (Stirrer in CSTR, or Turbine in a PFR)
[Rate of flow work]
Hamza J. Magnier
terms in the energy balance that represent the energy
exchange by mass flow across the system boundaries.
The energy Ei is the sum of the internal energy (Ui), the kinetic energy
2
(ui /2), the potential energy (gzi), and any other energies, such as
electric or magnetic energy or light:
20
In almost all chemical reactor situations, the kinetic, potential, and
"other" energy terms are negligible in comparison with the enthalpy,
heat transfer, and work terms, and hence will be omitted: that is,
Hamza J. Magnier
So, what is the Ui + PVi term?
Kinetic Energy
Energy of motion of an object is represented by its ki etic energy,
Hamza J. Magnier
Ek.
Changing the velocity would change the kinetic energy!
Internal Energy U and enthalpy H
What is intern l energy?
It is the energy of the molecules themselves, the attractive force
that keep the molecules of liquids and solids from flying apart.
22
We cannot measure the internal energy of a system exactly,
rather we can measure changes in internal energy
(ex. We cannot measure exactly how much a bank has money,
rather we can know within a day how much money entered/left the
bank)
U = Q – W – Ep – E k
Q : Heat added to the system
Hamza J. Magnier
W : Work done by the system
Ep : Change in Potential Energy
Ek : Change in Kinetic Energy
23
What is enthalpy?
The enthalpy of a system takes into account the work required to make
place for itself by pushing the surroundings. (analogy: In a shopping
centre the weight scale register the weight of a person + cloths)
With a pressure p on the object, the work required to make a place
for itself is W = pV
Remember at 1bar, the force exerted by the atmosphere on one
square-meter, is equivalent to that exerted by a mass of ten ton es. It s
Hamza J. Magnier
not negligible!
So the total energy of a body (lets consider a gas) is its internal energy
plus the energy credited for t king up a container of volume V at pressure
p. This is called enthalpy!
H = U + pV
The work is of two types:
A system moving from one state to another could expand/contract,
such as phase change from liquid to gas. This is called the pV work!
On the other hand, a system moving from one state to another may produce
work to turn a shaft, generate electricity… etc. This is called the
24
shaft work!
Total work produced: Standard state for U and H
W = Wsh + Wpv The absolute value of internal energy
of any material at rest (with subscript
The equation of zero) is given by Einstein famous
expression
U + Ek + Ep = Q – Wsh - WpV
At constant volume:
U + Ek + Ep = Q – Wsh
Hamza J. Magnier
At constant pressure:
U + Ek + Ep = Q – W sh - WpV U + WpV
mo: ass of the object
2
+ Ek + Ep = Q – Wsh c : Speed of light
U + ∫ pdV + Ek + Ep = Q – Wsh gc: In the SI unites this is
U + (pV) + Ek + Ep = Q – Wsh 2
dispensible = 1Kg.m/(s .N)
H + Ek + Ep =Q–W sh
Do we use U or H?
For constant volume batch systems,
we usually use U. But for constant
pressure and most others, we use H!
25
End of review
26
Hamza J. Magnier
In almost all chemical reactor situations, the kinetic, potential, and
"other" energy terms are negligible in comparison with the enthalpy,
heat transfer, and work terms, and hence will be omitted: that is,
Ei = Ui
Hamza J. Magnier
So, what is the Ui + PVi term?
Hi = ui + pQ
Typical units of Hjare
J Btu cal
(Hi)=- or - or -
mol i Ib mol i mol i
Enthalpy carried into or out of the system can be expressed as the sum
Hamza J. Magnier
of the net internal energy carried into (or out of) the system by mass
flow plus the flow work:
F,H, = F,(u,+PV
Combining previous equations, we can now write the energy balance
in the form:
28
The energy of the system at any instant in time, .k,!,, is the sum of the
products of the number of moles of each species in the system
multiplied by their respective energies. This term will be discussed in
more detail when unsteady-state reactor operation is considered
Some consistency
Let the subscrpt “0” represent the inlet conditions, and unsubscribed variables the outlet
Hamza J. Magnier
Solve
engineering
problem with
heat effects!
Relate
temperature, F 4 , FH.,&~
conversion,
and rate of
reaction! 'i- out
29
Development of Dynamic Models
Illustrative Example: A Blending Process
Specifications:
Hamza J. Magnier
Isothermal System
V varies with time