# Finite Difference Discretization of Hyperbolic Equations: Linear Problems Lectures 8, 9 and 10.

## Presentation on theme: "Finite Difference Discretization of Hyperbolic Equations: Linear Problems Lectures 8, 9 and 10."— Presentation transcript:

Finite Difference Discretization of Hyperbolic Equations: Linear Problems
Lectures 8, 9 and 10

First Order Wave Equation
INITION BOUNDARY VALUE PROBLEM (IBVP) Initial Condition: Boundary Conditions:

First Order Wave Equation
Solution First Order Wave Equation Characteristics General solution

First Order Wave Equation
Solution First Order Wave Equation

First Order Wave Equation
Solution First Order Wave Equation

First Order Wave Equation
Stability First Order Wave Equation

Model Problem Initial condition: Periodic Boundary conditions:
constant

Periodic Solution (U>0)
Example Model Problem Periodic Solution (U>0)

Finite Difference Solution
Discretization Finite Difference Solution Discretize (0,1) into J equal intervals And (0,T) into N equal intervals

Finite Difference Solution
Discretization Finite Difference Solution

Finite Difference Solution
Discretization Finite Difference Solution NOTATION: approximation to vector of approximate values at time ; vector of exact values at time ;

Finite Difference Solution
Approximation Finite Difference Solution For example … for ( U > 0 ) Forward in Time Backward (Upwind) in Space

Finite Difference Solution
First Order Upwind Scheme Finite Difference Solution suggests … Courant number C =

Finite Difference Solution
First Order Upwind Scheme Finite Difference Solution Interpretation Use Linear Interpolation j – 1, j

Finite Difference Solution
First Order Upwind Scheme Finite Difference Solution Explicit Solution no matrix inversion exists and is unique

Finite Difference Solution
First Order Upwind Scheme Finite Difference Solution Matrix Form We can write

Finite Difference Solution
First Order Upwind Scheme Finite Difference Solution Example

Convergence Definition The finite difference algorithm converges if
For any initial condition

Consistency Definition 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

Stability Definition The difference scheme is stable if:
There exists such that for all ; and n, such that Above condition can be written as

First Order Upwind Scheme
Stability

First Order Upwind Scheme
Stability

Stability Stable if Upwind scheme is stable provided

Lax Equivalence Theorem
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.

Lax Equivalence Theorem
Proof Lax Equivalence Theorem ( first order in , )

Lax Equivalence Theorem
First Order Upwind Scheme Lax Equivalence Theorem Consistency: Stability: for Convergence or and are constants independent of ,

Lax Equivalence Theorem
First Order Upwind Scheme Lax Equivalence Theorem Example Solutions for: (left) (right) Convergence is slow !!

CFL Condition Mathematical Domain of Dependence of
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 data may have some effect on

First Order Upwind Scheme
Domains of dependence CFL Condition First Order Upwind Scheme Analytical Numerical ( U > 0 )

CFL Condition CFL Theorem 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.

CFL Theorem CFL Condition Stable Unstable

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

Fourier Modes and Properties…
Continuous Problem Fourier Analysis Fourier Modes and Properties… Fourier mode: ( integer ) Periodic ( period = 1 ) Orthogonality Eigenfunction of

…Fourier Modes and Properties
Continuous Problem Fourier Analysis …Fourier Modes and Properties Form a basis for periodic functions in Parseval’s theorem

Continuous Problem Fourier Analysis Wave Equation

Fourier Modes and Properties…
Discrete Problem Fourier Analysis Fourier Modes and Properties… Fourier mode: , k ( integer )

…Fourier Modes and Properties…
Discrete Problem Fourier Analysis …Fourier Modes and Properties… Real part of first 4 Fourier modes

…Fourier Modes and Properties…
Discrete Problem Fourier Analysis …Fourier Modes and Properties… Periodic (period = J) Orthogonality

…Fourier Modes and Properties…
Discrete Problem Fourier Analysis …Fourier Modes and Properties… Eigenfunctions of difference operators e.g.,

Fourier Modes and Properties…
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

Fourier Analysis von Neumann Stability Criterion
First Order Upwind Scheme…

Fourier Analysis amplification factor Stability if which implies
von Neumann Stability Criterion Fourier Analysis …First Order Upwind Scheme… amplification factor Stability if which implies

Fourier Analysis Stability if: von Neumann Stability Criterion
…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

Lax-Wendroff Scheme Time Discretization
Write a Taylor series expansion in time about But …

Spatial Approximation
Lax-Wendroff Scheme Approximate spatial derivatives

Equation Lax-Wendroff Scheme no matrix inversion exists and is unique

Interpretation Lax-Wendroff Scheme Use Quadratic Interpolation

Lax-Wendroff Scheme Analysis Second order accurate in space and time
Consistency Second order accurate in space and time

Lax-Wendroff Scheme Analysis
Truncation Error Insert exact solution into difference scheme Consistency

Analysis Lax-Wendroff Scheme Stability Stability if:

Lax-Wendroff Scheme Analysis Consistency: Stability: Convergence
and are constants independent of

Domains of Dependence Lax-Wendroff Scheme Analytical Numerical

CFL Condition Lax-Wendroff Scheme Stable Unstable

Lax-Wendroff Scheme Example Solutions for: C = 0.5 = 1/50 (left)
= 1/100 (right)

Lax-Wendroff Scheme Example = 1/100 C = 0.5 Upwind (left) vs.
Lax-Wendroff (right)

Derivation Beam-Warming Scheme Use Quadratic Interpolation

Consistency and Stability
Beam-Warming Scheme Consistency, Stability

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

Spatial Discretization
Method of Lines Fourier Analysis …

Predictor/Corrector Algorithm …
Time Discretization Method of Lines Predictor/Corrector Algorithm … Model ODE Predictor Corrector Combining the two steps you have

…Predictor/Corrector Algorithm
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 Fourier Transform

Fourier Stability Analysis
Method of Lines Application factor with Stability

Method of Lines PDE Semi-discrete Discrete Semi-discrete Fourier
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

Method of Lines Methods for ODE’s Model equation: complex- valued
Discretization EF EB CN

Absolute Stability Diagrams …
Methods for ODE’s Method of Lines Absolute Stability Diagrams … Given and complex-valued (EF) or (EB) or … ; is defined such that

…Absolute Stability Diagrams …
Methods for ODE’s Method of Lines …Absolute Stability Diagrams … EF EB CN

…Absolute Stability Diagrams
Methods for ODE’s Method of Lines …Absolute Stability Diagrams

Application to the wave equation…
Methods for ODE’s Method of Lines Application to the wave equation… For each Thus, (and ) is purely imaginary for

…Application to the wave equation…
Methods for ODE’s Method of Lines …Application to the wave equation… EF is unconditionally unstable EB is unconditionally stable CN is unconditionally stable

…Application to the wave equation…
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”

Method of Lines Methods for ODE’s Explicit Time Stepping Scheme
…Application to the wave equation… Explicit Time Stepping Scheme Predictor/Corrector

Method of Lines Methods for ODE’s Explicit Time Stepping Scheme
…Application to the wave equation… Explicit Time Stepping Scheme 4 Stage Runge-Kutta

Method of Lines Methods for ODE’s Adding Artificial Viscosity
…Application to the wave equation… Adding Artificial Viscosity Additional Term EF Time First Order Upwind EF Time Lax-Wendroff

Method of Lines Methods for ODE’s Adding Artificial Viscosity
…Application to the wave equation… Adding Artificial Viscosity For each Fourier mode θ, Additional Term

…Application to the wave equation…
Methods for ODE’s Method of Lines …Application to the wave equation… First Order Upwind Scheme

…Application to the wave equation
Methods for ODE’s Method of Lines …Application to the wave equation Lax-Wendroff Scheme

Dissipation and Dispersion
Model Problem Dissipation and Dispersion with and periodic boundary conditions. Solution

Dissipation and Dispersion
Model Problem Dissipation and Dispersion represents Decay dissipation relation represents Propagation dispersion relation For exact solution of no dissipation (constant) no dispersion

Dissipation and Dispersion
Modified Equation Dissipation and Dispersion First Order Upwind Lax-Wendroff Beam-Warming

Dissipation and Dispersion
Modified Equation Dissipation and Dispersion 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 negative phase error Beaming-Warming has (for ) a positive phase error

Dissipation and Dispersion
Examples Dissipation and Dispersion First Order Upwind

Dissipation and Dispersion
Examples Dissipation and Dispersion Lax-Wendroff (left) vs. Beam-Warming (right)

Dissipation and Dispersion
Exact Discrete Relations Dissipation and Dispersion For the exact solution , and For the discrete solution

Similar presentations