Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Computational Fluid Dynamics

Department of Mechanical Engineering


CoEP, Pune
Discretisation of Governing Equations
𝝏
 𝝆. ∅ + 𝛁(𝛒. 𝑽. ∅) = ∇(Γ. ∇. ∅) + 𝑺
𝝏𝒕

• We have basic computational techniques that are required to


solve the governing equations of fluid dynamics.
• The process of obtaining the computational solution consists
of two stages.
• The first stage involves the conservation of the differential
equation and auxiliary (boundary and initial conditions) into
a system of discrete algebraic equations. (Discretization
stage)
Overview Process of the Computational Solution Procedure

Governing Partial Differential


Equations

Discretization Approaches

Finite Difference Finite Volume

Basic derivations Basic derivations


of FDM of FVM

System of Algebraic Equations


Overview Process of the Computational Solution Procedure

System of Algebraic Equations

Numerical Methods

Approximate Solutions
u,v,w,,p
• The second stage of the solution process involves the
implementation of numerical methods to provide a solution
to the system of algebraic equations.
• Appropriate methods for obtaining the numerical solution
for the system of algebraic equations needs to be used.
Finite Difference Method (FDM)
• In FDM, the grid usually considered to be locally structured,
which means that each grid node may be considered as the
origin of a local coordinate system whose axes coincide with
the grid lines.

1D
Representation
of 1D and 2D
uniformly
distributed
Cartesian Grid
for FDM

Full symbol – 2D
Boundary Nodes

Open Symbols –
Interior Nodes
Finite Difference Method (FDM)
• We are interested in replacing the partial derivaties with a
suitable algebraic difference quotient – a finite difference.
Full symbol –
Representation Boundary Nodes
of 1D and 2D
uniformly Open Symbols –
distributed Interior Nodes
Cartesian Grid
for FDM
2D

If at the indices (i,j) there exists a


generic flow field variable at point
(i+1,j) can be expressed in terms of a
Taylor series expanded about the point
(i,j) as:
-----(1)
Finite Difference Method (FDM)
Similarly , the variable at point (i-1 , j) can also be expressed in terms
of Taylor series about points (i,j) as:

-----(1)
Equations (1) and (2) are mathematically exact expressions for the
respective variables Ø i+1 , j and Ø i-1 , j

-----(2)
By subtracting above equations 1 and 2

-----(3)
Finite Difference Method (FDM)
- The term 0(𝑥𝑛 ) signifies the truncation error of FD approximation,
which measures the accuracy of the approximation and determines the
rate of which the error decreases as the spacing between the points is
reduced.
- The above equation 3 is considered to be 2nd order accurate because the
truncation error is of order 2

- This is major simplification, and its validity depends on the size of x.
- The equation (3) is called central difference since it depends equally on
values to both sides of the node at x .
Finite Difference Method (FDM)

-----(4)

-----(5)

- Both of the above equation are first order accurate and it is expected
that they will be less accurate in comparison to the central difference
for a given value of x.

- A geometric interpretation of equation (3) , (4) and (5)is provided in


following figure.
Finite Difference Method (FDM)

Finite Difference Differentiation


of the First Order Derivative for
𝜕Ø
𝜕𝑥
Finite Difference Method (FDM)
The differences for y derivatives are obtained in similar manner .
Finite Difference Method (FDM)
- The 2nd order derivative can also be obtained through the
Taylor series expansion as have been applied to approximate
the first-order derivative. By adding equation (1) and (2).

- This equation represents the central finite difference for the


2nd order derivative w.r.t. x evaluated at the point ( i, j).
- An analogous expression can easily be obtained for the 2nd
order derivative w.r.t. y , which results in
Finite Difference Method (FDM)
- Since the numerical solution is more likely to be marched
continuously in discrete time interval of t, the finite
approximation derived for the first order spatial derivatives
applies for the first order time derivative.

- For forward difference approximation in time,

The above equation introduces a truncation error of 0(t).


More accurate approximations to the time derivative can be
obtained through the consideration of additional discrete
values of Øi,j in time
Finite Difference Method (FDM)
Important features of FDM
✓ Simplicity to convert PDE into algebraic equation
✓ FDM allows the interpolation of higher order differencing
approximations on regular grids which provide a higher
degree of accuracy in the solution.
Issues:
✓ However, the main disadvantage is that the conservation
property is not enforced.
✓ Complex Geometries: FDM requires Grid lines to be located
in an orthogonal manner. Therefore, for a curved boundary
special treatment required. ℎ 2

✓ Taylor series of expansion: 𝑓 𝑥 + ℎ = 𝑓 𝑥 + ℎ. 𝑓 ′ 𝑥 + 𝑓 " 𝑥 + ⋯


2
✓ If f(x)=ex, f”(x)=ex and higher orders are also ex. Truncated as h
is small
✓ Therefore h has to be small to get correct solution, but when h is small
then truncation of higher order of T.S. will lead to errors.
Types of Boundary Conditions
• Well posed Boundary value Problems:
✓ Existence of the Solution ✓ Uniqueness of Solution
✓ Small perturbation in BCs should not result in a large change
in the solution
• Possible Types of Boundary Conditions:

✓ Dirichlet BC - Value of dependent variable specified (T)

✓ Neumann BCs-Value of gradient of dependent variable


specified (VT)
✓ Mixed BCs - Value of dependent variable is expressed as a
function of the gradient. Ex. Convective Heat Transfer B.C.
✓ Periodic BCs – The flow structure is periodically repeating.
Types of Boundary Conditions
• Is any condition specify are boundary a boundary condition?
✓ Existence of the Solution

q” = 1W/m2K q” = 1W/m2K

x=0 x=L

• One dimensional, heat conduction problem, s=0, k= constant


• It looks physically consistent as q”in=q”out
• Governing equation for 1d, S.S. Heat Conduction.
𝑑2𝑇 𝑑𝑇
=0 • Applying BC1 𝑎𝑡 𝑥 = 0, −𝑘. d𝑥 = 1, 𝐶1 = −1
d𝑥 2
𝑑𝑇
𝑑𝑇 • Applying BC2 𝑎𝑡 𝑥 = 𝐿, −𝑘. d𝑥 = 1, 𝐶1 = −1
= 𝐶1
d𝑥
𝑇 = 𝐶1 . 𝑦 + 𝐶2 • Using both boundary conditions we get the
value of C1 again, but not C2.
Types of Boundary Conditions
• Is any condition specify are boundary a boundary condition?
✓ Existence of the Solution

q” = 1W/m2K q” = 1W/m2K

x=0 x=L
• Hence there are multiple solutions of this problem.
• However, for a physical problem we require unique solution –
only one solution.
• These boundary conditions do not provide uniqueness, instead
they are giving family of solution where there are undetermined
constants.
• If a value of temperature is given at any one of the boundary
then constants can be found out.
• Hence at least at one of the boundary we must have darichlet
BC, otherwise we can’t get a unique solution.
• To have uniqueness of the solution we must have well posed BC.

You might also like