Finite Difference Method
S. NADARAJA PILLAI
School of Mechanical Engineering
SASTRA University
Thanjavur – 613401
Email: nadarajapillai@mech.sastra.edu
@
Progress through quality Education
Outline
Introduction
Finite Difference Method
Discretization Methods
Forward Backward Central Difference
Schemes
Errors
Finite Difference Method (FDM)
Historically, the oldest of the three
Techniques published as early as 1910 by L. F. Richardson
Seminal paper by Courant, Fredrichson and Lewy (1928)
derived stability criteria for explicit time stepping
First ever numerical solution: flow over a circular cylinder
by Thom (1933)
Scientific American article by Harlow and Fromm (1965)
•
First step in obtaining a numerical solution is to discretize
the geometric domain
to define a numerical grid
•
Each node has one unknown and need one algebraic
equation, which is a relation between the variable value at
that node and those at some of the neighboring nodes.
•
The approach is to replace each term of the PDE at the
particular node by a finite-difference approximation.
•
Numbers of equations and unknowns must be equal
•
Taylor Series Expansion: Any continuous differentiable function, in•
Higher order derivatives are unknown and can be dropped when the distance between grid points is small.•
By writing Taylor series at different nodes, xi-1, xi+1, or both xi-1 andForward-FDS
Backward-FDS
Central-FDS
1st order, order of accuracy P
kest=1
2nd order, order of accuracy P
kest=1
• Numerical solutions can give answers at only discrete points in
the domain, called grid points.
• If the PDEs are totally replaced by a system of algebraic
equations which can be solved for the values of the flow-field
variables at the discrete points only, in this sense, the original
PDEs have been discretized. Moreover, this method of
discretization is called the
method of finite differences
.• A partial derivative replaced with a suitable algebraic difference quotient is called finite difference. Most finite-difference representations of derivatives are based on Taylor’s series expansion.
• Taylor’s series expansion:
Consider a continuous function of x, namely, f(x), with all derivatives defined at x. Then, the value of f at a location can be estimated from a Taylor series expanded about point x, that is,
• In general, to obtain more accuracy, additional higher-order terms must be included.
x
x+∆
( )
( )
(
)
...
!
1
...
!
3
1
!
2
1
)
(
)
(
3 33 2
2 2
+
∆
∂
∂
+
+
∆
∂
∂
+
∆
∂
∂
+
∆
∂
∂
+
=
∆
+
nn n
x
x
f
n
x
x
f
x
x
f
x
x
f
x
f
x
x
f
(1) Forward difference:
(2) Backward difference:
• Truncation error:
The higher-order term neglecting in Eqs. (a), (b), (c) constitute the
truncation error. The general form of Eqs. (d), (e), (f) plus truncated terms can be written as
Forward:
Backward:
Central:
) ( )
( 1 o x
x f f
x
f i i
i + ∆
∆ − =
∂
∂ +
) (
)
( 1 o x
x f f
x
f i i
i + ∆
∆ − =
∂
∂ −
2 1
1 ( )
2 )
( o x
x f f
x
f i i
i + ∆
∆ − =
∂
∂ + −
• Second derivatives: * Central difference:
If , then (a)+(b) becomes
* Forward difference:
* Backward difference:
x x
xi = ∆ i = ∆
∆ +1
2 2
1 1
2 2
) ( )
( 2 )
( o x
x
f f
f x
f i i i
i ∆ + ∆
+ −
= ∂
∂ + −
) ( )
( 2 )
( 2 2 21
2
x o x
f f
f x
f i i i
i ∆ + ∆
+ −
= ∂
∂ + +
) ( )
( 2 )
( 2 1 2 2
2
x o x
f f
f x
f i i i
i ∆ + ∆
+ −
= ∂
∂ − −
• Mixed derivatives:
• In the solution of differential equations with finite differences, a variety of schemes are available for the discretization of derivatives and the solution of the resulting system of algebraic equations.
• In many situations, questions arise regarding the round-off and truncation errors involved in the numerical computations, as well as the consistency, stability and the convergence of the finite difference scheme.
• Round-off errors:computations are rarely made in exact arithmetic. This means that real numbers are represented in “floating point” form and as a result, errors are caused due to the rounding-off of the real numbers. In extreme cases such errors, called “round-off” errors, can accumulate and become a main source of error.
• Truncation error: In finite difference representation of derivative with Taylor’s series expansion, the higher order terms are neglected by
truncating the series and the error caused as a result of such truncation is called the “truncation error”.
• The truncation error identifies the difference between the exact solution of a differential equation and its finite difference solution without round-off error.