MCDM608L: COMPUTATIONAL
FLUID DYNAMICS (CFD)
M.Tech (WS24-25)
Sivakumar, R
SMEC, VIT Chennai
Module-2
Classification of Physical behavior and FDM:
Elliptical, parabolic and hyperbolic equations. Finite
difference discretization (FDM), Forward, backward and
central difference, Order of accuracy, different types of
errors and boundary conditions. (6 hours)
199
Discretization
It is the process by which a closed-form mathematical
expression, such as a function or a differential or
integral equation involving functions, all of which are
viewed as having an infinite continuum of values
throughout some domain, is approximated by
analogous (but different expressions) which prescribe
values at only a finite number of discrete points or
volumes in the domain
Discretization
Analytical solutions of partial differential equations
involve closed-form expressions which give the
variation of the dependent variables continuously
throughout the domain
In contrast, numerical solutions can give answers at
only discrete points in the domain called grid points
Discretization/ Modeling Techniques
Finite Difference Method (FDM)
Finite Volume Method (FVM)
Finite Element Method (FEM)
Boundary Element Method
Spectral Method
Finite Difference Method (FDM)
Oldest Method
Easiest Method for simple Geometries
Starting point is the conservation equations in
differential form
The solution domain is covered by a grid
At each grid point, the differential equation is
approximated one algebraic equation per grid
node
Finite Difference Method (FDM)
First and second derivatives of the variables
approximated using Taylor series expansion or
polynomial fit
The resulting set of linear algebraic equations is
solved either iteratively or simultaneously
Not suitable for complex flows (Restricted to simple
geometries)
Finite Difference Method (FDM)
dT Ti Ti 1 Ti 1 Ti
or
dx x x
1D Cartesian Grid
i-1 i i+1
2D Cartesian Grid
Finite Volume Method (FVM)
Starting point is the conservation equations in integral
form
Solution domain is subdivided into a finite number
of control volumes
Conservation equations are applied to each control
volume
Finite Volume Method (FVM)
Computational node lies at the centroid of each control
volume
Interpolation is used to express variable values at the
control volume surface in terms of the computational
nodal values
Boundary node
Control volume
Computational node
Finite Volume Method (FVM)
Suitable for simple and complex geometries
Advantage: Integral conservation is satisfied exactly
over the control volume
Disadvantage: Methods of order higher than second
are more difficult to develop in 3D
Finite Element Method (FEM)
While FDM and FVM were applied for flow/ thermal
problems, FEM was initially developed for structural
problems
In this method, a large structure is divided into small
elements and characteristic of each element is written
as a matrix contribution
By adding contributions of all elements, we get the
matrix equation for the whole geometry
Finite Element Method (FEM)
Structural Analysis
F=Kx
for a spring
Consider the structure as a collection of F
many connected springs.
In that case we get
Fi = Kij xj
Finite Element Method (FEM)
Discretization Methodology
Direct Method
Variational Method
Residuals (Galerkin) Method
Finite Difference Method (FDM)
Taylor Series Expansions
dT d 2T x 2 d 3T x 3 d nT ( x) n
Ti 1 Ti x 2 3 .... n 0(x n 1 )
dx i dx i 2! dx 3! dx n!
(1)
dT d 2T x 2 d 3T x 3 d nT x n
Ti 1 Ti x 2 3 .... n O(x n 1 )
dx dx i 2! dx i 3! dx n!
(2)
dT d 2 T (2x ) 2 d 3 T ( 2x ) 3
Ti 2 Ti (2x ) 2 3
dx i dx i 2! dx 3!
d n T ( 2x ) n
....... n 0 (x n 1 ) (3)
dx n!
dT d 2 T (2x ) 2 d 3 T (2x ) 3
Ti 2 Ti (2x ) 2 3
dx i dx i 2! dx i 3!
d n T (2x ) n
….. n 0(x n 1 ) (4)
dx i n!
Taylor Series Approximations
First Order Forward Difference Equation
dT d 2T x 2 d 3T x 3 d nT x n
Ti 1 Ti x 2 3 .... n O(x n 1 )
dx dx i 2! dx i 3! dx n!
dT Ti 1 Ti d 2 T x d 3 T x 2
2 3
dx i x dx i 2! dx i 3!
Truncation Error
dT Ti 1 Ti
O(x )
dx i x
Information to the right of grid point (i,j) is used
No information to the left of grid point (i,j) is used
Truncation error is the error made by truncating an infinite sum and approximating it by a
finite sum
Taylor Series Approximations
First Order Backward (rearward) Difference Equation
dT d 2T x 2 d 3T x3 d nT (x) n
Ti 1 Ti x 2 3 .... n 0(x n1 )
dx i dx i 2! dx 3! dx n!
dT Ti Ti 1 d 2T x d 3T x 2
2 3
dx i x dx i 2! dx i 3!
dT T T
i i 1 O (x)
dx i x
No Information to the right of grid point (i,j) is used
Information to the left of grid point (i,j) is used
Taylor Series Approximations
Second Order Central Difference Equation
dT d 2T x 2 d 3T x 3 d nT ( x) n
Ti 1 Ti x 2 3 .... n 0(x n 1 )
dx i dx i 2! dx 3! dx n!
(1)
dT d 2T x 2 d 3T x 3 d nT x n
Ti 1 Ti x 2 3 .... n O(x n 1 )
dx dx i 2! dx i 3! dx n!
(2)
Subtracting (1) from (2), we get
dT Ti 1 Ti 1
O (x )
2
dx i 2 x
Information from both sides of grid point (i,j) is used
Exercise
Derive the forward difference, rearward difference and central
difference expressions for
Taylor Series Approximations
Second Order Central Difference Equation
dT d 2T x 2 d 3T x 3 d nT ( x) n
Ti 1 Ti x 2 3 .... n 0(x n 1 )
dx i dx i 2! dx 3! dx n!
(1)
dT d 2T x 2 d 3T x 3 d nT x n
Ti 1 Ti x 2 3 .... n O(x n 1 )
dx dx i 2! dx i 3! dx n!
(2)
Adding (1) & (2), we get
d 2 T Ti 1 Ti 1 2Ti
2 O ( x
2
)
dx i x 2
Taylor Series Approximations
Second Order Central Difference Equation
d 2 T Ti 1 Ti 1 2Ti
2 O ( x 2
)
dx i x 2
This can be interpreted as a forward difference of the first
order derivatives, with backward differences in terms of
dependent variables for the first order derivatives.
Taylor Series Approximations
Second Order Central Difference Equation for mixed derivative
Taylor Series Approximations
Second Order Central Difference Equation for mixed derivative
Finite difference form for the steady heat conduction
equation – Nodal network
Two dimensional steady heat conduction with no heat generation
Constant thermal conductivity
Nodal network
Finite Difference Approximation
Finite difference form for the steady heat conduction
equation – Nodal network
Two dimensional steady heat conduction with no heat generation
For
Finite difference form for the steady heat conduction
equation – Nodal network
Two dimensional steady heat conduction with no heat generation
Temperature of the interior node be equal to the average of
the temperatures of the four neighboring nodes
Finite difference form for the steady heat conduction
equation – Energy balance method
Steady heat conduction with generation
(1)
Apply conservation of energy to a control volume about the nodal
region to get the finite difference equation for a node
Actual direction of heat flow (into or out of the node) is unknown
To formulate energy balance, assume all the heat flow is into the
node
Such a condition is of course, impossible, but if the rate equations
in a manner consistent with this assumption, the correct form of
the finite difference equation is obtained
Finite difference form for the steady heat conduction
equation – Energy balance method
Steady heat conduction with generation
Finite difference form for the steady heat conduction
equation – Energy balance method
Two dimensional steady heat conduction with genertaion
Substituting in (1),
For
If no heat generation 0
Finite difference form for the steady heat conduction
equation – Energy balance method
Finite difference equation is needed for each nodal point at which
the temperature is unknown
To find the unknown temperature at an insulated surface or at a
surface that is exposed to convective conditions, energy balance
method is used to obtain the finite difference equation
Finite difference equation for an interior corner of a
solid with surface convection
Finite difference equation for an interior corner of a
solid with surface convection
For
Assignment-1b
Node at a plane
surface with
convection
Assignment-1b
Node at external corner
with convection
Assignment-1b
Node at plane surface with
uniform heat flux