Lecture 6 - Discretisation Part 1
Lecture 6 - Discretisation Part 1
Discretisation
Discretisation concerns the process of
transferring continuous functions, models,
and equations into discrete counterparts
This process is usually carried out as a first
step toward making them suitable for
numerical evaluation and implementation
on digital computers
As the flow variables in the governing
equations are expressed as a function of
space and time, we have two
discretization types:
Spatial discretization
Temporal discretization
Spatial Discretization
Spatial Discretization
Spatial Discretization
In CFD, there are two common spatial discretization
methods:
Finite difference method
Approximating the derivatives using a
truncated Taylor series
The simplest method
Requires high degree of mesh regularity such
as in structured mesh
Finite volume method
Discretisation starts from the integral form of
the flow equations
Variation of any quantity within a volume
depends entirely on the surface values of the
fluxes
5
Spatial Discretization
(Finite Difference Method)
Taylor Expansion
First guess Add to capture
slope
(Not very good)
Add to account
for curvature
Taylor Expansion
First guess Add to capture
slope
(Not very good)
Add to account
for curvature
Exact solutions
Example:
Taylor Expansion
First guess Add to capture
slope
(Not very good)
Add to account
for curvature
10
Taylor Expansion
First guess Add to capture
slope
(Not very good)
Add to account
for curvature
Exact solutions
Example:
Taylor Expansion
First guess Add to capture
slope
(Not very good)
Add to account
for curvature
12
Taylor Expansion
First guess Add to capture
slope
(Not very good)
Add to account
for curvature
Exact solutions
Example:
13
Taylor Expansion
First guess Add to capture
slope
(Not very good)
Add to account
for curvature
14
Taylor Expansion
First guess Add to capture
slope
(Not very good)
Add to account
for curvature
Exact solutions
Example:
15
j+1
j
i, j
j1
i1
i+1
Eq. 1
Finite-difference representation
Hence
Truncation error
And
16
j+1
j
i, j
j1
i1
i+1
17
j+1
j
i, j
j1
i1
i+1
Eq. 2
18
j+1
j
i, j
j1
i1
i+1
19
i, j
j1
i1
i+1
Central difference
20
Convection
Diffusion
Production
j+1
j
i, j
j1
i1
i+1
i
22
j+1
j
i, j
j1
i1
i+1
i
23
i, j
j1
i1
i+1
i
24
Then
j+1
j
i, j
j1
i1
i+1
i
25
Example 1
6
26
70
Dispersed error
60
50
40
30
20
10
0
0
10
15
20
25
30
-10
-20
f(x,t)
f(x,t+dt)
f(x,t+2dt) f(x,t+3dt)
28
70
Diffusive error
60
50
40
30
20
10
0
0
10
15
20
25
30
-10
-20
f(x,t)
f(x,t+dt)
f(x,t+2dt) f(x,t+3dt)
29
Example 2
Fig. 1
Fig. 2
0.2
30
Example 4
Find the temperature at the interior node given in the following figure:
31
Example 5
32
x0 , y0 , x1 , y1 , x2 , y2 ,, xn , yn
Pn x a0 a1x an 1x n 1 an x n
To find the first derivative,
Pnx
dPn ( x )
a1 2a2 x n 1an 1 x n 2 nan x n 1
dx
33
Example 5
The upward velocity of a rocket is given as a function of time in Table 1.
t
s
0
10
15
20
22.5
30
v(t)
m/s
0
227.04
362.78
517.35
602.97
901.67
Using the third order polynomial interpolant for velocity, find the acceleration of the
rocket at t = 16s.
34
Solution
For the third order polynomial (also called cubic interpolation), we choose the velocity given by
vt a0 a1t a2 t 2 a3t 3
Since we want to find the velocity at t = 16 s, and we are using third order polynomial, we need to
choose the four points closest to t = 16 s and that also bracket t = 16 s to evaluate it.
The four points are
35
such that
v10 227.04 a0 a1 10 a2 10 a3 10
2
v15 362.78 a0 a1 15 a2 15 a3 15
2
v20 517.35 a0 a1 20 a2 20 a3 20
2
100
1000 a0 227.04
1 10
1 15
a 362.78
225
3375
1 20
400
8000 a 2 517.35
a
1
22
.
5
506
.
25
11391
602
.
97
36
a0 4.3810
a1 21.289
a2 0.13065
a3 0.0054606
Hence
http://numericalmethods.eng.usf.edu
37
a16
Given that
d
vt t 16
dt
d
4.3810 21.289t 0.13065t 2 0.0054606t 3
dt
21.289 0.26130t 0.016382t 2 , 10 t 22.5
29.664m/s 2
39
END OF LECTURE 6
40