EEE 484
Finite Differences Method
for
HYPERBOLIC PROBLEMS
Presentation
by
ÖZDEN PARSAK
1
Content
Partial Differential Equations (PDE’s)
Finite Difference Method (FDM)
Hyperbolic PDE’s – Wave Equation
Applying FDM to the Wave Equation
References
2
Partial Differential Equations
Physical problems that involve more than
one variable are often expressed using
equtions involving partial derivatives. And
it is called Partial Differential Equation
(PDE’s).
There are three types of partial differential
equations
3
Types of Partial Differential
Equations (PDEs)
1) Elliptic:
∂u
2
∂u
2
( x, y ) + 2 ( x, y ) = f ( x, y )
∂x 2
∂t
Poisson equation, Laplace equation for
steady state.
4
Types of Partial Differential
Equations (PDEs)
2) Parabolic:
∂u 2 ∂ u
2
( x, t ) − α ( x, t ) = 0
∂t ∂x 2
Transient heat transfer, flow and diffusion
equations
5
Types of Partial Differential
Equations (PDEs)
3) Hyperbolic:
∂u
2
2 ∂ u
2
( x, t ) − α ( x, t ) = 0
∂t 2
∂x 2
Transient Wave Equation
6
Content
Partial Differential Equations (PDE’s)
Finite Difference Method (FDM)
Hyperbolic PDE’s – Wave Equation
Applying FDM to the Wave Equation
References
7
FINITE DIFFERENCE METHODS
8
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 Partial
Differential Equations (PDE’s) with such
complexity.
9
Introduction
Finite Difference 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.
10
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.
11
Introduction
Rectangular Grid Pattern
12
Finite Difference Schemes
The derivative of a given function f(x) can be
approximated as:
df ( x0 ) f ( x0 + ∆ x) − f ( x0 )
; Forward Difference Formula
dx ∆x
df ( x0 ) f ( x0 ) − f ( x0 − ∆ x)
; Backword Difference Formula
dx ∆x
df ( x0 ) f ( x0 + ∆ x) − f ( x0 − ∆x)
; Central Difference Formula
dx 2∆ x
13
Finite Difference Schemes
f(x)
P B
x0 − ∆x x0 x0 + ∆x x
14
Finite Difference Schemes
Estimate of second derivative of f(x) at P by using
Central Difference Formula;
∂f ( x0 ) 1 ∂ 2
f ( x ) ( ∆ x ) 3
∂ 3
f ( x0 )
f ( x0 + ∆x) = f ( x0 ) + ∆x + (∆x )2 0
+ + ...
∂x 2! ∂x 2
3! ∂x 3
∂f ( x0 ) 1 ∂ 2
f ( x ) ( ∆ x ) 3
∂ 3
f ( x0 )
f ( x0 − ∆x) = f ( x0 ) − ∆x + (∆x)2 0
− + ...
∂x 2! ∂x 2
3! ∂x 3
15
Finite Difference Schemes
Adding these equations:
∂ f ( x0 )
2
f ( x0 + ∆x) + f ( x0 − ∆x) = 2 f ( x0 ) + (∆x )2
+ O ( ∆x ) 4
∂x 2
Assuming that higher order terms are
neglected:
∂2 f f ( x0 + ∆x) − 2 f ( x0 ) + f ( x0 − ∆x)
=
∂x 2
( ∆x ) 2
16
Finite Difference Schemes
To apply the
difference method to
find the solution of a
function Φ( x, t ) the
solution region is
divided into
rectangles:
17
Finite Difference Schemes
Letthe 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 )
18
Finite Difference Schemes
Usingthis 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
19
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 (i , j )
2
(∆t ) 2
20
Content
Partial Differential Equations (PDE’s)
Finite Difference Method (FDM)
Hyperbolic PDE’s – Wave Equation
Applying FDM to the Wave Equation
References
21
Hyperbolic PDE’s - Wave Equation
The wave equation which is an example of
Hyperbolic Equation is given by the
differential equation.
∂u2
2 ∂ u
2
( x, t ) − α ( x, t ) = 0
∂t 2
∂x 2
for 0< x<l , t>0
22
Hyperbolic PDE’s - Wave Equation
Boundary conditions subject to the wave
equation are given.
u (0, t ) = u (l , t ) = 0 , for t>0
23
Hyperbolic PDE’s - Wave Equation
Initial conditions subject to the wave equation are
given.
u ( x, 0) = f ( x)
, for 0≤ x≤l
∂u
( x, 0) = g ( x)
∂t
24
Content
Partial Differential Equations (PDE’s)
Finite Difference Method (FDM)
Hyperbolic PDE’s – Wave Equation
Applying FDM to the Wave Equation
References
25
Applying FDM to the Wave Equation
Select ;
length step-size h=l/m for m>0
and time-step size k > 0
The mesh point ( xi , t j ) are defined by
xi = ih i = 0,1,..., m
t j = jk j = 0,1,.....
26
Applying FDM to the Wave Equation
27
Applying FDM to the Wave Equation
At any interior mesh point ( xi , t j ) , the
wave equations becomes
∂ 2u ∂ 2
u
( xi , t j ) − α 2
( xi , t j ) = 0
∂t 2
∂x 2
28
Applying FDM to the Wave Equation
The Difference method is applied to the second
partial derivatives using the centred-difference
formula, then we obtain the second order
difference equations;
∂ 2u u ( xi , t j+1 ) − 2u ( xi , t j ) + u ( xi , t j 1−) k 2 4u∂
( xi , t j ) = − ( xµi , j )
∂t 2
k 2
12 t∂
4
for some µ j in (t j −1 , t j +1 ) ,
29
Applying FDM to the Wave
Equation
u ( xi +1 , t j ) − 2u ( xi , t j ) + u ( xi −1 , t j ) h 2 ∂ 4u
( xi , t j ) = − (ψ i , t j
h 2
12 ∂t 4
for some ψ i in ( xi −1 , xi +1 ) .
30
Applying FDM to the Wave
Equation
Substituting these equations into the wave
equation, we obtain;
u ( xi , t j +1 ) − 2u ( xi , t j ) + u ( xi , t j −1 ) u ( xi +1 , t j ) − 2u ( xi , t j ) + u ( xi −1 , t j )
2
−α 2
k h2
1 2 ∂ 4u 2 2 ∂ u
4
= k ( xi , µ j ) − α h (ς i , t j )
12 ∂t 4
∂x 4
31
Applying FDM to the Wave Equation
Neglecting the error term
1 2 ∂ 4u 2 2 ∂ u
4
τ ij = k ( xi , µ j ) − α h (ς i , t j )
12 ∂t 4
∂x 4
Then the difference equation
wi , j +1 − 2wi , j + wi , j −1 wi +1, j − 2wi , j + wi −1, j
2
−α 2
2
=0
k h
32
Applying FDM to the Wave Equation
With λ = α k / h , we can solve the difference
equation for wi , j +1 , the most advanced time-step
approximation is to be obtained,
wi , j+ 1 = 2(1 −λ ) wi , j +λ ( wi
2 2
1,+ j +wi 1,−j ) −wi , j 1 −
33
Applying FDM to the Wave Equation
wi , j + 1 = 2(1 −λ 2 ) wi , j +λ2 ( wi 1,+ j +wi 1,−j ) −wi , j 1 −
34
Applying FDM to the Wave Equation
This difference equation holds for,
i = 1, 2..., (m − 1) and j = 0,1,.....
From boundary conditions;
w0 j = wmj = 0 for each j = 1, 2,3.....
From initial conditions;
wi 0 = f ( xi ) i = 1, 2,..., ( m − 1)
for each
35
Applying FDM to the Wave Equation
It is easy to solve that equation when writing this
set of equations in matrix form;
2(1 − λ 2 ) λ2 0 0
w1, j +1 w1, j −1
w λ 2
2(1 − λ 2
) λ 2
w2, j −1
2, j +1 0 0
. = − .
λ2 .
.
λ2 2(1 − λ 2 )
wm −1, j +1 0 0
wm −1, j −1
36
References
Numerical Methods, J. Douglas FAIRES,
Richard L. BURDEN
Brooks Cole; Third edition (June 18, 2002)
37
Thanks for your attention!!!
38