Sunteți pe pagina 1din 41


Process Modeling

Outline of this lecture
• Introduction and outline of the course
• Need for process modeling
• Statistical and mechanistic models
• Rate laws and adjustable parameters
• Selection of variables
• Model application areas
Learning outcomes for this lecture
• Understand what is mathematical modeling and
how it is related to physical problems
• Recognize the need for modeling, estimate
necessary model complexity
• Understand how models are built from balances
and constitutive equations
• Understand the basis of rate laws and adjustable
parameters in them
• Lectures each Wednesday from 8.30-10
• Exercises Tuesday and Thursday 8.30-10 at the
computer class. Also exercises with pen and paper!
• There could be some small exercises during the
lectures (be prepared with pen, paper and a
calculator), and theory parts during the exercises.
One full lecture will be given on We 4.11. during
the exercise times.

• Teachers from various research groups:
– Prof. Ville Alopaeus, chemical engineering
(responsible teacher)
– Kaj Jakobsson, chemical engineering
– Olli Sorvari, chemical engineering
– Reetta Karinen, Yaseen Khan, industrial chemistry
Additional assistants / visitors may participate

Workload estimate
work / h Grade weight / %

Pre-exam 15 15
Lectures 16
Home assignments 30 30
Computer exercises 40 15
Other independent study 30
Final exam 3 40
total 134 100

Lecture schedule
2.11.2016 1. Introduction and course outline. Need for process modeling. Statistical
and mechanistic models. Rate laws and adjustable parameters

9.11.2016 3. Tubular reactors, CSTR:s. Static and dynamic models. Numerical tools
for initial value ODE:s. Stiff systems

16.11.2016 4. Partial differential equations. Unsteady heat and mass transfer. Finite

23.11.2016 5. Mass transfer, film models. Multicomponent mass transfer. Matrix

equations and their solvers

30.11.2016 6. Population balances. Distributed and random variables. Numerical


7.12.2016 7. Dynamic simulators. Model based process control

Exercise schedule
1.11.2016 1. Preparation for the pre-exam. Building of mechanistic models from
balances and rate laws

3.11.2016 2. Pre-exam (45 min). Building of mechanistic models from balances and
rate laws

8.11.2016 LECTURE: 2. Model generation from physical laws. Selection of

variables. Dimensionless numbers and non-dimensionalizing of models. Adjusting model
complexity to available time

10.11.2016 3. Solution of reactor examples with Matlab. Introduction to Matlab m-

files and solvers. Intro to 1st home assignment

15.11.2016 4. Differentiation, linearization

17.11.2016 5. Finite differences and boundary conditions; derivation, implementation

and solution. Intro to 2nd home assignment

22.11.2016 6. Matrices with Matlab and Excel 8

Exercise schedule
24.11.2016 7. Numerical solution of multicomponent mass transfer between phases

29.11.2016 8. Fundamentals of dynamic models

1.12.2016 9. Calculation of statistical parameters. Numerical integration of known

functions. Quadratures. Numerical solution of integrodifferential equations

5.12.2016 10. Process stability. Second order dynamics.

8.12.2016 Dynamic simulator demo

• 45 min, during the second exercise

• One A4 sheet (both sides) of personally hand-

written (not a copy) review allowed in the pre-exam

• Passing is not compulsory for the rest of the course,

but pre-exam affects the final grade (and helps you
during the course)

Home assignments (tot. 30 h of work)
1. Reactor simulation, coding with Matlab m-files
2. Unsteady heat transfer example with finite

• Will be evaluated from 1-5

• Must be accepted during the course!
• A reasonable version needs to be returned by the given
DL, otherwise rejected directly
• Another round possible to improve, but then grade max 3
• To be done in groups of 3 (max) 11
Computer exercises
• At the computer class
• Part of the grade is based on active participation.
List of participation is circulated during the
exercise, mark your presence (not others, that will
be checked). Be present and active the whole time.
• If you do non-related things (emails, web chatting
etc…) you are asked to leave, without points from
that exercise session
• Answers will be uploaded to MyCourses after the
exercises 12
Final exam
• Based on lectures, exercises, hand-outs and distributed
supporting material (in MyCourses)
• There will be theory and (small) calculation questions, but
without computers. Typically questions related to short
explanation of terminology, formulation of a model, and
explanation of brief computer program performance
• Pocket calculator (no programs) allowed, but no other
• Idea is not to memorize, but to understand and apply.
Basic equations distributed for the exam
• For the first final exam date, some additional extra
feedback questions with extra points may be available
Model generation
• Why a model is needed?
– To make quantitative predictions about system behaviour
– To back up financial or other decisions
– To optimize a new or existing process
– To operate efficiently and safely an existing process
– For illustration / teaching

The idea of a (mathematical) model

Real world 1 Mathematical 2 Mathematical 3 Interpretation

problem problem solution

1. Reality to mathematics
2. Mathematical solution
3. Interpreting the model outputs
4. Using the results in the real world
Model building steps
• Build a sketch and define quantities

1st step: a Black box

• What does a black box model mean?

• What do we have to know about the system inputs, states,
outputs and disturbances?
Model building steps
• Build a sketch and define quantities

1st step: a Black box

xin xout

xout = f(xin)
Model building steps
2nd step: assume something related to spatial or
temporal variations.

E.g. Plug flow dx/dh = f(x)

xin xout

Model building steps
• 3rd step: Assume Vapor phase (V) Dry catalyst (D)

detailed small scale

phenomena and apply kVD
it in the big scale hVD cD
model xV


• E.g. Phases around a

xL xW
small catalyst particle kV kL
in a trickle bed reactor hV hL TL hLW

• Multiscale modeling
Liquid phase (L) Wet catalyst (W)
Box colors
• ”Black box” models:
– Empirical
– Process fundamentals are not necessary
– Based on observed input and output variables
– Purely mathematical (as an opposite to a physical
model) form where some parameters (coefficients)
are identified based on observed variables. These
coefficients typically have no physical meaning
– Often polynomials, could be neural networks etc.
Box colors
”White box” models

– Based on first principles: Conservation laws etc.

– ”transparent”, the model is understandable to a
knowledgeable process engineer
– No process or other data required (theoretically)
– Usually complex models
– In principle excellent extrapolation (scale-up) properties
– Can predict new phenomena (in principle)
Box colors
”Gray box” models

– In practice, purely ”white” or ”black” box models

are rare
– Mechanistic first principle building blocks bring
reliability in scale-up and extrapolation, and
functional dependencies to the expressions
– a priori knowledge about the model is used as well
to determine the structure and some of the
parameter values 22
Model building steps
• Select variables
– input
– output
– model state
– independent (dimensions etc.)

• Input and output are usually quite clear. Model

state variables are sometimes difficult, and care
should be taken with independent variables
Selection of variables
• For example, energy variables: Temperature or
• Temperature is easier to comprehend and is anyway
• Enthalpy is sometimes better:
– T can be evaluated if H is known, but not always vice
versa (Example?)
– If T=300K and you add a stream with T=400K, the result
is not a system at T=700K. If H=1 kJ and you add H=2
kJ, the system has H=3 kJ
What is the formal difference between these variables?
Selection of variables
Formally balances are based on extensive variables, so those
should be the primary variables

For which of the following a balance can be written?

1. Amount of moles of a certain ion
2. Temperature
3. Pressure
4. Mechanical energy
5. Entropy
6. Volume
7. Number of particles with characteristic diameters
between L and L+dL 25
Selection of variables

dc dn
r or  rV
dt dt
Ideally mixed
batch reactor
• What are these describing?
• Which one is based on conserved property
(extensive variables)

Selection of variables
concentration is not a conserved
property (extensive variable), but
amount of moles is.

dn dcV 
 rV n=cV  rV
dt dt
This reduces to r
dV dc dt
c  V  rV only if volume does not change
dt dt
(or the first term is negligible)
Balances and closures
Physically correct models (not black box) are based on
balances (material, energy, momentum etc...)

In these balances, there are unknown rates (mass &

heat transfer, reaction etc...)

These rates are typically modeled with ”closures”

(closing the set of equations), or ”constitutive
Balances and closures

Material balance  rV

Ideally mixed
batch reactor

How do we know by looking at these equations that ideal

mixing is assumed?
What to do if it is not a valid assumption?
Balances and closures

Material balance  rV

• Why this is not ”closed”?

• What ”closures” or constitutive equations would be
needed to ”close” or be able to solve this
• Which adjustable parameters there could be?

Balances and closures

Material balance  rV

Reaction rate needs  E 

r  k r exp  c A c B
a model (closure)  RT 
Where to get all these
variable values?

These typically contain unknown (adjustable)

parameters. What to do with them? 31
Independent variables
Those dimensions that affect results must be
taken into the model
Nodal points where
the solution is calculated
1D # of variables  N

2D # of variables  N2

etc…. Symmetries help a lot! 32

Model building steps continue
• List parameters that are important. Look for
nonlinearities (in the parameters or in the
• Draw a sketch of expected behavior
• Write balances and constitutive relations. Check
sign conventions (direction of transfer that is
positive, whether component is produced or
consumed in a reaction etc.)
• Derive a set of equations that can be solved and
introduce initial and boundary conditions
• Solve the model
• Interpret results

• Improve the model if it is not good enough
• Carry out sensitivity analysis
• Carry out optimization
• Test the model at extreme conditions (near the
applicability limits of the variables)
Model application areas

In which fields of chemical engineering or process

technology mathematical models could be used?

Discuss with a friend next to you

Model application areas
• Process design
– Feasibility analysis of novel designs
– Technical, economic, environmental assesment
– Effects of process parameter changes on
– Optimization using structural and parametric
– Analysing process interactions
– Waste minimization in design
Model application areas
• Process control
– Examining regulatory control strategies
– Analysing dynamics for setpoint changes or
– Optimal control strategies for batch operations
– Optimal control for multi-product operations
– Optimal startup and shutdown policies

Model application areas
• Trouble-shooting
– Identifying likely causes for quality problems
– Identifying likely causes for process deviations

• Process safety
– Detection of hazardous operating regimes
– Estimation of accidental release events
– Estimation of effects from release scenarios

Model application areas
• Operator training
– Startup and shutdown for normal operations
– Emergency response training
– Routine operations training

• Environmental impact
– Quantifying emission rates for a specific design
– Dispersion predictions for air and water releases
– Characterizing social and economic impact
– Estimating acute accident effects (fire, explosion) 39
• Reality → Mathematical model → Model solution →
Interpretation → Application to reality
• Different box colors exist
• Carefully think about:
– Variables (state) needed in the model
– Independent variables (dimensions) as the model easily
gets too complicated
– Balance equations that the model is based on
– Rate laws and other necessary relations to close the model
• Mathematical models are needed in many parts of
Chemical Engineering 40
George E.P. Box:

”Essentially, all models are wrong,

but some are useful”