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

Finite Difference Method - lecture 2

The document discusses the basics of Computational Fluid Dynamics (CFD) with a focus on the Finite Difference Method (FDM) as a numerical approach for solving complex fluid flow problems. It outlines the steps involved in applying FDM, including grid division, approximation of differential equations, and solving under boundary conditions. Additionally, it explains various finite difference schemes for approximating derivatives and provides examples of their application.

Uploaded by

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

Finite Difference Method - lecture 2

The document discusses the basics of Computational Fluid Dynamics (CFD) with a focus on the Finite Difference Method (FDM) as a numerical approach for solving complex fluid flow problems. It outlines the steps involved in applying FDM, including grid division, approximation of differential equations, and solving under boundary conditions. Additionally, it explains various finite difference schemes for approximating derivatives and provides examples of their application.

Uploaded by

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

BASICS OF COMPUTATIONAL FLUID

DYNAMICS

FDM – Lecture 2
Dr. Arumuga Perumal
Assistant Professor
Introduction
In general real life fluid flow problems cannot be solved
by using the analytical methods, because:
• The PDE is not linear,
• The solution region is complex,
• The boundary conditions are of mixed types,
• The boundary conditions are time dependent,
• The medium is inhomogeneous or anisotropic.

2
Introduction
• For such complicated problems numerical
methods must be employed.
• Finite Difference Method (FDM) is one of the
available numerical methods which can easily
be applied to solve PDE’s with such
complexity.
• FDM, is easy to understand and apply.

3
FDM - Introduction
FD techniques are based upon approximations of
differential equations by finite difference equations.
• Finite difference approximations:
• have algebraic forms,
• Relate the value of the dependent variable at a
point in the solution region to the values at some
neighboring points.

4
FDM - Introduction
Steps of finite difference solution:
• Divide the solution region into a grid of
nodes,
• Approximate the given differential equation
by finite difference equivalent,
• Solve the differential equations subject to
the boundary conditions and/or initial
conditions.

5
FDM - Introduction

• Square / Rectangular Grid Pattern

6
Finite Difference Schemes
• To apply the difference
method to find the
solution of a function
( x, t )the solution region
is divided into rectangles:

7
Finite Difference Schemes
• The derivative of a given function f(x) can be
approximated as:
df ( x0 ) f ( x0  x)  f ( x0 )
= (1) Forward Difference Formula
dx x
df ( x0 ) f ( x0 )  f ( x0  x)
= (2) Backword Difference Formula
dx x
df ( x0 ) f ( x0  x)  f ( x0  x)
= (3) Central Difference Formula
dx 2x

8
Finite Difference Schemes
• Let the coordinates (x, t) of a typical grid point
or a node be:

x  ix, i  0,1,2,...
t  jt , j  0,1,2,...
• The value of  at a point:
(i, j )  (ix, jt )
9
Finite Difference Schemes
• Using this notation, the central difference
approximations of  at (i, j) are: First
derivative:
 =
 (i  1, j )   (i  1, j )
x (i , j ) 2x
  (i, j  1)   (i, j  1)
=
t (i , j ) 2t

10
Finite Difference Schemes
• The error in central difference (CDF) decreases
quadratically as the step size decreases,
whereas the decrease is only linear for the
other two formula.
• In general, CDF is to be preferred. Situations
where the data is not available on both sides
of the point where the numerical derivative is
to be calculated are exceptions.

11
Finite Difference Schemes
• Using this notation, the central difference
approximations of  at (i, j) are: First
derivative:

 =
 (i  1, j )   (i  1, j )
x (i , j ) 2x
  (i, j  1)   (i, j  1)
=
t (i , j ) 2t

12
Finite Difference Schemes
• Second derivative:

2 =
(i  1, j )  2(i, j )  (i  1, j )
x (i , j )
2
(x) 2

 
2
=
(i, j  1)  2 (i, j )  (i, j  1)
t 2 (i , j ) (t ) 2

13
Finite Difference Schemes
• One dimensional example:
• Solve 2 f
 4 f  0 , 0  x  1.0
x 2

• Subject to the boundary conditions:


f (0)  0
f (1)  1
• Assume x  0.5
14
Finite Difference Schemes
• Solution: Discretization of the equation:

f (i  1)  2 f (i)  f (i  1)
 4 f (i)  0
(x) 2

f (2)  2 f (1)  f (0)


2
 4 f (1)  0
(0.5)

15
Finite Difference Schemes
• Since there is one unknown, one equation is
enough to find this unknown.

f (1)  f (0)  f (2)


f (1)  1

16
Finite Difference Schemes
• If x  0.25

f (2)  2 f (1)  f (0)


2
 4 f (1)  0
(0.25)
f (3)  2 f (2)  f (1)
2
 4 f (2)  0
(0.25)
f (4)  2 f (3)  f (2)
2
 4 f (3)  0
(0.25)

17
Finite Difference Schemes
• f(1), f(2) and f(3) are unknowns. Therefore,
three equations are written to find three
unknowns.

18
Finite Difference Schemes
• For 1  N x we have (N-1) unknowns and we
need (N-1) equations to solve.

• The equation of the i th node is:

f (i  1)  2 f (i)  f (i  1)
 4 f (i)  0
(x) 2

19
Thank you

You might also like