Finite Difference Method For Hyperbolic Problems
Finite Difference Method For Hyperbolic Problems
Presentation
by
ÖZDEN PARSAK
1
Content
Partial Differential Equations (PDE’s)
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
4
Types of Partial Differential
Equations (PDEs)
2) Parabolic:
∂u 2 ∂ u
2
( x, t ) − α ( x, t ) = 0
∂t ∂x 2
5
Types of Partial Differential
Equations (PDEs)
3) Hyperbolic:
∂u
2
2 ∂ u
2
( x, t ) − α ( x, t ) = 0
∂t 2
∂x 2
6
Content
Partial Differential Equations (PDE’s)
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:
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
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
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:
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)
References
21
Hyperbolic PDE’s - Wave Equation
∂u2
2 ∂ u
2
( x, t ) − α ( x, t ) = 0
∂t 2
∂x 2
22
Hyperbolic PDE’s - Wave Equation
Boundary conditions subject to the wave
equation are given.
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)
References
25
Applying FDM to the Wave Equation
Select ;
length step-size h=l/m for m>0
and time-step size k > 0
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
∂ 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
32
Applying FDM to the Wave Equation
With λ = α k / h , we can solve the difference
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
34
Applying FDM to the Wave Equation
This difference equation holds for,
i = 1, 2..., (m − 1) and j = 0,1,.....
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
37
Thanks for your attention!!!
38