SlideShare a Scribd company logo
1 of 49
Download to read offline
3/8/2007 Indo-German Winter Academy 1
Discretization Methods
in Fluid Dynamics
Mayank Behl
B-tech. 3rd Year
Department of Chemical Engineering
Indian Institute of Technology Delhi
Course 1: Fluid Mechanics and Energy Conversion
Supervisor:
Dr. G.Biswas
Indian Institute of Technology
Kanpur
Indo-German Winter Academy 2
3/8/2007
OUTLINE
1. Basics of PDE
2. Mathematical Overview of fluid flow
3. Need For Computational Methods
4. Basic Discretization Methods in use
5. Finite Difference Method
6. Fluid Flow Modeling
Indo-German Winter Academy 3
3/8/2007
Partial differential equations (PDEs) are used to
formulate and solve problems related to any phenomena
that is distributed in space and time :
„ Heat flow
„ Fluid flow
„ propagation of sound
„ electrodynamics,
„ Elasticity…….
)
,
(
A 2
2
2
2
2
y
x
G
F
y
E
x
D
y
C
y
x
B
x
=
+
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
∂
+
∂
∂
φ
φ
φ
φ
φ
φ
Most of the fluid and related transport phenomena
can be modeled using PDEs
Indo-German Winter Academy 4
3/8/2007
Classification of PDEs
)
,
(
A 2
2
2
2
2
y
x
G
F
y
E
x
D
y
C
y
x
B
x
=
+
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
∂
+
∂
∂
φ
φ
φ
φ
φ
φ
B2 – 4AC<0 Elliptic equation
B.V.P.
Irrotational flows
steady Heat Transfer
B2 – 4AC=0 Parabolic equation
I.B.V.P;
Unsteady viscous
flows
B2 – 4AC>0 Hyperbolic equation Vibration problems
0
2
2
2
2
=
∂
∂
+
∂
∂
y
φ
x
φ
2
2
x
t ∂
∂
=
∂
∂ φ
α
φ
2
2
2
2
2
x
t ∂
∂
=
∂
∂ φ
β
φ
If A,B,C,D… all constants or f(x,y) Linear PDE
If any of A,B,C,D… contains Φ, Φ’ etc Non-linear PDE
Indo-German Winter Academy 5
3/8/2007
Boundary conditions
„ Dirchlet Boundary
condition:
„ Neumann Boundary
condition:
„ Mixed Boundary
condition:
)
(
1 r
φ
φ =
)
(
2 r
n
φ
φ
=
∂
∂
)
(
3 r
n
b
a φ
φ
φ =
∂
∂
+
Given boundary temperature
Given boundary heat flux
Boundary heat flux dependent on boundary temperature
Indo-German Winter Academy 6
3/8/2007
„ Equation of continuity: a differential mass balance
t
z
w
y
v
x
u
∂
∂
−
=
∂
∂
+
∂
∂
+
∂
∂ ρ
ρ
ρ
ρ
[ ]
t
∂
∂
−
=
⋅
∇
ρ
ρ u
In vector notation:
For constant density of the fluid: 0
=
⋅
∇ u
Mathematical description of flows;
Governing Equations of Fluid Dynamics
Δx
Δz
Δy (x,y,z)
Indo-German Winter Academy 7
3/8/2007
„Equation of motion: g
τ
uu
u ρ
ρ
ρ +
⋅
∇
−
−∇
=
⋅
∇
+
∂
∂
p
t
Governing Equations of Fluid Dynamics (2)
for incompressible, Newtonian Fluids , under laminar flow:
g
u
u
u
u ρ
μ
ρ +
∇
+
−∇
=
⎟
⎠
⎞
⎜
⎝
⎛
∇
⋅
+
∂
∂ 2
p
t
Navier-Stokes Equation
Indo-German Winter Academy 8
3/8/2007
The Navier-Stokes equations
(Non linear
PDEs)
x
g
z
u
y
u
x
u
x
p
z
u
w
y
u
v
x
u
u
t
u
+
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
−
=
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
2
2
2
2
2
2
1
ρ
μ
ρ
y
g
z
v
y
v
x
v
y
p
z
v
w
y
v
v
x
v
u
t
v
+
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
−
=
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
2
2
2
2
2
2
1
ρ
μ
ρ
z
g
z
w
y
w
x
w
z
p
z
w
w
y
w
v
x
w
u
t
w
+
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
−
=
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
2
2
2
2
2
2
1
ρ
μ
ρ
In general, Analytical Solution Not Possible
Solution???
Indo-German Winter Academy 9
3/8/2007
Approaches to Fluid Dynamical Problems
1. Simplifications of the governing equations
Æ AFD: Analytical Fluid Dynamic
2. Experiments on scale models
Æ EFD: Experimental Fluid Dynamics
3. Discretize governing equations and solve by computers
Æ CFD Computational Fluid Dynamics
CFD is the simulation of fluids engineering system using
modeling and numerical methods
Indo-German Winter Academy 10
3/8/2007
Need for Discretization methods
¾In general, no analytical solution exist for non-linear models
One of the way out is to approximate the solutions using
Numerical methods
¾Advent of digital computer and advanced improvements in
computer resources
¾Basis for CFD, which can provide unlimited details of results
¾Substantially more cost effective and more rapid than EFD
¾ability to study systems under hazardous conditions
Indo-German Winter Academy 11
3/8/2007
¾Finite Difference Method (focused in this lecture)
¾Finite Volume Method
¾Finite Element Method
Various Discretization Techniques
Indo-German Winter Academy 12
3/8/2007
Discretization Methods
Finite Difference Method (focused in this lecture)
1.Governing equations in differential formÆ domain with gridÆ
replacing the partial derivatives by approximations in terms of node
values of the functionsÆ one algebraic equation per grid nodeÆ linear
algebraic equation system.
2. Applied to structured grids
Finite Volume Method
1. Governing equations in integral formÆ solution domain is subdivided
into a finite number of contiguous control volumesÆ conservation
equation applied to each CV.
2. Computational node locates at the centroid of each CV.
3. Applied to any type of grids, especially complex geometries
Finite Element Method
1. Solution domain is subdivided into a finite number OF ELEMENTS,
the governing equation is solved for each element and then overall
solution is obtained by “assembly”.
2. Equations are multiplied by a weight function before integrated over
the entire domain.
Indo-German Winter Academy 13
3/8/2007
►Consistency
A discretization method is said to be consistent if it can be
shown that the difference between PDEs and its finite
difference (FDE) vanishes as the mesh is refined.
Truncation error (TE): Difference between the discretized
equation and the exact one
LimmeshÆ0 (TE) 0
Basics aspects of Discretization methods
O(∆x); O(∆t)
O(∆t/∆x)
►Convergence: solution of the discretized equations
tends to the exact solution of the differential equation as the
grid spacing tends to zero.
Indo-German Winter Academy 14
3/8/2007
Basics aspects of Discretization methods
Stability : Differencing Method should not magnify the
errors that appear in the course off numerical solution
process
Conservation:
1. The numerical scheme should on both local and
global basis respect the conservation laws.
2. Automatically satisfied for control volume method,
either individual control volume or the whole domain.
3. Errors due to non-conservation are in most cases
appreciable only on relatively coarse grids, but hard to
estimate quantitatively
1
1
≤
+
n
i
n
i
ε
ε
Indo-German Winter Academy 15
3/8/2007
Finite Difference Method
Replacing the derivatives of governing
PDE with finite, algebraic differences
quotients. It involves following steps:
„ Grid generation defining
geometric domain
„ Discretization of governing
equation using Taylor
series approximation.
„ Solution of simultaneous
algebraic equations.
φi,j
φi+1,j
φi-1,j
Δx
Δy
Discrete grid points
φi-1,j
φi,j φi+1,j
Indo-German Winter Academy 16
3/8/2007
Finite Difference Method:grids
Grids
„ Structured grid
all nodes have the same number
of elements around it
only for simple domains
„ Unstructured grid
for all geometries
irregular data structure
Indo-German Winter Academy 17
3/8/2007
Finite Difference,
approximation of the first derivative
►Taylor Series Expansion: Any continuous differentiable
function, in the vicinity of xi , can be expressed as a Taylor
series:
( ) ( ) ( )
( ) ( ) ( )
H
x
n
x
x
x
x
x
x
x
x
x
x
x
x
x
i
n
n
n
i
i
i
i
i
i
i
i +
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
Φ
∂
−
+
+
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
Φ
∂
−
+
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
Φ
∂
−
+
⎟
⎠
⎞
⎜
⎝
⎛
∂
Φ
∂
−
+
Φ
=
Φ
!
...
!
3
!
2 3
3
3
2
2
2
( )
H
x
Φ
x
x
x
Φ
x
x
x
x
Φ
Φ
x
Φ
i
i
i
i
i
i
i
i
i
i
i
+
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
∂
−
−
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
∂
−
−
−
−
=
⎟
⎠
⎞
⎜
⎝
⎛
∂
∂ +
+
+
+
3
3
2
1
2
2
1
1
1
6
2
►Higher order derivatives are unknown and can be dropped when the
distance between grid points is small Xi+1- Xi is small
Indo-German Winter Academy 18
3/8/2007
►By writing Taylor series at different nodes, x i-1, x i+1, or both
x i-1 and x i+1, we can have:
O(∆x)
1
1
−
−
−
Φ
−
Φ
≈
⎟
⎠
⎞
⎜
⎝
⎛
∂
Φ
∂
i
i
i
i
i x
x
x
Backward Difference Scheme-BDS O(∆x)
i
i
i
i
i x
x
x −
Φ
−
Φ
≈
⎟
⎠
⎞
⎜
⎝
⎛
∂
Φ
∂
+
+
1
1
Forward Difference Scheme-FDS
order of accuracy
O(∆x)
1
1
1
1
−
+
−
+
−
Φ
−
Φ
≈
⎟
⎠
⎞
⎜
⎝
⎛
∂
Φ
∂
i
i
i
i
i x
x
x Central Difference Scheme-CDS O(∆x)²
Indo-German Winter Academy 19
3/8/2007
Finite Difference,
approximation of the second derivative
Geometrically, the second derivative is the slope of the line
tangent to the curve representing the first derivative.
i
i
i
i
i
x
x
x
x
x −
⎟
⎠
⎞
⎜
⎝
⎛
∂
Φ
∂
−
⎟
⎠
⎞
⎜
⎝
⎛
∂
Φ
∂
≈
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
Φ
∂
+
+
1
1
2
2
Estimate the outer derivative by FDS, and estimate the inner
derivatives using BDS, we get
For equidistant spacing of the points:
( ) ( ) ( )
( ) ( )
1
2
1
1
1
1
1
1
1
2
2
−
+
−
+
+
−
−
+
−
−
−
Φ
−
−
Φ
+
−
Φ
≈
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
Φ
∂
i
i
i
i
i
i
i
i
i
i
i
i
i
i
x
x
x
x
x
x
x
x
x
x
x
( )2
1
1
2
2
2
x
x
i
i
i
i Δ
Φ
+
Φ
−
Φ
≈
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
Φ
∂ −
+
Higher-order approximations for the second derivative can be
derived by including more data points, such as xi-2, and xi+2, even
xi-3, and xi+3
Indo-German Winter Academy 20
3/8/2007
Discretization using Explicit Method
„ Consider unsteady viscous flow
2
2
x
t ∂
Φ
∂
=
∂
Φ
∂
α
( )2
1
1
1
2
x
t
i
n
i
n
i
n
n
i
n
i
Δ
Φ
+
Φ
−
Φ
=
Δ
Φ
−
Φ −
+
+
α
The Only unkown
:Φi
n+1
Explicit method , values at time n+1 computed from values at time n
Advantages: solution algorithm is simple i.e.
- direct computation without solving system of algebraic equation
- few number of operations per time step
Disadvantage: strong conditions on time step for stability
Requires many time steps to carry out the calculations over
a given time interval
Indo-German Winter Academy 21
3/8/2007
Implicit Method
Crank-Nicholson Method
( )2
1
1
1
1
1
1
1
1
2
2
2
x
u
u
u
u
u
u
t
u
u n
i
i
n
n
i
i
n
n
i
i
n
n
i
n
i
Δ
+
+
−
−
+
=
Δ
− +
−
−
+
+
+
+
+
α
2
2
x
u
t
u
∂
∂
=
∂
∂
α
ƒ values at time n+1 computed using the unknown values at time n+1
ƒ Second order accurate in time and space
ƒto be solved simultaneously at all the grid points as a system of
algebraic equations
ƒ Unconditionally stable
rearranging the above equation as follows….
O(∆t)2,O(∆x)2
Indo-German Winter Academy 22
3/8/2007
Indo-German Winter Academy 23
3/8/2007
This generates a Tridiagonal Matrix system which can be solved
using Thomas algorithm.
However, for higher dimensional flows, matrix system obtained are
much more complex and require substantially more computer time
Ax = C
Indo-German Winter Academy 24
3/8/2007
Alternating Direction Implicit Method
(ADI) for 2-D Flows
( ) ⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
Δ
+
−
+
Δ
+
−
=
Δ
− +
−
+
+
+
−
+
+
2
2
/
1
1
,
2
/
1
,
2
/
1
1
,
2
,
1
,
,
1
,
2
/
1
, 2
2
2
/ y
u
u
u
x
u
u
u
t
u
u n
j
i
n
j
i
n
j
i
n
j
i
n
j
i
n
j
i
n
j
i
n
j
i
α
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
∂
+
∂
∂
=
∂
∂
2
2
2
2
y
u
x
u
t
u
α
Each time increment is executed into two steps:
First step
( ) ⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
Δ
+
−
+
Δ
+
−
=
Δ
− +
−
+
+
+
+
−
+
+
+
+
+
2
2
/
1
1
,
2
/
1
,
2
/
1
1
,
2
1
,
1
1
,
1
,
1
2
/
1
,
1
, 2
2
2
/ y
u
u
u
x
u
u
u
t
u
u n
j
i
n
j
i
n
j
i
n
j
i
n
j
i
n
j
i
n
j
i
n
j
i
α
Second step
Indo-German Winter Academy 25
3/8/2007
ADI method results in Tridiagonal Equations (for 2-d flow systems)
if it is applied along the dimension that is implicit. Thus on first step it is
applied along Y axis and on second step along on X axis
First direction Y Second direction X
Indo-German Winter Academy 26
3/8/2007
Implicit method
„ Advantages:
Stability can be maintained over larger time
steps
„ Disadvantages
„ More computation time per time step, every time
step requires solving a system of equations.
„ Truncation error is often large , since larger
time steps are employed.
„ Overall, a more involved procedure
Indo-German Winter Academy 27
3/8/2007
Error and Stability analysis
„ Numerical solution is influenced by following:
Discretization errors or Truncation errors:
Analytical Solution (A) – exact Finite Difference Solution (D)
= A – D
Computational Round-Off Error (e)
ε=Numerical Solution (N) – exact Finite Difference Solution (D)
N = D + ε
By definition, N,D follow the Discretized Equation
Thus, ε should also follow the equation:
( )2
1
1
1
2
x
t
i
n
i
n
i
n
n
i
n
i
Δ
+
−
=
Δ
− −
+
+
ε
ε
ε
α
ε
ε
Indo-German Winter Academy 28
3/8/2007
Errors and Stability Analysis
(Cont.)
„ Substituting the value
of εm(x,t) in the F.D.E.,
Indo-German Winter Academy 29
3/8/2007
For stability:
∑
=
m
x
ik
at m
t
x ε
ε
ε )
,
(
Von Neumann Stability Analysis :
assuming error distribution follows Fourier series in space domain and
exponential in time
Putting an individual term in FD equation and using the above stability
criteria
2
1
)
(
)
(
2
≤
Δ
Δ
x
t
α
1
1
≤
+
n
i
n
i
ε
ε
Stability: Differencing Method should not magnify the errors that
appear in the course off numerical solution process
Indo-German Winter Academy 30
3/8/2007
Fluid Flow Modeling Using
Finite Difference Method
„ Nonlinear Fluid Flow equations involve:
time dependent multiple variables
Convective terms
Diffusive terms
„ Sample fluid flow equation : Burger’s Equation
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
∂
=
∂
∂
+
∂
∂
2
2
x
x
u
t
u ζ
ν
ζ
0
=
∂
∂
+
∂
∂
x
u
t
u ζ
„ Inviscid Burger’s Equation
Indo-German Winter Academy 31
3/8/2007
„ Conservative Property: To maintain the integral conservation
relation of continuum in finite difference representation.
It depends on the form of continuum equation being
discretized.
Conservative form:
Non-conservative form:
Properties of Fluid Flow Equations
Effect of Finite Difference method on properties of
fluid flow equations
( )
ζ
ζ
u
x
t ∂
∂
−
=
∂
∂
x
u
t ∂
∂
−
=
∂
∂ ζ
ζ
Indo-German Winter Academy 32
3/8/2007
2
)
(
2
1
2
1
2
1
1
1
1
1
1
∑
∑ ∑ =
−
−
+
+
= =
+
−
=
Δ
Δ
−
Δ
I
I
i
n
i
n
i
n
i
n
i
I
I
i
I
I
i
n
i
n
i u
u
t
x
x ζ
ζ
ζ
ζ
2
/
1
2
/
1 2
1
)
(
)
( +
− −
= I
I u
u ζ
ζ
x
x
u
u
x
t
i
n
i
n
n
i
n
i
Δ
Δ
−
=
Δ
Δ
− −
+
+
∫
∫ 2
)
(
)
( 1
1
1
ζ
ζ
α
ζ
ζ
Integrating the
CONSERVATIVE FORM
I1
I2
Indo-German Winter Academy 33
3/8/2007
Week Conservative Form in Fluid Flow
„ Conservative form of advective part is of prime importance for
fluid flow modeling. Navier Stokes in week conservative form:
x
g
z
u
y
u
x
u
x
p
z
uw
y
uv
x
u
t
u
+
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
−
=
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
2
2
2
2
2
2
2
1
ρ
μ
ρ
y
g
z
v
y
v
x
v
y
p
z
vw
y
v
x
uv
t
v
+
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
−
=
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
2
2
2
2
2
2
2
1
ρ
μ
ρ
z
g
z
w
y
w
x
w
z
p
z
w
y
vw
x
uw
t
w
+
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
−
=
∂
∂
+
∂
∂
+
∂
∂
+
∂
∂
2
2
2
2
2
2
2
1
ρ
μ
ρ
Indo-German Winter Academy 34
3/8/2007
Discretizing Fluid Flow equations using
Upwind Scheme
„ Upwind Scheme of discretization is necessary for convection
dominated flows
x
u
t ∂
∂
−
=
∂
∂ ζ
ζ
x
u
u
t
i
n
i
n
n
i
n
i
Δ
−
−
=
Δ
− −
+
1
1
ζ
ζ
ζ
ζ
x
u
u
t
i
n
i
n
n
i
n
i
Δ
−
−
=
Δ
− +
+
ζ
ζ
ζ
ζ 1
1
Backward Differencing Scheme for u>0
Forward Differencing Scheme for u<0
Indo-German Winter Academy 35
3/8/2007
Why use Upwind scheme
„ Upwind Scheme of discretization is necessary for convection
dominated flows for obtaining numerically stable results
Central Difference Scheme applied to highly convective flows
give unconditionally Unstable Results
0
2
1
1
1
=
Δ
−
+
Δ
− −
+
+
x
u
u
t
i
n
i
n
n
i
n
i ζ
ζ
ζ
ζ
CDS:
Violates
Von Neumann
Stability
Criteria
0
,
0
1
1
>
=
Δ
−
+
Δ
− +
+
u
x
u
u
t
i
n
i
n
n
i
n
i ζ
ζ
ζ
ζ
FDS:
Indo-German Winter Academy 36
3/8/2007
Why use Upwind scheme
2
1
1
1
1
1
2
2 x
x
u
u
t
n
i
n
i
n
i
i
n
i
n
n
i
n
i
Δ
+
−
=
Δ
−
+
Δ
− −
+
−
+
+
ζ
ζ
ζ
ν
ζ
ζ
ζ
ζ
CDS:
xx
x
t
u
u
t
ζ
ν
ζ
ζ
⎟
⎠
⎞
⎜
⎝
⎛
⎟
⎠
⎞
⎜
⎝
⎛ Δ
−
=
+
∂
∂
2
2
0
2
2
≥
⎟
⎠
⎞
⎜
⎝
⎛
⎟
⎠
⎞
⎜
⎝
⎛ Δ
−
t
u
ν
0
2
1
1 ≥
⎟
⎠
⎞
⎜
⎝
⎛ Δ
⎟
⎠
⎞
⎜
⎝
⎛
Δ
Δ
−
ν
ν
x
u
x
t
u
⎟
⎠
⎞
⎜
⎝
⎛ Δ
=
Δ
ν
x
u
x
Re
0
Re
*
2
1
1 ≥
⎟
⎠
⎞
⎜
⎝
⎛
− C
ν
C
2
Re ≤
CELL Reynold’s No.
For unsteady, convection-diffusion eqn.
Indo-German Winter Academy 37
3/8/2007
( )
ζ
ζ
u
x
t ∂
∂
−
=
∂
∂
x
u
u
t
i
n
i
n
n
i
n
i
Δ
−
−
=
Δ
−
⇒
>
−
+
1
1
0)
(u
scheme
upwind
using
ζ
ζ
ζ
ζ
Upwind Scheme and Transportive Property
proprerty
ive
transport
for the
rationale
the
follows
which
0
1)
(m
location
downstream
a
at
for
Then
location
m
at
occurs
in
on
perturbati
a
let
1
1
1
th
x
u
x
u
t
n
m
n
m
Δ
+
=
Δ
−
−
=
Δ
−
+
•
+
+
+ δ
δ
ζ
ζ
ζ
δ
At (m+1) location
region
the
of
out
ed
transport
being
on
perturbati
0
location
(m)
At
1
x
u
x
u
t
n
m
n
m
Δ
−
=
Δ
−
−
=
Δ
−
•
+
δ
δ
ζ
ζ At (m) location
upstream
carried
on
perturbati
no
0
0
0
location
1)
-
(m
At
1
1
1
=
Δ
−
−
=
Δ
−
•
−
+
−
x
t
n
m
n
m ζ
ζ At (m-1) location
Indo-German Winter Academy 38
3/8/2007
Problems of Using Forward Time Central Space method (FTCS)
0
2
2
0
location
1)
-
(m
At
1
1
1
≠
Δ
−
=
Δ
−
−
=
Δ
− −
+
−
x
u
x
u
t
n
m
n
m
δ
δ
ζ
ζ
Which indicates that Transportive Property is violated
Hence, only upwind method maintains unidirectional flow
of information.
Indo-German Winter Academy 39
3/8/2007
Upwind Method and Artificial Viscosity(1/2)
x
u
u
t
i
n
i
n
n
i
n
i
Δ
−
−
=
Δ
− −
+
1
1
ζ
ζ
ζ
ζ
x
u
u
t
i
n
i
n
n
i
n
i
Δ
−
−
=
Δ
− +
+
ζ
ζ
ζ
ζ 1
1
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
∂
∂
=
∂
∂
+
∂
∂
2
2
x
x
u
t
u ζ
ν
ζ
Indo-German Winter Academy 40
3/8/2007
Upwind Method and Artificial Viscosity (2/2)
< 1
For algorithm’s stability, artificial viscosity will necessarily be present
0
>
e
v
Source of inaccuracy
Indo-German Winter Academy 41
3/8/2007
Upwind Differencing Method
Advantages and Limitations
„ Upwind effect necessary to maintain transportive property of flow
equations
„ Although space centered differences (CDS) are more accurate than
upwind scheme (as indicated by Taylor Series expansion), the whole
system is more realistically modeled using Upwind Differencing Scheme.
‰ Leads to Artificial viscosity or “false diffusion” which is a cause of
inaccuracy. 0
>
e
v
Plausible Improvement: Higher order Upwind Method
Indo-German Winter Academy 42
3/8/2007
Second Upwind Differencing Scheme
where
Let us consider
Indo-German Winter Academy 43
3/8/2007
Here a factor is introduced which expresses a
weighted average of central and upwind differencing
η
u
≡
ζ
Considering momentum equation
Indo-German Winter Academy 44
3/8/2007
Here 0<η<1
For η=0, above equation becomes centered in space
For η=1, above equation follows full upwind
Hence, η brings about an upwind bias in the difference quotient
Accuracy of the differencing scheme can be adjusted using η value
Second upwind formulation possesses both
the conservative and transportive property
Indo-German Winter Academy 45
3/8/2007
Summary
„ Finite Difference methods discretizes the differential form of governing
equation using Taylor Series expansion.
„ The partial derivatives of governing PDE are replaced with finite,
algebraic differences quotients at the corresponding nodes.
„ Leads to linear algebraic equation system, with one algebraic equation
per grid node.
„ Best Suited for Structured Grids only.
„ Flow equation properties can be maintained using simple schemes
like upwind differencing.
Discretization methods provide more cost effective and more rapid
approach for solving Fluid Flow problems as compared to
experimental methods
Indo-German Winter Academy 46
3/8/2007
Summary
Finite Difference Approach
FD Approaches Can Be Divided Into Various
Categories Depending Upon Type of PDE Being
Solved:
1.Elliptic PDE: Algebraic System, Gauss Siedel
2.One-dimensional Parabolic PDE
A) Explicit
B) Implicit
3. Two-dimensional Parabolic PDE
ADI Method
Indo-German Winter Academy 47
3/8/2007
Acknowledgement
„ This lecture has been inspired by the
study material provided by Prof. G.Biswas
Indo-German Winter Academy 48
3/8/2007
References
„ Chapra and Canale, “Numerical Methods for
Engineers”,4th Ed., Tata McGraw-Hill.
„ Som and Biswas, “Introduction to Fluid Mechanics and
Fluid Machines”, Tata McGraw-Hill
„ Anderson.J; “Computational Fluid Dynamics”
Indo-German Winter Academy 49
3/8/2007
Thank you !

More Related Content

What's hot

220924828 cfd-analysis-of-heat-transfer-in-a-helical-coil-heat-exchanger-usin...
220924828 cfd-analysis-of-heat-transfer-in-a-helical-coil-heat-exchanger-usin...220924828 cfd-analysis-of-heat-transfer-in-a-helical-coil-heat-exchanger-usin...
220924828 cfd-analysis-of-heat-transfer-in-a-helical-coil-heat-exchanger-usin...
manojg1990
 
Data Exchange Standards & STEP, EXPRESS & EXPRESS-G
Data Exchange Standards & STEP, EXPRESS & EXPRESS-GData Exchange Standards & STEP, EXPRESS & EXPRESS-G
Data Exchange Standards & STEP, EXPRESS & EXPRESS-G
metalalp
 

What's hot (20)

Finite Element Analysis - UNIT-5
Finite Element Analysis - UNIT-5Finite Element Analysis - UNIT-5
Finite Element Analysis - UNIT-5
 
4th edition mechanics of materials by beer johnston (solution manual)
4th edition mechanics of materials by beer johnston (solution manual)4th edition mechanics of materials by beer johnston (solution manual)
4th edition mechanics of materials by beer johnston (solution manual)
 
Introduction to finite element analysis
Introduction to finite element analysisIntroduction to finite element analysis
Introduction to finite element analysis
 
Beam Deflection Formulae
Beam Deflection FormulaeBeam Deflection Formulae
Beam Deflection Formulae
 
CFD Best Practices and Troubleshooting - with speaker notes
CFD Best Practices and Troubleshooting - with speaker notesCFD Best Practices and Troubleshooting - with speaker notes
CFD Best Practices and Troubleshooting - with speaker notes
 
Undamped vibration absorber
Undamped vibration absorberUndamped vibration absorber
Undamped vibration absorber
 
ME6603 - FINITE ELEMENT ANALYSIS UNIT - I NOTES AND QUESTION BANK
ME6603 - FINITE ELEMENT ANALYSIS UNIT - I NOTES AND QUESTION BANKME6603 - FINITE ELEMENT ANALYSIS UNIT - I NOTES AND QUESTION BANK
ME6603 - FINITE ELEMENT ANALYSIS UNIT - I NOTES AND QUESTION BANK
 
FEM and it's applications
FEM and it's applicationsFEM and it's applications
FEM and it's applications
 
Axisymmetric
Axisymmetric Axisymmetric
Axisymmetric
 
01 reactive flows - finite-rate formulation for reaction modeling
01 reactive flows - finite-rate formulation for reaction modeling01 reactive flows - finite-rate formulation for reaction modeling
01 reactive flows - finite-rate formulation for reaction modeling
 
220924828 cfd-analysis-of-heat-transfer-in-a-helical-coil-heat-exchanger-usin...
220924828 cfd-analysis-of-heat-transfer-in-a-helical-coil-heat-exchanger-usin...220924828 cfd-analysis-of-heat-transfer-in-a-helical-coil-heat-exchanger-usin...
220924828 cfd-analysis-of-heat-transfer-in-a-helical-coil-heat-exchanger-usin...
 
Introduction to theory of machines
Introduction to theory of machinesIntroduction to theory of machines
Introduction to theory of machines
 
STRUCTURAL_STABILITY_OF_STEEL_CONCEPTS_A.pdf
STRUCTURAL_STABILITY_OF_STEEL_CONCEPTS_A.pdfSTRUCTURAL_STABILITY_OF_STEEL_CONCEPTS_A.pdf
STRUCTURAL_STABILITY_OF_STEEL_CONCEPTS_A.pdf
 
Ansys Workbench-Chapter13
Ansys Workbench-Chapter13Ansys Workbench-Chapter13
Ansys Workbench-Chapter13
 
Theory of machines_static and dynamic force analysis
Theory of machines_static and dynamic force analysisTheory of machines_static and dynamic force analysis
Theory of machines_static and dynamic force analysis
 
Advanced Design, Analysis and Optimization of Composite Structures
Advanced Design, Analysis and Optimization of Composite StructuresAdvanced Design, Analysis and Optimization of Composite Structures
Advanced Design, Analysis and Optimization of Composite Structures
 
[Solution manual] fluid mechanics fox & mcdonald
[Solution manual] fluid mechanics fox & mcdonald[Solution manual] fluid mechanics fox & mcdonald
[Solution manual] fluid mechanics fox & mcdonald
 
Kom dom lab manual 2017 regulation
Kom dom lab manual 2017 regulationKom dom lab manual 2017 regulation
Kom dom lab manual 2017 regulation
 
Data Exchange Standards & STEP, EXPRESS & EXPRESS-G
Data Exchange Standards & STEP, EXPRESS & EXPRESS-GData Exchange Standards & STEP, EXPRESS & EXPRESS-G
Data Exchange Standards & STEP, EXPRESS & EXPRESS-G
 
Dynamics of Machines: Question bank unitwise from vtu old question papers
Dynamics of Machines: Question bank unitwise from vtu old question papersDynamics of Machines: Question bank unitwise from vtu old question papers
Dynamics of Machines: Question bank unitwise from vtu old question papers
 

Similar to CFD discretisation methods in fluid dynamics

Product failure analysis using Explicit dynamic
Product failure analysis using Explicit dynamicProduct failure analysis using Explicit dynamic
Product failure analysis using Explicit dynamic
naga ram
 
Introduction to cfd
Introduction to cfdIntroduction to cfd
Introduction to cfd
Santosh V
 
2007 santiago marchi_cobem_2007
2007 santiago marchi_cobem_20072007 santiago marchi_cobem_2007
2007 santiago marchi_cobem_2007
CosmoSantiago
 
IARE_ ACAD LAB MANUAL.pdf
IARE_ ACAD LAB MANUAL.pdfIARE_ ACAD LAB MANUAL.pdf
IARE_ ACAD LAB MANUAL.pdf
RebyRoy2
 

Similar to CFD discretisation methods in fluid dynamics (20)

HOME ASSIGNMENT omar ali.pptx
HOME ASSIGNMENT omar ali.pptxHOME ASSIGNMENT omar ali.pptx
HOME ASSIGNMENT omar ali.pptx
 
HOME ASSIGNMENT (0).pptx
HOME ASSIGNMENT (0).pptxHOME ASSIGNMENT (0).pptx
HOME ASSIGNMENT (0).pptx
 
Product failure analysis using Explicit dynamic
Product failure analysis using Explicit dynamicProduct failure analysis using Explicit dynamic
Product failure analysis using Explicit dynamic
 
Computational fluid dynamics (cfd)
Computational fluid dynamics                       (cfd)Computational fluid dynamics                       (cfd)
Computational fluid dynamics (cfd)
 
Analysis of convection diffusion problems at various peclet numbers using fin...
Analysis of convection diffusion problems at various peclet numbers using fin...Analysis of convection diffusion problems at various peclet numbers using fin...
Analysis of convection diffusion problems at various peclet numbers using fin...
 
Fundamentals of Finite Difference Methods
Fundamentals of Finite Difference MethodsFundamentals of Finite Difference Methods
Fundamentals of Finite Difference Methods
 
Intro
IntroIntro
Intro
 
Computational Fluid Dynamics (CFD)
Computational Fluid Dynamics (CFD)Computational Fluid Dynamics (CFD)
Computational Fluid Dynamics (CFD)
 
Introduction to cfd
Introduction to cfdIntroduction to cfd
Introduction to cfd
 
Introduction to cfd
Introduction to cfdIntroduction to cfd
Introduction to cfd
 
Introduction to cfd 2
Introduction to cfd 2Introduction to cfd 2
Introduction to cfd 2
 
Mathematical models for a chemical reactor
Mathematical models for a chemical reactorMathematical models for a chemical reactor
Mathematical models for a chemical reactor
 
Introduction to Optial Flow
Introduction to Optial FlowIntroduction to Optial Flow
Introduction to Optial Flow
 
Fluent and Gambit Workshop
Fluent and Gambit WorkshopFluent and Gambit Workshop
Fluent and Gambit Workshop
 
APPLICATION OF NUMERICAL METHODS IN SMALL SIZE
APPLICATION OF NUMERICAL METHODS IN SMALL SIZEAPPLICATION OF NUMERICAL METHODS IN SMALL SIZE
APPLICATION OF NUMERICAL METHODS IN SMALL SIZE
 
2007 santiago marchi_cobem_2007
2007 santiago marchi_cobem_20072007 santiago marchi_cobem_2007
2007 santiago marchi_cobem_2007
 
Re_Equation.pdf
Re_Equation.pdfRe_Equation.pdf
Re_Equation.pdf
 
IARE_ ACAD LAB MANUAL.pdf
IARE_ ACAD LAB MANUAL.pdfIARE_ ACAD LAB MANUAL.pdf
IARE_ ACAD LAB MANUAL.pdf
 
module 1 PPT.pptx
module 1 PPT.pptxmodule 1 PPT.pptx
module 1 PPT.pptx
 
Numerical Solution of Diffusion Equation by Finite Difference Method
Numerical Solution of Diffusion Equation by Finite Difference MethodNumerical Solution of Diffusion Equation by Finite Difference Method
Numerical Solution of Diffusion Equation by Finite Difference Method
 

Recently uploaded

Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 

Recently uploaded (20)

kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 

CFD discretisation methods in fluid dynamics

  • 1. 3/8/2007 Indo-German Winter Academy 1 Discretization Methods in Fluid Dynamics Mayank Behl B-tech. 3rd Year Department of Chemical Engineering Indian Institute of Technology Delhi Course 1: Fluid Mechanics and Energy Conversion Supervisor: Dr. G.Biswas Indian Institute of Technology Kanpur
  • 2. Indo-German Winter Academy 2 3/8/2007 OUTLINE 1. Basics of PDE 2. Mathematical Overview of fluid flow 3. Need For Computational Methods 4. Basic Discretization Methods in use 5. Finite Difference Method 6. Fluid Flow Modeling
  • 3. Indo-German Winter Academy 3 3/8/2007 Partial differential equations (PDEs) are used to formulate and solve problems related to any phenomena that is distributed in space and time : „ Heat flow „ Fluid flow „ propagation of sound „ electrodynamics, „ Elasticity……. ) , ( A 2 2 2 2 2 y x G F y E x D y C y x B x = + ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ ∂ + ∂ ∂ φ φ φ φ φ φ Most of the fluid and related transport phenomena can be modeled using PDEs
  • 4. Indo-German Winter Academy 4 3/8/2007 Classification of PDEs ) , ( A 2 2 2 2 2 y x G F y E x D y C y x B x = + ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ ∂ + ∂ ∂ φ φ φ φ φ φ B2 – 4AC<0 Elliptic equation B.V.P. Irrotational flows steady Heat Transfer B2 – 4AC=0 Parabolic equation I.B.V.P; Unsteady viscous flows B2 – 4AC>0 Hyperbolic equation Vibration problems 0 2 2 2 2 = ∂ ∂ + ∂ ∂ y φ x φ 2 2 x t ∂ ∂ = ∂ ∂ φ α φ 2 2 2 2 2 x t ∂ ∂ = ∂ ∂ φ β φ If A,B,C,D… all constants or f(x,y) Linear PDE If any of A,B,C,D… contains Φ, Φ’ etc Non-linear PDE
  • 5. Indo-German Winter Academy 5 3/8/2007 Boundary conditions „ Dirchlet Boundary condition: „ Neumann Boundary condition: „ Mixed Boundary condition: ) ( 1 r φ φ = ) ( 2 r n φ φ = ∂ ∂ ) ( 3 r n b a φ φ φ = ∂ ∂ + Given boundary temperature Given boundary heat flux Boundary heat flux dependent on boundary temperature
  • 6. Indo-German Winter Academy 6 3/8/2007 „ Equation of continuity: a differential mass balance t z w y v x u ∂ ∂ − = ∂ ∂ + ∂ ∂ + ∂ ∂ ρ ρ ρ ρ [ ] t ∂ ∂ − = ⋅ ∇ ρ ρ u In vector notation: For constant density of the fluid: 0 = ⋅ ∇ u Mathematical description of flows; Governing Equations of Fluid Dynamics Δx Δz Δy (x,y,z)
  • 7. Indo-German Winter Academy 7 3/8/2007 „Equation of motion: g τ uu u ρ ρ ρ + ⋅ ∇ − −∇ = ⋅ ∇ + ∂ ∂ p t Governing Equations of Fluid Dynamics (2) for incompressible, Newtonian Fluids , under laminar flow: g u u u u ρ μ ρ + ∇ + −∇ = ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ∇ ⋅ + ∂ ∂ 2 p t Navier-Stokes Equation
  • 8. Indo-German Winter Academy 8 3/8/2007 The Navier-Stokes equations (Non linear PDEs) x g z u y u x u x p z u w y u v x u u t u + ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ − = ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ 2 2 2 2 2 2 1 ρ μ ρ y g z v y v x v y p z v w y v v x v u t v + ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ − = ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ 2 2 2 2 2 2 1 ρ μ ρ z g z w y w x w z p z w w y w v x w u t w + ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ − = ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ 2 2 2 2 2 2 1 ρ μ ρ In general, Analytical Solution Not Possible Solution???
  • 9. Indo-German Winter Academy 9 3/8/2007 Approaches to Fluid Dynamical Problems 1. Simplifications of the governing equations Æ AFD: Analytical Fluid Dynamic 2. Experiments on scale models Æ EFD: Experimental Fluid Dynamics 3. Discretize governing equations and solve by computers Æ CFD Computational Fluid Dynamics CFD is the simulation of fluids engineering system using modeling and numerical methods
  • 10. Indo-German Winter Academy 10 3/8/2007 Need for Discretization methods ¾In general, no analytical solution exist for non-linear models One of the way out is to approximate the solutions using Numerical methods ¾Advent of digital computer and advanced improvements in computer resources ¾Basis for CFD, which can provide unlimited details of results ¾Substantially more cost effective and more rapid than EFD ¾ability to study systems under hazardous conditions
  • 11. Indo-German Winter Academy 11 3/8/2007 ¾Finite Difference Method (focused in this lecture) ¾Finite Volume Method ¾Finite Element Method Various Discretization Techniques
  • 12. Indo-German Winter Academy 12 3/8/2007 Discretization Methods Finite Difference Method (focused in this lecture) 1.Governing equations in differential formÆ domain with gridÆ replacing the partial derivatives by approximations in terms of node values of the functionsÆ one algebraic equation per grid nodeÆ linear algebraic equation system. 2. Applied to structured grids Finite Volume Method 1. Governing equations in integral formÆ solution domain is subdivided into a finite number of contiguous control volumesÆ conservation equation applied to each CV. 2. Computational node locates at the centroid of each CV. 3. Applied to any type of grids, especially complex geometries Finite Element Method 1. Solution domain is subdivided into a finite number OF ELEMENTS, the governing equation is solved for each element and then overall solution is obtained by “assembly”. 2. Equations are multiplied by a weight function before integrated over the entire domain.
  • 13. Indo-German Winter Academy 13 3/8/2007 ►Consistency A discretization method is said to be consistent if it can be shown that the difference between PDEs and its finite difference (FDE) vanishes as the mesh is refined. Truncation error (TE): Difference between the discretized equation and the exact one LimmeshÆ0 (TE) 0 Basics aspects of Discretization methods O(∆x); O(∆t) O(∆t/∆x) ►Convergence: solution of the discretized equations tends to the exact solution of the differential equation as the grid spacing tends to zero.
  • 14. Indo-German Winter Academy 14 3/8/2007 Basics aspects of Discretization methods Stability : Differencing Method should not magnify the errors that appear in the course off numerical solution process Conservation: 1. The numerical scheme should on both local and global basis respect the conservation laws. 2. Automatically satisfied for control volume method, either individual control volume or the whole domain. 3. Errors due to non-conservation are in most cases appreciable only on relatively coarse grids, but hard to estimate quantitatively 1 1 ≤ + n i n i ε ε
  • 15. Indo-German Winter Academy 15 3/8/2007 Finite Difference Method Replacing the derivatives of governing PDE with finite, algebraic differences quotients. It involves following steps: „ Grid generation defining geometric domain „ Discretization of governing equation using Taylor series approximation. „ Solution of simultaneous algebraic equations. φi,j φi+1,j φi-1,j Δx Δy Discrete grid points φi-1,j φi,j φi+1,j
  • 16. Indo-German Winter Academy 16 3/8/2007 Finite Difference Method:grids Grids „ Structured grid all nodes have the same number of elements around it only for simple domains „ Unstructured grid for all geometries irregular data structure
  • 17. Indo-German Winter Academy 17 3/8/2007 Finite Difference, approximation of the first derivative ►Taylor Series Expansion: Any continuous differentiable function, in the vicinity of xi , can be expressed as a Taylor series: ( ) ( ) ( ) ( ) ( ) ( ) H x n x x x x x x x x x x x x x i n n n i i i i i i i i + ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ Φ ∂ − + + ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ Φ ∂ − + ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ Φ ∂ − + ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ∂ Φ ∂ − + Φ = Φ ! ... ! 3 ! 2 3 3 3 2 2 2 ( ) H x Φ x x x Φ x x x x Φ Φ x Φ i i i i i i i i i i i + ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ ∂ − − ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ ∂ − − − − = ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ∂ ∂ + + + + 3 3 2 1 2 2 1 1 1 6 2 ►Higher order derivatives are unknown and can be dropped when the distance between grid points is small Xi+1- Xi is small
  • 18. Indo-German Winter Academy 18 3/8/2007 ►By writing Taylor series at different nodes, x i-1, x i+1, or both x i-1 and x i+1, we can have: O(∆x) 1 1 − − − Φ − Φ ≈ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ∂ Φ ∂ i i i i i x x x Backward Difference Scheme-BDS O(∆x) i i i i i x x x − Φ − Φ ≈ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ∂ Φ ∂ + + 1 1 Forward Difference Scheme-FDS order of accuracy O(∆x) 1 1 1 1 − + − + − Φ − Φ ≈ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ∂ Φ ∂ i i i i i x x x Central Difference Scheme-CDS O(∆x)²
  • 19. Indo-German Winter Academy 19 3/8/2007 Finite Difference, approximation of the second derivative Geometrically, the second derivative is the slope of the line tangent to the curve representing the first derivative. i i i i i x x x x x − ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ∂ Φ ∂ − ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ∂ Φ ∂ ≈ ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ Φ ∂ + + 1 1 2 2 Estimate the outer derivative by FDS, and estimate the inner derivatives using BDS, we get For equidistant spacing of the points: ( ) ( ) ( ) ( ) ( ) 1 2 1 1 1 1 1 1 1 2 2 − + − + + − − + − − − Φ − − Φ + − Φ ≈ ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ Φ ∂ i i i i i i i i i i i i i i x x x x x x x x x x x ( )2 1 1 2 2 2 x x i i i i Δ Φ + Φ − Φ ≈ ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ Φ ∂ − + Higher-order approximations for the second derivative can be derived by including more data points, such as xi-2, and xi+2, even xi-3, and xi+3
  • 20. Indo-German Winter Academy 20 3/8/2007 Discretization using Explicit Method „ Consider unsteady viscous flow 2 2 x t ∂ Φ ∂ = ∂ Φ ∂ α ( )2 1 1 1 2 x t i n i n i n n i n i Δ Φ + Φ − Φ = Δ Φ − Φ − + + α The Only unkown :Φi n+1 Explicit method , values at time n+1 computed from values at time n Advantages: solution algorithm is simple i.e. - direct computation without solving system of algebraic equation - few number of operations per time step Disadvantage: strong conditions on time step for stability Requires many time steps to carry out the calculations over a given time interval
  • 21. Indo-German Winter Academy 21 3/8/2007 Implicit Method Crank-Nicholson Method ( )2 1 1 1 1 1 1 1 1 2 2 2 x u u u u u u t u u n i i n n i i n n i i n n i n i Δ + + − − + = Δ − + − − + + + + + α 2 2 x u t u ∂ ∂ = ∂ ∂ α ƒ values at time n+1 computed using the unknown values at time n+1 ƒ Second order accurate in time and space ƒto be solved simultaneously at all the grid points as a system of algebraic equations ƒ Unconditionally stable rearranging the above equation as follows…. O(∆t)2,O(∆x)2
  • 23. Indo-German Winter Academy 23 3/8/2007 This generates a Tridiagonal Matrix system which can be solved using Thomas algorithm. However, for higher dimensional flows, matrix system obtained are much more complex and require substantially more computer time Ax = C
  • 24. Indo-German Winter Academy 24 3/8/2007 Alternating Direction Implicit Method (ADI) for 2-D Flows ( ) ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ Δ + − + Δ + − = Δ − + − + + + − + + 2 2 / 1 1 , 2 / 1 , 2 / 1 1 , 2 , 1 , , 1 , 2 / 1 , 2 2 2 / y u u u x u u u t u u n j i n j i n j i n j i n j i n j i n j i n j i α ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ ∂ + ∂ ∂ = ∂ ∂ 2 2 2 2 y u x u t u α Each time increment is executed into two steps: First step ( ) ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ Δ + − + Δ + − = Δ − + − + + + + − + + + + + 2 2 / 1 1 , 2 / 1 , 2 / 1 1 , 2 1 , 1 1 , 1 , 1 2 / 1 , 1 , 2 2 2 / y u u u x u u u t u u n j i n j i n j i n j i n j i n j i n j i n j i α Second step
  • 25. Indo-German Winter Academy 25 3/8/2007 ADI method results in Tridiagonal Equations (for 2-d flow systems) if it is applied along the dimension that is implicit. Thus on first step it is applied along Y axis and on second step along on X axis First direction Y Second direction X
  • 26. Indo-German Winter Academy 26 3/8/2007 Implicit method „ Advantages: Stability can be maintained over larger time steps „ Disadvantages „ More computation time per time step, every time step requires solving a system of equations. „ Truncation error is often large , since larger time steps are employed. „ Overall, a more involved procedure
  • 27. Indo-German Winter Academy 27 3/8/2007 Error and Stability analysis „ Numerical solution is influenced by following: Discretization errors or Truncation errors: Analytical Solution (A) – exact Finite Difference Solution (D) = A – D Computational Round-Off Error (e) ε=Numerical Solution (N) – exact Finite Difference Solution (D) N = D + ε By definition, N,D follow the Discretized Equation Thus, ε should also follow the equation: ( )2 1 1 1 2 x t i n i n i n n i n i Δ + − = Δ − − + + ε ε ε α ε ε
  • 28. Indo-German Winter Academy 28 3/8/2007 Errors and Stability Analysis (Cont.) „ Substituting the value of εm(x,t) in the F.D.E.,
  • 29. Indo-German Winter Academy 29 3/8/2007 For stability: ∑ = m x ik at m t x ε ε ε ) , ( Von Neumann Stability Analysis : assuming error distribution follows Fourier series in space domain and exponential in time Putting an individual term in FD equation and using the above stability criteria 2 1 ) ( ) ( 2 ≤ Δ Δ x t α 1 1 ≤ + n i n i ε ε Stability: Differencing Method should not magnify the errors that appear in the course off numerical solution process
  • 30. Indo-German Winter Academy 30 3/8/2007 Fluid Flow Modeling Using Finite Difference Method „ Nonlinear Fluid Flow equations involve: time dependent multiple variables Convective terms Diffusive terms „ Sample fluid flow equation : Burger’s Equation ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ ∂ = ∂ ∂ + ∂ ∂ 2 2 x x u t u ζ ν ζ 0 = ∂ ∂ + ∂ ∂ x u t u ζ „ Inviscid Burger’s Equation
  • 31. Indo-German Winter Academy 31 3/8/2007 „ Conservative Property: To maintain the integral conservation relation of continuum in finite difference representation. It depends on the form of continuum equation being discretized. Conservative form: Non-conservative form: Properties of Fluid Flow Equations Effect of Finite Difference method on properties of fluid flow equations ( ) ζ ζ u x t ∂ ∂ − = ∂ ∂ x u t ∂ ∂ − = ∂ ∂ ζ ζ
  • 32. Indo-German Winter Academy 32 3/8/2007 2 ) ( 2 1 2 1 2 1 1 1 1 1 1 ∑ ∑ ∑ = − − + + = = + − = Δ Δ − Δ I I i n i n i n i n i I I i I I i n i n i u u t x x ζ ζ ζ ζ 2 / 1 2 / 1 2 1 ) ( ) ( + − − = I I u u ζ ζ x x u u x t i n i n n i n i Δ Δ − = Δ Δ − − + + ∫ ∫ 2 ) ( ) ( 1 1 1 ζ ζ α ζ ζ Integrating the CONSERVATIVE FORM I1 I2
  • 33. Indo-German Winter Academy 33 3/8/2007 Week Conservative Form in Fluid Flow „ Conservative form of advective part is of prime importance for fluid flow modeling. Navier Stokes in week conservative form: x g z u y u x u x p z uw y uv x u t u + ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ − = ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ 2 2 2 2 2 2 2 1 ρ μ ρ y g z v y v x v y p z vw y v x uv t v + ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ − = ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ 2 2 2 2 2 2 2 1 ρ μ ρ z g z w y w x w z p z w y vw x uw t w + ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ − = ∂ ∂ + ∂ ∂ + ∂ ∂ + ∂ ∂ 2 2 2 2 2 2 2 1 ρ μ ρ
  • 34. Indo-German Winter Academy 34 3/8/2007 Discretizing Fluid Flow equations using Upwind Scheme „ Upwind Scheme of discretization is necessary for convection dominated flows x u t ∂ ∂ − = ∂ ∂ ζ ζ x u u t i n i n n i n i Δ − − = Δ − − + 1 1 ζ ζ ζ ζ x u u t i n i n n i n i Δ − − = Δ − + + ζ ζ ζ ζ 1 1 Backward Differencing Scheme for u>0 Forward Differencing Scheme for u<0
  • 35. Indo-German Winter Academy 35 3/8/2007 Why use Upwind scheme „ Upwind Scheme of discretization is necessary for convection dominated flows for obtaining numerically stable results Central Difference Scheme applied to highly convective flows give unconditionally Unstable Results 0 2 1 1 1 = Δ − + Δ − − + + x u u t i n i n n i n i ζ ζ ζ ζ CDS: Violates Von Neumann Stability Criteria 0 , 0 1 1 > = Δ − + Δ − + + u x u u t i n i n n i n i ζ ζ ζ ζ FDS:
  • 36. Indo-German Winter Academy 36 3/8/2007 Why use Upwind scheme 2 1 1 1 1 1 2 2 x x u u t n i n i n i i n i n n i n i Δ + − = Δ − + Δ − − + − + + ζ ζ ζ ν ζ ζ ζ ζ CDS: xx x t u u t ζ ν ζ ζ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ Δ − = + ∂ ∂ 2 2 0 2 2 ≥ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ Δ − t u ν 0 2 1 1 ≥ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ Δ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ Δ Δ − ν ν x u x t u ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ Δ = Δ ν x u x Re 0 Re * 2 1 1 ≥ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ − C ν C 2 Re ≤ CELL Reynold’s No. For unsteady, convection-diffusion eqn.
  • 37. Indo-German Winter Academy 37 3/8/2007 ( ) ζ ζ u x t ∂ ∂ − = ∂ ∂ x u u t i n i n n i n i Δ − − = Δ − ⇒ > − + 1 1 0) (u scheme upwind using ζ ζ ζ ζ Upwind Scheme and Transportive Property proprerty ive transport for the rationale the follows which 0 1) (m location downstream a at for Then location m at occurs in on perturbati a let 1 1 1 th x u x u t n m n m Δ + = Δ − − = Δ − + • + + + δ δ ζ ζ ζ δ At (m+1) location region the of out ed transport being on perturbati 0 location (m) At 1 x u x u t n m n m Δ − = Δ − − = Δ − • + δ δ ζ ζ At (m) location upstream carried on perturbati no 0 0 0 location 1) - (m At 1 1 1 = Δ − − = Δ − • − + − x t n m n m ζ ζ At (m-1) location
  • 38. Indo-German Winter Academy 38 3/8/2007 Problems of Using Forward Time Central Space method (FTCS) 0 2 2 0 location 1) - (m At 1 1 1 ≠ Δ − = Δ − − = Δ − − + − x u x u t n m n m δ δ ζ ζ Which indicates that Transportive Property is violated Hence, only upwind method maintains unidirectional flow of information.
  • 39. Indo-German Winter Academy 39 3/8/2007 Upwind Method and Artificial Viscosity(1/2) x u u t i n i n n i n i Δ − − = Δ − − + 1 1 ζ ζ ζ ζ x u u t i n i n n i n i Δ − − = Δ − + + ζ ζ ζ ζ 1 1 ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ∂ ∂ = ∂ ∂ + ∂ ∂ 2 2 x x u t u ζ ν ζ
  • 40. Indo-German Winter Academy 40 3/8/2007 Upwind Method and Artificial Viscosity (2/2) < 1 For algorithm’s stability, artificial viscosity will necessarily be present 0 > e v Source of inaccuracy
  • 41. Indo-German Winter Academy 41 3/8/2007 Upwind Differencing Method Advantages and Limitations „ Upwind effect necessary to maintain transportive property of flow equations „ Although space centered differences (CDS) are more accurate than upwind scheme (as indicated by Taylor Series expansion), the whole system is more realistically modeled using Upwind Differencing Scheme. ‰ Leads to Artificial viscosity or “false diffusion” which is a cause of inaccuracy. 0 > e v Plausible Improvement: Higher order Upwind Method
  • 42. Indo-German Winter Academy 42 3/8/2007 Second Upwind Differencing Scheme where Let us consider
  • 43. Indo-German Winter Academy 43 3/8/2007 Here a factor is introduced which expresses a weighted average of central and upwind differencing η u ≡ ζ Considering momentum equation
  • 44. Indo-German Winter Academy 44 3/8/2007 Here 0<η<1 For η=0, above equation becomes centered in space For η=1, above equation follows full upwind Hence, η brings about an upwind bias in the difference quotient Accuracy of the differencing scheme can be adjusted using η value Second upwind formulation possesses both the conservative and transportive property
  • 45. Indo-German Winter Academy 45 3/8/2007 Summary „ Finite Difference methods discretizes the differential form of governing equation using Taylor Series expansion. „ The partial derivatives of governing PDE are replaced with finite, algebraic differences quotients at the corresponding nodes. „ Leads to linear algebraic equation system, with one algebraic equation per grid node. „ Best Suited for Structured Grids only. „ Flow equation properties can be maintained using simple schemes like upwind differencing. Discretization methods provide more cost effective and more rapid approach for solving Fluid Flow problems as compared to experimental methods
  • 46. Indo-German Winter Academy 46 3/8/2007 Summary Finite Difference Approach FD Approaches Can Be Divided Into Various Categories Depending Upon Type of PDE Being Solved: 1.Elliptic PDE: Algebraic System, Gauss Siedel 2.One-dimensional Parabolic PDE A) Explicit B) Implicit 3. Two-dimensional Parabolic PDE ADI Method
  • 47. Indo-German Winter Academy 47 3/8/2007 Acknowledgement „ This lecture has been inspired by the study material provided by Prof. G.Biswas
  • 48. Indo-German Winter Academy 48 3/8/2007 References „ Chapra and Canale, “Numerical Methods for Engineers”,4th Ed., Tata McGraw-Hill. „ Som and Biswas, “Introduction to Fluid Mechanics and Fluid Machines”, Tata McGraw-Hill „ Anderson.J; “Computational Fluid Dynamics”
  • 49. Indo-German Winter Academy 49 3/8/2007 Thank you !