0% found this document useful (0 votes)
22 views

Lecture4 Discretization Technique

1) The document discusses discretization techniques used in computational fluid dynamics (CFD) simulations. Discretization involves approximating continuous equations with discrete equations that can be solved numerically on a computational grid or mesh. 2) Finite difference, finite volume, and finite element methods are introduced as common discretization approaches in CFD. Finite differences involve approximating derivatives as algebraic differences between node points. 3) Taylor series expansions are used to derive finite difference approximations of first and second derivatives, showing how truncation error decreases with higher-order approximations. Examples of first-order forward, backward, and second-order central differences are given.

Uploaded by

Tin Dang
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Lecture4 Discretization Technique

1) The document discusses discretization techniques used in computational fluid dynamics (CFD) simulations. Discretization involves approximating continuous equations with discrete equations that can be solved numerically on a computational grid or mesh. 2) Finite difference, finite volume, and finite element methods are introduced as common discretization approaches in CFD. Finite differences involve approximating derivatives as algebraic differences between node points. 3) Taylor series expansions are used to derive finite difference approximations of first and second derivatives, showing how truncation error decreases with higher-order approximations. Examples of first-order forward, backward, and second-order central differences are given.

Uploaded by

Tin Dang
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

CFD LECTURE

COMPUTATIONAL AERODYNAMICS

Lecture 4 : Discretization Technique

Farfield boundary

Grids /
Mesh

Body/ Solid boundary

Page 1
Computational Modelling

Real Words Physics Numerical Simulation

Mathematical Discretization Resolution of


Flow Models Techniques discrete system
Model
of Equations.

Space
Steadiness Dynamic
approximation approximation discretization
Mesh definition

Spatial
approximation Equation
discretization
Definition of
Numerical schemes

Page 2
Computational Solution Procedure

GE
Governing
BC PDE and BC’s

f
f
Discretization
Consistency
x x Stability
Discretized Convergence
Equations

explicit
implicit Equation Solver

Approximate Solution
T(x,y,z,t), etc

Page 3
Review of Mathematical Models

Linear equations Non-Linear equation System equations


1. Linear convection 1. Inviscid Burgers 1. Unsteady Inviscid
compressible flow

2. Linear diffusion
(heat conduction)

3. Transport (unsteady 2. Burgers


convection-diffusion)

Where p is pressure and E


4. Laplace is total energy per unit
volume given by

5. Wave
and g is ratio of specific
heats
Page 4
Boundary Conditions

1. Direchlet BC > a given value at boundary


Example : BC for viscous flow -> no slip condition (zero velocity)

Wall Temperature

2. Newmann BC > gradient of variable at boundary

Example : BC on the temperature gradient at wall

3. Robin BC > mixed BC’s

Page 5
Meanings of Discretization

Discretization is the process by which a closed-


form mathematical expression, such as a function
or a differential or integral equation involving
functions, is approximated by analogous (but
different) expression which prescribe values at only
a finite number of discrete points or volumes in the
domain.
Time discretization
Transport equation

Space discretization
Laplace Equation

Page 6
Road Map

Discretization Approaches

Finite Finite Finite


Difference Volume Element

Basic derivations of finite Basic derivations


differences: Internal and of finite volume
boundary, order accuracy equations

Basic derivations
of finite difference
equations

Types of solutions: Stability


Explicit and implicit analysis
Page 7
Finite Differences

Discretization Techniques

Taylor Series Expansion Polynomial

Page 8
Finite Differences : Taylor Series
First Derivative
f (x)
f f (x) ≈ f (x0 + D x ) = f (x0) First guess (not very good)
? 4
x 5 f (x)
2 + add to capture slope

1 3 add to account for


+ lower order curvature

add to account for


x0 x0 + D x x + higher order curvature

Dx ui 1, j  ui , j
= -
Dx

FD representation Truncation error ( O(Dx) )

Page 9
First-order forward difference
Finite Differences : Taylor Series
First Derivative
f (x)
df
? f (x) ≈ f (x0 - D x ) = f (x0)
dx 5 f (x)
2 -
1 4

x0 - D x x0 x0 + D x x
-

ui , j  ui 1, j
= +
Dx

FD representation Truncation error ( O(Dx) )

Page 10
First-order backward difference
Finite Differences : Taylor Series
First Derivative
f (x)
f
?
x 5 f (x)
2
1 4

x0 - D x x0 x0 + D x x

f (x) ≈ f (x0 + D x ) = f (x0) +  3 f (D x) 3


+ +
u 3 6

f (x) ≈ f (x0 - D x ) = f (x0) -  3 f (D x) 3


+ -
u 3 6
(-)

f i 1  f i 1  2
f  3 f (D x) 3
Dx  2 3
f f i 1  f i 1
  O(Dx) 2
x x 6 x 2 Dx
Page 11
Second-order central difference
Finite Differences : Taylor Series
Second Derivative
f (x)
2 f
?
x 2
5 f (x)
2
1 4

i  1, j

x0 - D x x0 x0 + D x x

f (x) ≈ f (x0 + D x ) = f (x0) +  3 f (D x) 3


+ +
u 3 6

f (x) ≈ f (x0 - D x ) = f (x0) -  3 f (D x) 3


+ -
u 3 6
(+)
2 f  4 f (D x) 4 2 f f i 1  2 f i  f i 1
f i 1  f i 1  2 f i  2 (D x)  4
2
  O ( Dx ) 2

x  x 12  x2 ( D x) 2
Page 12 Second-order central difference
Finite Differences : Taylor Series
Second Derivative

i  2, j i  1, j i, j i  1, j i  2, j

Fourth-order central difference for second derivative

Page 13
Finite Differences : Taylor Series

Mixed Derivative

i  1, j

Page 14
PR

 f  f i  2  4 f i 1  3 f i
i  2, j
  O(Dx) 2
i  1, j i, j i  1, j i  2, j
x 2 (D x)

i  3, j i  2, j i, j i  1, j  2 f 2 f i  5 f i 1  4 f i  2  f i 3
  D
i  1, j
2
O ( x )
 x2 (D x) 2

Page 15
Finite Differences : Polynomial

f (x)
f 2 f
?
?  x2
x 5 f (x)

f ( x)  Ax 2  B x  C
2
1 4

x0 x0 + D x x0 + 2 D x x

xi  0 f i  A xi  B xi  C  C
2

xi 1  D x f i 1  Axi 1  B xi 1  C  A(D x) 2  B(D x)  C


2

xi  2  2D x f i  2  A xi  2 2  B xi  2  C  A(2D x) 2  B(2D x)  C

Page 16
Finite Differences : Polynomial

f ( x)  Ax 2  B x  C
 f i  2  f i 1  3 f i f i  2  2 f i 1  f i
C  fi B A
2Dx 2(Dx) 2
f f
 2 Ax  B xi  0 B
x x i

 f  f i  2  f i 1  3 f i

x 2Dx

2 f 2 f f i  2  2 f i 1  f i
 2A 
x 2
x 2
(Dx) 2
Page 17
Discretization techniques at Boundary

First-order accuracy

3
Dy
2 Second-order accuracy
Dy
1 boundary

Page 18
Difference Equations

Forward difference in Time and Central difference in Space (FTCS)

Partial Differential
Equation (PDE)

Discretized Equation (DE))

Page 19 Truncation Error


Finite Difference Solution Process

Initialise Construct Finite Difference


Setup Grid dependent Analogue of PDE and BC’s
variables

For Each Interior Grid


Point evaluate Algorithm to
give ujn+1
tn+1 = tn + Dt
Adjust Boundary values
u1n+1 and ujn+1

No
e<K
Yes

Solution

Page 20
Explicit Marching solution

Page 21
Implicit Marching solution


Ti n 1  Ti n  Ti n11  2Ti n 1  Ti n11


Dt D x 2
n 1 n 1 n 1  Dt 2 Dt
AT  BTi  AT  Ti n
A B  1
i 1 i 1
D x 2 D x 2

Page 22
Consistency, Stability, Convergence
Discretization
Governing Discretized
PDE and BC’s Consistency Equations Consistency
Discretization error → Condition on Structure of
Numerical Formulation
Round-off → The discretized equation
Stability
error should tend to the PDE to
T T which they are related when
Dt and Dx tend to zero
Analytical Convergence Approximate
Solution Solution
Stability
Consistency + Stability = Convergence → Condition on Solution of
Numerical Scheme
→ The numerical scheme

Convergence should not allow errors to


Discretization error = A - D grow indefinitely, that is, to
→ Condition on Numerical
Round-off error = e = N - D Solution
be amplified without bound,
→ The numerical solution as the iteration progress
A = analytical solution of PDE from one time step to
should approach the exact
D = exact solution of discretized eq. another
solution of the PDE at any
N = Approximate solution
point and time

Page 23
Analysis of Stability for Heat conduction

e = round-off error

 Stable

 Unstable

Page 24
Analysis of Stability

Von Neumann Methods


The error is expressed analytically by Fourier series

amplitudes are exponentially varying with time

1.

The condition is always hold


2.

Page 25
for Stable solution

You might also like