Lectures 8, 9 and 10

1 / 97

# Lectures 8, 9 and 10 - PowerPoint PPT Presentation

Lectures 8, 9 and 10. Finite Difference Discretization of Hyperbolic Equations: Linear Problems. First Order Wave Equation. INITION BOUNDARY VALUE PROBLEM (IBVP) Initial Condition: Boundary Conditions:. Solution. First Order Wave Equation. Characteristics. General solution.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'Lectures 8, 9 and 10' - conor

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### Lectures 8, 9 and 10

Finite Difference Discretization of Hyperbolic Equations:Linear Problems

First Order Wave Equation

INITION BOUNDARY VALUE PROBLEM (IBVP)

Initial Condition:

Boundary Conditions:

Solution

First Order Wave Equation

Characteristics

General solution

Model Problem

Initial condition:

Periodic Boundary conditions:

constant

Example

Model Problem

Periodic Solution (U>0)

Discretization

Finite DifferenceSolution

Discretize (0,1) into J equal intervals

And (0,T) into N equal intervals

Discretization

Finite DifferenceSolution

NOTATION:

• approximation to
• vector of approximate values at time ;
• vector of exact values at time ;

Approximation

Finite DifferenceSolution

For example … for ( U > 0 )

Forward in Time Backward (Upwind) in Space

First Order Upwind Scheme

Finite DifferenceSolution

Interpretation

Use Linear Interpolation

j – 1, j

First Order Upwind Scheme

Finite DifferenceSolution

Explicit Solution

no matrix inversion

exists and is unique

Definition

Convergence

The finite difference algorithm converges if

For any initial condition .

Definition

Consistency

The difference scheme ,

is consistent with the differential equation

if:

For all smooth functions

when .

First Order Upwind Scheme

Consistency

Difference operator

Differential operator

First Order Upwind Scheme

Consistency

First order accurate in space and time

Truncation Error

Insert exact solution into difference scheme

Consistency

Definition

Stability

The difference scheme is stable if:

There exists such that

for all ; and n, such that

Above condition can be written as

Stability

Stable if

Upwind scheme is stable provided

Lax EquivalenceTheorem

A consistent finite difference scheme for a partial differential equation for which the initial value problem is well-posed is convergent if and only if it is stable.

Proof

Lax EquivalenceTheorem

( first order in , )

First Order Upwind Scheme

Lax EquivalenceTheorem
• Consistency:
• Stability: for
• Convergence

or

and are constants independent of ,

First Order Upwind Scheme

Lax EquivalenceTheorem

Example

Solutions for:

(left)

(right)

Convergence is slow !!

Domains of dependence

CFL Condition

Mathematical Domain of Dependence of

Set of points in where the initial or boundary

data may have some effect on .

Numerical Domain of Dependence of

Set of points in where the initial or boundary

data may have some effect on .

Domains of dependence

CFL Condition

First Order Upwind Scheme

Analytical

Numerical ( U > 0 )

CFL Theorem

CFL Condition

CFL Condition

For each the mathematical domain of de-

pendence is contained in the numerical domain of dependence.

CFL Theorem

The CFL condition is a necessary condition for the convergence of a numerical approximation of a partial differential equation, linear or nonlinear.

Fourier Analysis
• Provides a systematic method for determining stability → von Neumann Stability Analysis
• Provides insight into discretization errors

Continuous Problem

Fourier Analysis

Fourier Modes and Properties…

Fourier mode: ( integer )

• Periodic ( period = 1 )
• Orthogonality
• Eigenfunction of

Continuous Problem

Fourier Analysis

…Fourier Modes and Properties

• Form a basis for periodic functions in
• Parseval’s theorem

Discrete Problem

Fourier Analysis

Fourier Modes and Properties…

Fourier mode: ,

k ( integer )

Discrete Problem

Fourier Analysis

…Fourier Modes and Properties…

Real part of first 4 Fourier modes

Discrete Problem

Fourier Analysis

…Fourier Modes and Properties…

• Periodic (period = J)
• Orthogonality

Discrete Problem

Fourier Analysis

…Fourier Modes and Properties…

• Eigenfunctions of difference operators e.g.,

Discrete Problem

Fourier Analysis

Fourier Modes and Properties…

• Basis for periodic (discrete) functions
• Parseval’s theorem

von Neumann Stability Criterion

Fourier Analysis

Write

Stability

Stability for all data

von Neumann Stability Criterion

Fourier Analysis

…First Order Upwind Scheme…

amplification factor

Stability if which implies

von Neumann Stability Criterion

Fourier Analysis

…First Order Upwind Scheme

Stability if:

von Neumann Stability Criterion

Fourier Analysis

FTCS Scheme…

Fourier Decomposition:

von Neumann Stability Criterion

Fourier Analysis

…FTCS Scheme

amplification factor

Unconditionally Unstable Not Convergent

Time Discretization

Lax-WendroffScheme

Write a Taylor series expansion in time about

But …

Spatial Approximation

Lax-WendroffScheme

Approximate spatial derivatives

Equation

Lax-WendroffScheme

no matrix inversion

exists and is unique

Interpretation

Lax-WendroffScheme

Interpolation

Analysis

Lax-WendroffScheme

Consistency

Secondorder accurate in space and time

Analysis

Lax-WendroffScheme

Truncation Error

Insert exact solution into difference scheme

Consistency

Analysis

Lax-WendroffScheme

Stability

Stability if:

Analysis

Lax-WendroffScheme

Convergence

• Consistency:
• Stability:
• Convergence
• and are constants independent of

Example

Lax-WendroffScheme

Solutions for:

C = 0.5

= 1/50(left)

= 1/100 (right)

Example

Lax-WendroffScheme

= 1/100

C = 0.5

Upwind (left)

vs.

Lax-Wendroff (right)

Derivation

Beam-WarmingScheme

Interpolation

Method of Lines

Generally applicable to time evolution PDE’s

• Spatial discretization

Semi-discrete scheme (system of coupled ODE’s

• Time discretization (using ODE techniques)

Discrete Scheme

By studying semi-discrete scheme we can better

understand spatial and temporal discretization errors

Method of Lines

Notation

approximation to

vector of semi-discrete approximations;

Spatial Discretization

Method of Lines

Central difference … (for example)

or, in vector form,

Spatial Discretization

Method of Lines

Fourier Analysis …

Write semi-discrete approximation as

inserting into semi-discrete equation

Spatial Discretization

Method of Lines

… Fourier Analysis …

For each θ, we have a scalar ODE

Neutrally stable

Spatial Discretization

Method of Lines

… Fourier Analysis …

Exact solution

Semi-discrete solution

Time Discretization

Method of Lines

Predictor/Corrector Algorithm …

Model ODE

Predictor

Corrector

Combining the two steps you have

Time Discretization

Method of Lines

…Predictor/Corrector Algorithm

Semi-discrete equation

Predictor

Corrector

Combining the two steps you have

Fourier Stability Analysis

Method of Lines

Application factor

with

Stability

Fourier Stability Analysis

Method of Lines

PDE

Semi-discrete

Discrete

Semi-discrete Fourier

Discrete Fourier

Fourier Stability Analysis

Method of Lines

Path B …

Semi-discrete

Fourier semi-discrete

Predictor

Corrector

Discrete

Fourier Stability Analysis

Method of Lines

…Path B

• Give the same discrete Fourier equation
• Simpler
• “Decouples” spatial and temporal discretization

For each θ, the discrete Fourier equation is the

result of discretizing the scalar semi-discrete

ODE for the θ Fourier mode

Methods for ODE’s

Method of Lines

Model equation: complex- valued

Discretization

EF

EB

CN

Methods for ODE’s

Method of Lines

Absolute Stability Diagrams …

Given and complex-valued

(EF) or (EB) or …;

is defined such that

Methods for ODE’s

Method of Lines

…Absolute Stability Diagrams …

EF

EB

CN

Methods for ODE’s

Method of Lines

…Absolute Stability Diagrams

Methods for ODE’s

Method of Lines

Application to the wave equation…

For each

Thus,

• (and ) is purely imaginary
• for

Methods for ODE’s

Method of Lines

…Application to the wave equation…

EF is unconditionally unstable

EB is unconditionally stable

CN is unconditionally stable

Methods for ODE’s

Method of Lines

…Application to the wave equation…

Stable schemes can be obtained by:

1) Selecting explicit time stepping algorithm which

have some stability on imaginary axis

2) Modifying the original equation by adding “artificial

viscosity”

Methods for ODE’s

Method of Lines

…Application to the wave equation…

Explicit Time Stepping Scheme

Predictor/Corrector

Methods for ODE’s

Method of Lines

…Application to the wave equation…

Explicit Time Stepping Scheme

4 Stage Runge-Kutta

Methods for ODE’s

Method of Lines

…Application to the wave equation…

EF Time First Order Upwind

EF Time Lax-Wendroff

Methods for ODE’s

Method of Lines

…Application to the wave equation…

For each Fourier mode θ,

Methods for ODE’s

Method of Lines

…Application to the wave equation…

First Order Upwind Scheme

Methods for ODE’s

Method of Lines

…Application to the wave equation

Lax-Wendroff Scheme

Model Problem

Dissipation andDispersion

with and periodic boundary conditions.

Solution

Model Problem

Dissipation andDispersion

represents Decay

dissipation relation

represents Propagation

dispersion relation

For exact solution of

no dissipation

(constant)no dispersion

Modified Equation

Dissipation andDispersion

First Order Upwind

Lax-Wendroff

Beam-Warming

Modified Equation

Dissipation andDispersion
• For the upwind scheme dissipation dominates over dispersion Smooth solutions
• For Lax-Wendroff and Beam-Warming dispersion is the leading error effect Oscillatory solutions ( if not well resolved)
• Lax-Wendroff has a negativephase error
• Beaming-Warming has (for ) a positive phase error

Examples

Dissipation andDispersion

Lax-Wendroff (left)

vs.

Beam-Warming (right)

Exact Discrete Relations

Dissipation andDispersion

For the exact solution

, and

For the discrete solution

, and