Beruflich Dokumente
Kultur Dokumente
Process Modeling
Lecture 4
1
Lecutre 4 outline
• Which models lead to partial differential
equations?
• Coupled and uncoupled physical models
• Some solution methods:
– finite differences
– polynomial approximations
– finite volume
2
Partial differential equations
For a function f x 0
changing x leads to changes in f as
f x
df dx
x
f is a function of one variable (x) only. These
result in ordinary differential equation models 3
Partial differential equations
For a function f x, y 0
changing x and y lead to changes in f as
f x, y f x, y
df dx dy
x y
by the chain rule Partial derivatives
4
PDE
More generally: independent variables x and y;
dependent c,
dc d c
2
Ordinary differential
f c, x, , 2 ... 0 equation
dx dx
dc d c dc d c d c
2 2 2
f c, x, y, , 2 , , 2 , ... 0
dx dx dy dy dxdy
Partial differential equation, differentiation of the
field with respect to several variables 5
What kinds of models result from the following
assumptions:
ODE (z), but r divided into two regions (depends on the wall flow model)
Dynamic plug flow
c 1 c
r With dimensionless length
t res z coordinate
Heat flux
Diffusion flux
1 or 2 dimensional problem?
9
End effects can be neglected
A warning
In many cases, only one spatial dimension is
important but be careful:
A long and narrow cable A long and narrow
wood chip or fibre
Diffusion flux
Heat flux
Diffusion flux
Cold surface,
Wall Temperature specified
L
Cold surface,
Wall Temperature specified
T T2
Transient heat conduction in
x-direction only. Drop other t c p x 2
T terms out 12
Coupled and uncoupled problems
Sometimes dependent variables are ”coupled”, i.e. they affect
strongly on each other. For example temperature and
concentration in exothermic reaction
T T 2
t c p x 2
Ti Ti 1 2Ti Ti 1
Home assignment
t c p h 2
”Method of lines” 16
PDE in weather forecast
Lewis Fry Richardson (1881-1953)
18
Richardson weather forecast factory
Richardson estimated that 64 000 people would be
needed to keep pace with the atmosphere
Ti-1
Ti-1
Ti Ti
Ti+1 Ti+1
h h
x x
Alternative
eOh
notations
n
22
Method order
d f x 0 h
Oh
n 1 i i
f x 0 h i
n
i 0 dx i!
df i f i 1 f i 1
Three-point difference e=O(h2)
dx 2h
25
High order approximate solutions to
PDEs
By using Taylor’s series expansion we get:
Approximation for the derivative
df i f i 1 f i 1 d 3f i h 2
3 ... Approximation
dx 2h dx 3!
for the error
e=O(h2)
The third point is actually fi, but it has
a coefficient 0 on the right hand side 26
High order approximate solutions to
PDEs
Five-point difference
df i f i 2 8f i 1 8f i 1 f i 2
e=O(h4)
dx 12h
etc.
29
Advection equation
c c
v
t x
df i f i 1 f i 1
Three point central difference
dx 2h
dci ci 1 ci 1
v
dt 2h 30
Three point central difference df i f i 1 f i 1
100 discretization points dx 2h
31
First order ”upwind” discretization df i f i f i 1
100 discretization points dx h
32
First order ”upwind” discretization
1000 discretization points
33
Second order ”upwind” discretization
100 discretization points
34
Polynomial approximations
dc N d c N
2 N
R N a, x f c N , x, , 2 ... c N a i Fi
dx dx i 0
37
Polynomial approximations
An example: collocation methods
dc N x j d c N x j
2
R N a , x j f c N , x j , , ... 0
dx dx 2
The trial function satisfies the differential equation at
specific collocation points, i.e. the residual is set to zero
at these points. Optimally these are zeros of Jacobi
polynomials (orthogonal collocation)
R a, x x
j1
N dx 0, j 1...N
0
• Subdomain method
• Galerkin method ( FEM)
• Least squares method
41
Finite volume methods (FVM)
42
FVM
Control volume
43
FVM
Flux at the boundary must be calculated from the cell
values
1 2 3 4 5 6 7 8
44
Summary
• Real modeling problems often lead to partial
differential equations, but by assuming symmetries
models can be simplified
• In coupled problems, variables affect each other. For
example reaction rate and temperature
• There are many solution methods for partial
differential equations. These bring them to a set of
ordinary differential equations or algebraic equations
• Some solution methods:
– Finite difference method
– Polynomial approximations
– Finite volume method 45