finite difference method for hyperbolic problems

38
1 EEE 484 Finite Differences Method for HYPERBOLIC PROBLEMS Presentation by ÖZDEN PARSAK

Upload: ozden

Post on 18-Nov-2014

972 views

Category:

Documents


3 download

DESCRIPTION

Finite Difference Method application for Hyperbolic equations(wave equations. It is a good presentation...

TRANSCRIPT

Page 1: Finite Difference Method for Hyperbolic Problems

1

EEE 484Finite Differences Method

forHYPERBOLIC PROBLEMS

Presentationby

ÖZDEN PARSAK

Page 2: Finite Difference Method for Hyperbolic Problems

2

Content

Partial Differential Equations (PDE’s)

Finite Difference Method (FDM)

Hyperbolic PDE’s – Wave Equation

Applying FDM to the Wave Equation

References

Page 3: Finite Difference Method for Hyperbolic Problems

3

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

Page 4: Finite Difference Method for Hyperbolic Problems

4

Types of Partial Differential Equations (PDEs)

1) Elliptic:

2 2

2 2( , ) ( , ) ( , )u ux y x y f x y

x t

Poisson equation, Laplace equation for

steady state.

Page 5: Finite Difference Method for Hyperbolic Problems

5

Types of Partial Differential Equations (PDEs)

2) Parabolic:

Transient heat transfer, flow and diffusion

equations

22

2( , ) ( , ) 0u ux t x t

t x

Page 6: Finite Difference Method for Hyperbolic Problems

6

Types of Partial Differential Equations (PDEs)

3) Hyperbolic:

Transient Wave Equation

2 22

2 2( , ) ( , ) 0u ux t x t

t x

Page 7: Finite Difference Method for Hyperbolic Problems

7

Content

Partial Differential Equations (Partial Differential Equations (PDE’sPDE’s))

Finite Difference Method (FDM)

Hyperbolic PDE’s – Wave Equation

Applying FDM to the Wave Equation

References

Page 8: Finite Difference Method for Hyperbolic Problems

8

FINITE DIFFERENCE METHODS

Page 9: Finite Difference Method for Hyperbolic Problems

9

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.

Page 10: Finite Difference Method for Hyperbolic Problems

10

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.

Page 11: Finite Difference Method for Hyperbolic Problems

11

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.

Page 12: Finite Difference Method for Hyperbolic Problems

12

Introduction

Rectangular Grid Pattern

Page 13: Finite Difference Method for Hyperbolic Problems

13

Finite Difference Schemes

The derivative of a given function f(x) can be approximated as:

0 0 0

0 0 0

0 0 0

( ) ( ) ( )

( ) ( ) ( )

( ) ( ) ( )

2

df x f x x f xForward Difference Formula

dx xdf x f x f x x

Backword Difference Formuladx x

df x f x x f x xCentral Difference Formula

dx x

Page 14: Finite Difference Method for Hyperbolic Problems

14

Finite Difference Schemes

0x x

f(x)

x

A

P B

0x x 0x

Page 15: Finite Difference Method for Hyperbolic Problems

15

Finite Difference Schemes

Estimate of second derivative of f(x) at P by using Central Difference Formula;

2 3320 0 0

0 0 2 3

2 3320 0 0

0 0 2 3

( ) ( ) ( )1 ( )( ) ( ) ( ) ...

2! 3!

( ) ( ) ( )1 ( )( ) ( ) ( ) ...

2! 3!

f x f x f xxf x x f x x x

x x x

f x f x f xxf x x f x x x

x x x

Page 16: Finite Difference Method for Hyperbolic Problems

16

Finite Difference Schemes

Adding these equations:

Assuming that higher order terms are neglected:

22 40

0 0 0 2

( )( ) ( ) 2 ( ) ( ) ( )

f xf x x f x x f x x O x

x

20 0 0

2 2

( ) 2 ( ) ( )

( )

f f x x f x f x x

x x

Page 17: Finite Difference Method for Hyperbolic Problems

17

Finite Difference Schemes

To apply the difference method to find the solution of a function the solution region is divided into rectangles:

( , )x t

Page 18: Finite Difference Method for Hyperbolic Problems

18

Let the coordinates (x, t) of a typical grid point or a node be:

The value of at a point:

Finite Difference Schemes

, 0,1,2,...

, 0,1,2,...

x i x i

t j t j

( , ) ( , )i j i x j t

Page 19: Finite Difference Method for Hyperbolic Problems

19

Finite Difference Schemes

Using this notation, the central difference approximations of at (i, j) are: First derivative:

( , )

( , )

( 1, ) ( 1, )

2

( , 1) ( , 1)

2

i j

i j

i j i j

x x

i j i j

t t

Page 20: Finite Difference Method for Hyperbolic Problems

20

Finite Difference Schemes

Second derivative:

2

2 2( , )

2

2 2( , )

( 1, ) 2 ( , ) ( 1, )

( )

( , 1) 2 ( , ) ( , 1)

( )

i j

i j

i j i j i j

x x

i j i j i j

t t

Page 21: Finite Difference Method for Hyperbolic Problems

21

Content

Partial Differential Equations (Partial Differential Equations (PDE’sPDE’s))

Finite Difference Method (FDM)

Hyperbolic PDE’s – Wave Equation

Applying FDM to the Wave Equation

References

Page 22: Finite Difference Method for Hyperbolic Problems

22

Hyperbolic PDE’s - Wave Equation

The wave equation which is an example of Hyperbolic Equation is given by the differential equation.

for , 0 x l 0t

2 22

2 2( , ) ( , ) 0u ux t x t

t x

Page 23: Finite Difference Method for Hyperbolic Problems

23

Hyperbolic PDE’s - Wave Equation

Boundary conditions subject to the wave equation are given.

, for

(0, ) ( , ) 0u t u l t 0t

Page 24: Finite Difference Method for Hyperbolic Problems

24

Hyperbolic PDE’s - Wave Equation

Initial conditions subject to the wave equation are given.

, for

( ,0) ( )u x f x

( ,0) ( )ux g x

t

0 x l

Page 25: Finite Difference Method for Hyperbolic Problems

25

Content

Partial Differential Equations (PDE’s)

Finite Difference Method (FDM)

Hyperbolic PDE’s – Wave Equation

Applying FDM to the Wave Equation

References

Page 26: Finite Difference Method for Hyperbolic Problems

26

Applying FDM to the Wave Equation

Select ; length step-size for and time-step size

The mesh point are defined by

0k 0m /h l m

( , )i jx t

ix ih

jt jk

0,1,...,i m

0,1,.....j

Page 27: Finite Difference Method for Hyperbolic Problems

27

Applying FDM to the Wave Equation

Page 28: Finite Difference Method for Hyperbolic Problems

28

Applying FDM to the Wave Equation

At any interior mesh point , the wave equations becomes

( , )i jx t

2 22

2 2( , ) ( , ) 0i j i j

u ux t x t

t x

Page 29: Finite Difference Method for Hyperbolic Problems

29

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;

for some in ,

1 1( , )j jt t j

2 2 41 1

2 2 4

( , ) 2 ( , ) ( , )( , ) ( , )

12i j i j i j

i j i j

u x t u x t u x tu k ux t x

t k t

Page 30: Finite Difference Method for Hyperbolic Problems

30

Applying FDM to the Wave Equation

for some in .

i

1 1( , )i ix x

2 41 1

2 4

( , ) 2 ( , ) ( , )( , ) ( ,

12i j i j i j

i j i j

u x t u x t u x t h ux t t

h t

Page 31: Finite Difference Method for Hyperbolic Problems

31

Applying FDM to the Wave Equation

Substituting these equations into the wave equation, we obtain;

1 1

2

( , ) 2 ( , ) ( , )i j i j i ju x t u x t u x t

k

4 42 2 2

4 4

1( , ) ( , )

12 i j i j

u uk x h t

t x

1 122

( , ) 2 ( , ) ( , )i j i j i ju x t u x t u x t

h

Page 32: Finite Difference Method for Hyperbolic Problems

32

Applying FDM to the Wave Equation

Neglecting the error term

Then the difference equation

4 42 2 2

4 4

1( , ) ( , )

12ij i j i j

u uk x h t

t x

, 1 , , 1 1, , 1,22 2

2 20i j i j i j i j i j i jw w w w w w

k h

Page 33: Finite Difference Method for Hyperbolic Problems

33

Applying FDM to the Wave Equation

With , we can solve the difference

equation for , the most advanced time-step

approximation is to be obtained,

/k h

, 1i jw

2 2, 1 , 1, 1, , 12(1 ) ( )i j i j i j i j i jw w w w w

Page 34: Finite Difference Method for Hyperbolic Problems

34

Applying FDM to the Wave Equation

2 2, 1 , 1, 1, , 12(1 ) ( )i j i j i j i j i jw w w w w

Page 35: Finite Difference Method for Hyperbolic Problems

35

Applying FDM to the Wave Equation

This difference equation holds for, and

From boundary conditions;

for each

From initial conditions;

for each

0,1,.....j

0 0j mjw w 1,2,3.....j

0 ( )i iw f x 1,2,..., ( 1)i m

1,2..., ( 1)i m

Page 36: Finite Difference Method for Hyperbolic Problems

36

Applying FDM to the Wave Equation

It is easy to solve that equation when writing this set of equations in matrix form;

2 2

1, 1 1, 12 2 2

2, 1 2, 1

2

2 2

1, 1 1, 1

2(1 ) 0 0

2(1 )

0 0. .

. .0 0 2(1 )

j j

j j

m j m j

w w

w w

w w

Page 37: Finite Difference Method for Hyperbolic Problems

37

References

Numerical Methods, J. Douglas FAIRES,

Richard L. BURDEN

Brooks Cole; Third edition (June 18, 2002)

Page 38: Finite Difference Method for Hyperbolic Problems

38

Thanks for your attention!!!