0% found this document useful (0 votes)
79 views

CAAM452 Lecture 12 A

This document summarizes the Godunov scheme for numerical solutions of partial differential equations. It discusses computing slopes to reconstruct the solution, including standard and limiting slope formulae. Limiters like minmod and MC are presented to limit slopes near discontinuities. The document also discusses expressing the scheme as a flux formulation with piecewise linear reconstruction and using flux limiters to control flux contributions between cells. Harten's conditions for total variation diminishing schemes are stated. Sweby diagrams are introduced to analyze flux limiters and ensure the TVD property.

Uploaded by

Junk Jettison
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

CAAM452 Lecture 12 A

This document summarizes the Godunov scheme for numerical solutions of partial differential equations. It discusses computing slopes to reconstruct the solution, including standard and limiting slope formulae. Limiters like minmod and MC are presented to limit slopes near discontinuities. The document also discusses expressing the scheme as a flux formulation with piecewise linear reconstruction and using flux limiters to control flux contributions between cells. Harten's conditions for total variation diminishing schemes are stated. Sweby diagrams are introduced to analyze flux limiters and ensure the TVD property.

Uploaded by

Junk Jettison
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 26

Numerical Methods for Partial

Differential Equations
CAAM 452
Spring 2005
Lecture 12
Instructor: Tim Warburton

Godunov Scheme Summary


To complete this scheme we now specify how to
compute the slopes.
2
2

1
dx
u
dt
n 1
n
n
n
n
n
qi qi udt qi qi 1 u dt
i i 1

dx
2
2

upwind: 0
n
i

Standard formulae:
n
n
q

q
Centered slope (Fromm): in i 1 i 1
2dx
n
n
q

q
i 1
Upwind slope (Beam-Warming): in i
dx
n
n
qi 1 qi
n
Downwind slope (Lax-Wendroff): i
dx

With Limiting
Minmod slope limiter:
n
n
n
n

q
q

q
n
i
i 1
i 1
i
i min mod
,

dx
dx

Monotonized central-difference limiter (MC limiter)


n
n
n
n
n
n

qi 1 qi 1
qi qi 1
qi 1 qi
n
i minmod
,minmod 2
,2

2
dx
dx
dx

Today
More limiters
Flux limiting function formulation.
We will discuss Hartens sufficient conditions for a numerical
method (including limiter) to be TVD
Sweby TVD diagrams for flux limiting functions.
Extension to systems of linear PDEs
Extension to nonlinear PDEs

Flux Formulation with Piecewise Linear


Reconstruction
Last time we showed how the ansatz of a
piecewise linear reconstruction and Godunovs
method allowed us to compute the time averaged
flux contribution at each end of the Ith cell
t n 1

n
i 1/ 2

f q% xi 1/ 2 , t dt

dt t t n
u
uq dx udt in1
2
n
i 1

t n 1

n
i 1/ 2

f q% xi 1/ 2 , t dt

dt t t n
u
uq dx udt in
2
n
i

Notice: we can obtain the i-1/2 flux by setting i->i-1 in the i+1/2 flux formula
(i.e. the flux formula is continuous at the cell boundary)

cont
Using this notation the scheme becomes:
dt n1
n 1
n
qi qi Fi 1/ 2 Fi n1/12
dx
where:
t n 1

n
i 1/ 2

f q% xi 1/ 2 , t dt

dt t t n
u
uq dx udt in1
2
n
i 1

This is known as the flux formulation with piecewise


reconstruction.

cont
So far we have assumed u>0 but we can generalize this for
u<0 using the same approach as before:
uq n u dx udt n if u 0

i1
i 1

2
Fi n1/ 2
uqin u dx udt in if u 0

2
To simplify this we write it as:
u
udt n
F
u q u q 1
i 1/ 2
2
dx
where:
n
i 1/ 2

n
i

n
i 1

u u u u
u
,u
,
2
2
in1/ 2 limited version of

n
i

qin1

cont
By writing the time interval averaged flux function in
this way:
u
udt
Fi n1/ 2 u qin u qin1

i 1/ 2

in1/ 2 limited version of

dx

n
i

qin1

We are philosophically moving away from a local


cell reconstruction approach towards controlling the
flux contribution from jumps in the averages
between elements.

Flux Limiters
The idea is: limit the flux of q between cells and you will
subsequently limit spurious growth in the cell averages near
discontinuities
A general approach is to multiply the jump in cell averages
by a limiting function:

in1/ 2 in1/ 2 qin qin1


where:

in1/ 2

qIn qIn1
n
qi qin1

i 1 if u 0
I
i 1 if u 0

cont
The theta ratio can be thought of as a smoothness indicator
near the cell interface at x_{i-1/2}.
qn qn
n
i 1/ 2

I
n
i

I 1
n
i 1

q q

i 1 if u 0
I
i 1 if u 0

If the data is smooth we expect the ratio to be approximately 1


(except at extrema)
Near a discontinuity we expect the ratio to be far away from 1.
The flux limiting function, phi, will range between 0 and 2. The
smaller it is, the more limiting is applied to a jump in cell
averages. Above 1 it is being used to steepen the effective
reconstruction.

cont
Using this formulation we can recover the methods we have seen
before and some new limiters:
Linear methods:

upwind: 0
Lax-Wendroff: 1
Beam-Warming:
Fromm:

1
1
2

High-resolution limiters:
minmod: minmod 1,

superbee: max 0,min 1,2 , min 2,

1+

MC: max 0,min
,2,
2

van Leer:
1

cont
Using this notation we can write down the scheme
in terms of the flux limiter function ( udt ):
dx

u>0
n 1
i

1
q q q
in1/ 2 qin1 qin in1/ 2 qin qin1

2
n
i

n
i

n
i 1

Upwind scheme
flux contibution

u<0
n 1
i

Limited downwind
cell interface flux
contribution

Limited upwind
cell interface
flux contribution

1
q q q
in1/ 2 qin qin1 in1/ 2 qin1 qin

2
n
i

n
i 1

n
i

Hartens Theorem
Theorem: Consider a general method of the form:
qin1 qin Cin1 qin qin1 Din qin1 qin
for one time step, where the coefficients C and D
are arbitrary values (which in particular may
depend on qbar in some way).
n 1
n
TV
q

TV
q
i
i provided that the following
Then
n
conditions are satisfied:
Ci 1 0 i

Din 0 i
Cin Din 1 i

Sweby Diagrams
http://locus.siam.org/fulltext/SINUM/volume-21/0721062.pdf

We need to express the flux limited scheme:


1
n 1
n
n
n
qi qi qi qi 1
in1/ 2 qin1 qin in1/ 2 qin qin1
2
In the form: q n1 q n C n q n q n D n q n q n

i 1

i 1

i 1

And then satisfying the Harten conditions will guarantee the


method is TVD.
An appropriate choice (which we can work with) is:
n

i 1/ 2
n
n
Ci 1
i 1/ 2

1/
2

Din 0

cont
In this case since the D coefficients are zero and
the Harten TVD conditions reduce to:
0 Cin1 1

1 i 1/ 2
n
n
i.e. 0

i 1/ 2
i 1/ 2
n

i 1/ 2


This will hold if: 0 2 and 0 2 0

We can summarize this in terms of the minmod


function: 0 minmod 2, 2 0
In addition we require: 0 0
See LeVeque p 116-118 for details

cont
i.e. any flux limiting function must satisfy:
0 minmod 2, 2 0
to be TVD. Graphically, the shaded region is the TVD region:

upwind: 0

Beam-Warming

Fromm

Lax-Wendroff: 1
Beam-Warming:
Fromm:

Lax-Wendroff

1
1
2
1

Clearly non of these linear limiters generate a TVD scheme.

cont
To guarantee second order accuracy and avoid
excessive compression of solutions, Sweby
suggested the following reduced portion of the TVD
region as a suitable range for the flux limiting
function:
2

http://locus.siam.org/fulltext/SINUM/volume-21/0721062.pdf

Minmod Flux Limiter on Sweby Diagram

minmod: minmod 1,
It is apparent that the minmod flux limiter applies the maximum possible
limiting allowed within the second order TVD region.
(i.e. it will be rather dissipative and smear out discontinuities somewhat
as seen on the right hand side figure).

Superbee Flux Limiter on Sweby Diagram

superbee: max 0,min 1,2 ,min 2,


The Superbee limiter applies the minimum limiting and maximum steepening
possible to remain TVD. It is known to suffer from excessive sharpening of
slopes as a result.
On the right we show what happens to a smooth sine wave after 20 periods.
Notice the flattening of the peaks and the steepening of the slopes.

MC Flux Limiter on Sweby Diagram

1+

MC: max 0,min
,2,2
2

The MC limiter transitions from upwind (theta<0)


to Fromm (at theta=1/3) then switches to a constant(at theta=3).
This is a compromise between Superbee and minmod

van Leer Flux Limiter

van Leer:

The van Leer limiter charts a careful compromise path through


the Sweby TVD region.

Summary of Some
Flux Limiting Functions

Linear non-TVD limiters

Nonlinear second order


TVD limiters

Implementation
For u>0 the scheme looks like:
n 1
i

1
n
n
n
n
n
n
q q q

i 1/ 2 i 1
i
i 1 / 2 i
i 1
2
n
i

n
i

n
i 1

We can easily achieve this in matlab:

Matlab Version
This is a sample Matlab implementation of a
piecewise linear reconstructed Godunov
approach with a selection of flux limiters.
Available from the course home page:
http://www.caam.rice.edu/~caam452/CodeSnippe
ts/fluxlimiter.m
With the initial condition supplied by:
http://www.caam.rice.edu/~caam452/CodeSnippe
ts/fluxlimiterexact.m

Homework 4
Q1) Using N=80,160,320,640,1280 estimate the solution order of accuracy of the
flux limited scheme:
n 1
i

1
q q q
in1/ 2 qin1 qin in1/ 2 qin qin1

2
n
i

n
i

n
i 1

with flux limiting functions:


i. Fromm
ii. minmod
iii. MC
using initial conditions:
i. sin(pi*x)
ii. sin(pi*x) + (abs(x-.5)<.25);
on the periodic interval [-1,1).
Use the fluxlimiter.m Matlab code from the web page.
You will also need to download fluxlimiterexact.m and minmod.m
Measure error both using the maxmimum norm, l2 norm and finally the
maximum norm with data points near the discontinuity excluded.
Use error plots and tables with discussion to describe your results.

Homework 4 cont
Q2a) Invent your own 2nd order TVD flux limiter function (i.e. a
function with range contained in the Sweby TVD region)
Q2b) Modify sweby.m to plot your flux limiter function and
compare with the limiter functions already used.
Q2c) Estimate order of accuracy for a smooth initial condition
to the advection equation
Q2d) Estimate order of accuracy for a discontinuous initial
condition to the advection equation
Q2e) Compare results (with diagrams,results and comments)
and discuss how your limiter differs from the other limiters
we have seen.

You might also like