Search for notes by fellow students, in your own course and all over the country.

Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.

My Basket

You have nothing in your shopping cart yet.

Title: differential equation
Description: it is an book about maths

Document Preview

Extracts from the notes are below, to see the PDF you'll receive please use the links above


NUMERICAL SOLUTION OF
H Y P E R B O L I C P A R T I A L D I FF E R E N T I A L E Q U A T I O N S
This is a new type of graduate textbook, with both print and interactive electronic components (on CD)
...

Classical techniques for judging the qualitative performance of the schemes, such as
modified equation analysis and Fourier analysis, are used to motivate the development of
classical higher-order methods (the Lax–Wendroff process) and to prove results such as the
Lax Equivalence Theorem
...

The solution of the Riemann problems for these applications is developed, so that the
reader can use the theory to develop test problems for the methods, especially to measure errors for comparisions of accuracy and efficiency
...
Since many of these methods depend on
Riemann solvers, there is extensive discussion of the basic design principles of approximate
Riemann solvers, and several computationally useful techniques
...

The accompanying CD contains a hyperlinked version of the text which provides access
to computer codes for all of the text figures
...

John A
...
TRANGENSTEIN
Department of Mathematics, Duke University
Durham, NC 27708-0320

cambridge university press
Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, S˜ o Paulo
a
Cambridge University Press
The Edinburgh Building, Cambridge CB2 8RU, UK
Published in the United States of America by Cambridge University Press, New York
www
...
org
Information on this title: www
...
org/9780521877275
C

John A
...
Subject to statutory exception
and to the provisions of relevant collective licensing agreements,
no reproduction of any part may take place without
the written permission of Cambridge University Press
...

All material contained within the CD-ROM is protected by copyright and other intellectual property laws
...

To the extent permitted by applicable law, Cambridge University Press is not liable for direct damages
or loss of any kind resulting from the use of this product or from errors or faults contained in it,
and in every case Cambridge University Press’s liability shall be limited to the amount
actually paid by the customer for the product
...
Rowe

Contents

Preface
1 Introduction to Partial Differential Equations
2 Scalar Hyperbolic Conservation Laws
2
...
1
...
1
...
1
...
1
...
1
...
2 Linear Finite Difference Methods
2
...
1 Basics of Discretization
2
...
2 Explicit Upwind Differences
2
...
3 Programs for Explicit Upwind Differences
2
...
3
...
2
...
2 Second Upwind Difference Program
2
...
3
...
2
...
4 Fourth Upwind Difference Program
2
...
3
...
2
...
2
...
2
...
2
...
3 Modified Equation Analysis
2
...
1 Modified Equation Analysis for Explicit Upwind
Differences

page ix
1
6
6
6
8
9
10
11
12
12
14
16
16
17
18
20
21
23
24
25
26
30
30

vii

viii

Contents

2
...
5

2
...
7
2
...
3
...
3
...
3
...
5
...
5
...
5
...
5
...
1 Nonlinear Hyperbolic Conservation Laws
3
...
1 Nonlinear Equations on Unbounded Domains
3
...
2 Characteristics
3
...
3 Development of Singularities
3
...
4 Propagation of Discontinuities
3
...
5 Traveling Wave Profiles
3
...
6 Entropy Functions
3
...
7 Oleinik Chord Condition
3
...
8 Riemann Problems
3
...
9 Galilean Coordinate Transformations
3
...
2
...
2
...
2
...
3 First-Order Finite Difference Methods
3
...
1 Explicit Upwind Differences
3
...
2 Lax–Friedrichs Scheme
3
...
3 Timestep Selection
3
...
4 Rusanov’s Scheme
3
...
5 Godunov’s Scheme
3
...
6 Comparison of Lax–Friedrichs, Godunov and Rusanov
3
...
5 Lax–Wendroff Process
3
...
1 Theory of Hyperbolic Systems
4
...
1 Hyperbolicity and Characteristics
4
...
2 Linear Systems
4
...
3 Frames of Reference
4
...
3
...
1
...
2 Change of Frame of Reference for
Conservation Laws
4
...
3
...
1
...
1
...
1
...
1
...
1
...
1
...
1
...
1
...
2 Upwind Schemes
4
...
1 Lax–Friedrichs Scheme
4
...
2 Rusanov Scheme
4
...
3 Godunov Scheme
4
...
3
...
3
...
4 Case Study: Gas Dynamics
4
...
1 Conservation Laws
4
...
2 Thermodynamics
4
...
3 Characteristic Analysis
4
...
4 Entropy Function
4
...
5 Centered Rarefaction Curves
4
...
6 Jump Conditions
4
...
7 Riemann Problem
4
...
8 Reflecting Walls
4
...
5
...
5
...
5
...
5
...
5
...
6 Case Study: Finite Deformation in Elastic Solids
4
...
1 Eulerian Formulation of Equations of Motion for Solids
4
...
2 Lagrangian Formulation of Equations of Motion for Solids
4
...
3 Constitutive Laws
4
...
4 Conservation Form of the Equations of Motion for Solids
4
...
5 Jump Conditions for Isothermal Solids
4
...
6 Characteristic Analysis for Solids
4
...
8 Case Study: Vibrating String
4
...
1 Conservation Laws
4
...
2 Characteristic Analysis
4
...
3 Jump Conditions
4
...
4 Lax Admissibility Conditions
4
...
5 Entropy Function
4
...
6 Wave Families for Concave Tension
4
...
7 Wave Family Intersections
4
...
8 Riemann Problem Solution
4
...
9
...
9
...
9
...
9
...
9
...
9
...
10 Case Study: Polymer Model
4
...
1 Constitutive Laws
4
...
2 Characteristic Analysis
4
...
3 Jump Conditions
4
...
4 Riemann Problem Solution
4
...
11
...
11
...
11
...
11
...
12 Case Study: Schaeffer–Schechter–Shearer System
4
...
13
...
13
...
13
...
13
...
13
...
13
...
13
...
13
...
13
...
13
...
13
...
13
...
1 Convergence
5
...
1 Consistency and Order
5
...
2 Linear Methods and Stability
5
...
3 Convergence of Linear Methods
5
...
2
...
2
...
3 Nonlinear Stability
5
...
1 Total Variation
5
...
2 Total Variation Stability
5
...
3 Other Stability Notions
5
...
5 Monotonic Schemes
5
...
1 Smoothness Monitor
5
...
2 Monotonizations
5
...
3 MUSCL Scheme
5
...
7 E-Schemes
5
...
8
...
8
...
8
...
9 Slope-Limiter Schemes
5
...
1 Exact Integration for Constant Velocity
5
...
2 Piecewise Linear Reconstruction
5
...
3 Temporal Quadrature for Flux Integrals
5
...
4 Characteristic Tracing
5
...
5 Flux Evaluation
5
...
6 Non-Reflecting Boundaries with the MUSCL Scheme

xi
296
298
299
304
313
315
317
320
326
326
326
328
330
331
331
341
353
353
354
357
359
361
361
362
364
367
368
370
370
375
379
383
384
386
388
389
390
391

xii

Contents

5
...
10
...
10
...
11 Higher-Order Extensions of the Lax–Friedrichs Scheme
5
...
13 Essentially Non-Oscillatory Schemes
5
...
14
...
14
...
14
...
14
...
14
...
14
...
15 Case Studies
5
...
1 Case Study: Linear Advection
5
...
2 Case Study: Burgers’ Equation
5
...
3 Case Study: Traffic Flow
5
...
4 Case Study: Buckley–Leverett Model

391
391
394
395
402
408
412
412
413
414
415
416
417
418
418
422
426
427

6 Methods for Hyperbolic Systems
6
...
1
...
1
...
1
...
1
...
1 Godunov’s Method with the Rusanov Flux
6
...
3
...
1
...
3 Godunov’s Method with the
Harten–Hyman Fix for Roe’s Solver
6
...
2
...
2
...
2
...
2
...
2
...
2
...
2
...
2
...
2
...
3 Case Studies
6
...
1 Wave Equation
6
...
2 Shallow Water
6
...
3 Gas Dynamics
6
...
4 MHD
6
...
5 Nonlinear Elasticity
6
...
6 Cristescu’s Vibrating String
6
...
7 Plasticity
6
...
8 Polymer Model
6
...
9 Schaeffer–Schechter–Shearer Model
7 Methods in Multiple Dimensions
7
...
1
...
1
...
1
...
1 Traditional Donor Cell Upwind Method
7
...
2
...
1
...
3 Wave Propagation Form of First-Order
Corner Transport Upwind
7
...
2
...
1
...
1
...
1
...
1 First-Order Lax–Friedrichs
7
...
4
...
1
...
1
...
2 Riemann Problems in Two Dimensions
7
...
1 Burgers’ Equation
7
...
2 Shallow Water
7
...
3 Gas Dynamics
7
...
3
...
3
...
3
...
3
...
1 Linear Advection with Positive Velocity
7
...
3
...
3
...
3 General Nonlinear Problems
7
...
3
...
3
...
4 Curvilinear Coordinates
7
...
1 Coordinate Transformations
7
...
2 Spherical Coordinates
7
...
2
...
4
...
2 Case Study: Lagrangian Solid Mechanics
in Spherical Coordinates
7
...
3 Cylindrical Coordinates
7
...
3
...
4
...
2 Case Study: Lagrangian Solid Mechanics
in Cylindrical Coordinates
7
...
6 Geometric Flexibility
8 Adaptive Mesh Refinement
8
...
2 Basic Assumptions
8
...
3
...
3
...
3
...
1 Boundary Data
8
...
2
...
3
...
3 Time Integration
8
...
3 Regridding
8
...
3
...
3
...
2 Tagging Cells for Refinement
8
...
3
...
3
...
4 Logically Rectangular Organization
8
...
3
...
3
...
3
...
3
...
4 Object Oriented Programming
8
...
1 Programming Languages
8
...
2 AMR Classes
8
...
2
...
4
...
2 Boxes
8
...
2
...
4
...
4 Lists

521
522
523
527
529
533
537
539
542
542
544
544
546
547
548
549
549
550
552
553
553
556
559
559
559
560
560
561
561
562
563
563
567
569
569

Contents

8
...
2
...
4
...
6 Timesteps
8
...
2
...
4
...
8 DataBoxes
8
...
2
...
4
...
10 Patch
8
...
2
...
5 ScalarLaw Example
8
...
1 ScalarLaw Constructor
8
...
2 initialize
8
...
3 stableDt
8
...
4 stuffModelGhost
8
...
5 stuffBoxGhost
8
...
6 computeFluxes
8
...
7 conservativeDifference
8
...
8 findErrorCells
8
...
9 Numerical Example
8
...
7 Gas Dynamics Examples

xv
570
571
571
571
572
572
573
573
576
576
577
577
578
578
579
579
579
580
581

Bibliography

584

Index

593

Preface

Hyperbolic conservation laws describe a number of interesting physical problems
in diverse areas such as fluid dynamics, solid mechanics, and astrophysics
...
These propagating discontinuities can appear as the familiar shock waves in gases (the “boom” from explosions
or super-sonic airplanes), but share many mathematical properties with other waves
that do not appear to be so “shocking” (such as steep changes in oil saturations in
petroleum reservoirs)
...
Of course, the numerical methods in this
book can be used to solve linear hyperbolic conservation laws, but our methods will
not be as fast or accurate as possible for these problems
...

This book grew out of a one-semester course I have taught at Duke University
over the past decade
...
I may tinker with the material more in the future,
because I expect that I will never be fully satisfied
...
As a result, I have included substantial discussion about the analytical solution
of hyperbolic conservation laws, as well as discussion about numerical methods
...
With this information, I hope that they will be able to adapt new numerical
methods developed for other problem areas to their own applications
...


xvii

xviii

Preface

I also tried to discuss a variety of numerical methods in this text, so that students
could see a number of competing ideas
...
It does have software available, to allow the reader to experiment with
the various ideas
...
Instead, I hope that the readers will learn enough from this book to make
intelligent decisions on which scheme is best for their problems, as well as how to
implement that scheme efficiently
...
LeVeque’s Finite
Volume Methods for Hyperbolic Problems [97] is one that covers the mathematics
well, describes several important numerical methods, but emphasizes the wave
propagation scheme over all
...
These books contain very interesting techniques
that are particular for fluid dynamics, and should not be ignored
...
This
relates to a point I try to emphasize in teaching the course, that it is essential in
numerical computation to perform mesh refinement studies in order to make sure
that the method is performing properly
...
Sometimes people have an inate
bias toward higher-order methods, but this may not be the most cost-effective
approach for many problem
...
I do not claim to have produced
the most efficient version of any of the schemes in this text, so the efficiency comparisons should be taken “with a grain of salt
...
For example, I
was surprised that approximate Riemann problem solvers often produce better
numerical results in Godunov methods than “exact” Riemann solvers
...
There are some schemes that generally work better than most
and some that often are less efficient than most, but all schemes have their niche
in which they perform well
...


Preface

xix

During the past ten years, I have watched numerical methods evolve, computers
gain amazing speed, and students struggle harder with programming
...
In that way, I could insert additional text for ready access by
the students
...
During that time, however, the
new operating systems have separated the students ever farther from programming
details
...
First, I wanted students to be able to
view the example programs while they were reading the text online
...
Then, I
decided that it would be really nice if students could perform “what if” experiments
within the text, by running numerical methods with different parameters and seeing
the results immediately
...
e
...
Eventually, our
department systems programmer, Andrew Schretter, found a way to make things
work for me, provided that I arrange for all parameter entry through graphical
user interfaces
...
One of my former
graduate students, Wenjun Ying, programmed carefully the many cases for the
marching cubes algorithm for visualizing level surfaces in three dimensions
...

This text is being published in two forms: traditional paper copy and a PDF file on
a companion CD
...
Similar links lead to bibliography
citations or to occurrences of key words in the index
...
This allows students
to view computer implementations of the algorithms developed in the book, and
to perform “what if” experiments with program and model parameters
...

The graphical user interface (GUI) makes it easy for students to change parameters (and, in fact, to see all of the input parameters)
...
There is a danger that students may think that they have to
program GUI’s in order to solve these problems
...
I have provided several example programs in the online version of chapter 2 to show students

xx

Preface

how they can write simple programs (that produce data sets for post processing)
or slightly more complex programs (that display numerical results during the computation to look like movies), or very sophisticated programs (that use GUI’s for
input parameters)
...
After all, CLAWPACK is a very successful example of that simple
and direct style of programming
...
Both
of these languages have advantages and disadvantages
...
Fortran is not very
good with memory allocation, or with pointers in general
...
When users
select numerical methods through a GUI, then I set values for function pointers and
pass those as arguments to Fortran routines
...
On the other hand, students who want to expand their
programming skills can find several interesting techniques in the codes
...
By this term, I mean the use of programming practices that
make it easier to prevent or identify programming errors
...
The mixed-language programs all use the following defensive steps
...
Second, floating-point
array values are initialized to IEEE infinity
...
When the program
makes an allocation request, the memory debugger gets even more space from the
heap, and puts special bit patterns into the space before and after the user memory
...
This memory debugger is very fast, and does
not add significantly to the overal memory requirements
...

Unfortunately, mixing Fortran and C++ allows the possibility of truly bizarre
programming errors
...
I don’t have a
good defensive programming technique for that error
...
I became
interested in hyperbolic conservation laws well after graduate school, and I am
indebted to several people for helping me to develop that interest
...
At Lawrence Livermore National Laboratory, I learned much
about Godunov methods from both John Bell and Phil Colella, and about object
oriented programming from Bill Crutchfield and Mike Welcome
...

Finally, emotional support throughout a project of this sort is essential
...
I could not have written this book without her
...
These equations often
fall into one of three types
...
Elliptic equations are most commonly associated with steady states of
either parabolic or hyperbolic problems
...
Advection–diffusion
problems involve important aspects of both hyperbolic and parabolic problems
...

It is reasonably straightforward to determine the type of a general second-order
partial differential equation
...

∂xi

Without loss of generality, we can assume that A is symmetric, by averaging the
coefficients of the i, j and j, i derivative terms
...
We will find a way to
choose the transformation matrix F below
...

∂ξ j

We would like to choose the matrix F so that D = FAF is diagonal
...
In other words, we can choose F to be an orthogonal matrix
...
The canonical example of an elliptic equation is the Laplace equation
∇ x · ∇ x u = 0
...
The canonical example of
2
a hyperbolic equation is the wave equation ∂ u − ∇ x · ∇ x u = 0
...
If D has one zero diagonal entry, the equation may be parabolic
...

∂t
Example 1
...
1 Consider the differential equation
∂ 2u ∂ 2u
∂ 2u
+ 2 −
=0
∂x3 ∂x4
∂x2
∂x2
1
which arises in the Khokhlov–Zabolotskaya–Kuznetsov (KZK) equation for
biomedical imaging
...

A=
0 0
0
−1/2
0 0 −1/2
0
A coordinate transformation that diagonalizes A is given by


1 0
0
0
0 1
0
0 
√ 

F=
0 0 1/ 2 1/ 2


0 0 −1/ 2 1/ 2
and the new coefficient matrix is


1
0
D=
0
0

0
1
0
0

0
0
1/2
0


0
0 

...


Introduction to Partial Differential Equations

3

This book will discuss analytical and numerical methods for solving hyperbolic
equations
...

Generally, our hyperbolic equations will arise from a physical law describing the
conservation of some quantity, such as mass, momentum or energy
...

Here is an outline of the analytical approaches in this book, whether they are
applied to problems or numerical methods
...
We will learn how the solution of such
problems depends on initial and boundary data, so that we can construct numerical
methods that respect this dependence
...
First, we will use calculus
to see how the approximations in the numerical method cause us to be solving a
differential equation that is slightly different from the problem that was posed
...
Second, we will use Fourier analysis to
see how the methods propagate waves, and use this analysis to develop the very
important Lax equivalence theorem
...

We will learn about the development and propagation of discontinuities, and see
that an understanding of infinitesimal diffusive effects is essential to understanding how nature selects certain solutions to these problems
...
This numerical diffusion will arise in subtle ways, depending on how how numerical schemes
use upwinding and averaging techniques
...
We
will apply these methods to problems in traffic flow and oil recovery/contaminant
cleanup
...
This is where
the discussion becomes most practical, because the physical applications are so
interesting
...
The analytical solution of the equations of motion for these
problems for special initial data (Riemann problems) can be very useful in building some of our numerical methods
...
As a
result, we will find methods to approximate the solution of Riemann problems
...

In Chapter 5 we will try to analyze the numerical methods, and use the analysis
to design better methods
...
In order to
achieve higher-order accuracy, we will design nonlinear schemes, even for use
on linear problems
...
They will not be the most effective schemes for solving
linear problems with smooth solutions
...

But this book is not just about analysis of problems and methods
...

It is important that the student learn how to judge when a numerical method is
working properly, sometimes by understanding its numerical stability, and often
by performing mesh refinement studies to verify the correct order of convergence
...
Methods can also differ greatly in their
efficiency, meaning how much it costs us to achieve a given accuracy
...

In order to assist the student in gaining knowledge about the design and performance of numerical methods, we have provided an interactive form of this book
...
In this way, students can view
computer programs to learn about code organization
...
Through the use of interactive graphics, the student can see the evolution of the numerical solution; this really helps in understanding instability and
the spread of discontinuities due to numerical diffusion
...
These make the selection of program parameters easy
once the code is written, but makes the example code somewhat larger than it needs
to be just to solve the problem
...
2
...
These programs start with
short Fortran programs, proceed through more modular Fortran to mixed language
programs, and end up with the more complicated program containing interactive
graphics and graphical user interfaces
...


Introduction to Partial Differential Equations

5

If the student can learn about mixed language programming, then the discussion on adaptive mesh refinement in Chapter 8 should be interesting
...
The hope is that after study of the applications of adaptive mesh refinement to oil recovery, linear elasticity and gas dynamics, the student
can apply adaptive mesh refinement to other research problems
...
In this chapter we will develop several basic numerical methods to solve
initial value problems arising from a particular class of partial differential equations,
namely scalar hyperbolic conservation laws
...
However, in many practical problems there are physical effects, such as
diffusion, that prevent such analytical reductions
...
1
...
Some experimentation with obvious numerical discretizations in Section 2
...
Analysis of these basic numerical methods
using Taylor series and Fourier transforms in Sections 2
...
5 will yield some
basic numerical principles, and the limitations of the simple numerical methods
...
1 Linear Advection
Linear advection describes the motion of some conserved quantity along a constant
velocity field
...

2
...
1 Conservation Law on an Unbounded Domain
The unbounded linear advection problem takes the form
∂u ∂cu
+
= 0 for all x ∈ R for all t > 0,
∂t
∂x
u(x, 0) = u 0 (x) for all x ∈ R
...
1a)
(2
...
1 Linear Advection
t

u

x − ct = constant
t=0

t>0

x

x

(a) Characteristic line

(b) Evolution

Fig
...
1 Characteristics in linear advection

In this initial-value problem, we assume that the velocity c is constant
...
1a) can be rewritten in the form
0 = 1, c

∂u
∂t
∂u
∂x

for all x ∈ R for all t > 0
...
It follows
that u is constant on lines parallel to that constant vector:
for all (x0 , t0 ) for all τ u(x0 + cτ, t0 + τ ) = constant
...

Given x, choose x0 = x − ct + ct0 to get
u(x, t) = u 0 (x − ct)
...
1)
...
Along a characteristic line, the solution of the conservation
law at time t > 0 is equal to the initial value at time t = 0
...
1
...
Suppose that we define the new
variables
ξ = x − ct, τ = t

(2
...


(2
...

∂x
∂ξ

and

˜
It follows that u solves the initial value problem
0=

˜
∂u
∂u
∂u
+c
=
,
∂t
∂x
∂τ
˜
u(ξ, 0) = u 0 (ξ )
...
In summary,
after we change to characteristic coordinates the original partial differential equation
becomes a system of ordinary differential equations, parameterized by ξ
...

2
...
2 Integral Form of the Conservation Law
In general, a conservation law in one dimension takes the form
∂u ∂ f
+
= 0
...
4)

Here u is the conserved quantity, and f is the flux
...

There is a physical reason for calling Equation (2
...
By
integrating over the space-time rectangle (a, b) × (0, t) and applying the divergence
theorem, we obtain
b
a

b

u(x, t) d x =
a

t

u(x, 0) d x +
0

t

f (a, τ ) dτ −

f (b, τ ) dτ
...
5) as follows
...
e
...
Thus the spatial integrals represent
the total conserved quantity in the interval (a, b) at some advanced time t and the
initial time 0
...
Thus equation (2
...


(2
...
1 Linear Advection

2
...
3 Advection–Diffusion Equation
Many physically realistic problems actually involve some amount of diffusion
...
2
...
In general, one-dimensional
linear advection with constant diffusion takes the form
∂u ∂cu

∂u
+
=
for all x ∈ R for all t > 0,
∂t
∂x
∂x
∂x
u(x, 0) = u 0 (x) for all x ∈ R
...
6a)
(2
...
The need for this restriction on will become obvious in
Equation (2
...

Let us transform again to characteristic coordinate ξ = x − ct and time τ = t
˜
as in Equation (2
...
3)
...
6) leads to
˜
˜
∂u
∂ 2u
=
for all ξ ∈ R for all τ > 0,
∂τ
∂ξ 2
˜
u(ξ, 0) = u 0 (ξ ) for all ξ ∈ R
...
7)

This is the one-dimensional heat equation on an unbounded interval
...


Here
G(ξ, τ ) = √

1
4π τ

e−ξ

2

/(4 τ )

is called the Green’s function
...
Here u is smooth for t > 0 because derivatives of
˜
u involve derivatives of the smooth Green’s function G, and not derivatives of the
initial data u 0
...
6) is
u(x, t) =


−∞

1
2
e−(x−ct−y) /(4 t) u 0 (y)dy
...


(2
...
On the other hand, after sufficiently large time even a small
diffusion will spread the effect of disturbances in the initial data over significant
intervals in space
...
These observations are important,
because in many practical situations we are interested in the solution of conservation
laws obtained in the limit as the diffusion tends to zero
...

It is sometimes useful to note that the linear advection–diffusion equation (2
...
In fact, we can rewrite it in the form
∂u

+
∂t
∂x

cu −

∂u
∂x

= 0 for all x ∈ R for all t > 0
...
We can develop an integral form of this conservation law by
using (2
...


2
...
4 Advection Equation on a Half-Line
Here is another important modification to the problem (2
...
For both practical and
computational purposes, we might be interested in solving a semi-infinite problem
with boundary data:
∂u ∂(cu)
+
= 0 for all x > 0 for all t > 0,
∂t
∂x
u(0, t) = v(t) for all t > 0,

(2
...


(2
...
2), we see that
the solution of (2
...
If c < 0, this inequality cannot be satisfied for any (x, t) in the problem
domain; in other words, no points in the problem domain will depend on the data at
the left-hand boundary
...
Since the solution of (2
...


(2
...
1 Linear Advection
t

u(x,t) = v(t − x/c)

11

u(x,t) = u0 (x − ct)

x

Fig
...
2 Characteristics in linear advection on a quarter-plane

This solution is illustrated in Figure 2
...
In other words, the solution in part of
the domain, namely points that can be reached by characteristics from the positive
x-axis, is given by the initial data; the solution in the remainder of the domain is
given by tracing back along characteristics to the boundary data on the positive
t-axis
...
1
...
Instead, we will
typically work with a problem on a bounded domain
∂u ∂(cu)
+
= 0 for all a < x < b for all t > 0,
∂t
∂x
u(a, t) = v(t) for all t > 0,

(2
...


(2
...
10a)

Here we have assumed for simplicity that the velocity c satisfies c > 0
...

It is interesting to note that if we added diffusion to this problem, as in
Equation (2
...
In this case, the analytical solution of the advection–diffusion problem on
a finite interval would typically involve a boundary layer at the right-hand side,
unless the boundary data there is chosen very carefully
...
1
2
...
1 Consider the variable coefficient conservation law
∂u
∂(uc)
+
= 0, for all x ∈ R for all t > 0
∂t
∂x
u(x, 0) = u 0 (x), for all x ∈ R
where c is a function of x
...

(a) Let f (x, t) = u(x, t)c(x) and show that f satisfies the partial differential equation
∂f
∂f
+c
= 0
...

∂t
(c) If b(x) has an inverse function, show that
u(x, t) =

c(b−1 (b(x) − t))
u 0 (b−1 (b(x) − t))
c(x)

satisfies the original differential equation
...


2
...
2
...
10), we will
discretize space by a finite increasing sequence of grid points
a = x−1/2 < x1/2 < · · · < x I − 3 < x I −1/2 = b
2
and time points
0 = t 0 < t 1 <
...

We will define the computational grid cells to be the intervals (xi−1/2 , xi+1/2 ), with
cell widths
xi ≡ xi+1/2 − xi−1/2 for all 0 ≤ i < I
...

See Figure 2
...


13

2
...
2
...
1
...
10a) over the
space-time rectangle (xi−1/2 , xi+1/2 ) × (t n , t n+1 ) to find that for all 0 ≤ i < I and
all 0 ≤ n < N
xi+1/2

xi+1/2

u(x, t n+1 ) d x =

xi−1/2

u(x, t n ) d x

xi−1/2
t n+1

+

tn

cu(xi−1/2 , t) dt −

t n+1
tn

cu(xi+1/2 , t) dt
...
11)

This equation involves no approximations
...
4) we obtain the similar equation
xi+1/2

xi+1/2

u(x, t n+1 ) d x =

xi−1/2

u(x, t n ) d x

xi−1/2

+

t n+1
tn

f (u(xi−1/2 , t)) dt −

t n+1
tn

f (u(xi+1/2 , t)) dt
...
12)

Equation (2
...
Our numerical scheme
will involve discrete quantities u in that approximate the cell averages in the following
sense:
u in ≈

1
xi

xi+1/2
xi−1/2

u(x, t n ) d x for all 0 ≤ i < I
...
13)

14

Scalar Hyperbolic Conservation Laws
n+1/2

Similarly, we will work with discrete quantities f i+1/2 that approximate time averages of the flux in the conservation law:
t n+1

1

n+1/2

f i+1/2 ≈

t n+1/2

f (u(xi+1/2 , t)) dt for all 0 ≤ i < I
...
12) we will require our discretization to satisfy
u in+1 = u in −

t n+1/2
xi

n+1/2

n+1/2

f i+1/2 − f i−1/2

for all 0 ≤ i < I
...
14)

n+1/2

Once we relate the fluxes f i+1/2 to the solution values u in and u in+1 , this will have
the form of a recurrence relation
...
14) over all spatial intervals, we obtain a telescoping sum
that simplifies to
I −1
i=0

u in+1 xi =

I −1

n+1/2

n+1/2

u in xi − t n+1/2 f I −1/2 − f −1/2

for all 0 ≤ n < N
...
As a result, schemes
of the form (2
...
Conservative finite difference
schemes for solving the conservation law are distinguished solely by their choices
n+1/2
for the numerical fluxes f i+1/2 , for 0 ≤ i < I and 0 ≤ n < N
...

xi xi−1/2
At the left-hand boundary x−1/2 = a we define the numerical fluxes by time averages
of the boundary data:
n+1/2
f −1/2

=

1
t n+1/2

t n+1
tn

f (v(t)) dt for all 0 ≤ n < N
...
15)

2
...
2 Explicit Upwind Differences
The simplest numerical approximation to the linear advection equation is the
explicit upwind difference method
c t n+1/2
, 0xi
t n+1/2
n+1/2
= u n − cu n − f −1/2

...
16a)

u n+1
0

(2
...
2 Linear Finite Difference Methods
t

n+1

t
x j − 3/2

t

x j − 1/2

x j + 1/2

x j − 3/2

t
x j − 1/2

x j + 1/2

x j − 1/2

x j + 1/2

x j + 3/2

x j − 3/2

x j + 3/2

n

x j − 3/2

n+1

x j − 1/2

x j + 1/2

x j + 3/2

n

x j + 3/2

(a) CFL < 1

(b) CFL > 1

Fig
...
4 Explicit upwind stencil

This is a conservative difference scheme in which the numerical fluxes are computed
n+1/2
by f i+1/2 = cu in for all 0 ≤ i < I , and by Equation (2
...

For explicit upwind differences away from the left boundary, the new solun
tion u in+1 depends solely on the previous data u in and u i−1 (the so-called stencil of the scheme)
...
Thus the domain of dependence of u in+1 is the
2
interval (xi− 3 , xi+1/2 )
...
It
follows that the numerical domain of dependence contains the physical domain
of dependence if and only if the timestep satisfies the Courant–Friedrichs–Levy
condition (also known as the CFL condition)
c t n+1/2 ≤ min{ xi }
...
17)

i

These ideas are illustrated in Figure 2
...

The explicit upwind difference scheme (2
...
17)
suggest that we define the dimensionless Courant–Friedrichs–Levy number, usually
abbreviated to CFL number, namely
n+1/2

γi



c t n+1/2

...
18)
n+1/2

If the timestep is chosen so that the CFL number satisfies γi
≤ 1 for all i, then
the explicit upwind scheme can be rewritten as the weighted average
n+1/2

u in+1 = u in 1 − γi

n+1/2

n
+ u i−1 γi

, 0 < i < I
...
This implies that the upwind difference
scheme is stable when the CFL condition (2
...

Finally, let us note that the explicit upwind scheme depends on the assumption
that the velocity c is positive
...


Furthermore, if c < 0 then we have to change the boundary condition (2
...
15)
...
2
...
Nevertheless, in order to assist
the student with code organization, visualization and debugging, we have provided
five example programs
...
When we begin to experiment with different integration
schemes and differential equations, we will use the the last of these programs
...

(ii) Type “mkdir scalar-law” to make a directory to contain the program code in
this chapter
...

(iv) Download Program 2
...

(v) Type “tar -xvf tarfile” to unbundle the codes in your new scalar-law
directory
...

The unbundled code will remain
...
2
...
1 First Upwind Difference Program
The first program is designed to be as simple as possible
...
2-2: main
...
This program is specifically
designed to solve the linear advection problem with a positive advection velocity
...
The time evolution of the solution
is terminated by exceeding either a specified number of timesteps or a specified
simulation time
...
2 Linear Finite Difference Methods

17

program
...
2-3: README
...

Type “cd scalar-law/PROGRAM0” to enter the directory for the first program
...
f” build the program executable
...
out > output” to run the program and direct the output to the file names
“output
...


This information is contained in the README file
...
2
...
2 Second Upwind Difference Program
The second program is designed to be more modular than the first program
...
2-4: linaddmain
...


r Program 2
...
f Fortran routines for initializing the solution and mesh, and

handling boundary conditions;

r Program 2
...
f Fortran routines for computing characteristic speeds and solving

Riemann problems;

r Program 2
...
f Fortran routine to compute a numerical approximation to the

time integral of the flux at a cell side;

r Program 2
...
f Fortran routine to apply conservative differences;
r Program 2
...
i Fortran common block for parameters used in the linear advec-

tion model and Riemann problem;

r Program 2
...
i Fortran common block for machine dependent parameters, and

parameter statements for some common constants;

r Program 2
...


It is strongly suggested that the student maintain this basic style of organization for
the code
...
It will
also make it easier for us to apply the methods to a variety of differential equations,
or to different initial values or boundary conditions
...

File riemprob
...

Subroutine initsl initializes the conserved quantity and mesh for a scalar law,
such as linear advection
...
Subroutine

18

Scalar Hyperbolic Conservation Laws

bccells sets values for the conserved quantity outside the physical domain, using
the user-specified physical boundary condition
...
In order to simplify the treatment of boundary conditions,
we may begin array addresses with negative indices, determined by the value of
the integer arguments (fc,lc etc
...
This simplifies the treatment of
boundary conditions because index 0 in the Fortran array corresponds to the first
cell inside the domain; this corresponds to the way in which we have written the
difference scheme in this text
...
f contains two routines, fluxderv and riemann
...
The subroutine fluxderv computes the
characteristic speeds, and riemann solves a Riemann problem
...

File upwind
...
File consdiff
...

Note that these Fortran files have been designed to organize the various problemdependent parts of the code
...
f should be the same for all scalar
conservation laws in one dimension
...
f could be replaced to change
the scheme without changing the differential equation
...
f would
have to be changed if we change the initial or boundary conditions, or change the
differential equation
...

Type “cd scalar-law/PROGRAM1” to enter the directory for this program
...

Type “flinearad > output”; flinearad runs the program and > output
redirects the results to the file output
...


The final step will show a graph of the numerical solution plotted as a function of
space, at the final time in the simulation
...
One is that whenever we want to change the input parameters, such as the number of grid cells or
timesteps, we have to recompile the main program
...
We will fix these problems with the next program
...
2
...
3 Third Upwind Difference Program
Our third program is more sophisticated, employing a mixture of C++ and Fortran
...
2 Linear Finite Difference Methods

19

riemprob
...
f, upwind
...
f, linearad
...
i
...
2-12: LinearAdvectionMain
...
2-13: GNUmakefile Makefile to compile and load the mixed-language program;
r Program 2
...


The C++ file, LinearAdvectionMain
...
Since
C++ is strongly typed, this file contains function prototypes for the Fortran routines;
these can be found in the extern “C” block
...

Inside the main program itself, we provide values for the machine-dependent
constants in the Fortran common block machine, and default values for the
problem-dependent constants in the linearad common block
...

After this preliminary work, the main program is prepared for computation
...
Next, the main program initializes the array entries to
IEEE infinity; if the program uses an entry before it is given a proper value, then the
resulting values will be obviously wrong
...

Now that the problem parameters are known and the data arrays have been
allocated, the main program calls initsl to set the initial values, and bcmesh
to set boundary values for the mesh
...
At the end of the computation, the main program writes out the final
results
...

Type “cd scalar-law/PROGRAM2” to enter the directory for this program
...

Type “linearad input > output” to run the program and redirect the results
to the file output
...


There are still difficulties with this program
...


20

Scalar Hyperbolic Conservation Laws

Further, we are not fully able to perform other important aspects of defensive
programming that we will introduce in the next program
...
2
...
4 Fourth Upwind Difference Program
Our fourth program is even more sophisticated, employing a mixture of C++ and
Fortran, together with some references to external libraries
...
f,
linearad
...
f, consdiff
...
i and const
...

However, the main program, input file and make file are different:
r Program 2
...
C C++ main program;
r Program 2
...
2-17: input the input file for executing the program
...
C is that we construct a MemoryDebugger to watch for out-of-bounds writes and unfreed pointers
...
Each InputParameter knows the location of the variable to be assigned,
a character string identifier and lower/upper bounds on permissible values
...

The biggest change to the main program is our use of interactive graphics to plot
the solution
...
Then we construct an XYGraphTool that will plot our results
...
Next, we set the colors
for the background and foreground, and draw the axes
...
During the loop over timesteps,
we also plot the new results
...
At
the beginning of makefile, we include macros
...
Next, we set some
internal macros for compiling and linking
...

The trickiest part of the makefile is how we provide different targets to construct
code for debugging or optimized performance
...

The choice d will generate code for debugging with no optimization, while the
choice o will generate optimized code
...
2 Linear Finite Difference Methods

21

work with debug code
...

To run a copy of this code, perform the following steps:
(i)
(ii)
(iii)
(iv)

Type “cd” to return to your home directory
...

Type “make” to compile the program files and make the executable 1d/linearad
...


When the program is run, the user will see a movie of the simulation, showing the
conserved quantity plotted as a function of space at each time in the movie
...
Optimized code is compiled and loaded in directory 1o
...
5 contains some
example results with this program, at the final time in each simulation
...
2-18: eps4paper This command first copies the contents of
a window to a
...
pdf form
...
2
...
5 Fifth Upwind Difference Program
Our fifth and final version of our upwind finite difference program is designed
to be run from within this book
...
This program consists of several pieces that we have already seen, namely
riemprob
...
f, consdiff
...
i and const
...

However, the main program, input file and make file are different:
r Program 2
...
C

C++ main program and C++ auxiliary

procedures;

r Program 2
...
2-21: input the input file for executing the program
...
The event loop calls
various routines in response to user interaction with the graphical user interface
...
C;
this routine contains most of the statements that appeared in the main program of
the previous example
...
However, because of the separate threads used for the events,
such a program is more difficult to debug than the previous examples
...
1

(b) CFL = 0
...
0

(d) CFL = 1
...
2
...

(ii) Type “cd scalar-law” to enter the directory for this program
...

(iv) Type “1d/guilinearad input” to run the program
...

Optimized code is compiled and loaded in directory 1o
...
2-1: guilinearad The latter
will use a graphical user interface for parameter input
...
Click on any of the arrows to see current values
of either the “Riemann Problem Parameters”, “Linear Advection

2
...
After selecting your values, click on “Start Run Now” in the
original graphical user interface
...


2
...
4 Explicit Downwind Differences
Now that we have examined one useful scheme for integrating the linear advection
equation, let us consider the development of alternative numerical schemes
...
16a) can be viewed as a finite difference
approximation to the linear advection equation (2
...
In fact, we can rewrite
explicit upwind differences as
n
cu in − cu i−1
u in+1 − u in
+
= 0,
t n+1/2
xi

0 < i < I
...

When we view the numerical method solely in terms of order of approximation
of difference quotients to derivatives, we do not have any reason to prefer one
first-order difference to another
...
We can rewrite this explicit downwind difference scheme in
the form
n
u in+1 = u in − [u i+1 − u in ]

c t n+1/2
,
xi

0 ≤ i < I
...

If we look carefully at this scheme, we can see that it ignores the boundary data
at the left, and does not know how to compute the new solution in the last grid cell
on the right
...
Actually, these are indicators of a much more serious flaw
...
Thus, the domain of dependence of
n+1
u i is the interval (xi−1/2 , xi+ 3 )
...
Thus for downwind differences, the numerical domain
of dependence never contains the physical domain of dependence, no matter what
the size of the timestep t n+1/2 may be
...

n+1/2
If the CFL number γi
is given by (2
...

xi

Because the new solution involves amplification of u in , the upwind scheme allows
for instability to develop
...
3 and 2
...

Figure 2
...
These results can
be obtained by running Executable 2
...
Since this scheme is unstable, the program should be run with a very small
number of timesteps
...
2
...
10)
...
If instead we evaluate the spatial downwind difference at the new
time, we obtain the implicit downwind difference scheme
cu n+1 − cu in+1
u in+1 − u in
+ i+1
= 0,
t n+1/2
xi

0 ≤ i < I − 1
...

Note that we can rewrite the scheme in the form
n+1/2

(1 − γi

n+1/2 n+1
u i+1

)u in+1 + γi

= u in ,

0 ≤ i < I − 1
...
Backsolution of this linear system shows that u in+1 depends on cell averages u n at the
j
previous time for all j ≥ i
...
This interval does not contain the physical domain
of dependence (xi−1/2 − c t n+1/2 , xi+1/2 − c t n+1/2 ) for any t n+1/2 > 0
...


25

2
...
2
...
9

The implicit downwind scheme does not use the boundary data at the left, and
has trouble defining the solution at the right-hand (outflow) boundary
...
However, it is possible
to show (see Section 2
...
4 below) that this scheme is stable for sufficiently large
n+1/2
timesteps, namely those for which the CFL numbers satisfy γi
≥ 1
...


2
...
6 Implicit Upwind Differences
Our next example of a fully first-order discretization of the linear advection equation
involves evaluating the upwind spatial difference at the new time
...

t n+1/2
xi
n+1/2
n+1/2 t
u in+1 = u in − [cu in+1 − f i−1/2 ]
, i = 0
...
19a)
(2
...

Note that we can rewrite the scheme in the form
n+1/2

(1 + γi

n+1/2 n+1
u i−1

)u in+1 − γi

= u in ,

0 < i < I
...
As a result,
u in+1 depends on u n for j ≤ i
...
This interval
contains the physical domain of dependence for all t n+1/2 > 0
...
5
...

n+1/2
In comparison, remember that the explicit upwind scheme is stable for γi

1
...
However, we will see in Sections 2
...
5
...

Figure 2
...
These results can
be obtained by running Executable 2
...
Note that the spreading of the numerical discontinuity increases as the
Courant number increases
...
This is important to remember, because the
temptation is to take larger timesteps with the implicit upwind method in order to
decrease the cost of the scheme
...
2
...
In order to determine this second-order spatial
approximation, we will use the cell averages u in to form a quadratic approximation to the integral of u, and differentiate that quadratic at a cell side
...
2 Linear Finite Difference Methods

CFL = 0
...
0

CFL = 5
...
2
...
This gives us the quadratic interpolation
x
xi−1/2

u(x) d x ≈ u in (x − xi−1/2 ) + u[xi , xi+1 ](x − xi−1/2 )(x − xi+1/2 )
...

xi + xi+1
xi + xi+1
In the explicit centered difference scheme for linear advection, we evaluate
the fluxes for a conservative difference by using our approximation to u at the cell
side:
n
u n xi+1 + u i+1 xi
n+1/2
f i+1/2 = c i

...


This can be rewritten in the form of a weighted average
c t n+1/2
xi−1 − xi+1
c t n+1/2
+ u in 1 +
xi + xi+1
xi + xi+1
xi
n+1/2
c t
n

...
20)
n+1/2

On a uniform grid, the fluxes simplify to the more common formula f i+1/2 =
n
c(u in + u i+1 )/2, and the new solution can be evaluated by
u in+1 = u in −

c t n+1/2 n
n
[u i+1 − u i−1 ]
...

We do not gain useful information by examining the domain of dependence of
n
the explicit centered difference scheme
...
Thus the numerical domain of dependence is (xi− 3 , xi+ 3 )
...
This seems to indicate
that the explicit centered difference scheme could be conditionally convergent
...
2 Linear Finite Difference Methods

29

We can get some indication that this scheme is unstable by examining the
n
weighted average form of the scheme (2
...
Note that the coefficient of u i+1
is always negative; this will lead to instability
...
3
...
5
...

Explicit centered differences are easy to program, except for the treatment of
the downstream boundary
...


Exercises for 2
...
2
...
1 and u(x, 0) = 1 for x > 0
...
Determine
the analytical solution to this problem, and write a program to plot this analytical solution as a
function of x for any t > 0
...
2
...
1, 0
...
0 and 1
...
01
...
55
...

Describe the qualitative differences in the numerical results
...
2
...
In order to treat
boundary data, take u = 2 on the left, and u = 1 on the right
...
Describe the qualitative
differences in the numerical results
...
2
...
Plot the numerical
results together with the analytical solution, labeling each CFL number case carefully
...
How does the CFL number affect the sharpness
of the results?
2
...
5 There are several very interesting test problems for numerical schemes applied to linear advection,
suggested by Zalesak [180]:
square pulse for 0
...
2 u(x, 0) = 2, otherwise u(x, 0) = 1;
triangular pulse for 0
...
2 u(x, 0) = 2 − 20|x − 0
...
1 ≤ x ≤ 0
...
15)2 ) − exp(−25),
otherwise u(x, 0) = 1;
quadratic pulse for 0
...
2 u(x, 0) = 1 + 1 − 400(x − 0
...

Each problem should be solved with 100 cells on a uniform grid, so that the initial disturbance
is described in a fixed number of grid cells
...
0, 0
...
5 and 0
...
Plot the analytical solution with a continuous curve,
and the numerical solution with discrete markers
...

2
...
6 Repeat the previous exercise using the implicit upwind scheme
...
3 Modified Equation Analysis
The examples in section 2
...
In this section, we
will discover that the numerical solution of linear advection by finite differences
actually solves a partial differential equation that is slightly different from the
original problem
...

Please note that we will continue to assume that the advection velocity satisfies
c > 0
...
3
...
3
...

x i

Further suppose that
˜
u in = u(i x, n t) + o( t 2 ) + o( x 2 ) + o( t x),
˜
˜
where u is twice continuously differentiable in x and t, and u satisfies a modified
equation of the form
˜
˜
∂ u ∂cu
+
= e = O( t) + O( x)
...

∂x2

˜
Proof Since u is twice continuously differentiable,
˜
u in+1 = u(x, t + t) + o( t 2 ) + o( x 2 ) + o( t x)
˜
˜
1 ∂ 2u 2
∂u
t+
t + o( t 2 ) + o( x 2 ) + o( t x),
∂t
2 ∂t 2
˜
= u(x − x, t) + o( t 2 ) + o( x 2 ) + o( t x)
˜
= u(x, t) +

n
u i−1

˜
= u(x, t) −

˜
˜
∂ 2u x 2
∂u
+ o( t 2 ) + o( x 2 ) + o( t x)
...
21)

31

2
...
Since u satisfies
the modified equation (2
...

∂x2
∂t
∂x

When we substitute the Taylor series approximations into the explicit upwind difference scheme, we get the equation
n
u n − u i−1
˜
˜
˜
˜
u in+1 − u in
∂ u ∂cu
t ∂ 2u c x ∂ 2u

+ o( t) + o( x)
+c i
=
+
+
2
t
x
∂t
∂x
2 ∂t
2 ∂x2
˜
˜
˜
c t ∂ 2u
∂e
t ∂e
∂ u ∂cu c x
+

1−
−c
+ o( t) + o( x)
+
=
∂t
∂x
2
x ∂x2
2 ∂t
∂x
˜
˜
˜
c t ∂ 2u
∂ u ∂cu c x
+ o( t) + o( x)
...

∂x2

If c > 0 and c t ≤ x the modified equation shows that the upwind scheme
is actually solving an advection–diffusion equation with a small diffusion
...
It is interesting to note that the upwind scheme involves no diffusion
if we choose γ = c t/ x = 1
...
In
fact, the explicit upwind scheme itself shows that when c t/ x = 1, then u in+1 =
n
0
u i−1
...


2
...
2 Modified Equation Analysis for Explicit Downwind Differences
Lemma 2
...
2 Suppose that the discrete values u in satisfy the explicit downwind
difference
u in+1 = u in −

c t n
[u − u in ],
x i+1

Further suppose that
˜
u in = u(i x, n t) + o( t 2 ) + o( x 2 ) + o( t x),

32

Scalar Hyperbolic Conservation Laws

˜
˜
where u is twice continuously differentiable in x and t, and u satisfies a modified
equation of the form (2
...
Then the modification e satisfies
e=−

c x
2

1+

c t
x

˜
∂ 2u
+ o( t) + o( x)
...
21), we obtain
u n − u in
˜
˜
˜
˜
u in+1 − u in
∂ u ∂cu
t ∂ 2u c x ∂ 2u
+ c i+1
=
+
+
+
+ o( t) + o( x)
2
t
x
∂t
∂x
2 ∂t
2 ∂x2
˜
˜
˜
c t ∂ 2u
∂ u ∂cu c x
+ o( t) + o( x)
...

2
∂x
2
∂x

Since c > 0, the downwind scheme is anti-diffusive for all CFL numbers γ ≡
c t/ x > 0
...
In fact, the analytical solution
for the advection-diffusion equation in Section 2
...
3 does not apply to this modified
equation, because the diffusion coefficient is negative
...
We will perform a Fourier analysis of this scheme in Section 2
...
4
...
3
...
However, in order to study the explicit centered difference scheme we will need to make the additional assumption that the modified
equation error has an asymptotic expansion
...
3
...

2 x i+1

Further suppose that
˜
u in = u(i x, n t) + o( t 2 ) + o( x 3 ) + o( t x 2 ),

2
...
21)
...

2 ∂x2
Proof If we substitute Taylor series expansions into the linear advection equation,
we obtain
e=−

n
u n − u i−1
u in+1 − u in
+ c i+1
t
2 x
˜
˜
˜
˜
t ∂ 2u 1
∂ 3u
∂ u ∂cu
+
+
+ c x 2 3 + o( t) + o( x 2 ) + o( t x)
=
∂t
∂x
2 ∂t 2
3
∂x
2
˜
˜
˜
˜
∂e
1 2 ∂ 3u
t
∂ u ∂e
∂ u ∂cu
+
+
c2 2 +
−c
+
x
+ o( t) + o( x 2 ) + o( t x)
...


This defines e implicitly
...

2 ∂x2

Note that the dominant term in the modified equation error e is anti-diffusive for
all t, no matter what the sign of the velocity c
...

2
...
4 Modified Equation Analysis Literature
There are several interesting papers on modified equation analysis
...
Majda
and Ralston [115] used modified equation analysis for first-order schemes and
weak shocks in nonlinear systems to provide necessary and sufficient conditions to
guarantee physical (or non-physical) discrete shock profiles
...
However, in this case the schemes involved are
not diffusive when linearized around the sonic points
...


34

Scalar Hyperbolic Conservation Laws

Exercises for 2
...
3
...
Compare its numerical
diffusion to that of the explicit upwind scheme
...
3
...
Under what circumstances
is it diffusive?
2
...
3 Suppose that we want to perform an explicit upwind difference on a non-uniform grid
...

(a) Perform a modified equation analysis of the scheme
c t n
n
[u − u i−1 ]
...
Note that
n
u in − u i−1 ≈

∂u xi + xi−1

...

(c) To construct a first-order scheme on a non-uniform grid, we can define the numerical fluxes
to be given by a Newton interpolation to the flux at the cell centers:
n
f (u in ) − f (u i−1 )
xi
...
Perform a modified equation analysis of the conservative difference scheme
u in+1 = u in −

t n
n
[f
− f i−1/2 ]
xi i+1/2

to show that it is first-order in both space and time
...


2
...
3
...
Under what circumstances is this scheme diffusive?
n
u i+1/2 = u in +

2
...
With some minor modification of that analysis and some
additional assumptions, we can prove the convergence to solutions of partial differential equations
...
We
assume that the numerical method can be written
u n+1 = Q n u n
where Q n is some operator on the solution vector
...
It will
typically be convenient to use the shift operators
n
(S+ u)in = u i+1

n
(S− u)in = u i−1 ,

and

to define Q n in specific schemes
...
4
...
In this case, we have
n+ 1
2

n+ 1
2

Q n = I 1 − γi

+ S− γi


...
4
...


36

Scalar Hyperbolic Conservation Laws

In this case, we have
n+ 1 −1
2

n+ 1
2

Q n = I (1 + γi

) − S− γi


...
For example, we could
use the ∞ norm
u n ≡ sup |u in |
i

or the

1

norm
un ≡

|u in | xi
...

un
n+ 1

1

Example 2
...
3 If the CFL number satisfies 0 < γi 2 = c t n+ 2 / xi ≤ 1, then in
the max norm the solution operator Q n for the explicit upwind scheme satisfies
n+ 1
2

Q n u n = max u in (1 − γi
i

n+ 1
2

n
) + u i−1 γi

n+ 1
2

≤ max |u in |(1 − γi
≤ max{|u n |} max
i

i

n+ 1
2

n
) + |u i−1 |γi
n+ 1
2

n+ 1
2

1 − γi

+ γi

= max |u in | ≡ u n
...

Example 2
...
4 Recall that in the implicit upwind scheme we have
n+ 1
2

Q n = I 1 + γi

n+ 1
2

− S− γi

n
u i−1

−1


...


37

2
...


Q n ≤ 1 for all norms and all positive CFL

The following important theorem proves that linear explicit two-step schemes
are convergent under reasonable assumptions, and provides an estimate for the error
in the numerical solution
...
4
...

n

i

Proof For all timesteps satisfying the assumptions,
u(·, t n ) − u n ≤ u(·, t n ) − Q n−1 u(·, t n−1 ) + Q n−1 u(·, t n ) − Q n−1 u n−1


n−1

+ Q n−1

u(·, t n−1 ) − u n−1
...

n

i

Example 2
...
6 The same Taylor series expansions that were used in the modified
equation analysis of the explicit upwind scheme can be used to show that the local
truncation error for the explicit upwind scheme is
n
i

n+ 1
2

≡ u(xi , t n+1 ) − u(xi , t n ) − γi

[u(xi , t n ) − u(xi−1 , t n )]

1

1

= t n+ 2



∂ 2 u t n+ 2
∂ 2 u c xi
+ 2
∂t 2 2
∂x 2


...
4
...
If the second partial derivatives of u are uniformly bounded
for all states within the range of the problem of interest, then Theorem 2
...
5 proves
that the explicit upwind scheme is first-order accurate in both space and time
...
4
2
...
1 Prove that the implicit upwind scheme for linear advection is first-order accurate in both space
and time
...
5 Fourier Analysis of Finite Difference Schemes
In Section 2
...
We found
that the modified equation analysis was useful in understanding the order of the

2
...

The modified equation analysis is reasonably general, in that it can be applied to
linear schemes for nonlinear differential equations on bounded domains
...
We will use Fourier transforms to study the dissipation and dispersion
introduced by linear schemes in solving linear problems on unbounded domains
...
However,
Fourier analysis can only be used to study linear schemes applied to linear problems
...


2
...
1 Constant Coefficient Equations and Waves
Let us consider the linear partial differential equation
∂u
∂u
∂ 2u
∂ 3u
+c
= r u + d 2 + f 3 for all x ∈ R for all t > 0
∂t
∂x
∂x
∂x
u(x, 0) = u 0 (x)
...
22a)
(2
...


−∞

ˆ
It is well-known [139] that if both u and u are integrable in x and ξ , respectively,
then the appropriate inversion formula for the Fourier transform is
u(x, t n ) =

1




ˆ
u(ξ, t n )eıξ x dξ

−∞

almost everywhere
...
22a), we obtain
an ordinary differential equation that is parameterized by the Fourier variable ξ :
ˆ
∂u
=
∂t

r − dξ 2 − i cξ + f ξ 3

ˆ
u(ξ, t)
...


ˆ
If the initial data has Fourier transform u(ξ, 0) = αδ(ξ − β), then the Fourier inverα
sion formula (2
...
Thus the initial data consists of a
single wave number β; a wave number is equal to 2π over the wavelength
...
23)

40

Scalar Hyperbolic Conservation Laws

also easy to use the inverse Fourier transform to find that the solution of (2
...


It is common to define the frequency
ω = −(βc + β 3 f ) + i(−r + β 2 d)
...
Note that the frequency ω has units of one over time
...
22a) with only one nonzero coefficient and initial data consisting of a
single wave number
...
22) is u(x, t) = αeiβ(x−ct)
...

reaction: If c = 0, d = 0 and f = 0 then the frequency of the wave is ω = −ir ,
and the solution of (2
...
All wave numbers β remain
stationary, and the amplitude of the wave either grows (r > 0) or decays
(r < 0) in time
...
22) is u(x, t) = αe−β dt eiβx
...
If d > 0 all nonzero wave numbers decay, and large wave
numbers decay faster than small wave numbers
...

dispersion: If c = 0, r = 0 and d = 0 then the frequency of the wave is ω = −β 3 f
2
and the solution of (2
...
This says that different
wave numbers travel with different speeds, and high wave numbers travel
faster than slow wave numbers
...
5
...
22a)
...
Given some useful length
L (such as the problem length or the grid cell width), we can define a dimensionless time coordinate τ = ct/L and a dimensionless spatial coordinate
˜
η = (x − ct)/L
...


2
...

∂τ
cL ∂η2
Here the ratio cL/d of convection to diffusion is called the Peclet number
...

∂τ
cL 2 ∂η3
The dimensionless ratio cL 2 / f of convection to dispersion does not have a
commonly used label
...

∂τ
c
reaction–diffusion: If c = 0 and f = 0 we can define τ = r t, ξ = x/L and
˜
eτ u(ξ, τ ) = u(x, t) to obtain the diffusion equation
˜
˜
d ∂ 2u
∂u

...

∂τ
r L 3 ∂ξ 3
2
...
3 Linear Finite Differences and Advection
Although Fourier analysis is applicable to general linear partial differential equations, in this section we are interested only in linear advection
...
Thus
ˆ
ˆ
u(ξ, t + t) = e−iξ c t u(ξ, t),
so the exact solution merely involves multiplying the Fourier transform by a fixed
ratio
...

Then the solution ratio is e−iξ c t = e−iθγ
...
24)

k

on an equally spaced space-time mesh t n = n t, x j = j x
...

j
We will define the finite Fourier transform of this discrete data to be
J

u n e−ı j
j

ˆ
u n (ξ ) =



x
...
Note that the corresponding inversion formula
for the finite Fourier transform is
un =
j

1


π/ x

ˆ
u n (ξ )eı j




...
25)

−π/ x

Also note that if we define the shift operators S+ and S− by
(S+ u)n = u n and (S− u)n = u n ,
j
j+1
j
j−1
then it is easy to see that
n

(S+ u) = eıξ

n

ˆ
u and (S− u) = e−ıξ

x n

ˆ
u
...
24), we obtain
ak eikξ

x

ˆ
u n+1 (ξ ) =

k

bk eikξ

x

ˆ
u n (ξ )
...


2
...

ikθ
k ak e
k

(2
...
24) is dissipative if and only if |z| < 1 for all θ = 0
and dispersive if and only if arg(z)/θ depends on θ
...

In order to assess the cumulative effect of numerical dissipation and dispersion
over several timesteps, we will compare the numerical solution to the analytical
solution at the time required for the wave to cross a grid cell
...
The analytical solution at this time is
ˆ
ˆ
u(ξ, (n + 1/γ ) t) = u(ξ, n t)e−iξ c

t/γ

ˆ
= u(ξ, n t)e−iθ ,

and the numerical solution is
ˆ
ˆ
u n+1/γ (ξ ) = u n (ξ )z(θ)1/γ
...
The total numerical dissipation error in the time required for the wave
to cross a grid cell is
|e−iθ | − |z(θ )|1/γ = 1 − |z(θ)|1/γ
...

The phase error measures the relative error in how fast information associated with a
specific mesh wave number moves in a single timestep, while the dissipation error
measures how much the amplitude of that information changes in one timestep
...
Negative dissipation errors mean
that the amplitude is larger than it should be, and indicates instability
...

ak eikθ
k
k

The order of the scheme is the power p such that
z(θ) − e−iγ θ = O(θ p+1 )
...
27)

44

Scalar Hyperbolic Conservation Laws

order we mean that its local truncation tends to zero as the mesh size approaches
zero
...

An ideal scheme would have nearly no dispersion or dissipation over all wave
numbers
...

2
...
4 Fourier Analysis of Individual Schemes
Let us consider explicit upwind differences for linear advection:
u n+1 = u n −
j
j

c t n
[u − u n ] = (1 − γ )u n + γ u n
...

Thus the solution ratio is
z(θ) = 1 − γ + γ e−iθ = [1 − γ (1 − cos θ)] − iγ sin θ
...
8 is a circle in the complex plane with center
1 − γ and radius γ
...

Alternatively, we can compute the modulus of the solution ratio
|z(θ)|2 = [1 − γ (1 − cos θ )]2 + [γ sin θ]2 = 1 − 4γ (1 − γ ) sin2 (θ/2)
...
e
...
The smallest solution ratio is associated with θ = π
...
For a fixed mesh wave number θ, the solution ratio goes to one as γ → 1
...


(2
...
5 Fourier Analysis of Finite Difference Schemes

45

Fig
...
8 Explicit upwind solution ratio

In order to determine the order of the explicit upwind scheme, we note that
z(θ ) − e−iγ θ = 1 − γ + γ cos θ − iγ sin θ − cos γ θ + i sin γ θ
1
= 1 − γ + γ 1 − θ 2 + O(θ 4 ) − iγ [θ − O(θ 3 )]
2
1
− 1 − γ 2 θ 2 + O(γ 4 θ 4 ) + i[γ θ − O(γ 3 θ 3 )]
2
1
= − γ (1 − γ )θ 2 + O(θ 3 )
2
This shows that the explicit upwind scheme has order 1 for γ < 1
...
Note that
(2
...

1 − 2γ sin2 (θ/2)

For large wave numbers θ → ±π we have that tan z(θ) → 0
...
For small θ,
arg z(θ ) = tan−1

−γ sin θ
1
≈ −γ θ 1 − (1 − 2γ )(1 − γ )θ 2 + o(θ 3 )
...
For 1 > γ > 0 we
2
have arg z(θ ) > −γ θ ; this says that low wave numbers are dispersed ahead for CFL
less than one half
...
For γ = 1 we have z(θ ) = e−iθ
...
For γ = 1 , we have
2

46

Scalar Hyperbolic Conservation Laws

θ

θ

(a) Dissipation error

(b) Phase error

Fig
...
9 Fourier analysis for explicit upwind differences
...
9 (red), 0
...
6 (green), 0
...
4 (cyan), 0
...
01
(black)

z(θ) = 1 (1 + e−iθ )
...
These two choices of γ are very useful
in computation
...
For most problems, CFL numbers close to one give the best results
...
9 shows the dissipation error 1 − |z(θ)|1/γ and phase error 1 +
arg(z(θ )1/γ )/θ for the explicit upwind scheme
...
5-22: fourierMain
...
5-23: fourier
...
Students can produce error curves for individual values of the CFL
number by choosing scheme equal to 0 while running Executable 2
...

Next, recall explicit downwind differences for linear advection:
u n+1 = u n −
j
j

c t n
[u
− u n ] = (1 + γ )u n − γ u n
...


(2
...
5 Fourier Analysis of Finite Difference Schemes

(a) Dissipation error

47

(b) Phase error

Fig
...
10 Fourier analysis for explicit downwind differences
...
99, 0
...
6, 0
...
4, 0
...
1; these appear in order from top to
bottom on the right in the dissipation errors, and from top to bottom in the middle
of the phase errors
...


Note that z(θ) is the equation for a circle with center 1 + γ and radius γ
...
As a result, the explicit downwind scheme
is anti-dissipative
...
Numerical oscillations will
grow until they become too large to represent on the machine
...
Here, it is useful to
recall that the order of a scheme, as defined in Equation (2
...
Figure 2
...
Note that the dissipation error is negative at all
mesh wave numbers for all values of CFL; this indicates unconditional instability
...
5-2 with the scheme set
to explicit downwind
...

j−1
j−1
j
2 x
2
2 j+1

In this case the solution ratio is
1
1
z(θ) = γ e−iθ + 1 − γ eiθ = 1 − iγ sin θ
...
2
...
CFL values for the
curves are 0
...
85, 0
...
5, 0
...
3 and 0
...
Negative dissipation errors indicate instability
...

Thus this scheme is anti-dissipative for all CFL numbers γ
...

The Fourier analysis of the explicit centered difference scheme is shown in
Figure 2
...
Students can produce error curves for individual values of the CFL
number by choosing scheme equal to explicit centered while running
Executable 2
...

Let us consider implicit upwind differences for linear advection:
u n+1 = u n −
j
j

λ t n+1
[u
− u n+1 ]
...

j
j
j−1
Thus the solution ratio is
z(θ) =

1

...
Thus
this circle lies outside the unit circle for all γ , so z(θ) lies inside the unit circle
...
The dissipation increases (z(θ) moves
farther into the interior of the unit circle) as γ increases
...
5 Fourier Analysis of Finite Difference Schemes

(a) Dissipation error

49

(b) Phase error

Fig
...
12 Fourier analysis for implicit upwind differences
...
99, 0
...
6, 0
...
4, 0
...
1; these appear in order from bottom
to top on the right in the dissipation errors, and from top to bottom in the middle
of the phase errors
...
The Fourier analysis of this scheme is shown in
Figure 2
...
5-2
...

j
x

This can be rewritten
γ u n+1 + (1 − γ )u n+1 = u n
...

1 − γ + γ eiθ

Note that 1/z(θ) is the equation for a circle with center 1 − γ and radius γ
...
It follows that the scheme is dissipative whenever
γ > 1
...

j−1
j
j+1
2
2

u n+1 = u n −
j
j

c t n
1
[u j+1 − u n ] +
j−1
2 x
2

50

Scalar Hyperbolic Conservation Laws

θ

θ

(a) Dissipation error

(b) Phase error

Fig
...
13 Fourier analysis for the Lax–Wendroff scheme
...
99, and increases at large wave number as
CFL decreases (0
...
6, 0
...
4), then decreases slightly at high wave number
for smaller CFL (0
...
1); phase error is essentially zero for CFL = 0
...
85 and 0
...
5, and becomes positive for smaller CFL

Thus the solution ratio is
1
1
z(θ) = γ (1 + γ )e−iθ + 1 − γ 2 − γ ((1 − γ )eiθ
...
The dissipation and phase errors for this
scheme are shown in Figure 2
...
Note that for CFL near one, both the dissipation
and phase errors are uniformly small for all mesh wave numbers
...
5-2
...

[u
j−1
x j+1

Thus
vn+1 ≡

ˆ
−2ıγ sin θ
u n+1
=
n
ˆ
1
u

1
0

ˆ
un
n
n−1 ≡ Av
...
5 Fourier Analysis of Finite Difference Schemes

The matrix A in this expression has eigenvalues
λ = ± 1 − γ 2 sin2 θ − ıγ sin θ;
in fact,
AX ≡

−2ıγ sin θ
1

1
0

1 − γ 2 sin2 θ − ıγ sin θ
1

− 1 − γ 2 sin2 θ − ıγ sin θ
1

1 − γ 2 sin2 θ − ıγ sin θ
1

− 1 − γ 2 sin2 θ − ıγ sin θ
1

1 − γ 2 sin2 θ − ıγ sin θ
1

=

− 1 − γ 2 sin2 θ − ıγ sin θ
≡X
...


In other words,
n

ˆ
un =

1 − γ 2 sin2 θ − ıγ sin θ

n

α + − 1 − γ 2 sin2 θ − ıγ sin θ

β

for some coefficients α and β that depend on the initial data for the scheme
...
Note that for either eigenvalue of A,
|λ| = 1
...
In this sense, the leap-frog
scheme involves zero dissipation
...
Students can produce error curves for individual values of the
CFL number by choosing scheme equal to leap frog while running executable
2
...

It is possible to use energy estimates [151] to show that the leap-frog scheme is
stable for γ < 1
...
1 summarizes the results of our Fourier analyses
...
1 Fourier Analysis Results
Dissipation error

Phase error

 negative for γ ∈ ( 1 , 1)
2
explicit upwind
dissipative for γ ∈ (0, 1)
positive for γ ∈ (0, 1 )
2

zero for γ = 1 , 1
2
explicit downwind anti-dissipative for all γ positive for γ ∈ (0, 1)
explicit centered
anti-dissipative for all γ positive for γ ∈ (0, 1)
implicit upwind
dissipative for all γ
positive for γ ∈ (0, 1)
implicit downwind dissipative for γ > 1

 negative for γ ∈ ( 1 , 1)
2
Lax–Wendroff
dissipative for γ ∈ (0, 1)
positive for γ ∈ (0, 1 )
2

zero for γ = 1 , 1
2
leap-frog
dissipative for γ ∈ (0, 1) positive for γ ∈ (0, 1)

Order
1
1
1
1
1
2
2

Exercises for 2
...
5
...
9, 0
...
5, 0
...
1 for each of the
following schemes
(a) explicit upwind
(b) explicit downwind
(c) explicit centered differences
Discuss which features of the plots indicate stability, and which features indicate order of convergence
...
5
...

x

Since this scheme is implicit, it is potentially competitive with explicit schemes only if it can take
larger timesteps than the explicit schemes
...


2
...
5
...

dx

Here u i (x, t) is a polynomial of degree at most p in x for each t, and w(x) is a basis function
for the set of all polynomials of degree at most p
...

(a) If p = 0, then we can take w(x) = 1 and u i (x, t) = u i (t) and integrate in time by forward
Euler
...

(b) If p = 1, then w0 (x) = 1 and w1 (x) = (x − xi )/ xi are orthogonal basis functions for firstdegree polynomials on (xi−1/2 , xi+1/2 )
...
Program the
resulting scheme, and test it for piecewise constant initial data
...
What do
the results tell you about the scheme?
2
...
4 Choose one of either the Lax–Wendroff scheme, the leap-frog scheme, or the Eulerian–
Lagrangian localized adjoint method described above, and perform the following:
(a) Modify the GNUmakefile so that Program 2
...
C
...
5-25: lax-wendroff
...
5-26: leap-frog
...
5-27: ellam
...
Plot the fourier analysis of
your scheme
...
Explain why you chose these values
of CFL, and describe how your numerical results correspond to the results of the fourier
analysis
...
6 L2 Stability for Linear Schemes
Let us recall Parseval’s identity for the finite Fourier transform
1


π/ x
−π/ x

π/ x

ˆ
|u n (ξ )|2 dξ =

|u n |2 x ≡ u n
j
j=−π/ x

2

x
...
30)

54

Scalar Hyperbolic Conservation Laws

The corresponding Parseval identity for the Fourier transform is


1


−∞



ˆ
|u n (ξ )|2 dξ =

−∞

|u(x)|2 d x
...
31)

Then the definition (2
...
30) imply that
J

(u n+1 )2 x =
j
j=−J

1


π/ x
−π/ x

ˆ
|z(ξ x)u n (ξ )|2 dξ

≤ max{|z(θ )|}2
θ |≤π

π/ x

1


−π/ x

ˆ
|u n (ξ )|2 dξ
...

j
j=−J

This shows that the L 2 norm of the solution cannot grow whenever the modulus of
z is bounded above by 1
...
However, it will be useful to examine how the dissipation and
phase errors affect the error in the numerical solution
...
7 Lax Equivalence Theorem

The first term on the right is small if the solution involves very little high-frequency
information
...
The third
term is small if z(ξ x) is close to e−ıc tξ ; for smooth initial data, only low wave
number information is important
...
27) of the order
of the scheme
...
7 Lax Equivalence Theorem
For more information about the material in this section see, for example, Strikwerda
[154]
...
5 we considered the Fourier analysis of linear schemes for linear
advection
...


(2
...
If we take the Fourier transform of equation (2
...
33)

where q(ξ ) is whatever comes out of the Fourier transform of the spatial derivatives
in the partial differential equation
...
32)
...

It is also useful to note that the function wξ,s (x, t) ≡ est eıξ x is an eigenfunction of
the differential operator in (2
...

Example 2
...
1 The symbol for the linear advection operator
s + ıcξ
...

Example 2
...
2 The symbol for the linear diffusion operator
p(ξ, s) = s + dξ 2
...


∂u
∂t

∂u
+ c ∂ x is p(ξ, s) =

∂u
∂t




∂x

∂u
d ∂ x = 0 is

Next, suppose that we have a linear explicit two-step numerical scheme of the
form
P

x, t u

n



ak u n+1 −
j+k
k

bk u n = 0
j+k
k

(2
...
32)
...


k

It is useful to define
w n = wξ,s ( j x, n t) = esn t eıξ j
j

x

,

which are the mesh values of the eigenfunction of the differential operator in (2
...

Since
P

n
x, t w j

=

ak eıkξ

x

es

t



k

bk eıkξ

wn ≡ p
j

x

n
x, t (ξ, s)w j ,

k

we see that the mesh function wn is an eigenfunction of the difference operator
j
P x, t in the numerical scheme (2
...
Here p x, t (ξ, s) is called the symbol of
the numerical scheme
...

ˆ
u n (ξ )

Note that s = ln z(ξ x)/ t is a zero of the symbol p
p

x, t

ξ,

x, t :

1
ln z(ξ x) = 0
...
7
...

For computations that occur below, it will be useful to compute
∂ p x, t
(ξ, s) = tes
∂s

t

ak eıkξ

x


...


1
ln z(ξ x) = t z(ξ x)
t
∂p

ak eıkξ
k

x

= t

bk eıkξ

x


...
7
...
In order

(2
...
7 Lax Equivalence Theorem

for z to be zero, we must have (1 − γ )/γ = ±1, since |e−ıξ
solution is γ = 1 and ξ = ±π/ x
...
The only

Definition 2
...
5 We will say that the scheme P x, t u n = 0 is consistent with the
partial differential equation Pu = 0 if and only if
for all φ ∈ C ∞ for all j ∈ Z for all n ∈ Z+ for all

> 0 there exists x0 > 0

there exists t0 > 0 for all x ∈ (0, x0 ] for all t ∈ (0, t0 ]
|P

x, t φ( j

x, n t) − (Pφ)( j x, n t)| <
...
7
...


We expect that if the scheme is consistent with the partial differential equation,
then the zero s = 1t ln z(ξ x) of the symbol p x, t (ξ, s) of the numerical scheme
should be close to the zero s = q(ξ ) of the symbol p(ξ, s) of the partial differential
equation
...

Lemma 2
...
7 Suppose that the scheme P x, t u n = 0 is consistent with the partial
differential equation Pu = 0
...

t

− z(ξ x) = o( t); in other words,

∂ p x,
∂s

t

ξ,

1
ln z(ξ x) = 0 for all δ > 0 there exists x0 > 0 there exists t0 > 0
t
for all x ∈ (0, x0 ] for all t ∈ (0, t0 ] |eq(ξ )

t

− z(ξ x)| ≤ δ t
...
7
...


− p(ξ, q(ξ ))eı jξ

x q(ξ )n t

e

|

58

Scalar Hyperbolic Conservation Laws

Since s =

1
t

ln z(ξ x) is a zero of the symbol p

e−q(ξ )n t δ > p

x, t (ξ, q(ξ ))
q(ξ )

=

ln z(ξ x)/ t

≥ q(ξ ) −

−p

ξ,

x, t

x, t

of the scheme,

1
ln z(ξ x)
t

∂ p x, t
(ξ, s) ds
∂s

1
ln z(ξ x)
t

∂ p x, t
(ξ, s)
...


(ξ, s)

is nonzero, and choose
...

min
s∈ int(ln z(ξ x)/ t,q(ξ ))
∂s
Further, the continuity of q and z implies that
there exists β > 0 there exists n > 0 there exists x0 > 0 there exists t0
for all x ∈ (0, x0 ] for all t ∈ (0, t0 ] e−q(ξ )n t emax{q(ξ )

t,ln z(ξ x)}

< β
...

Corollary 2
...
8 Suppose that the scheme P x, t u n = 0 is consistent with the partial differential equation Pu = 0 of order α in time and β in space
...

t

59

2
...

t
for all ξ such that

Proof Replace in the previous proof with Cα t α + Cβ x β
...

Definition 2
...
9 We will say that the scheme P x, t u n = 0 is a stable finite difference approximation to the partial differential equation Pu = 0 if and only if
there exists x0 > 0 there exists t0 > 0 for all T > 0 there exists C T > 0
for all t ∈ (0, t0 ] for all n t ∈ [0, T ] for all x ∈ (0, x0 ]
u

n 2
x

≡ x



|u n |2
j

≤ CT x

j=−∞



|u 0 |2 ≡ C T u 0
j

2

x
...
36)

j=−∞

We expect that if the scheme is stable, then the solution ratio is bounded close to
one
...
7
...
Then the scheme is a stable finite difference
approximation to the partial differential equation if and only if z(ξ x) bounded
close to one in the following sense:
there exists K > 0 there exists x0 > 0 there exists t0 > 0 for all t ∈ (0, t0 ]
for all x ∈ (0, x0 ] for all θ |z(θ)| ≤ 1 + K t
...
37)

Proof First, we will prove that the bounded solution ratio condition implies stability
...
30) and the fact that u n+1 (ξ ) = z(ξ x)u n (ξ ), inequality
(2
...


ˆ
u0

2
x

ˆ
≤ e2K T u 0

2
x

2
x

60

Scalar Hyperbolic Conservation Laws

Next, we will show that if inequality (2
...
The negation of (2
...

Since z is continuous,
for all K > 0 for all x0 > 0 for all t0 > 0 there exists 0 < t ≤ t0
there exists 0 < x ≤ x0 there exists θ1 < θ2 for all θ1 < θ < θ2 |z(θ)| > 1 + K t
...

Note that Parseval’s identity (2
...

θ2 − θ1

For any T > 0 and for n t near T we have
un

2
x

=

π/ x
−π/ x

ˆ
|z(ξ x)|2n |u 0 (ξ )|2 dξ =

≥ (1 + K t)2n

θ2 / x
θ1 / x

1
1
≥ e2K T = e2K T u 0
2
2

2

|z(ξ x)|2n

x

θ2 − θ1

x
...
36)
holds, namely
for all x0 > 0 for all t0 > 0 there exists T > 0 for all C T > 0 there exists 0 < t ≤ t0
there exists 0 ≤ n t ≤ T there exists 0 < x ≤ x0 such that u n

2
x

> CT u0

2
x

is satisfied with C T < 1 e2K T
...
In order to do so, we will make use of two new devices
...

ˆ

(2
...
7 Lax Equivalence Theorem

Note that the interpolation operator takes a grid function and returns a function of
space that agrees in value with the grid function at the cell centers; in this way, it
interpolates the values at the cell centers at all points in space
...
25) implies that
v(ξ ), |ξ | ≤ π/ x
ˆ
0, |ξ | > π/ x
...


−π/ x

The truncation operator takes a function of space and returns a grid function that
agrees in value with its argument at the cell centers
...

x

Both the interpolation operator and the truncation operator are linear
...

Lemma 2
...
11 If u n is a grid function, then the interpolation operator (2
...


Proof Parseval’s identities (2
...
31) imply that
I x un

2

=
=


−∞

1


|(I x u n )(x)|2 d x =
π/ x
−π/ x



1


| I x u n (ξ )|2 (ξ ) dξ

−∞
π/ x

ˆ
|u(ξ )|2 (ξ ) dξ =

|u j |2 x = u

2

x
...
7
...
Then
the truncation operator (2
...


62

Scalar Hyperbolic Conservation Laws

Proof Using Parseval’s identities (2
...
31), we compute
π/ x

T xu − v

2
x

= x

|(T x u) j − v j |2 =
j=−π/ x

=

=

π/ x
−π/ x
π/ x
−π/ x

−∞

π/ x
−π/ x

|T x u(ξ ) − v(ξ )|2 dξ
ˆ

ˆ
|u(ξ ) − v(ξ )|2 dξ
ˆ
ˆ
|u(ξ ) − v(ξ )|2 dξ +
ˆ

|ξ |>π/ x

ˆ
|u(ξ )|2 dξ

ˆ
|u(ξ ) − I x v(ξ )|2 dξ = u − I x v

2

Lemma 2
...
13 Suppose that u ∈ L 2 (R)
...


Proof We compute
u − I x (T x u)

2

=
=
=



ˆ
|u(ξ ) − I x (T x u)(ξ )|2 dξ

−∞
π/ x

−π/ x

ˆ
|u(ξ ) − T x u(ξ )|2 dξ +

|ξ |>π/ x

|ξ |>π/ x

ˆ
|u(ξ )|2 dξ

ˆ
|u(ξ )|2 dξ
...

These results lead us to the following important theorem
...
7
...
34), and is consistent with the partial
differential equation Pu = 0, which is defined by (2
...
Further, suppose that the
symbol p x, t (ξ, s) of the scheme is defined by (2
...

t

We also assume that the solution ratio z(ξ x) for the scheme is continuous
...
33),
and has the form p(ξ, s) = s − q(ξ ) where q(ξ ) is continuous
...
7 Lax Equivalence Theorem

assume that the partial differential equation Pu = 0 is stable, in the sense that
for all T > 0 there exists C T > 0 for all 0 ≤ t ≤ T for all ξ, |eq(ξ )t | ≤ C T
...
39)
Finally, we assume that the initial data for the scheme is convergent to the true
initial data, in the sense that the interpolation operator (given by (2
...
40)

Under these conditions, if the scheme is stable (see condition (2
...

(2
...
Using the finite Parseval identity (2
...

2π −∞

|ξ |>π/ x

ˆ
|eq(ξ )n t u 0 (ξ )|2 dξ

Here we have defined
φ x (ξ ) ≡

|eq(ξ )n

t

ˆ
− z(ξ x)n |2 |u 0 (ξ )|2 , |ξ | < π/ x
ˆ
|eq(ξ )n t |2 |u 0 (ξ )|2 , |ξ | ≥ π/ x
...
7
...


64

Scalar Hyperbolic Conservation Laws

This may place our first restrictions on x and t
...
7
...


This places further restrictions on x0 and t, and possibly a restriction on ξ
...


t

| imply

1
ln z(ξ x) = 0 for all n ≥ 0
t
there exists x0 > 0
t

ξ,

there exists t0 > 0
for all x ∈ (0, x0 ] for all t ∈ (0, t0 ]
n−1

|e

q(ξ )n t

− z(ξ x) | = (e
n

q(ξ ) t

− z(ξ x))

eq(ξ )(n−k) t z(ξ x)k
k=0

≤ |e

q(ξ ) t

− z(ξ x)|n[1 + (K + δ) t]n [1 + K t]n

≤ δn te(2K +δ)n t
...

Lebesgue’s dominated convergence theorem implies that
for all δ > 0 for all n > 0 there exists x0 > 0 there exists t0 > 0
for all 0 < x ≤ x0 for all 0 < t ≤ t0
u(·, n t) − I x wn

2

=


−∞

φ x (ξ ) dξ < δ
...
42)

65

2
...


(2
...
7
...
Since both w n and u n are grid functions generated by a stable linear
j
j
scheme
there exists K > 0 for all n > 0 there exists x0 > 0 there exists t0 > 0
for all 0 < t ≤ t0 for all 0 < x ≤ x0
π/ x

1


(1 + K t)




e2K n


t

= e2K n

x

1




2

=
=

wn − u n

t

−π/ x
π/ x

ˆ
|w n (ξ ) − u n (ξ )|2 dξ
ˆ
ˆ
|z(ξ x)|2n |w0 (ξ ) − u 0 (ξ )|2 dξ
ˆ

−π/ x
2n

π/ x

π/ x
−π/ x

ˆ
|w0 (ξ ) − u 0 (ξ )|2 dξ
ˆ

ˆ
|w0 (ξ ) − u 0 (ξ )|2 dξ
ˆ

−π/ x
0
0 2

w −u

x
...
7
...
43), (2
...
40) implies that
there exists K > 0 for all n > 0 there exists x0 > 0 there exists t0 > 0
for all 0 < t ≤ t0 for all 0 < x ≤ x0
u(·, n t) − I x u n ≤ u(·, n t) − I x w n + e K n
≤ u(·, n t) − I x w

n

+e

t

Kn t

T x u0 − u0

x

u0 − I x u

x
...
42) that for any initial data and any > 0 and any n > 0
we can choose x and t so that the first of the two terms on the right hand side
is less than /2
...
40) that the error in the initial
data can be chosen to be small, for any initial data and any > 0 we can further
restrict x so that the second of these two terms is less than /2
...
41) of our theorem, that stability implies convergence
...

Theorem 2
...
15 (Lax Equivalence Part II: Convergence implies stability) Suppose
that the scheme P x, t u n = 0 is defined by (2
...
32)
...
35), is continuously differentiable

66

Scalar Hyperbolic Conservation Laws

in s, and
∂ p x,
∂s

t

ξ,

1
ln z(ξ x) = 0
...
We
assume that the symbol of the partial differential equation P is defined by (2
...
In addition, we
assume that the partial differential equation Pu = 0 is stable, in the sense that
condition (2
...
Finally, we assume that the initial data for the scheme is
convergent to the true initial data, in the sense that the interpolation operator (given
by (2
...
40) holds
...

Proof We will prove this by constructing initial data u 0 (x) so that the numerical
solution wn , satisfying P x, t w n = 0 and w 0 = T x u 0 , does not converge to u(x, t)
...
7
...

Since the solution ratio z is assumed to be continuous, this negation of stability
implies that
for all K > 0 for all x0 > 0 for all t0 > 0 there exists 0 < t ≤ t0
there exists 0 < x ≤ x0 there exists ξ K there exists η K > 0 for all |ξ − ξ K | ≤ η K
1
|z(ξ x)| > 1 + K t
...

2
We now claim that for K > 1, the interval K = [ξ K − η K , ξ K + η K ] can be
chosen to be disjoint from the previous intervals 1 ,
...
Note that this claim
is obviously satisfied for K = 1
...
44)

67

2
...
Suppose that K > 1 is the first so that I K cannot be disjoint from the
previous intervals
...

Since the scheme is consistent, Lemma 2
...
7 implies that
∂ p x, t
1
ξ, ln z(ξ x) = 0
∂s
t
> 0 there exists x∗ > 0 there exists t∗ > 0 such that

for all ξ such that
for all

for all 0 < x ≤ x∗ for all 0 < t ≤ t∗
eq(ξ )

t

− z(ξ x)

...
Since N continuous,

there exists x∗ < x K there exists t∗ < t K
there exists C∗ > 0 for all ξ ∈ ∪ N eq(ξ ) t − z(ξ x)
≤ C∗
...
39)
implies that
for all T > 0 there exists C T ≥ 1 for all t > 0
1/n

for all 0 ≤ n t ≤ T for all M ≥ (C T
|e

q(ξ ) t

| = |e

− 1)/ t for all ξ
|

q(ξ )n t 1/n

1/n

≤ CT

≤ 1 + M t
...

t

Thus
there exists x∗ < x K there exists t∗ < t K there exists C∗ > 0
for all ξ for all 0 < x ≤ x∗ for all 0 < t ≤ t∗
|z(ξ x)| ≤ 1 + max{K , C∗ + M} t
...
Thus the intervals can
be chosen to be disjoint
...
We choose
u 0 (x) =



w K (x)

K =1

where the Fourier transform of w K is given by
w K (ξ ) =
ˆ

, |ξ − ξ K | ≤ η K
0, otherwise
...

We now claim that the scheme does not converge for these initial data
...

2
K
8

Next, note that for all ξ ∈ [ξ K − η K , ξ K + η K ], inequality (2
...
44) imply that
|eq(ξ )n

t

− z(ξ x K )n | ≥ |z(ξ x K )|n − C T ≥ 1 +

1
K tK
2

n

− CT
...
8 Measuring Accuracy and Efficiency

Lemma 2
...
12 and the inequality (1 + x)n ≥ 1 + nx (which holds for all x > 0 and
n ≥ 1) imply that
I x u n − u(·, t n )

2

≥ u n − T x u(·, t n ) 2 x

1
ˆ
=
|z(ξ x)n − eq(ξ )n t |2 |u 0 (ξ )|2 dξ
2π −∞
=

1




1


=

1






N =1 −∞
ξ K +η K
ξ K −η K

1+

|z(ξ x)n − eq(ξ )n t |2 |w N (ξ )|2 dξ
ˆ

|z(ξ x)n − eq(ξ )n t |2 |w K (ξ )|2 dξ
ˆ

1
K tK
2

2

n

− CT

1
=
π

1 + 1 K n t K − C T ]2
2
K

2

(1 + 1 K t K )n − C T ]2
2
K

1

π

1
2η K
K 2ηK

2



1
(T /8)2
...
This proves that instability
implies non-convergence
...
However, it is also important for the student
to remember the limitations of the assumptions in the theorem
...
On the other hand, the theorem is very general, because it
makes no assumption about the type of the differential equation; it applies equally
well to linear advection and diffusion equations
...
8 Measuring Accuracy and Efficiency
Different numerical schemes have different convergence properties, even when they
have the same order of convergence
...
For our
purposes, we will measure efficiency by comparing the computational time required
to achieve a specified numerical accuracy
...


70

Scalar Hyperbolic Conservation Laws

The first difficulty we face in measuring the accuracy of finite difference methods
is that our numerical results have point values on a grid, while the solution of the
differential equation is defined on an interval in space
...
The truncation operator in (2
...
38) served these purposes in section 2
...
However, the use of L 2 norms for studying hyperbolic equations is
uncommon (especially for nonlinear problems)
...
e
...
Instead, we will typically use L 1 norms in our comparisons
...

In Section 2
...
The numerical solution values were taken to be approximations to the cell averages of the solution in equation (2
...
Thus it seems
reasonable to define the average of a function w(x) over a cell (xi−1/2 , xi+1/2 )
by
A(w)i ≡

xi+1/2

1
xi+1/2 − xi−1/2

w(x) d x

xi−1/2

and use the L 1 norm
u − A(u(·, t ))
n

n

1



I −1

u in −

i=0

=

I −1
i=0

xi+1/2
xi−1/2

1
xi

xi+1/2

u(x, t n ) d x

xi

xi−1/2

u in − u(x, t n ) d x ,

(2
...
46)

71

2
...
time

(a) Cell average vs
...
2
...
9, velocity =
1
...
1

or the L 2 norm
I −1
i=0

u − A(u(·, t ))
n

n

2
2



=

1

xi

I −1

xi+1/2

u in

i=0

xi−1/2

2

xi+1/2

n

u(x, t ) d x
2

u in

xi

xi−1/2

− u(x, t ) d x
n

1

...
These norms will determine the
accuracy of our methods
...

In Figure 2
...
9 and 100 grid cells at time 0
...
In the right-hand image of the same figure, we also show the L 1
norm of the error, defined by Equation (2
...
Generally speaking, the
error increases with time, but does not increase monotonically
...
The results in
Figure 2
...
1
...
We expect the explicit upwind scheme to be more
accurate as the CFL number approaches one
...
8-3: guilinearerror with initial-data equal to riemann, scheme
equal to explicit upwind and cfl equal to 0
...
1
...
47)

72

Scalar Hyperbolic Conservation Laws

(a) Cell average vs
...
time

Fig
...
15 Explicit upwind scheme for linear advection at CFL = 0
...
0, 100 grid cells, Riemann problem initial data with jump at x = 0
...
-Log10 Cell Width

(b) Log10 Error vs
...
2
...
9

similar numerical results for square pulse, triangular pulse, smooth
Gaussian or quadratic pulse initial data
...
g
...

It is also useful to examine how the computational errors behave as the mesh
is refined
...
16 we show the results of a mesh refinement study for the
explicit upwind scheme
...
9
...

The plot of error versus computational time shows somewhat erratic behavior for

2
...
2
...
9

coarse mesh, due to the inherent inaccuracy in the available system timing routines
...
25
...
8-3 with initial-data
equal to riemann, scheme equal to explicit upwind, cfl equal to 0
...
This seemingly nonsensical value for the number of grid cells
is a signal for the executable to perform a mesh refinement study
...
17 shows the results with the explicit upwind scheme for linear advection
of a square pulse
...
Figure 2
...
Figure 2
...
Note that the results are significantly

74

Scalar Hyperbolic Conservation Laws

(a) 100 cells

(b) 200 cells

(c) 400 cells

(d) 800 cells

Fig
...
18 Refinement study with implicit upwind scheme for linear advection
square pulse at CFL = 2
...

Figure 2
...
Note that the resolution of the pulse is better
than with either explicit or implicit upwind, but there are significant oscillations to
the left of each discontinuity in the pulse
...
21 shows the error in the explicit upwind scheme, plotted against computational time for several values of the CFL number
...
In other words, the schemes requires less computational time to reach a given
level of accuracy as the CFL number is increased
...
8 Measuring Accuracy and Efficiency

(a) CFL = 0
...
0

(c) CFL = 5
...
0

Fig
...
19 Study with implicit upwind scheme for linear advection square pulse
(100 cells)

numbers between 0
...
Low CFL numbers increase the cost of the implicit
upwind scheme while reducing the numerical spreading of the discontinuities
...
Figure 2
...
9, together
with the error refinement study for implicit upwind at its efficient CFL number of
1
...

Our previous examples have involved linear advection with discontinuous initial
data
...
It is reasonable to ask if the methods would
perform differently on a smooth problem
...
23 shows numerical results

76

Scalar Hyperbolic Conservation Laws

(a) 100 cells

(b) 200 cells

(c) 400 cells

(d) 800 cells

Fig
...
20 Refinement study with Lax–Wendroff scheme for linear advection square
pulse at CFL = 0
...
2
...
9; middle: CFL = 0
...
1

2
...
5

−2

−2
...
implicit upwind
Lower curve: explicit upwind
Upper curve: implicit upwind

Explicit upwind vs
...
2
...
2
...
9

77

78

Scalar Hyperbolic Conservation Laws

(a) 100 cells

(b) 200 cells

(c) 400 cells

(d) 800 cells

Fig
...
24 Refinement study with implicit upwind scheme for linear advection
smooth Gaussian at CFL = 2
...
Note that the peak value of the solution is not
very accurate in these simulations
...
24
...
25
...
26, we see that the Lax–Wendroff
scheme is the most accurate and efficient of the three
...
If the mesh were refined even more, we would see
that the implicit upwind scheme is first-order accurate for the smooth Gaussian, as
well
...
2
...
9

Log(error) vs
...
Log(computer time)

Fig
...
26 Refinement studies comparing schemes for linear advection, smooth
Gaussian initial data (lower curves: Lax–Wendroff, middle curves: explicit
upwind, upper curves: implicit upwind

80

Scalar Hyperbolic Conservation Laws

It is tricky to compare numerical schemes for efficiency
...
Computational times can be affected by programming care and the choice of computing machinery
...
It is reasonable to expect that implicit
numerical schemes are more efficient than explicit numerical schemes only if the
former can take timesteps much larger than the latter for a given level of accuracy
...

It is also reasonable to expect that high-order numerical schemes should be
more efficient than low-order numerical schemes when high accuracy is required
...
Of course, this observation is problem-dependent
...
These results were obtained by running executable 2
...
Figure 2
...
Both schemes were run at CFL = 0
...
The results
show that the second-order Lax–Wendroff scheme is more efficient than the firstorder explicit upwind scheme for this problem at any of the mesh sizes in the
study
...
8
2
...
1 The modified equation analysis in Section 2
...
1 showed that the explicit upwind difference scheme
is approximately solving a diffusion equation with diffusion coefficient proportional to the mesh
width
...
5
...
Note that the analytical solution of the
diffusion equation involves a Green’s function that is proportional to one over the square root
of the diffusion coefficient
...


3
Nonlinear Scalar Laws

The linear advection equation is very easy to solve analytically, but somewhat tricky
to solve well numerically
...
A number of
high-order pseudo-spectral [61] and collocation methods also work well for linear
advection
...
The
most challenging physical problems are nonlinear, because these develop propagating discontinuities known as shocks
...
1
...
2
...


3
...
An alternative reference is LeVeque’s book [96], which also covers the theory
of numerical methods
...
1
...


(3
...
1b)

81

82

Nonlinear Scalar Laws

In these equations, u represents the density of some conserved quantity, and f (u)
represents the flux of that conserved quantity
...

Example 3
...
1 The most common example of a nonlinear scalar conservation law
is Burgers’ equation [24], for which the flux function is
1
f (u) = u 2
...
2)
2
This conservation law is not terribly important in practice, but it is useful in illustrating important concepts
...
1a) over a region a < x < b, we obtain
b
d
u(x, t) d x = − f (u(b, t)) + f (u(a, t))
...
3)
dt a
This equation says that the rate of change of the conserved quantity in the fixed
region (a, b) is equal to the net flux into the interval
...
Actually, Equation (3
...
1a) is actually derived from the integral form (3
...

We will discuss the meaning of “appropriate” in Section 3
...
4 below
...

t1

This equation says that the total conserved quantity at the new time t2 is equal to
the total at the old time, plus the total flux into the interval minus the total flux out
...
1
...
1a) has quasilinear form
∂u d f ∂u
+
= 1
0=
∂t
du ∂ x

df
du

∂u
∂t
∂u
∂x


...

du
Note that λ has units of velocity
...
If u(x, t)
has differentiable initial data u 0 (x), then the quasilinear form of the conservation
λ(u) =

(3
...
1 Nonlinear Hyperbolic Conservation Laws

83

law (3
...
This
fact implies that u is constant along trajectories x = x(t) that propagate with speed
dx
= λ(u(x, t)), since
dt
∂u ∂u d x
∂u ∂u ∂ f
d
u(x(t), t) =
+
=
+
= 0
...
4) is
u(x, t) = u 0 (x − tλ(u(x, t)))
...
5)

Note that this equation defines u(x, t) implicitly
...
1
...
5), where
λ(u) ≡ d f
...
5) to problem (3
...

∂λ
∂x
∂u ∂ x
∂x
1 + tu 0 ∂u
These equations imply that the solution (3
...
4),
∂λ
provided that the initial data u 0 is differentiable, and the denominator 1 + tu 0 ∂u is
nonzero for all time t up to the time of interest
...
1
...
1a) has flux f (u) = cu where c is a
constant
...
Since the characteristic
du
speed is constant, it is easy to see that the solution of the conservation law is
u(x, t) = u 0 (x − ct)
...
1
...
In this case,
2
the characteristic speed is λ(u) = u, so the solution
u(x, t) = u 0 (x − tu(x, t))
is implicitly defined through the initial data u 0
...
6a)
(3
...
1
...
5) generally defines u implicitly, we need to find circumstances
under which we can solve this equation for u
...
6) to solve for the
partial derivatives of u when the initial data is differentiable
...


convex flux: Suppose that du > 0 for all u
...
6) show that
∂u
∂u
and ∂ x are bounded for all t if and only if u 0 (x) ≥ 0 for all x
...

∂λ
∂u
concave flux: Next, suppose that ∂u < 0 for all u
...
In other words, for concave
flux functions, the temporal and spatial derivatives of the solution are bounded
for all time if and only if the initial data is a nonincreasing function of x
...
In this case, ∂u = −λu 0 and ∂ x =
∂t
u 0 are bounded for all t
...
1
...
Here the flux function is
∂λ
f (u) = 1 u 2 , so the characteristic speed is λ(u) = u and ∂u = 1 > 0 for all u
...
We expect the first-order partial derivatives of u to be
bounded for all t if and only if the initial data u 0 (x) is non-decreasing
...
1a
...

For x > 1, the characteristic lines intersecting the x axis are given by x − t · 0 =
const > 1; along these curves the solution is u(x, t) = 0
...
At t = 1, we have x(1) = 1
for any initial value x0 ∈ (0, 1)
...
Along these curves the solution of the conservation law is
u(x(t), t) = 1 − x(t) = (1 − x0 )(1 − t) for 0 ≤ x0 ≤ 1 and 0 ≤ t ≤ 1
...
1b, and the solution at a time 0 < t < 1 is depicted in
Figure 3
...


85

3
...
3
...
Equation (3
...

It follows that the solution (3
...


3
...
4 Propagation of Discontinuities
As we have seen, hyperbolic conservation laws can develop discontinuities, even
when provided with continuous initial data
...
In developing the formula for the

86

Nonlinear Scalar Laws

propagation of a discontinuity, we will use the notation limx↓z f (x) for the onesided limit from the right of f at z, and limx↑z f (x) for the one-sided limit from
the left of f at z
...
1
...


a

If u is discontinuous along the space-time curve (z(t), t) that moves with speed
dz
, then the jumps across the discontinuity satisfy the Rankine–Hugoniot jump
dt
condition
for all 0 < t < T lim f (u(x, t)) − lim f (u(x, t))
x↓z(t)

x↑z(t)

dz

...
7)

Proof We compute
f (u(a, t)) − f (u(b, t))
d
dt
d
=
dt

b

=

=

u(x, t) d x
a
z(t)
a
z(t)

a
z(t)

=
a

=

u(x, t) d x +

d
dt

b

u(x, t) d x
z(t)

∂u
dz
d x + lim u(x, t) +
x↑z(t)
∂t
dt


∂f
dx +
∂x

b



z(t)

∂f
dx +
∂x

b
z(t)

x↑z(t)

lim u(x, t) − lim u(x, t)

x↑z(t)

x↓z(t)

= { f (u(a, t)) − f (u(b, t))} +

lim u(x, t) − lim u(x, t)

x↑z(t)

f (u(a, t)) − lim f (u(x, t)) +
+

∂u
dz
d x − lim u(x, t)
x↓z(t)
∂t
dt
x↓z(t)

dz
dt

lim f (u(x, t)) − f (u(b, t))

x↓z(t)

dz
dt

lim f (u(x, t)) − lim f (u(x, t))

x↓z(t)

x↑z(t)

dz
+ lim u(x, t) − lim u(x, t)

...


3
...
It is customary to represent the jump in some quantity by
square brackets, and the discontinuity speed by σ
...
7) can
[ f ] = [u]σ
...
1
...
1
...
We know that at
time t = 1 the solution of this equation must develop a discontinuity at x = 1
...
On
the left side of the discontinuity, the solution of the conservation law is u = 1
...

[u]
0−1
2
It follows that for 0 ≤ t ≤ 1 the solution of the conservation law is

 1, t ≥ x
u(x, t) = 1−x , t ≤ x ≤ 1
 1−t
0, 1 ≤ x,
and for 1 ≤ t the solution is
u(x, t) =

1,
0,

1 + t > 2x
1 + t < 2x
...
1
...


Figure 3
...
If we
trace back to the axis at x < 0, the characteristics have the form x(t) = x0 < 0
...
Thus the characteristics do not provide any information about
the solution of the conservation law in the region 0 < x < t
...
For example, the initial discontinuity

88

Nonlinear Scalar Laws

u

t

x

x

(a) Initial data

(b) Characteristics

Fig
...
2 Discontinuous decreasing data for Burgers’ equation

could continue to propagate with speed σ = [ f ]/[u] = 1 :
2
u(x, t) =

0,
1,

t > 2x
t < 2x
...

The form of this solution for 0 ≤ x ≤ t can be determined as follows
...
Thus the characteristic has the form x − u(x, t)t = 0;
du
this implies that u(x, t) = x/t
...
1
...


89

3
...
Note that we get the same characteristic speeds
for both problems:

∂ 1 u2
2
=u=
∂u

1
u k+1
k+1

∂u

1
∂( k u k )
∂u

−1


...

j=0

Again, we do not yet know which information correctly specifies the solution to
the problem
...
1
...

As we mentioned in section 2
...
3, many hyperbolic conservation laws actually
represent the limit of a diffusion equation, in the limit as the diffusion approaches
zero
...
The following lemma will determine
which are the correct propagating discontinuities for use in solving our nonlinear
conservation laws
...
1
...

Here > 0 is assumed to be small
...


ξ →−∞

ξ →∞

(3
...
8b)

90

Nonlinear Scalar Laws

Then u − and u + satisfy the Rankine–Hugoniot condition
f (u + ) − f (u − ) = (u + − u − )σ

(3
...


(3
...
10), u + is a stable stationary point,
and the Lax admissibility conditions
f (u − ) > σ > f (u + )

(3
...

Proof Because of the diffusion, u is smooth and the partial differential equation
(3
...
We assume that we have a
traveling wave solution of the form
u (x, t) = w

x − σt

In other words, w is a function of the variable ξ =
differential equation (3
...

x−σ t

1
2


...


Since the equation involves the same power of in all terms, this suggests that the
form of the traveling wave variable ξ is correct
...

In order for the traveling wave w to converge, as → 0, to a propagating discontinuity with value u − on the left of (x, 0) and u + on the right, we have required
lim w(ξ ) = u − ,

ξ →−∞

lim w(ξ ) = u +
...

ξ →∞

(3
...
1 Nonlinear Hyperbolic Conservation Laws

91

The former equation implies that
C = σ u − − f (u − ),
and the latter equation then gives us an alternative derivation of the RankineHugoniot condition
f (u + ) − f (u − ) = (u + − u − )σ
...
13) into the Equation (3
...
10)
...
10)
...
10) such that
lim w(ξ ) = u − ,

lim w(ξ ) = u +
...

To determine the stability of stationary points for w, we will consider a perturbation of w:
d(w + yδ)
= f (w + yδ) − f (u − ) − σ (w + yδ − u − )
...
10) from this equation and
take δ to be small, in order to obtain
dy
= ( f (w) − σ )y
...
10), we must have
f (u − ) − σ > 0,

f (u + ) − σ < 0
...
11)
...
1
...
11) is called a shock
...

Example 3
...
12 Let us return to Burgers’ equation with nondecreasing discontinuous initial data
u 0 (x) =

0,
1,

x <0
x > 0
...
13)

92

Nonlinear Scalar Laws

If this problem involves a propagating discontinuity, the speed of the discontinuity
must be determined by the Rankine–Hugoniot condition:
1
σ = [ f ]/[u] =
...
Thus we must check the Lax
admissibility conditions (3
...
Note that u − = 0 and f (u − ) = u − = 0
...
11) is violated
...
Thus the initial discontinuity evolves into a continuous solution
...
1
...

Example 3
...
13 Recall the following two forms of Burgers’ equation:
∂u ∂ 1 u 2
+ 2 = 0,
∂t
∂x
and
∂u k+1 /(k + 1)
∂u k /k
+
= 0,
∂t
∂x
with discontinuous initial data
u 0 (x) =

u−,
u+,

x <0
x > 0
...
Since the two problems have
different shock speeds, namely
− 1 u2
u+ + u−
2 −
=
u+ − u−
2

1 2
u
2 +

and
1 u k+1 − u k+1
+

=
k + 1 u+ − u−

k
j=0

k− j

j

u+ u−

k+1

,

they also have different Lax admissibility conditions
...

3
...
6 Entropy Functions
Definition 3
...
14 Given a hyperbolic conservation law with flux f (u), suppose
that we can find a continuous function s(u) and a continuous function ψ(u) so that

ds d f
=

...
14)

93

3
...

Lemma 3
...
15 If s(u) is an entropy function for the conservation law
∂u ∂ f (u)
+
=0
∂t
∂x
and if the solution u(x, t) of the conservation law is continuously differentiable,
then s satisfies the conservation law
∂s(u) ∂ψ(u)
+
=0
∂t
∂x

(3
...


Lemma 3
...
16 Suppose that s(u) is an entropy function for the conservation law
∂u ∂ f (u)
+
=0
∂t
∂x
and u (x, t) satisfies the viscous conservation law
for all x ∈ R for all t > 0

∂ f (u )
∂ 2u
∂u
+
=
,
∂t
∂x
∂x2
with > 0
...
If
s(u) is convex and s(u(x, t)) is bounded for all x and t, then
for all x ∈ R for all t > 0


for all φ(x, t) ≥ 0, φ ∈ C0 (R × R)


∂φ
∂φ
s(u) +
ψ(u) d x dt −

∂x
0
−∞ ∂t


−∞

φ(x, 0)u(x, 0) d x ≤ 0
...
Also note that the solution u of
the viscous conservation law is smooth for any > 0
...


94

Nonlinear Scalar Laws

Since the solution u of the viscous conservation law is smooth, for any nonnegative
smooth φ(x, t) we can compute

0



∂s(u ) ∂ψ(u )
+
∂t
∂x

−∞



d x dt = −
0




−∞



−∞

∂φ
∂φ
s(u ) +
ψ(u ) d x dt
∂t
∂x

φ(x, 0)u (x, 0) d x
...


Putting these results together, we obtain


0≥−
0





∂φ
∂φ
s(u ) +
ψ(u ) d x dt −
∂t
∂x
−∞

∞ 2
∂ φ
s(u ) d x dt
2
0
−∞ ∂ x


−∞

φ(x, 0)u (x, 0) d x

Since s(u) is bounded and u → u almost everywhere, the term involving a factor
of tends to zero as → 0
...

Often, the result of this lemma is written in the form of an inequality, which is said
to hold “weakly”:
∂s(u) ∂ψ(u)
+
≤ 0
...
16)
∂t
∂x
Also note that similar results can be proved if the entropy function is concave; the
obvious inequalities are reversed
...

Lemma 3
...
17 Suppose that the solution u(x, t) of the conservation law
∂u ∂ f (u)
+
=0
∂t
∂x
is the limit, as the diffusion tends to zero, of the corresponding viscous conservation
law
...
1 Nonlinear Hyperbolic Conservation Laws

and moving with speed σ = d x
...


Proof Suppose that φ(x, t) ∈ C0 ((−∞, ∞) × (0, ∞)) and φ(x(t), t) > 0
...
1
...
1
...

φ [ψ] − [s]
=
dt
0

0≥−

1

d x(t)
dt



1
0

d x(t)
dt

The result follows by noting that the support of φ is arbitrary
...
1
...

Lemma 3
...
18 For any scalar conservation law
∂u ∂ f (u)
+
=0
∂t
∂x
and any constant c,
sc (u) = |u − c|
is a convex entropy function with entropy flux
ψc (u) = [ f (u) − f (c)]sign(u − c)
...

du
du
du du
The following lemma is very useful in describing the solutions of hyperbolic
conservation laws
...
3
and 3
...

Lemma 3
...
19 Suppose that u(x, t) solves the conservation law
∂u ∂ f (u)
+
=0
∂t
∂x
and that u is the limit of the solution of the viscous conservation law as the
diffusion tends to zero
...

≥σ ≡

u − uL
uR − uL
uR − u
(3
...
1
...

In the case u L < c < u R , we obtain
0 ≤ −{ f (u R ) − f (c)}sign(u R − c) + { f (u L ) − f (c)}sign(u L − c)
+ {|u R − c| − |u L − c|}σ
= 2 f (c) − f (u R ) − f (u L ) − {2c − u R − u L }σ
...

By choosing c to be an intermediate state u, we obtain (3
...
A similar argument
can be used in the case u R < u L
...
1 Nonlinear Hyperbolic Conservation Laws

97

3
...
8 Riemann Problems
As we have seen, it is interesting to consider conservation laws with piecewiseconstant initial data:
d
dt

b

u(x, t) d x + f (u(b, t)) − f (u(a, t)) = 0 for all a < b for all t > 0, (3
...


(3
...
We would like to
understand the analytical solutions to these problems
...
By this, we mean that
u(x, t) is a function of x/t; as a result, we will be able to write the solution of the
Riemann problem in the form
x
u(x, t) = R u − , u + ;

...

If the self-similar solution w is differentiable, then
x ∂u
1
∂u
= −w 2 ,
=w
...
18a), we must have
x
x
1
1
w
...
It follows that the centered rarefaction w(x/t) will satisfy the conservation law (3
...
Note that in order to have a continuous solution w the characteristics must not collide; in other words, a centered rarefaction requires that
f (u − ) < f (u) < f (u + ) for all states u between u − and u +
...

Example 3
...
20 Let us return to Burgers’ equation with nondecreasing discontinuous initial data
u 0 (x) =

0,
1,

x <0
x > 0
...
1
...
Thus the initial
discontinuity evolves into a continuous solution
...
Thus the solution
du

98

Nonlinear Scalar Laws

of this Riemann problem is
u(x, t) =




0, x ≤ 0
x/t, 0 ≤ x/t ≤ 1

1, 1 ≤ x/t
...


Here σ = [ f ]/[u] is the Rankine–Hugoniot jump speed
...
11), i
...
,
f (u − ) > σ > f (u + )
...
17)
...

Algorithm 3
...
21 Scalar conservation law Riemann problem solution
(i) If u − < u + , then the solution of the Riemann problem is determined by the convex hull
of the flux function on (u − , u + )
...
) Wherever the convex hull is equal to a continuous
portion of f , we have a centered rarefaction, and wherever the convex hull jumps
across points on f , we have a(n admissible) shock
...
(The concave hull is the smallest
concave function greater than or equal to the given flux function
...


Example 3
...
22 Consider the general flux function in Figure 3
...
This flux function
is neither convex nor concave between the left and right states for the Riemann
problem
...
This leads to a solution involving a rarefaction
moving rapidly to the left, followed by a shock, a transonic rarefaction (meaning
that the characteristic speeds change sign), and a shock moving to the right behind
a fast rarefaction
...
When we plot the characteristic speeds for
the solution of this problem, we find that λ = x/t in rarefactions, so these curves
follow lines with unit slope through the origin
...
1 Nonlinear Hyperbolic Conservation Laws

f
u

uR
u4

L

R
u3
u2

λL
λ1

u1

u1
uL

λ2

λR

x/t

u

u3
u2

u4

(a) Oleinik chords

(b) Solution of Riemann problem

λ

λ1
λL

λ2

λR

x/t

(c) Characteristic speeds

Fig
...
3 Riemann problem for general flux function

decrease from left to right in a rarefaction, otherwise we could not draw a picture
of the conserved quantity as a function of x/t
...
1
...
This leads to Figure 3
...
In this case,
the left state is greater than the right state, so the solution follows the concave hull
of the flux function
...
1
...

Suppose that we have a coordinate system (ξ, τ ) moving at a fixed velocity c with

100

Nonlinear Scalar Laws
f
u

R

L

x/t

u
(a) Oleinik chords

(b) Solution of Riemann problem

λ

x/t

(c) Characteristic speeds

Fig
...
4 Riemann problem for general flux function

respect to the coordinate system (x, t):
ξ = x − ct, τ = t
...

∂t
∂x
Then it is easy to see that
˜
∂ f (u)
∂ f (u)
=
∂x
∂ξ

and

˜
˜
∂u
∂u
∂u
=
−c
...

∂τ
∂ξ

3
...
In the moving frame of reference, the characteristic speeds are
d f˜
˜
˜
= f (u) − c = λ − c
λ=
˜
du
and the speeds of propagating discontinuities are
σ =
˜

˜
[f]
[ f˜]
[ f ] − c[u]
=
− c = σ − c
...
For example, for a Riemann problem
with a shock we can choose a Galilean transformation that transforms to a problem
with a stationary discontinuity
...
1
3
...
1 Suppose that we want to solve Burgers’ equation with initial data u 0 (x) = x 2 for x ≥ 0
...

2t
3
...
2 Show that in a Riemann problem for Burgers’ equation, the flux at the state that moves with zero
speed is
f =

1
2
1
2

max{u L , min{u R , 0}}2 ,

uL < uR

max{|u L |, |u r |} ,

uL ≥ u R
...
1
...


Here we use the notation ξ = x/t
...
)
3
...
4 Show that in the sense of distributions, the self-similar solution to the scalar Riemann problem
satisfies
w(ξ ) =

d
− dξ (minu − ≤v≤u + [ f (v) − ξ v]),

u− ≤ u+

d
− dξ (maxu + ≤v≤u − [ f (v) − ξ v]),

u− ≥ u+
...
1
...
5,
0
...
7cos(2π x),

x < 0
...
5
...
2 Case Studies
Many interesting applications of hyperbolic conservation laws are nonlinear
...
1
...
1
...
1
...
1
...
1
...
1
...
1
...
This nonlinear conservation law is useful in certain simplified models of
gas dynamics
...


3
...
1 Traffic Flow
We will consider a simple model of traffic flow
...
Nevertheless, we will use a continuum model
to describe the large-scale behavior of traffic
...

Let ρ(x, t) be the density of vehicles (say vehicles per mile), and let v(ρ) be the
velocity of the vehicles
...
Assuming that we are watching
a section of the highway with no entrances or exits, conservation of mass of the
vehicles can be written
∂ρ
∂ρv
+
= 0
...

One simple model for the vehicle velocity is
v(ρ) = vmax (1 − ρ/ρmax )
...

The latter may be determined at times of low density, either by the topology of the
highway or the attentiveness of law enforcement
...
Thus at ρ = 0 the vehicle
speed is vmax , but the speed decreases linearly with density after that
...

Note that negative values of the density are unphysical, as are values of density greater than ρmax
...
We will not
want our numerical methods to produce negative densities (or velocities) in such
cases
...
19)

103

3
...
2
...
This
problem occurs in modeling the flow of water-soluble contaminants in aquifers, and
of solvent-enhanced recovery of oil
...
It is assumed that the tracer
is inert; in other words, there are no chemical reactions that would transform the
water and tracer into other chemicals
...

We will denote the concentration of the tracer by c; by definition, c is the volume
of tracer divided by the total volume of the fluid in some region in space
...
Because the tracer concentration can vary,
the fluid density ρ can vary; we will assume that density is a function of tracer
concentration
...

The fluid moves through tiny holes in the rock
...
Thus porosity is
dimensionless
...

The holes must be connected for the fluid to move through the rock
...
It turns out that permeability has
units of area
...

Neither the permeability nor the porosity need be continuous functions
...
This takes the form
1
v = K [−∇x p + gρ] ,
µ
where p is the pressure in the fluid and g is the gravity vector
...
One is due to the macroscale flow from Darcy’s law; this part of the flux takes the form cv for the tracer,
and (1 − c)v for water
...
Typically, this part of the flux is represented by Fick’s law
...

v
v
τ
Here, α and αt are the longitudinal and transverse mixing lengths, δc is the diffusivity of the tracer and τ is the tortuosity of the rock
...


104

Nonlinear Scalar Laws

We must have equations representing the conservation of mass for water and the
tracer
...
Thus conservation of the tracer
and water can be written
∂cφ
+ ∇x · ft = 0,
∂t
∂(1 − c)φ
+ ∇x · fw = 0
...
This leads to an elliptic partial differential equation
for pressure:
0 = ∇x · v = ∇x · K [−∇x p + gρ(c)]

1

...
20)

It is interesting to note that the coefficients ρ(c) and µ(c) in this problem are functions of the variable tracer concentration
...
This completes the description of the
miscible displacement model
...
We need to manipulate
these equations into a conservation law
...

∂x
This is says that the total fluid velocity is independent of position in one dimension
...

τ ∂x

Given the total fluid velocity, the two mass conservation equations become redundant
...

τ ∂x

In the typical case, we specify the total fluid velocity v(t) and the tracer concentration c(x L , t) at inflow
...
21) and for the fluid pressure (3
...

Suppose that we are given p(x R , t) = p R (t) at the right-hand boundary
...
21)

105

3
...

K(x)

Some common test problems choose the fluid velocity to be around 30 centimeters per day, the porosity to be 0
...
01 times the problem length
...

For our purposes in this chapter, we will not need to compute the pressure, so
we will not need to describe the density or viscosity
...
21)
...
2
...

In this model, we assume that the fluid consists of two distinct phases, oil and water
...
Since the fluid is incompressible and the chemical
composition of the phases is fixed, the phase densities ρo and ρw are constants
...

The fluid moves through tiny holes in the rock
...
Thus porosity is
dimensionless
...

The holes must be connected for the fluid to move through the rock
...
It turns out that permeability has
units of area
...

Neither the permeability nor the porosity need be continuous functions
...
By definition,
sw + so = 1
...
Thus oil is the non-wetting phase, and prefers to

(3
...
Thus the presence of both oil and water reduces the
flow of the other
...
Typically, relative
permeability of a phase is chosen to be an empirical function of that phase saturation
...
We must have
κr o (0) = 0 = κr w (0),
because neither phase can flow if it occupies no volume in the fluid
...

Finally, we must have
κr o (so ) ≥ 0 for all so ∈ [0, 1]

and

κr w (sw ) ≥ 0 for all sw ∈ [0, 1],

because an increase in relative volume of a phase makes it easier for that phase to
flow
...
In
Section 3
...
2 for a single phase, Darcy’s law was written
v = K [−∇x p + gρ]

1
,
µ

where p is the pressure in the fluid and g is the gravity vector
...

µo
µw
For two-phase flow the pressures in the phases are not necessarily the same
...
Capillary pressure arises
from the interfacial tension between the phases and the narrow flow paths available
to the fluids
...

See Figure 3
...

It will simplify notation if we define the phase mobilities
λo (so ) ≡

κr o (so )
,
µo

λw (sw ) ≡

κr w (sw )

...
2 Case Studies

107

Fig
...
5 Capillary pressure curve

Then the two-phase modification of Darcy’s law can be written
vo = K[−∇x po + gρo ]λo ,

vw = K[−∇x pw + gρw ]λw
...
It is easy to see that the mass of oil per bulk (rock) volume is ρo so φ, and
the mass of water per bulk volume is ρw sw φ
...
Thus conservation of oil and water can be written
∂ρo so φ
∂ρw sw φ
+ ∇x · (ρo vo ) = 0,
+ ∇x · (ρw vw ) = 0
...

Next, we need to manipulate these equations into a conservation law in one
dimension
...

∂t
∂x
∂t
∂x
Next, we can add these two equations and use equation (3
...

∂x
This is an expression of the incompressibility of the flow: the total fluid velocity has
zero divergence
...
It will suffice to work with conservation of oil
...

∂x
∂x

108

Nonlinear Scalar Laws

Table 3
...
998
0
...
839
0
...
0114
0
...
0230
0
...
Thus this equation can be viewed as providing a relationship between the
gradient of the water-phase pressure and the oil saturation:


∂ pw
vT /K − g(ρo λo + ρw λw ) + λo ∂ Pc /∂x
=

...

∂x
λo + λw

This means that conservation of oil can be written

λo
∂so φ
+
[vT + Kgλw (ρo − ρw )]
∂t
∂x
λo + λw

=


∂x

Kλo λw ∂ Pc
λo + λw ∂x


...
The capillary pressure term introduces
a physical diffusion; this diffusion term is nonlinear
...

Some common test problems choose the relative permeabilities to be
2
2
κr o (so ) = so , κr w (sw ) = sw
...

Oil is less dense than water and more viscous
...
25 is typical
...
3
meters/day
...
Some typical values for the densities and viscosities are
contained in Table 3
...
With zero total
fluid velocity, the flux function formed solely by the action of gravity is shaped like
a script “V”
...
Figure 3
...


(3
...
2 Case Studies

(a) vT = 1, g = 0

(b) vt = 0, g = −10

(c) vT = 1, g = −10

Fig
...
6 Buckley–Leverett flux function: f (s) = (vT + g(1 − s)2 )s 2 /(s 2 + (1 −
s)2 )µo /µw with µo /µw = 1

Exercises for 3
...
2
...
19)
...

3
...
2 Solve the Riemann problem for traffic flow with velocity function given by equation (3
...
In
particular, find a general formula in terms of the left and right densities ρ L and ρ R for the state ρ
that moves with zero speed in the solution of the Riemann problem
...
2
...
19)
...


110

Nonlinear Scalar Laws


(a) Suppose that we want to approximate the solution of the Riemann problem with ρ = ρmax / e
on the left and ρ = 0 on the right
...

(b) Program the following scheme for the Riemann problem just posed:
ρin+1 = ρin −

t n+1/2
n
[(ρv)in − (ρv)i−1 ]
...
Use 100 grid cells and a problem length of 1 for your calculations
...


(c) Suppose that we want to approximate the solution of the Riemann problem with ρ = ρmax / e
on the right and ρ = ρmax on the left
...

(d) Program the following scheme for the Riemann problem just posed:
ρin+1 = ρin −

t n+1/2
n
[(ρv)i+1 − (ρv)in ]
...
Use 100 grid cells and a problem length of 1 for your calculations
...

(e) Suppose that we want to approximate the solution of the Riemann problem with ρ = 0 on
the right and ρ = ρmax on the left
...

(f) What happens if you try to solve the problem just posed with the upwind method given for
the problem with all nonnegative characteristic speeds? Run your program and describe your
results
...

3
...
4 Compute the characteristic speed for the miscible displacement model (3
...
Ignore the diffusive
terms (convective mixing and molecular diffusion) when you compute the characteristic speed
...
5
...

3
...
5 Typically, people measure time in miscible displacement problems in terms of “pore volumes
injected
...

0

If the porosity φ is constant and the injection rate v is constant, find a formula for the time at
which the volume of the total fluid injected is half the total pore volume
...
3 First-Order Finite Difference Methods

3
...
6 Program explicit upwind differences for the miscible displacement problem
...
Choose the problem length to be 10 meters, and use 100 grid
cells
...
01 on the left for all time
...
Describe how you chose your timestep
...
2
...
23)
...
Plot the oil flux f o
and characteristic speed versus the oil saturation so
...

∂t
∂so ∂ x

The characteristic speed can be determined from this equation
...
2
...
Which kinds of flow problems produce multiple shocks? Which
kinds of flow problems correspond to injecting water to produce oil from an oil reservoir with
(nearly) no water?
3
...
9 Choose left and right states for a Buckley–Leverett Riemann problem so that all of the characteristic speeds are positive
...
Use 100 grid cells,
and plot the numerical results at 0
...
Also plot the characteristic speed
...


3
...
3
...
In the special case when
generalize explicit upwind differences as follows:
u in+1 = u in −

(3
...

xi
n+1/2

This is a conservative difference scheme with numerical fluxes defined by f i+1/2 =
f (u in ), and for which all timesteps are chosen so that
∂f n
u
∂u i

t n+1/2 ≤ γ xi

112

Nonlinear Scalar Laws

for some 0 < γ < 1
...

xi
n+1/2

This is a conservative difference scheme with numerical fluxes defined by f i+1/2 =
n
f (u i+1 ), and with all timesteps chosen so that
∂ f n n+1/2
u t
≤ γ xi
∂u i
for some 0 < γ < 1
...

However, we will have to be more clever to develop schemes for problems in
which the sign of the characteristic speed is not known
...

∂t
∂x
This, of course, is a Galilean transformation of the original problem
...
1
...
) This leads to the conservative difference


t n+1/2
˜
˜
˜n
˜n
[( f (u in ) + cu in ) − ( f (u i−1 ) + cu i−1 )],
xi
and to the timestep restriction
˜
˜
u in+1 = u in −

˜
[ f (u in ) + c] t n+1/2 ≤ γ xi
...

3
...
2 Lax–Friedrichs Scheme
A very popular scheme for general nonlinear flux functions f is the Lax–Friedrichs
scheme
...

(i) the computational results are replaced with the piecewise constant cell averages at
times t n and t n + 1 t n+1/2 ;
2
(ii) there is an upper bound λ on the characteristic speed so that for all u |d f /du| ≤ λ
(we will have to clarify just what we mean by the quantifier on u),
(iii) the timestep is chosen so that

for all i, λ t n+1/2 < xi
...
25)

113

3
...
We will apply the divergence theorem to the conservation
law (3
...
Since the
2
solution is piecewise constant at time t n and the timestep is chosen so that waves
from the constant states do not reach the cell centers by time t n + t n+1/2 /2, the
fluxes are constant in time at the cell centers in this application of the divergence
theorem:
xi =

0=
=

t n + t n+1/2 /2
tn
xi+1

xi+1
xi

u x, t n +

xi
t n + t n+1/2 /2

+
=

tn
xi+1

∂u ∂ f (u)
+
d x dt
∂t
∂x

1 n+1/2
t
2

xi

u(x, t n ) d x

xi

f (u(xi+1 , t)) dt −

u x, t n +

xi+1

dx −

1 n+1/2
t
2

t n + t n+1/2 /2
tn

d x − u in

f (u(xi , t)) dt

xi
xi+1
n
+ u i+1
2
2

t n+1/2
t n+1/2
− f (u in )
2
2
We replace the numerical results at the half-time with the cell averages
...
We obtain the following formulas
2
for the two half-steps:
n
+ f (u i+1 )

n+1/2

n
n
u i+1/2 = u in xi + u i+1 xi+1 − f u i+1 − f u in

n+1/2

n+1/2

n+1/2

t n+1/2
t n+1/2
xi

n+1/2

u in+1 = u i−1/2 + u i+1/2 − f u i+1/2 − f u i−1/2

1
,
xi + xi+1
1

...
26a)
(3
...
For example, summing the conserved quantity
at the half-time leads to the mass at the old time plus a telescoping sum of fluxes:
n+1/2

u i+1/2
i

1
xi + xi+1
=
2
2

u in xi +
i

− t

n+1/2

1
2
f

n
u i+1 xi+1
i
n
u i+1

− f u in

i

=

u in
i

The second step is similarly conservative
...


114

Nonlinear Scalar Laws

The only approximations in these equations are the replacement of the solution
at each new time by the cell averages
...
Except for certain boundary conditions (periodic boundaries, first-order
non-reflecting boundaries and reflecting boundaries), this is a delicate topic
...

Example 3
...
1 For linear advection on a uniform grid, the Lax–Friedrichs scheme
can be written
n+1/2

λ t n
1 n
n
u i+1 − u in ,
u i + u i+1 −
2
2 xi
1 n+1/2
λ t n+1/2
n+1/2
n+1/2
u
= u i−1/2 + u i+1/2 −
− u i−1/2
...

4
2
4

u in+1 =

A Fourier analysis shows that the solution ratio is
1
1
1
z = (1 − γ )2 eiθ + (1 − γ 2 ) + (1 + γ )2 e−iθ
4
2
4
1
1
= (1 + γ 2 ) cos θ − iγ sin θ + (1 − γ 2 )
2
2
θ
θ
θ
θ
= cos2 − γ 2 sin2 − 2iγ sin cos
...


It follows that the Lax–Friedrichs scheme is dissipative for γ < 1
...
3 First-Order Finite Difference Methods

115

A modified equation analysis of the Lax–Friedrichs scheme for linear advection
on a uniform grid shows that
˜
˜
∂u
1 ∂ 2u 2
1
1
1
n
n
t+
t ≈ u in+1 = (1 − γ )2 u i+1 + (1 − γ 2 )u in + (1 + γ )2 u i−1
...

= u in −
∂x
∂x
4
This can be rewritten in the form

u in +

˜
˜
˜
˜
∂u
∂ 2u t
∂ 2u
x2
∂u

=− 2
+ 2 (1 + γ 2 )
≡ e
...

= λ2 2 +
∂x
∂t
∂x
Thus the modified equation for the Lax–Friedrichs scheme is
˜

∂ 2u
=
2
∂t
∂t

−λ

˜
˜
˜
˜
∂u
λ2 t
x 2 + λ2 t 2 ∂ 2 u
x 2 ∂ 2u
∂u

≈ −
+
= (1 − γ 2 )

...

A program to implement the Lax-Friedrichs scheme can be found in either
Program 3
...
f or Program 3
...
C By deleting the file name

from the browser window that displays the current web address, the user can see
a list of all of the files in the directory
...
Figure 3
...
The
numerical solution at a fixed time is plotted versus x/t
...
Note that the discontinuity is spread out
more as we decrease the CFL number
...
8
...
Students can also execute

116

Nonlinear Scalar Laws

5

(a) CFL = 0
...
5

(c) CFL = 0
...
0

Fig
...
7 Lax–Friedrichs scheme for Burgers’ shock: u vs
...
3-4: guiconvex1
and selecting scheme to be lax friedrichs in the View pulldown menu,
inside the Numerical Method Parameters group
...
The disadvantages of the Lax–Friedrichs scheme are that it must work
on a staggered grid using half-interval timesteps, and must use some special calculations at boundaries
...
The timestep must still be chosen so that waves from cell sides cannot

3
...
1

(b) CFL = 0
...
9

117

(d) CFL = 1
...
3
...
x/t (solid = exact,
plus = numerical solution)

reach cell centers, and the additional averaging step introduces additional numerical
diffusion
...
3
...
For the Lax–Friedrichs scheme we
found that α = 1
...

In many cases, it is difficult for us to compute a strict upper bound λ on the
largest characteristic speed
...

du i

Because of the discrete sampling, the computed λ may be less than the analytical
value
...
The revised timestep selection would
take the form
λ t n+1/2 < ω xi for all i
where ω ≤ α
...
9 for schemes that are stable with α = 1
...
5
...
5, and the
problem has strong discontinuities
...

3
...
4 Rusanov’s Scheme
In some cases, we would like to avoid the half-step complications of the LaxFriedrichs scheme
...

5u

Further, let
λ = max{λi+1/2 }
...
Rusanov’s scheme uses the upwind
flux evaluation for each of these two parts of the flux:
n+1/2

f i+1/2 =

1 +

n
u n + f i+1/2 u i+1
f
2 i+1/2 i

=

1
n
n
f u in + f u i+1 − λi+ 1 u i+1 − u in
...
3 First-Order Finite Difference Methods

Thus the Rusanov flux is the explicit centered differences flux plus an additional
artificial diffusion
...
3
...

2
2

It follows that Rusanov’s scheme for linear advection can be written
u in+1 = u in −
=

t n+1/2 λ + c n λ − c n
λ+c n
λ−c n
ui −
u i+1 −
u i−1 +
ui
xi
2
2
2
2

t n+1/2 λ + c n
t n+1/2
t n+1/2 λ − c n
u in +
u i−1 + 1 − λ
u i+1
...

A modified equation analysis of Rusanov’s scheme for linear advection shows
that
u in +

˜
˜
˜
˜
t λ + c n ∂u
∂u
1 ∂ 2u 2
1 ∂ 2u 2
t+
t ≈
x+
x
ui −
2
∂t
2 ∂t
x 2
∂x
2 ∂x2
˜
˜
1 ∂ 2u 2
t
t λ − c n ∂u
x+
x
u in +
ui +
+ 1−λ
x
x 2
∂x
2 ∂x2
˜
˜
∂ u λ t x ∂ 2u

...

∂x2

This indicates that Rusanov’s scheme is diffusive if λ >
stability analysis leads to solution ratio

c2 t

...

It follows that
|z|2 = 1 − 2γ + γ 2 (1 + cos2 θ) + γc2 sin2 θ
...
x/t

(b) Characteristic speed vs
...
3
...
9 (solid =
exact, plus = numerical solution)

Since λ ≥ |c|, we see that γ ≥ |γc |
...

This result indicates that in order for the Rusanov scheme to be dissipative, it is
sufficient that the CFL number satisfy 0 < γ < 1
...
3-30:
rusanov
...
3-31: Schemes
...
9 shows some numerical results
with the Rusanov scheme for the traffic flow problem with v(ρ) = −ρ log(ρ)
...
Note that
we plot both the solution ρ and the characteristic speed d(ρv(ρ))/dρ versus x/t
...
Thus, the
graph of the characteristic speed gives us a way to check that the numerical solution
is (approximately) correct
...
Students
can also execute the Lax–Friedrichs scheme by clicking on the web link Executable
3
...


3
...
5 Godunov’s Scheme
Like the Lax–Friedrichs scheme, Godunov’s scheme considers the solution at each
timestep to be piecewise-constant
...
3 First-Order Finite Difference Methods

scheme purposely uses information from Riemann problems to determine the
numerical fluxes
...
24)
over the space-time rectangle (xi−1/2 , xi+1/2 ) × (t n , t n+1 ) to get
1
xi
1
=
xi

u in+1 ≡

xi+1/2
xi−1/2
xi+1/2

u(x, t n+1 ) d x
u(x, t n ) d x

xi−1/2
t n+1

1

xi
≡ u in −

tn

f R

n
u in , u i+1 ; 0

dt −

t n+1
tn

n
f R u i−1 , u in ; 0

dt

t n+1/2 n+1/2
n+1/2
f i+1/2 − f i−1/2
...
Godunov’s scheme
does not require that we find the complete solution to the Riemann problem; it only
requires the flux at the stationary state in the solution to the Riemann problem
...
For example,
suppose that we want the boundary condition to represent an unbounded domain;
then no waves should go from the boundary to the interior of the domain
...
This can be checked during the calculation of the Godunov
flux at the left boundary; in particular, the flux at the boundary should be the flux
at the state inside the domain at the boundary
...
Then the fastest characteristics from the individual
Riemann problems at the cell sides do not intersect other sides if the convex hull f
of the flux function f between the two states satisfies
maxn
n

u i ≤u≤u i+1

df
du

(u)

t n+1/2 ≤ min { xi , xi+1 } for all i
...


However, it is possible that the interaction of the fastest waves from two Riemann
problems at neighboring sides could produce an even faster characteristic speed
...


With this choice, it may be possible to pre-compute the inflection points of the flux
to find the largest possible characteristic speeds
...
3
...

∂t
∂x
If the velocity satisfies λ > 0, then R(u L , u R ; 0) = u L
...
Similarly, if λ < 0, Godunov’s
scheme is
u in+1 = u in −

t n+1/2
n
λu i+1 − λu in ,
xi

which again is upwind differencing
...
Also note that for
linear advection, Godunov’s scheme is dissipative if |λ| t n+1/2 < xi for all cells i
...
3
...
For Godunov’s
method, we need to find the state that moves with zero speed in the solution of the
Riemann problem
...


Thus Godunov’s scheme is easy to implement for Burgers’ equation
...
This may cause difficulty in the computation of steady-state
solutions, stationary waves or transonic rarefactions
...
Suppose that the timestep is chosen
so that (3
...
If we are given piecewise constant initial data, we can
approximate the the solution to the conservation law by the cell averages of the
analytical solution to the conservation law
...


(3
...
3 First-Order Finite Difference Methods

(a) CFL = 0
...
5

(c) CFL = 0
...
0

Fig
...
10 Godunov scheme for Burgers’ shock: u vs
...
3-32:
godunov
...
3-33: Schemes
...
3-34: burgers
...
3-35: GUIConvexRiemannProblem1
...
These routines for solving scalar law Riemann problems are valid
only for convex or concave flux functions
...
10 and 3
...
Note that the numerical solution is not smeared as much as it was with
the Lax-Friedrichs scheme
...
1

(b) CFL = 0
...
9

(d) CFL = 1
...
3
...
x/t (solid = exact,
plus = numerical solution)

by clicking on Executable 3
...


3
...
6 Comparison of Lax–Friedrichs, Godunov and Rusanov
Of the three schemes we have just examined, the Rusanov scheme is probably the
easiest to implement, and the Godunov scheme is the least diffusive
...
4 Nonreflecting Boundary Conditions

125

advection, the modified equation analyses gave us
c x
∂ 2u
∂u ∂cu
+

(1 − γ ) 2 ≡ eG
∂t
∂x
2
∂x
for the Godunov scheme, which is equivalent to explicit upwind in this case
...

2
∂x
γ

From these analyses, we expect that both Lax–Friedrichs and Rusanov will be more
diffusive than Godunov
...
12 and 3
...
4
...
All schemes were run with CFL = 0
...
Of these four
schemes, the Godunov scheme generally produces results closest to the analytical
solution, except for states close to the sonic point (where the characteristic speed
is zero in the rarefaction)
...
3-7: guiconvexerror1
...
3-36: GUIConvexErrorAnalysis1
...
For comparisons involving Burgers’s equation and the
Buckley-Leverett model, view Program 3
...
C or run the executable Executable 3
...
Individual schemes can be run for Burgers’ equation and the Buckley-Leverett model by clicking on Executable 3
...

The main program for this executable can be viewed at Program 3
...
C

3
...
This condition represents a nonreflecting boundary
...

Suppose that our numerical method assumes that we have piecewise constant
data at the end of each timestep
...
3
...
x/t, CFL = 0
...
7

the interaction of waves at individual cell sides cannot cross a cell in less than one
timestep
...
Given the solution at the previous time, the analytical
solution of the conservation law at the right-hand boundary is
w n (x) = u n
j
where j is the index of the last cell
...

j

3
...
3
...
x/t, u L = 1,
rR = 0

In this case, we can use ghost cells to cause the numerical method to compute
the correct flux at the right-hand boundary
...
, j + k
where k is the width of the finite difference stencil, and set
un = un , 1 ≤ i ≤ k
j+i
j
Similarly, at a nonreflecting boundary on the left, we can set the ghost cell values
to the value of the solution in the first cell inside the domain
...
These
methods will usually require a more elaborate treatment of a nonreflecting boundary
to preserve their order at the boundary
...
4
3
...
1 Many texts (for example [96, page 125] and [72, page 315]) incorrectly write the Lax–Friedrichs
scheme on a uniform grid in the form
u in+1 =

t n+1/2
1 n
n
n
n
u i−1 + u i+1 −
f u i+1 − f u i−1
...

2
2 t i+1

(b) Show that this incorrect form of the Lax–Friedrichs scheme is such that odd-indexed values
of the solution at the new time depend only on even-indexed values of the solution at the old
time
...

3
...
2 Program Lax-Friedrichs, Godunov and Rusanov for Burgers’ equation
...
1, 1
...
9
(b) a shock with u L = 0, u R = −2 on x ∈ (−1
...
1) and 0 < t ≤ 0
...
2, 2
...
9
(d) a transonic rarefaction, with u L = −1, u R = 1 on x ∈ (−1
...
0) and 0 < t ≤ 0
...

When comparing the schemes, do the following steps:
(a) use 100 grid cells in each calculation;
(b) place the initial discontinuity in the interior of your grid at x = 0;
(c) run each scheme for CFL numbers 0
...
5;
(d) plot the solution at the final time, but scale the horizontal axis by dividing the spatial coordinates by the final time
...
)
3
...
3 Marquina’s flux formula [45] for scalar laws involves using the Rusanov scheme to approximate the flux in transonic Riemann problems, and Godunov’s scheme otherwise
...

L
R
R
L
u∈int[u L ,u r ]
2
Test this scheme on the computations in the previous problem
...
4
...
19)
...
1, 1
...
9
(b) a shock with ρ R = ρmax , ρ L = ρmax /e, a = e − 1 on x ∈ (−1
...
1) and 0 < t ≤ 0
...
1, 2
...
9

129

3
...
0, 1
...
9
In addition, plot the characteristic speeds versus x/t for each of these Riemann problems
...
4
...
21)
...

x2

(a) Assuming that the velocity v, longitudinal mixing length α , porosity φ, diffusivity δc and
tortuosity τ are all constant, rewrite the miscible displacement problem as a convectiondiffusion problem and determine a formula for the cell Peclet number
...

(c) Write the upwind difference scheme for the miscible displacement problem with explicit
centered differences for the diffusive terms as a conservative difference scheme
...
Experiment with values
of the Peclet number to determine when the numerical diffusion dominates the physical
diffusion
...
4
...

3
...
7 We can plot approximate trajectories for numerical solutions of conservation laws using a contour
plotter
...
This gives us a
2D lattice of numerical values u in
...

(a) Explain why this contour plot would approximately produce the trajectories of u(x, t)
...
5,
0
...
7 cos(2π x),

x < 0
...
5

The difficulty with this approach for plotting trajectories is that it does not plot trajectories in
regions where the solution is constant
...
5 Lax–Wendroff Process
Modified equation analyses of any of the previous schemes we have studied indicate
that the error term is first-order in either t or x
...


130

Nonlinear Scalar Laws

Consider the explicit centered difference scheme on a uniform grid
t n+1/2
n
n
f u i+1 − f u i−1
...

2

As we have seen, the modified equation analysis of the explicit centered difference
method for linear advection shows that the error term is O( x 2 ) + O( t)
...

Nevertheless, let us carry out a modified equation analysis for the general nonlinear scalar conservation law
...

∂x
2 ∂x2
6 ∂x3

We assume that the modified equation is
˜
˜
∂ u ∂ f (u)
+
= e
...

˜
˜
∂t
∂x
∂u
∂x
du
∂x
Thus the difference equation leads to
n
n
f u i+1 − f u i−1
u in+1 − u in
+
t
2 x
2
˜
˜
˜
∂ f (u) 1 ∂ 3 f 2
∂u 1 ∂ u
+
+
t+
x

2
∂t
2 ∂t
∂x
6 ∂x3
˜
∂ d f (u)

1 ∂3 f 2
∂e

e +
=e+
x +
3
˜
6 ∂x
∂t
∂x
du
∂x

˜
˜
d f (u) ∂ f (u)
˜
du
∂x

t

...
We will approximate this term by finite differences
u

131

3
...


On a non-uniform mesh, we should take the Lax-Wendroff flux to be
n
xi − t n+1/2 d f f u i+1 − f u in
du
=

...


du i+1/2
du 2 (u i+1 +u i )
n+1/2
f i+1/2

f u in

n
xi+1 + f u i+1

(3
...


(3
...

du
However, this scheme does not work well for general nonlinear problems, as the
next example shows
...
5
...
For example, if we consider the Riemann problem initial data
for Burgers’ equation with initial data
u(x, 0) =

−1,
1,

x <0
x <0
n+1/2

then the Lax–Wendroff fluxes in (3
...
The con2
servative difference (2
...

It is more common to implement the Lax–Wendroff scheme in two steps
...

= u in −
xi

u i+1/2 =

(3
...
30b)

132

Nonlinear Scalar Laws

(a) Lax–Wendroff

(b) MacCormack

Fig
...
14 Second-order schemes for traffic flow rarefaction: CFL = 0
...

Figure 3
...
Note that the
Lax–Wendroff results are significantly more accurate than the first-order schemes
in Figure 3
...
A program to implement the Lax–Wendroff scheme can be found in
Program 3
...
C Students can also execute the Lax–Wendroff scheme by
clicking on the web link Executable 3
...


3
...
A
popular scheme is the MacCormack scheme [114]:
t n+1/2
n
f u i+1 − f u in ;
xi
t n+1/2
˜
˜ n+1
˜
f u in+1 − f u i−1
= u in+1 −
xi
1
˜
= u in + u in+2
...
31a)
;

(3
...
31c)

An alternative form of this scheme uses backward differencing in the predictor, and
forward differencing the the corrector
...
6 Other Second Order Schemes

133

and backward differencing between successive steps of this scheme
...
14
shows some numerical results with the MacCormack scheme for a rarefaction with
the traffic flow problem
...
(In classical applications of these methods, artificial diffusion was
added to reduce the likelihood of such behavior
...
6-40: Schemes
...
6-11:
guiconvex2 and selecting scheme to be mac cormack in the View pulldown
menu, inside the Numerical Method Parameters group
...
The
Beam–Warming scheme [173]: uses the solution values u n for j = i − 2, i − 1, i
j
to construct a second-order approximation to the flux at xi+1/2
...

We will discuss this scheme for linear advection in Section 5
...
2
...
This scheme also needs to be properly upwinded and
combined with artificial diffusion to work properly
...
5
...

The leap-frog scheme uses data from two previous timesteps to compute
u in+1 = u in−1 −

t n+1/2 + t n−1/2
n
n
f u i+1 − f u i−1
...
313]
...

Students can perform their own comparisons of these schemes for convex conservation laws by clicking on the web links Executable 3
...
6-13: guiconvexerror2, Executable 3
...
6-15: guierror2
...
6-41: GUIConvexRiemannProblem2
...
6-42: GUIConvexErrorAnalysis2
...
6-43: GUIRiemannProblem2
...
6-44: GUIErrorAnalysis2
...


Exercises for 3
...
6
...
Plot the total dissipation and dispersion for each
...

3
...
2 Perform modified equation analyses for the Lax–Wendroff, MacCormack, and leap-frog applied
to linear advection
...


134

Nonlinear Scalar Laws

3
...
3 Program Lax–Wendroff, MacCormack, and leap-frog for linear advection
...
For
example, compare the location of the oscillations in the Lax–Wendroff scheme to the dispersion
results from the Fourier analysis
...
6
...
Compare
the results to Godunov’s scheme for a Riemann problem with shock moving at speed 1, and for
a stationary shock
...
6
...
Compare the results to Godunov’s scheme for a Riemann problem with
shock moving at speed 1, and for a stationary shock
...
)
3
...
6 Develop a second-order treatment of non-reflecting boundary conditions for the Lax–Wendroff
method
...
For example, gas dynamics involves equations for conservation of mass,
momentum and energy
...


4
...
In order to assist the student in understanding these issues, we
will present applications of these issues to the shallow water equations throughout
the discussion of the general theory
...


4
...
1 Hyperbolicity and Characteristics
Systems of conservation laws take the form
d
dt

u(x, t) dx +



F(u(x, t))n ds =

b(x, t) dx,

(4
...


135

136

Nonlinear Hyperbolic Systems

Example 4
...
1 In a body of water with zero slope angle and zero friction coefficient, the equations for the motion of shallow water are [175, page 84]
d
dt

h
vh

dx +



hv · n
vhv · n + n 1 gh 2
2

ds = 0
...
2)

Here h is the height of the water, v is the velocity, g is the vertical component of
the acceleration due to gravity
...

Definition 4
...
2 The system of conservation laws (4
...
In other words, (4
...


The diagonal entries of (n) are called the characteristic speeds
...

In order to simplify the notation in the definition of characteristic speeds, we will
typically suppress the dependence of X and on n, and write
∂Fn
X=X
...

∂xi

(4
...
” The quasilinear form of the
conservation law in smooth flow will then be written
∂u ∂w
+
∂w ∂t

k
i=1

∂Fei ∂w
= b(x, t)
...
1
...
1) has a continuously differentiable solution u at some point (x, t)
...
Finally, suppose that we can

(4
...
1 Theory of Hyperbolic Systems

find a nonsingular matrix Y and a Jordan canonical form
−1

∂u
∂w

so that

∂Fn
Y=Y
...
5)

Then the diagonal entries of
are the characteristic speeds for (4
...

Proof Since
∂Fn
∂Fn
=
∂u
∂w

∂u
∂w

−1

it follows that
∂Fn
∂Fn
X≡
∂u
∂u

∂u
Y =
∂w

∂u
Y
∂w

≡X
...
1
...
2), it is natural to take the array
of flux variables to be
h
w=

...


In order to determine if the shallow water conservation laws are hyperbolic,
Definition 4
...
2 requires that we find the eigenvalues of
∂u
∂w

−1

∂Fn
v·n
=
ng
∂w

hn

...
Let us define the speed of sound by c = gh
...

v·n+c

138

Nonlinear Hyperbolic Systems

Here n N is an orthogonal matrix with first column equal to n
...
The characteristic speeds are v · n ± c, and v · n in multiple dimensions
k > 1
...

(n + v/c)h

In many applied problems, the characteristic speeds are distinct, so the problem
has a full set of characteristic directions
...
Many physical problems have a full set of characteristic
directions even if the characteristic speeds are not distinct
...
We will also see interesting problems in which some
characteristic speeds are equal along special degenerate curves (as in the vibrating
string of Section 4
...
below)
...
10), is not always diagonal
...

Definition 4
...
5 Given a unit vector n, an eigenvalue λi = ei
uinely nonlinear if and only if
for all u

ei of

∂Fn
∂u

is gen-

∂λi
Xei = 0
...

∂u

Linearly degenerate waves are sometimes called contact discontinuities
...
5)
...
1
...

Yei =
n
n
∂w
∂w
2
To see that v · n is linearly degenerate in multiple dimensions, we compute
∂v · n 0
= 0
∂w N

n

0
= 0
...
1 Theory of Hyperbolic Systems

139

4
...
2 Linear Systems
Some interesting physical problems, such as Maxwell’s equations, are linear with
constant coefficients
...

Lemma 4
...
7 Consider the linear hyperbolic system for u ∈ Rm in a single spatial
variable x, namely
∂u
∂u
+A
= 0,
∂t
∂x
u(x, 0) = u0 (x),
where A is some fixed matrix
...
Then the solution to

Xe j e j X−1 u0 (x − λ j t)
...

Then we can rewrite the conservation law in the form
∂c
∂c
+
= 0,
∂t
∂x
c(x, 0) = X−1 u0 (x)
...

We can solve for the individual components to get c j (x, t) = e j X−1 u0 (x − λ j t)
...


Xe j c j (x, t) =
j

j

Just for fun, we will examine the solution of a linear hyperbolic system of two
conservation laws involving a nontrivial Jordan canonical form
...
1
...

λ

is a nontrivial Jordan block, and that u0 (x) is continuously differentiable
...

e2 u0 (x − λt)

Proof If we transform to characteristic coordinates ξ = x − λt and τ = t, then
˜
u(ξ, τ ) ≡ u(x, t) satisfies
˜
∂u
0
+
0
∂τ

˜
1 ∂u
= 0
...
After transforming back to the original coordinates x and t, we obtain the
claimed result
...
Note that
the solution of this conservation law can involve polynomial growth in time, if
the initial data is continuously differentiable; if the initial data is not continuously
differentiable, then the solution can blow up immediately
...
A principal difficulty in this extension is
the complication due to wave propagation on characteristic cones; see [54] for
more details
...

4
...
3 Frames of Reference
In developing the conservation laws for physical various models, it will be useful
to view the fluid in various frames of reference
...
On the other
hand, the Eulerian frame views the fluid in terms of the current position of the
material particles
...

Following the notation in Fung’s solid mechanics book [52], we will represent the
Lagrangian coordinates by a ∈ 0 , and the Eulerian coordinates by x ∈ t
...
1 Theory of Hyperbolic Systems

the current position of a particle originally at position a is x(a, t)
...

4
...
3
...

If b, c ∈ Rm then
b c = tr (bc ),

(4
...
Similarly,
if y ∈ Rk and w(y) ∈ Rk , then it is easy to see that
∇y

· w = tr (∇ y w ) = tr

∂w

...
7)

There are several identities based on the product rule for differentiation
...


(4
...

∂y

(4
...

dt
dt

(4
...
In order to clarify the independent variables in the formulas, we
will use subscript L for dependence on (a, t), and subscript E for dependence on
(x, t)
...

∂a

If u E (x, t) ∈ Rm , let
uL (a, t) ≡ u E (x(a, t), t)
...
11)

142

Nonlinear Hyperbolic Systems

Then the chain rule implies that
∂u E
∂uL
=
JL
...
12)

We can transpose this equation to obtain ∇ a uL JL (∇ x u E ), or take the trace to obtain
∂u
∇ a · u L = tr ( E J L )
...

∂t

(4
...

∂t
∂a

(4
...
t), t) ≡ JL (a, t)
...
14)
and (4
...

∂t
∂x

(4
...
15) and finally the fact
that a matrix with one row a scalar multiple of another has zero determinant, we
compute




e1 J L
e1 JL



...


...

k
k

...


 k
∂ det JL
 ∂JL
∂v E

=
det e
det  =1 ei ∂x e e JL 
=

 i ∂t  i=1
∂t



...


...

ek JL
ek J L


e1 J L



...




...

det  i ∂x ei ei JL  =
ei

∂x



...




...

∂t
The chain rule can also be used to derive the formula for the material
derivative (which is sometimes called the substantial derivative): if uL (a, t) =

(4
...
1 Theory of Hyperbolic Systems

u E (x(a, t), t) ∈ Rm then
∂u E
∂u E
∂uL
=
+
vE
...
17)

Equality of mixed partial derivatives can be used to prove that
∇a

· |JL |J−1 = 0
...
18)

If BL (a, t) = B E (x(a, t), t) ∈ Rk×m then we can use the product rule (4
...
18), and the chain rule (4
...

L

(4
...
1
...
2 Change of Frame of Reference for Conservation Laws
We can use a number of identities from the previous subsection to prove the following lemma
...
1
...
Then uL (a, t) ≡
u E (x(a, t), t) satisfies the (Lagrangian) conservation law
d
dt

uL (a, t)|JL | da +
a



[(FL − uL vL )J− |JL |na dsa =
L
a

bL (a, t)|JL | da
...

a

Further, the divergence theorem implies that for any fixed vector z,



z F E (u(x, t))nx dsx =
x

(∇ x · F E z) dx =
x

tr
x

then change of variables in integration implies that
=

tr
a

J−1
L

∂FL z
|JL | da
∂a

∂F E z
∂x

dx

144

Nonlinear Hyperbolic Systems

then the product rule (4
...
18) imply that
=

tr
a

∂J−1 FL z|JL |
L
da =
∂a

∇a

· J−1 FL z|JL | da
L

a

and finally the divergence theorem implies that
=

z FL J− na |JL | dsa
...
17) for the material derivative implies

x

∂u E
dx =
∂t

x

∂uL
∂u E

v E dx
∂t
∂x

then change of variables in integration and the chain rule (4
...
16) for the rate of change of the Jacobian, together with the
chain rule (4
...
18), and the product rule
(4
...
8) with b = J−1 vL |JL | and c = uL implies that
L
=
a

∂uL |JL |

∂t

∇a

J−1 vL |JL |uL
L

da
...

Note that in smooth flow, this lemma says that the conservation law
∂u E
+
∂t

k
i=1

∂F E ei
= bE
∂xi

4
...

∂ai

4
...
3
...

Lemma 4
...
10 [63] Suppose that at some point in the domain, a discontinuity
propagates with speed σ E in direction n E with respect the Eulerian coordinate
system x(a, t), and with speed σL and normal nL in the Lagrangian coordinate
system a
...

∂a

Proof Suppose that we have a propagating discontinuity surface described as the
level set of a function φ E in the Eulerian frame of reference: φ E (x, t) = 0
...
The velocity of the surface in this
normal direction must be continuous across the surface
...
Then we can differentiate
dt
the level set equation in time to get
0=

∂φ E ∂xt
∂φ E
∂φ E
+
= ∇x φ E · n E σ E +

...

∂t
We can also write the discontinuity surface in the Lagrangian frame as φL (a, t) =
φ E (x(a, t), t) = 0
...
Note that the chain rule for partial differentiation implies that
∇a φL = JL ∇x φ E
...
Thus the normal directions in the two frames of reference are related as follows:
1
1
∇x φ E
n L = ∇a φ L
= J L ∇x φ E
= JL nE

...

This result allows us to write
1
1
nL = JL nE
or n E = J− nL −

...
20)

146

Nonlinear Hyperbolic Systems

Of course, the equation φL (a, t) = 0 gives us a one-parameter representation of
the motion of points a in the surface
...
Since
0=

∂φL dat
∂φL
+
,
∂t
∂a dt

we see as before that the normal velocity of points on the surface is dat = nL σL ,
dt
where the normal speed of the discontinuity surface in the Lagrangian frame is
σL = −

∂φL
1

...

dt
∂a dt
∂t
Now we can see that the Eulerian and Lagrangian normal discontinuity speeds are
related by
σE = −
=

1
1
∂φ E
dxt
=
(∇x φ E ) ·
= n E · [JL nL σL + v]
∂t ∇x φ E
∇x φ E
dt

∇a φ L
nE JL JL nE
σL + nE v = JL nE σL + nE · v =
σL + n E · v
...
1
...
1) as partial differential equations (4
...
However, these equations could become invalid because
of a propagating discontinuity
...
1
...

Lemma 4
...
11 Suppose that we have a fixed domain ⊂ Rk which is divided into
two sub-domains L and R by a single propagating discontinuity on a surface D,
associated with the conservation law
d
u dx +
Fn ds =
b dx
...
21)
dt

We will assume that the normal n to the discontinuity is oriented to point from L to
R
...
Similarly, let FL and F R be

147

4
...

Finally, let σ be the speed of the discontinuity, oriented corresponding to the normal
n
...


(4
...


Away from the discontinuity surface, the conservation law can be written as the
partial differential equation
∂u
+
∂t

k
i=1

∂Fei
= b
...

D

∪ D to get

Fn ds +

[F R − FL ]n ds −
D

[u R − uL ]σ ds
...
21) for the conservation law, we obtain
[F R − FL ]n ds =
D

[u R − uL ]σ ds
...
22)
...

Note that the normal n appears in the definition of the discontinuity speed σ ; thus
reversing the sign of the normal leads to the same result
...
1
...
2) are
[hv · n] = [h]σ
1
vhv · n + ngh 2 = [vh]σ
...

Then the jump conditions can be rewritten
[hξ ] = 0
1
ngh 2 − vhξ = 0
...
Note that [v · n] = −[ξ ] and [hξ ] = 0, so
[v · nhξ ] = (h R ξ R )[v · n] = −(h R ξ R )[ξ ] = −[hξ 2 ];
thus we can further modify the jump conditions to get
[hξ ] = 0
1 2
gh + hξ 2 = 0
2
[v · n⊥ hξ ] = 0
...
If [h] = 0 and h L = h R > 0,
then [ξ ] = 0
...
We must have [v · n⊥ ] = 0, otherwise there is no
jump at all
...
This
is a contact discontinuity
...
1 Theory of Hyperbolic Systems

149

On the other hand, suppose that [h] = 0
...
We need to specify two variables to determine a solution
...
Define the relative jump in the water
height to be z = (h R − h L )/h L
...
We can use this
expression for ξ R to rewrite the second jump condition in the form
1
1
ξL2
gh L (1 + z)2 +
= gh L + ξL2
...

2
2

At this point, given h L and h R , we know how to determine ξL and ξ R
...

2
hL


It is interesting to note that as h R → h L , we find that σ → vL · n ± gh L = λ; in
other words, the speed of infinitesimal discontinuities is the same as a characteristic
speed
...

2

The locus of points satisfying the Rankine–Hugoniot jump conditions consists
of two curves in w-space
...

+
hL
hR

Alternatively, we could fix the right state (h R , v R ) and determine vL (h L ) and
σ (h L )
...
1
...
2) satisfy
v(h) = vL − n(h − h L )

g
2

1
1
+
hL
h

where h > h L > 0

with discontinuity speed
σ (h) = vL · n −

g

hL + h h

...

2 hR

Across a contact discontinuity, both the water height h and the normal velocity v · n
are continuous, and the speed of a contact discontinuity is σ = v · n
...
1
...

Definition 4
...
14 Suppose that for all states u and all directions n, the characteristic speeds obtained from ∂Fn/∂u are real and either genuinely nonlinear or linear
degenerate
...
Suppose that the characteristic speeds have
been ordered so that
λ 1 ≤ λ2 ≤
...


(4
...


(4
...
1 Theory of Hyperbolic Systems

These inequalities require that m − j + 1 characteristics enter the shock on the
left (namely those with indices j,
...
, j)
...
The Rankine-Hugoniot jump
conditions give us m equations to determine these unknowns
...
23) provide the remaining conditions needed to completely specify
the left and right states and the shock speed
...
23) are important, we will generalize the analysis in section 3
...
5 to a system of conservation laws in one spatial
dimension
...

Also suppose that the system is hyperbolic with a full set of characteristic directions;
then by Definition 4
...
2,
∂f
X=X ,
∂u
where is diagonal, and its diagonal entries satisfy the Lax admissibility conditions
(4
...
Consider the viscous modification of the conservation law
∂u
∂f(u )
∂ 2u
+
=
,
∂t
∂x
∂x2
where

> 0
...


As in the case of a single conservation law, if u satisfies the viscous conservation
law, then w satisfies the system of ordinary differential equations
∂f
− Iσ w = w
...
Taking the limit as ξ → −∞ implies that u → uL , and consequently

152

Nonlinear Hyperbolic Systems

that w → 0
...

Because the initial states uL and ur satisfy the Rankine–Hugoniot condition, both
of these states are stationary states of this system of ordinary differential equations
for w
...
Note that if w = uL or
w = u R and w + yδ is a perturbed solution of the ordinary differential equations,
then
d(w + yδ)
= f(w + yδ) − f(uL ) − (w + yδ − uL )σ
...

dt
∂u
Thus
X−1

dy
=(
dt

− Iσ )X−1 y
...
23) imply that the jth entry of X−1 w is linearly
unstable at uL and linearly stable at u R
...

Example 4
...
15 The slow discontinuity in the shallow water equations is admissi√

ble as long as vL · n − gh L > σ > v R · n − gh R
...


These inequalities imply that h L < h L +h R h R and h L +h R h L < h R
...
Thus the
slow shock is admissible for h R > h L
...

4
...
6 Asymptotic Behavior of Hugoniot Loci
The following discussion has been taken from Lax [89]
...
The multidimensional case is more

153

4
...
See, for example, [37] for a discussion of shock reflection, or
[104, 146] for a discussion of Riemann problems for two-dimensional gas dynamics
...
1
...
23)
...
Given a left state
wL , the locus of right states w R ( ) that can be connected to wL by an admissible
shock in the jth wave family, and the associated characteristic speed and shock
speed along this locus satisfy
λ j ( ) = λ j (0) + + O( 2 )

(4
...

d
d
=0
2

(4
...
24c)

Proof Given a state wL , we would like to determine the flux variables w R that can
be connected to wL by a shock in the jth wave family
...
To see this fact, note that given
wL , the Rankine–Hugoniot conditions
[f(w R ) − f(wL )] = [(u(w R ) − u(wL )]σ
involve m equations for m + 1 unknowns, namely w R and σ
...

If we differentiate the Rankine–Hugoniot conditions with respect to , we get
∂f(w)
∂w
At

wR

∂u
dw R
=
d
∂w

wR

dw R

σ ( ) + [u(w R ( )) − u(wL )]
...


The eigenvector equation for the characteristic speeds shows that, after adjusting
by a scalar multiple if necessary, there is some index j so that dw R | =0 is a scalar
d
multiple of Ye j , and σ (0) = λ j
...
25)

154

Nonlinear Hyperbolic Systems

We will assume that the genuinely nonlinear eigenvectors Yei have been normalized so that for all genuinely nonlinear waves
∂λ j
∂w

wL

Ye j = 1

and that for all linearly degenerate waves Yei = 1
...


Let us differentiate Equation (4
...


(4
...


If we subtract this equation from (4
...


=0


...
27)

155

4
...


Thus at the left state wL , the characteristic speed is changing twice as fast as the
shock speed along the Hugoniot locus
...
27) can be rewritten
∂f
∂w
=

wL



∂u
∂w

wL

d 2wR
d 2

λj


∂u
(wL )Ye j 2
∂w
d

=0



=0



dλ j


dYe j
d
=0

=0

= 0
...
Because the left-hand side in this equation involves derivatives
of different order, we can parameterize so that β = 0
...
24) says that the shock curve is continuous to second
order with the integral curve of the characteristic direction
...

Thus the Hugoniot locus w R ( ) only involves parameters < 0
...

Example 4
...
17 Let us perform an asymptotic analysis of the jump conditions for
the shallow water equations
...

Then the speed of the shock relative to the fluid velocity on the left is
ξL = σ − vL = ∓ gh L −

1

...
1
...

g

From this, we find that the relative shock speed on the right is

h L ∓ gh L − 1
2
h L ξL
1
2
ξR =
1± √

gh L ±
≈∓
hR
2
3 hL g
h ± 2 hL
L

≈∓

gh L ±

3

1
2

g

1∓

2

3 hL g

≈ ∓ gh L +

1

...

3

It follows that the characteristic speed to the right of the shock is
gh R ≈ vL −

2

3

gh L ±

≈ vL −

vR −

2
2
gh L ≈ vL −

3
3

2

3

gh L 1 ∓

1

3 gh L

= vL ∓

gh L 1 ∓

2

3 gh L

gh L −
...
We also note
that

hL
∓ h L /g 2
hR


wR =
1
vR
vL
3
is perturbed by the appropriate eigenvector of the system
...
1
...

Then
∂w
x·n
1
∂w
˜
˜
= −w 2 and
=w n
...
1 Theory of Hyperbolic Systems

157

We can substitute these values into the conservation law to get
0=

∂u ∂w
+
∂w ∂t

k
i=1

∂Fei ∂w
=
∂w ∂xi

∂u x · n
1
∂Fn
˜

w
...
In other words, for some index j and some scalar α w = Ye j α and
x · n/t = λ j
...

∂w
∂w
These results motivate the following definition
...
1
...

∂w
˜
Then the function w(x, t) = w(x · n/t) is a centered rarefaction if and only if
there is some index 1 ≤ j ≤ m such that
˜
˜
w = Y(w)e j α
for some function α of the similarity variable x · n/t
...

Note that we cannot have a centered rarefaction in a linearly degenerate wave
family
...
28) for w , so we
˜
cannot find an ordinary differential equation for w
...


(4
...
1
...

∂w
Then r (w) is a Riemann invariant of this system if and only if
for all n for all j =

∂r
Ye j = 0
...

Example 4
...
20 For the shallow water equations (4
...

n
dy v
3
Note that we obtained these equations for the flux variables in lemma 4
...
4 under
g
the assumption that h > 0
...
We can integrate this
dh
ordinary differential equation to get
v R · n − vL · n
,

g


which is equivalent to v R · n ± 2 gh R = vL · n ± 2 gh L
...

2 hR − 2 hL = ∓

Summary 4
...
21 The Riemann invariants for the shallow water equations (4
...
On fast centered rarefactions r− is constant, and on slow
centered rarefactions r+ is constant
...
e
...

Note that centered rarefaction curves cannot be constructed as functions in space
unless the characteristic speeds are increasing from left to right
...


4
...
1
...
These take the form
∂f
∂u
+
= 0 for x ∈ R, t > 0
∂t
∂x
u , x <0
u(x, 0) = L
u R , x > 0
...
For problems satisfying the hypotheses of the Lax admissibility condition,
the solutions of the Riemann problems involve a combination of centered rarefaction waves, Hugoniot loci and contact discontinuities, which are discontinuities in
linearly degenerate wave families
...
We construct curves in the state space given
by the flux variables w as follows
...
Note that the admissibility conditions on the shock require that
the shock curve be used only in the direction of decreasing characteristic speed
...

From the right state w R we construct the centered rarefaction wave in the direction
of decreasing largest characteristic speed, and we construct the Hugoniot locus
in the direction of increasing largest characteristic speed
...
This assumption
leads to a unique path from wL to w R ; this path is the solution of the Riemann
problem
...
See [104,
105, 145, 146]
...
1
...


160

Nonlinear Hyperbolic Systems

Lemma 4
...
22 Suppose that u(x, t) ∈ Rm solves the linear constant coefficient
system
∂u
∂u
+A
= 0,
∂t
∂x

u(x, 0) =

uL ,
uR ,

x <0
x > 0,

where the eigenvectors and eigenvalues of A are given by AX = X and
is
diagonal with real entries
...

2
2
Further, the flux evaluated at the solution of this Riemann problem is
1
AR(uL , u R ; ξ ) = AuL + [A − A sign(A − Iξ )](u R − uL )
2
1
= Au R − [A + A sign(A − Iξ )](u R − uL )
2
1
1
= A(u R + uL ) − A sign(A − Iξ )(u R − uL )
...

2
2
Proof Let φ(ξ ) be continuously differentiable and such that φ(ξ ) = 0 for ξ < 0 and
φ(ξ ) = 1 for ξ > 1
...


j=1

Note that u (x, 0) = uL for x < 0 and u (x, 0) = u R for x > (2m − 1)
...
1
...
1 Theory of Hyperbolic Systems

data u is
x − λ j t − 2( j − 1)

m

u (x, t) = uL +

Xe j φ

e j X−1 (u R − uL )
...

We compute the characteristic expansion coefficients y for the jump in the solution by solving Xy = u R − uL
...

Provided that ξ ∈ {λ j }, the part of the solution of the Riemann problem that moves
with speed ξ can be written
Xe j e j X−1 (u R − uL )

R(uL , u R ; ξ ) = uL +
j:λ j <ξ

= uL +

1
2

Xe j [1 − sign(λ j − ξ )]e j X−1 (u R − uL )
j

1
= uL + [I − sign(A − Iξ )](u R − uL )
2
or
R(uL , u R ; ξ ) = u R −

(Xe j )(e j y)
j:λ j >ξ

Xe j e j X−1 (u R − uL )

= uR −
j:λ j >ξ

= uR −

1
2

Xe j [sign(λ j − ξ ) + 1]e j X−1 (u R − uL )
j

1
= u R − [I + sign(A − Iξ )](u R − uL )
...

2
2
Provided that ξ ∈ {λ j }, the flux f(u) = Au at the solution to the Riemann problem
is
1
f(R(uL , u R ; ξ )) = AuL + [A − A sign(A − Iξ )](u R − uL )
2
1
= Au R − [A + A sign(A − Iξ )](u R − uL )
2
1
1
= A(uL + u R ) − [A sign(A − Iξ )](u R − uL )
...

Here we have defined
1
A+ = [A + |A|] =
2

Xe j
j

λ j + |λ j |
e j X−1 =
2

Xe j max{λ j , 0}e j X−1
j

−1

=

Xe j λ j e j X
j:λ j >0

and
1
A− = [A − |A|] =
2

Xe j
j

λ j − |λ j |
e j X−1 =
2

Xe j min{λ j , 0}e j X−1
j

−1

=

Xe j λ j e j X
...


4
...
10 Riemann Problem for Shallow Water
We are now able to describe the solution of the Riemann problem for the shallow
water equations
...


If n · v− (h ∗ ) = n · v+ (h ∗ ), let
ξL =

n · vL −
n · vL −



h∗
g h L +h ∗ h L ,
2

h∗ > h L

gh L ,

h∗ ≤ h L

4
...

Given a left state (h L , vL ), the Rankine-Hugoniot jump conditions satisfy the
Lax admissibility condition on the shock in the direction of increasing h: h R >
h L ; this implies decreasing n · v along the Hugoniot locus
...
Similarly, the fast wave family has characteristic speed n · v + gh

and Riemann invariant n · v − 2 gh
...
The fast rarefaction curve proceeds out of the right state (h R , v R )
in the direction of decreasing h and decreasing n · v
...
If
n · vL + 2 gh L > n · v R − 2 gh R ,
then the slow wave curve out of (h L , vL ) must intersect the water height and normal
velocity of the fast wave curve out of (h R , v R ), at some point where (h ∗ , n · v− (h ∗ )) =
(h ∗ , n · v+ (h ∗ ))
...
1
...
1
...

Summary 4
...
23 Given a left state (h L , vL ) and a right state (h R , v R ), the solution
of the one-dimensional Riemann problem for the shallow water equations (4
...
There are four different structural
forms for the solution of the Riemann problem: either a slow shock or a slow
rarefaction, a contact discontinuity, and then either a fast shock or a fast rarefaction
...
1-45: Riemann Solver for Shallow Water Equations This program
contains a function slowwavesw to find points on the slow wave curve given the
left state, and a function fastwavesw to find points on the fast wave curve given
the right state
...
e
...

You can also execute this program by clicking on Executable 4
...

In Figure 4
...
Note that in a rarefaction, the
characteristic speed associated with that rarefaction increases from left to right;
further, in the plot of characteristic speed versus x/t, the relevant characteristic
speed for a rarefaction plots as a straight line with slope one with zero intercept
...
2 shows the solution of a shallow water Riemann problem involving a
rarefaction and a shock
...
Figures 4
...
4 show
solutions to shallow water Riemann problems involving a shock and a rarefaction,
or two shocks
...
1
...
We will call these functions entropy functions, although they may not necessarily have the physical units of entropy
...
1 Theory of Hyperbolic Systems

(a) Height vs
...
x/t

(c) Height vs
...
x/t

Fig
...
1 Shallow water Riemann problem (rarefaction–rarefaction)

where w is a vector of flux variables, we want to find an entropy function S(w) and
entropy flux (w) so that

for all x for all t > 0 for all n fixed,

∂n
∂w

=

∂S
∂w

∂u
∂w

−1

∂Fn

...
29)

166

Nonlinear Hyperbolic Systems

(a) Height vs
...
x/t

(c) Height vs
...
x/t

Fig
...
2 Shallow water Riemann problem (rarefaction–shock)

conserved:
∂S
∂w

∂u
∂w

∂S
+
=
∂t

k

0=

i=1

−1

∂u ∂w
+
∂w ∂t

∂ei

...
30)

4
...
velocity

(b) Characteristic speeds vs
...
x/t

167

(d) Velocity vs
...
4
...
1
...
2) the total energy is E =
1
ρ(hv · v + gh 2 ) and the energy flux is = ρ( 1 hv · v + gh 2 )v
...

2

168

Nonlinear Hyperbolic Systems

(a) Height vs
...
x/t

(c) Height vs
...
x/t

Fig
...
4 Shallow water Riemann problem (shock–shock)

Thus
∂E
∂w

∂u
∂w

−1

∂F
= ρ gh + 1 v · v,
2
∂w

hv

= ρ ( 1 v · v + 2gh)v · n,
2

v·n
ng

hn
Iv · n

gh 2 n + hv · nv + 1 hv · vn
2

=



...


169

4
...

Ih

Attempting a Cholesky factorization of this matrix shows that it is positive definite
if and only if v · v < gh
...

2
It follows that
1
1
1
1
1
[E] = ρ gh 2 + hv · v = ρ h(v · n)2 + gh 2 + ρ gh 2 + ρ[h( v
2
2
2
4
2
1
hL + hR
1
+ [h] v ⊥ 2
= ρ[h]σ 2 + ρg[h]
2
2
2
1
hL + hR
= ρ[h] σ 2 + g
+ v⊥ 2
...
In this case, the velocities of the water relative to the shock
are
n · vL − σ =

g

hL + hR hR
2
hL

and

n · vR − σ =

g

hL + hR hL

...
Thus in this
case the total energy E decreases from the pre-shock state (the right state) to the
post-shock state (the left state)
...
On both sides of the shock the velocity of the water relative to the shock is
negative, so this condition says that the total energy E decreases from the pre-shock
state (the left state) to the post-shock state (the right state)
...

Lemma 4
...
25 (Lax [89]) Suppose that u(x, t) ∈ Rm solves the hyperbolic conservation law
∂u
+
∂t

k
i=1

∂F(u)ei
=0
∂xi

170

Nonlinear Hyperbolic Systems

in the limit of vanishing diffusion, meaning that u → u weakly where u solves the
viscous conservation law
∂u
+
∂t

∂F(u )ei
=
∂xi

k
i=1

k
i=1

∂ 2u

...

∂u
∂u ∂u
If S(u) is locally bounded for all x and t, then

for all φ(x, t) ∈ C0 (Rk × R), φ(x, t) ≥ 0,




∂φ
S(u) +
k
R ∂t

0

k
i=1

∂φ
∂xi

(u) · ei dx dt −

Rk

φ(x, 0)S(u)(x, 0) dx ≥ 0
...

Proof As in the one-dimensional case, the maximum principle shows that the viscous conservation law has at most one solution, but the conservation law may have
multiple solutions; this is the reason for the assumption that u converges to u
...

Since S(u) is an entropy function with entropy flux (u), we have that
0=
=

∂S
∂u

∂u
+
∂t

∂ S(u )
+
∂t
k

+
i=1

k
i=1

k
i=1

∂u
∂xi

∂F(u )ei

∂xi

k
i=1

∂ei · (u )

∂xi
∂ S
∂u2
2

∂ 2u
∂xi2

k
i=1

∂u
∂xi


∂xi

∂ S ∂u
∂u ∂xi


...
1 Theory of Hyperbolic Systems

We can also compute

0

k

R

φ
k
i=1


∂xi

∂ S ∂u
∂u ∂xi



dx dt = −

k
k

R

0


=

Rk

0

i=1
k

i=1

∂φ ∂ S(u )
dx dt
∂xi ∂xi

∂ 2φ
S(u ) dx dt
∂xi2

and note that the concavity of S and nonnegativity of φ imply that

0

φ
Rk

∂2S
∂u2

∂u
∂x

∂u
∂x

dx dt ≤ 0
...

∂xi2

Since S(u) is bounded and u → u almost everywhere, the term involving a factor
of tends to zero as → 0
...

This lemma has the following useful corollary
...
1
...
Then for all rectangles R = (a1 , b1 ) ×
...


(4
...


Let φh (x, t) = φ0,h (t)φ1,h (x1 )
...
This function is nonnegative and continuous, but not C ∞
...
First, suppose that t [1] > 0
...
1
...


bk +h
ak −h
bk +h
ak −h
bk +h
ak −h


...


...
φk,h (xk )S(u(x, t)) dx1
...
φk,h (xk )S(u(x, t)) dx1
...
φk,h (xk )e1

b1 +h
b1

φ0,h (t)φ2,h (x2 )
...
dxk dt
(u(x, t)) dx1 · · · dxk dt

As h → 0, we get the claimed result
...


In this case, the integral 0
...
1
...

Lemma 4
...
27 (Lax,[89]) Suppose that u(x, t) ∈ Rm solves the hyperbolic conservation law
∂u
+
∂t

k
i=1

∂F(u)ei
= 0
...
Further, suppose that there is a concave entropy function S(u) with
entropy flux (u) so that for all fixed directions n
∂n · (u)
∂ S ∂F(u)n
=

...
1 Theory of Hyperbolic Systems

Suppose that u(x, t) involves an isolated discontinuity surface D(t) dividing Rk
into two domains − (t) and + (t)
...
Further, assume that y points into + (t), and its normal velocity is
σ ≡ n · y ≥ 0
...


−]

(4
...


Proof Suppose that φ(x, t) ∈ C0 (Rk × (0, ∞)) and φ(x(t), t) > 0; also suppose
that the support of φ is such that no other discontinuity surface of u lies in its
support, and the support does not intersect any boundary of − (t) or + (t) other
than D(t)
...
1
...
30) shows that


0≤−
0

− (t)

∇x


∂t

φ
φS



dx dt −
0

+ (t)

∇x

φ
φS


∂t

dx dt
...


φ
φS
φ +
φ S+

ds R dt
ds

174

Nonlinear Hyperbolic Systems

Entropy functions will be useful later in section 4
...
8 where we develop approximate Riemann solvers, and in section 5
...


Exercises for 4
...
1
...
Explain why the wave equation can be
∂t
written in the form of the linear system of conservation laws

∂ v
0 −c2 ∂ v
+
= 0 for all x ∈ R for all t > 0
−1 0 ∂ x w
∂t w
v
(x, 0) =
w
(b) Show that AX = X

v0
du0
dx

(x) for all x ∈ R
...

0 c

(c) Use Lemma 4
...
7 to show that
du0
v
c 1
(x, t) =
v0 (x + ct) + c
(x + ct)
w
1 2c
dx
+

du0
c 1
v0 (x − ct) − c
(x − ct)
...


x−ct

We remark that the solution of the wave equation in 3D is given by Kirchhoff’s formula
υ(x, t) =

1
4πc2 t
ξ −x

1
+
∂t 4π c2 t

=ct

∂υ
(ξ, 0) ds
∂t
ξ −x =ct

υ(ξ, 0)ds

175

4
...

w
Icυ

In this case, the normal flux
0 cn
nc 0

F(u)n =

υ
w

is linear in its argument with a matrix that depends on n
...

4
...
2 One easy application of Lemma 4
...
9 is to study the effect of a rotation of the coordinate system
...
If x = Qa where Q
is fixed, orthogonal and det(Q) = 1, show that the conservation law
∂u E
+
∂t

k
i=1

∂F E ei
= bE
∂xi

is equivalent to the conservation law
∂uL
+
∂t

k
i=1

∂FL Qei
= bL
...

4
...
3 The shallow water equations were presented in the Eulerian frame of reference in
Example 4
...
1
...
You
may want to use equation (4
...

(b) Perform a characteristic analysis of the Lagrangian form of the shallow water equations
...


176

Nonlinear Hyperbolic Systems

4
...
4 Consider the one-dimensional system of constant coefficient equations
∂u
∂u
+A
= 0 for all a < x < b for all t > 0,
∂t
∂x
where A is diagonalizable with real eigenvalues, and u(x, 0) is given
...


4
...
3 we presented several numerical methods for nonlinear scalar conservation laws
...


4
...
1 Lax–Friedrichs Scheme
The Lax–Friedrichs scheme is applied to general one-dimensional nonlinear systems in the same way it is applied to scalar equations:
n+1/2

n
n
ui+1/2 = uin xi + ui+1 xi+1 − [f(ui+1 ) − f(uin )] t n+1/2
n+1/2

n+1/2

n+1/2

n+1/2

uin+1 = ui−1/2 + ui+1/2 − [f(ui+1/2 ) − f(ui−1/2 )]

t n+1/2
xi

1
xi + xi+1
1

...
33a)
(4
...

Note that the Lax–Friedrichs scheme must choose the timestep t n+1/2 so that
for all i we have t n+1/2 λi ≤ xi
...

Example 4
...
1 The Lax–Friedrichs scheme for shallow water begins with cellcentered values for the flux variables
win

h
=
v

n
i

and the conserved quantities
uin =

h
vh

n


...
2 Upwind Schemes

Note that the Lax–Friedrichs scheme must choose the timestep t n+1/2 so that
for all i t n+1/2 λi ≤ xi , where λi is an upper bound on the absolute values of the
characteristic speeds
...

The first step of the Lax–Friedrichs scheme computes the cell-centered
fluxes
f(win ) =

hv
2
hv + 1 gh 2
2

n
i

and updates the conserved quantities by
n+1/2

n
n
h i+1/2 = h in xi + h i+1 xi+1 − h i+1 − h in

1
xi + xi+1

t n+1/2

n+1/2

n
(vh)i+1/2 = (vh)in xi + (vh)i+1 xi+1

1
hv2 + gh 2
2



n

1
− hv2 + gh 2
2
i+1

n

t n+1/2
i

1

...
Then we compute the fluxes at the half-time
f

n+1/2
wi+1/2

hv
=
2
hv + 1 gh 2
2

n+1/2

,
i+1/2

and determine the conserved quantities at the new time
h in+1 =
(vh)in+1 =

1 n+1/2
n+1/2
n+1/2
n+1/2
+ h i+1/2 − (hv)i+1/2 − (hv)i−1/2
h
2 i−1/2

t n+1/2
xi

1
n+1/2
n+1/2
(vh)i−1/2 +(vh)i+1/2
2



1
hv2 + gh 2
2

n+1/2

1
− hv2 + gh 2
2
i+1/2

n+1/2
i−1/2

t n+1/2

...

Figure 4
...
This is a Riemann problem with gravity g = 1 in which
the left state is given by h L = 2, vL = 0 and the right state is h R = 1, v R = 0
...
x/t

(b) Velocity vs
...
x/t

(d) Characteristic speed vs
...
4
...
9, gravity = 1

numerical results are plotted versus x/t
...
Nevertheless, the graph of the
characteristic speeds indicates that the Lax–Friedrichs scheme is getting results
consistent with the correct solution
...
Further, the shock involves a decrease in the fast characteristic speed as we
move from left to right
...


4
...
2
...

2

Here λi+1/2 is an upper bound for the absolute values of the characteristic speeds
in either cell
...
Figure 4
...
The quality of these results is similar to those with the
Lax–Friedrichs scheme, but the computation is faster because the Rusanov scheme
does not involve half-steps
...
2
...

This scheme takes the form
uin+1 = uin −

t n+1/2 n+1/2
n+1/2
fi+1/2 − fi−1/2
xi

where the fluxes are computed by solving a Riemann problem:
n+1/2

n
fi+1/2 = f R(uin , ui+1 ; 0)
...
Figure 4
...
Note that the rarefaction is resolved better
with Godunov’s scheme than with either the Lax-Friedrichs scheme or the Rusanov
scheme
...

Programs to perform the Lax-Friedrichs, Rusanov and Godunov schemes can be
found in Program 4
...
C
...
You can execute this Riemann
problem solver by clicking on the link Executable 4
...
x/t

(b) Velocity vs
...
x/t

(d) Characteristic speed vs
...
4
...
9,
gravity = 1

releasing on “Main,” and then clicking on the arrow next to “Riemann Problem
Parameters
...
” Model parameters can be selected by
clicking on the arrow next to the name of the model of interest
...
” When
you have selected all of your input parameters, click on “Start Run Now” in the
window labeled “1d/guiRiemannProblem
...
2 Upwind Schemes

(a) Height vs
...
x/t

(c) Total Energy vs
...
x/t

Fig
...
7 Godunov scheme for dam break problem: 100 grid cells, CFL = 0
...

Lemma 4
...
2 If S is a convex (or concave) entropy function for some hyperbolic
conservation law in one dimension, and Godunov’s method for this conservation
laws converges, then it converges to an entropy-satisfying solution of that conservation law
...
Let un be the exact solution to the conservation law
∂u ∂f(u)
+
=0
∂t
∂x
˜
with piecewise constant initial data un (x, t n ) = uin for x ∈ [xi−1/2 , xi+1/2 ]
...


In Godunov’s method, it is natural to define the numerical entropy flux by
˜ (w− , w+ ) = (R(w− , w+ ; 0)), where R(w− , w+ ; 0) is the state that moves with
zero speed in the solution of the Riemann problem with left state w− and right state
w+
...


It follows that in this case (Godunov’s method for a conservation law with convex
entropy function), whenever the numerical solution converges, it converges to a
solution of the conservation law that satisfies the entropy inequality, similar to the
“weak entropy inequality” (4
...

The difficulty with this scheme lies in computing the solution of the Riemann
problem
...
13
...
3 Case Study: Maxwell’s Equations

183

4
...
Since these equations are linear, their solutions
do not involve shocks
...
We include this discussion because
many students are interested in these equations, and because of the connections to
the magnetohydrodynamics model in section 4
...


4
...
1 Conservation Laws
In electromagnetic wave propagation, the electric displacement vector D is related
to the electric field strength vector E by
D=E ,
and the magnetic induction vector B is related to the magnetic field strength vector
H by
B = Hµ,
where is the permittivity and µ is the magnetic permeability
...
Also B has units of volt-seconds per square meter, H has
units of amps per meter and µ has units of ohm-seconds per meter
...
Here J has units of amps per square meter and 1/σ has
units of ohm-meters
...

Here ρ has units of coulombs per cubic meter
...

The electromagnetic force on some closed circuit ∂ S is

∂S

E · t ds = −

d
dt

B · n dS
S

184

Nonlinear Hyperbolic Systems

where n is the unit outer normal to the surface, ∂ S is the closed curve that represents
the boundary of the surface S, and t is the unit tangent vector to ∂ S
...

∂t

S

The magnetomotive force around the circuit ∂ S is

∂S

J+

H · t ds =
S

∂D
· n d S
...

∂t

For simplicity, we will assume that the density of the electric charge is ρ = 0
...
34a)

∂B
+ ∇ x × (E) = 0
...
34b)

Note that if E is divergence-free at t = 0, then the former of these two equations
implies that it is divergence-free for all t > 0
...
3
...
34) are hyperbolic
...
3 Case Study: Maxwell’s Equations

where






E1
E1
 E2 
E2 
 


 E3 
E3 

w ≡   , u(w) ≡ 
 B1 
 B1  ,
 


 B2 
 B2 
B3
B3




−E1 σ
0
−B3 /µ B2 /µ
−E2 σ 
 B3 /µ
0
−B1 /µ




−E3 σ 
−B2 /µ B1 /µ
0 

 , r(w) ≡ 
F(w) ≡ 
 0 
...

−n2 n1
0


Note that Nx = n × x for any vector x
...

N1
0

The eigenvectors and eigenvalues of this matrix satisfy
1
0 −N µ
1
N
0

y
y
=
λ
...

Since (I − nn ) is the orthogonal projection onto the space of vectors orthogonal to n, its eigenvectors are n (with eigenvalue 0), and any vector orthogonal
∂u −1
to n (with eigenvalue 1)
...


186

Nonlinear Hyperbolic Systems

We can put this all together in the form of an array of eigenvectors and an array
of eigenvalues of the flux derivatives
...
Define
−n⊥ × n −n⊥ −n n
n⊥
n⊥ × n
n⊥
n × n⊥ n n n × n⊥
n⊥

I
0
X=
√ Q
0 I µ

Q=

and



− √1 µ
0

− √1 µ
 0

 0
0
=
 0
0

 0
0

0
0
Then Q is an orthogonal matrix, and

∂Fn
∂w

0
0
0
0
0
0

0
0
0
0
0
0

∂u −1
∂w

0
0
0
0
√1

µ

0

0
0
0
0
0
√1

1
√ ,
2







...


Summary 4
...
1 Suppose that the permittivity and magnetic permeability µ are
constant
...
34) are hyperbolic, with characteristic

speeds 0 and ±1/ µ
...
Also note that
the matrix X of eigenvectors is easy to invert because its 3 × 3 block entries are
scalar multiples of orthogonal matrices
...

The Riemann problem for Maxwell’s equation in 3D will be associated with a
particular direction n only
...
3
...
1
...


4
...
The
reasons for studying fluid dynamics are that its equations are derived by important
physical considerations, the wave structure of gas dynamics illustrates many of the
basic issues of hyperbolic conservation laws, and the most sophisticated numerical methods for conservation laws were originally developed for gas dynamics
applications
...
4 Case Study: Gas Dynamics

187

4
...
1 Conservation Laws
We will denote the velocity by v(x, t), the pressure by p(x, t), the density by ρ(x, t),
the specific internal energy (i
...
and the internal energy per mass) by e(x, t)
...

In the Eulerian frame the arrays of conserved quantities, fluxes and body forces
are






ρ
ρv
0
,F ≡ 
 , b ≡  gρ 
...
35)
u≡

vρv + I p
1
1
(e + 2 v · v)ρ
g · vρ
{ρ(e + 2 v · v) + p}v
We obtain the system of conservation laws either in integral form
d
dt

u dx +
t



Fn ds =

b dx,

t

(4
...

∂xi

(4
...

4
...
2 Thermodynamics
The material in this section has been taken from Courant and Friedrichs [37]
...

Let e denote the specific internal energy (internal energy per mass), S denote the
specific entropy (entropy per mass) and T denote the temperature
...

This says that the change in internal energy is equal to the heat contributed plus
the work done by pressure
...


For an ideal gas, p = ρ RT
...
If in addition there is a
constant cv , called the heat capacity at constant volume, so that e = cv T , then we

188

Nonlinear Hyperbolic Systems

have a polytropic gas
...
Here R is the gas constant,
with value R = 8
...
The constant 1 ≤ γ ≤ 5/3
is a property of the gas; for example, γ = 7/5 for air, 5/3 for argon and 4/3 for
sulfur hexafluoride
...

ρ
γ −1ρ

The second law of thermodynamics now implies that
dS =

p

1
1
de +
dp −

...

∂ρ
Tρ (γ − 1)
γ −1ρ
ρ
Thus the specific entropy is given by
S − S0 = cv ln

p
p0

ρ0
ρ

γ


...

Thermodynamic stability requires that d S ≥ 0
...


4
...
3 Characteristic Analysis
In Lemma 4
...
3 we saw how to use the quasilinear form (4
...
In the case of Eulerian gas
dynamics, note that u, F and b, defined in Equation (4
...
38)

189

4
...

w≡
p

(4
...

n
γ
(n · v)
γ −1

For any fixed unit vector n,
∂u
∂w

−1


n · v ρn
0
∂Fn 
=
0 I(n · v) n/ρ  ≡ A + I(n · v)
∂w
0
γ pn
n·v


where A is the acoustic tensor



0 ρn
A = 0
0
0 γ pn


0
n1/ρ 
...
Let the matrix [n, N]
be a rotation, and let c be the sound speed (i
...
, c2 = γ p/ρ)
...

=  nc N 0 −nc 


0
ρc2 0 0 ρc2
−c
As we saw in Lemma 4
...
3, the characteristic speeds are the eigenvalues of
∂Fn
∂Fn
=
∂u
∂w

∂u
∂w

−1

=

∂u
∂u
[A + I(n · v)]
∂w
∂w

−1


...

Similarly, the characteristic directions are the eigenvectors of ∂Fn , which we can
∂u
∂u
compute as X = ∂w Y
...
Thus
the test for genuine nonlinearity in Definition 4
...
5 can be written
∂λi
Xei =
∂u

∂λi
∂w

∂u
Y
∂w

−1

∂λi
∂u
Y ei =
Yei
...

2
2 p
2
Similarly, n · v − c is genuinely nonlinear:

ρ
1c
n − 1 c −nc

2 p
ρc2
1 ρ
1
1
= c − c − c3 = − c(1 + γ ) = 0
...

∂w
0 0
0 0
Summary 4
...
1 The Eulerian equations (4
...
The characteristic speed
n · v is linearly degenerate, and the characteristic speeds n · v ± c are genuinely
nonlinear
...
4
...
38)
...
4 Case Study: Gas Dynamics

defined by (4
...

∂w
This implies that the partial derivatives of the entropy per volume are
∂ Sρ
= S − cv γ , 0, cv ρ/ p
...

=
∂w

=

cv ρ (n v)
p

v Iρ 0 =

∂S
∂vρ
ρn v + Sn
∂w
∂w

The work in section 4
...
11 therefore shows that Sρn · v is the entropy flux
...

= 0
0
0
∂w ∂w
2
cv / p 0 −cv ρ/ p
It is easy to see that the eigenvalues of this matrix are either zero or


c2 2
γ − 1 2
c2
ρ 
1+
−4
±
c ,
λ=− 2 1+
2p
γ
γ
γ
which are both nonpositive
...
Away from discontinuities, the Eulerian conservation law for
entropy is
∂ Sρ
∂ Sρ ∂u
+ ∇x · (vSρ) =
+
∂t
∂u ∂t

k
∂ Sρei · v ∂u
∂Fei ∂u
∂ Sρ ∂u
+
=
∂u ∂xi
∂u ∂t
∂u ∂xi
i=1
i=1


0
∂ Sρ
g · vρ 2
=
b = S − cv γ 0 cv ρ/ p  gρ  = cv

...
4
...
The specific
entropy is a concave function of p and ρ
...

∂t
p
4
...
5 Centered Rarefaction Curves
˜
˜
˜
Recall equation (4
...

Here w is the vector of flux variables, and Y is the matrix of eigenvectors of
∂u
( ∂w )−1 ∂Fn , which was computed in Section 4
...
3 We will use this equation to
∂w
determine the centered rarefaction waves for the gas dynamics Equations (4
...
37)
...
Note that this
c
system of ordinary differential equations says dp = c2 = γρp and dv·n = − ρ
...
Note that this
p
implies that the specific entropy S = S0 + cv ln{ ρ γ } is constant
...

γ
ρ
γ −1 γ −1
ρL γ − 1

vL · n = v · n +

ρ

It follows that v · n + 2c/(γ − 1) is also constant on this centered rarefaction
curve
...
4 Case Study: Gas Dynamics

entropy S and v · n + 2c/(γ − 1) are constant
...
In multiple dimensions, the transverse components of velocity are also
Riemann invariants
...
If (ρL , vL , pL ) is on the centered rarefaction
1
2
curve, then ρ = ρL ( ppL )1/γ , c = cL ( ppL ) 2 (1−1/γ ) , v = vL − n γ −1 (c − cL )
...
Also note that 2c dp =
−1
p/ρ
1
γ dd p = γ ( ρ −

p dρ
)
ρ2 d p

=

γ

ρ2

γ −1

...
4
...
Thus v · n − c increases
2ρc
as p decreases
...


Summary 4
...
3 In a polytropic gas, with sound speed c = γ p/ρ,
(i) a slow centered rarefaction, which is associated with characteristic speed v · n − c,
has for its Riemann invariants the specific entropy S = cv ln( p/ρ γ ), the quantity v · n + 2c/(γ − 1), and (in multiple dimensions) the transverse components of
velocity,
(ii) and a fast centered rarefaction, which is associated with characteristic speed v · n + c,
has for its Riemann invariants the specific entropy S, the quantity v · n − 2c/(γ − 1),
and (in multiple dimensions) the transverse components of velocity
...

γ −1

Further,
(i) the slow characteristic speed v · n − c increases as p decreases,
(ii) and the fast characteristic speed v · n + c increases as p increases
...

−1

(4
...
4
...
22) to the Eulerian gas
dynamics function (4
...

2

1
ρ e + v · v (v · n) + pv · n =
2

Let [n, N] be a rotation matrix with first column n, and let ν = n · v − σ be
the normal velocity relative to the discontinuity speed
...
If we multiply the normal component
of the momentum jump condition by σ and subtract from the energy jump, we
get
[ρν] = 0,

(4
...
41b)

[v ρν] = 0


(4
...

γ −1 2
2

(4
...
41a) implies that ρ R ν R = ρL νL
...
Then ρL > 0, ν R = 0 and
v⊥ = v⊥ ,
R
L
2
p R − pL
ρL νL − p R + pL
=
ρL νL
ρL νL
2
ρL νL
(ρL νL )
ρR =
=
,
2− p + p
νR
ρL νL
R
L
1
1
γ
γ
2
3
+ ρL νL ν R − pL νL
− ρL νL
0 = pR νR
γ −1 2
γ −1 2

ν R = νL −

1
γ
p R − pL
p R − pL 2
+ ρL νL νL −
ρL νL
γ −1 2
ρL νL
1
γ
3
− ρL νL
− pL νL
γ −1 2

p R − pL
2 2γ
2
− pR
− 2ρL νL + p R − pL
...
Thus we can divide the fourth of these jump conditions

4
...

γ −1
γ −1
γ −1
γ −1

This can be rewritten
2
νL =

1
{ pL (γ − 1) + p R (γ + 1)}
2ρL

This implies that the discontinuity speed is given by
σ = n · vL − νL = n · vL ±

1
{ pL (γ − 1) + p R (γ + 1)}
...

Summary 4
...
4 Suppose that n is the normal to a gas dynamics discontinuity
propagating with speed σ
...
Given a left state
ρL > 0, vL = nn · vL + Nv⊥ , pL and the right pressure p R , the gas dynamics jump
L
conditions imply that v R = nn · v R + Nv⊥ where
R
v⊥ = v⊥
R
L
σ = n · vL −

1
{ pL (γ − 1) + p R (γ + 1)}
2ρL

νL = n · vL − σ
ν R = n · v R − σ = νL −
ρR =

ρL νL

...

νL

pL − p R
ρR νR

On the other hand, suppose that ρL νL = ρ R ν R = 0
...
41) imply that p R = pL but allow the transverse velocities v⊥ and v⊥ to be
R
L

196

Nonlinear Hyperbolic Systems

arbitrary
...
41d) implies that p R ν R = 0; in this case, either ν R = 0
or both ρ R = 0 and p R = 0
...

Summary 4
...
5 Suppose that n is the normal to a gas dynamics discontinuity,
and that [n, N] is a rotation
...
If the discontinuity speed is σ = n · vL then the gas dynamics
L
jump conditions imply that
v R = nn · vL + Nv⊥
R
p R = pL
for any transverse velocity v⊥ and any density ρ R
...

In order to complete the solution of the gas dynamics jump conditions, we need
to consider two more cases
...
Since both states are at zero pressure, this case is not very interesting
...
This implies that ρL = 0
...
This would lead to 0 = pL = p R , so both states would be
at zero pressure
...

Sometimes, it is useful to discuss the jump conditions in terms of shock strength
...

pL

Given ρL > 0, pL and the shock strength z L , Lemma 4
...
4 implies that the states on
either side of the discontinuity satisfy
p R = pL (1 + z L )
νL =

pL
ρL

γ +1
γ − 1 1 + zL
+
(γ + 1) = cL 1 + z L
2
2


1
1
γ +1
2
ρL νL − p R + pL =
ρ L c2 1 + z L
L
ρL νL
ρL νL

2
2
c
γ + 1 zL
γ −1
c

= L 1 + zL
= L 1 + zL
νL

γ
νL


νR =

ρR =

+1
1 + z L γ2γ
1
ρL νL
ρL ν 2
= 2L
= ρL

...
4 Case Study: Gas Dynamics

Given the same condition on the discontinuity speed, it is sometimes useful to define
L
the Mach number by M L = νL
...

=
2
2
νR
cL 2 + M L (γ − 1)
2 + M L (γ − 1)

Similar results can be obtained for a discontinuity propagating with speed
σ > n · vR
...

If 0 < νL ≡ n · vL − σ , then we also have ν R > 0; in this case, gas particles move
from the left (the pre-shock state) to the right (the post-shock state)
...


Note that φ(0) = 1 and

=
dz

−1
1 + z γ2γ
+1
1 + z γ2γ

γ

γ2 − 1

...
Thus thermodynamic stability for a discontinuity propagating with speed σ < n · v R

198

Nonlinear Hyperbolic Systems

requires
p R > pL
ρR
> 1 =⇒ ρ R > ρL
ρL
νR
> 1 =⇒ n · vL > n · v R
νL
ML =

νL
=
cL

1 + zL

γ +1
> 1 =⇒ n · vL − cL > σ


γ −1
−1
1 + z L γ2γ
γ pR
γ pL (1 + z L ) 1 + z L 2γ
2
cR =
=
= cL (1 + z L )
> c2
L
γ +1
γ +1
ρR
ρL
1 + z L 2γ
1 + z L 2γ
2

and
νR − cR =

γ −1
c2
L
1 + zL
νL




γ pL
1 + z L (γ − 1)/(2γ )
(1 + z L )
ρL
1 + z L (γ + 1)/(2γ )

1 + z L (γ − 1)/(2γ )
1 + z L (γ − 1)/(2γ )
− cL (1 + z L )
= cL √
1 + z L (γ + 1)/(2γ )
1 + z L (γ + 1)/(2γ )
= cL

1 + z L (γ − 1)/(2γ )
1 + z L (γ + 1)/(2γ )

1 + z L (γ − 1)/(2γ ) −

1 + zL > 0

We can easily derive similar results when σ > n · v R
...

Summary 4
...
6 Suppose that the normal n to a shock satisfying σ < n · vL is
oriented toward the post-shock (right) state, and the Mach number is the ratio of
the speed of the shock relative to the pre-shock velocity, divided by the pre-shock
sound speed:
ML =

n · vL − σ

...
4 Case Study: Gas Dynamics

199

Given a state (ρL , vL , pL ) with ρL > 0, define ν = n · v − σ
...

=1+
pL
γ +1 L
In order for the entropy to increase as the discontinuity passes a material particle,
we require any of the following equivalent inequalities:
ρ > ρL , n · v < n · vL , p > pL , c > cL or M L > 1
...

is satisfied by this shock
...
4
...

cR

Given a state (ρ R , v R , p R ) with ρ R = 0, define v = n · v − σ
...

pR
γ +1 R

200

Nonlinear Hyperbolic Systems

In order for the entropy to increase as the discontinuity passes a material particle,
we require any of the following equivalent inequalities:
ρ > ρ R , n · v > n · v R , p > p R , c > c R or M R > 1
...

is satisfied by this shock
...
4
...
4
...
4
...
Let us summarize the information we will need to
describe the solution of this problem
...

The solution of the Riemann problem for gas dynamics involves two intermediate
states with the same normal velocity n · v∗ and pressure p∗ at the intersection of
the slow wave curve

p− p
cL
,
p > pL
 v L − n γ p LL
p− p
1+ 1 p L 1+γ
2
γ
L
v− ( p) ≡
 v + n 2 c 1 − ( p )(γ −1)/(2γ ) , p ≤ p
L
L
γ −1 L
pL
and the fast wave curve

p− p
cR
,
 v R + n γ p RR
p− p
1+ 1 p R 1+γ
2
γ
R
v+ ( p) ≡
 v R − n 2 c R 1 − ( p )(γ −1)/(2γ ) ,
γ −1
pR

p > pR
p ≤ pR

In other words, p∗ solves the nonlinear equation
n · v− ( p∗ ) = n · v+ ( p∗ )
...
4 Case Study: Gas Dynamics

be the density as a function of pressure along the slow wave curve, and

 ρ 1 + p− p R
1
 R
, p > pR
γ p R 1+ γ −1 p− p R

pR
ρ+ ( p) =
1/γ

p
ρ
,
p ≤ pR
R
pR
be the density as a function of pressure along the fast wave
...

Given a left state wL = (ρL , vL , pL ), we construct the slow centered rarefaction
curve in the direction of decreasing p, and the Hugoniot locus in the direction of
increasing p
...
We can draw these curves in the two-dimensional
v, p plane, and use the definitions of the centered rarefaction curves to determine
the values of the density ρ along the curves
...

The remainder of the details in the solution of the Riemann problem can be found
in the Summaries 4
...
1, 4
...
3, 4
...
5, 4
...
7, and 4
...
6
...
4
...
The state that moves with speed ξ in the Riemann

202

Nonlinear Hyperbolic Systems

problem is

 
ρL




 


 vL  ,





pL





1/γ




ρL pL





 v − n 2 (c − c ) ,

 L
L

γ −1 ξ




2γ /(γ −1) 




pL cL









ρ− ( p∗ )


  
 v− ( p ∗ )  ,


ρξ

p
 vξ  =
 ∗ 

ρ+





v+ ( p∗ ) ,





p∗





1/γ




ρR pR







 v R + n 2 (cξ − c R ) ,

γ −1





2γ /(γ −1) 




pR cR



 



ρR



 vR  ,




pR

ξ ≤ ξL

ξL < ξ < ξ− where cξ =

γ −1
[n
γ +1

· vL +

2c L
γ −1

− ξ]

γ −1

γ +1

− n · vR +

2c R
]
γ −1

ξ− ≤ ξ ≤ n · v− ( p∗ )
n · v+ ( p∗ ) < ξ < ξ+

ξ+ < ξ < ξ R where cξ =

ξ ≥ ξR

In rarefactions, these equations can be used to compute the variables in the order
cξ , vξ , pξ and then ρξ
...
4-47: gas dynamics
...
4-18: gas
DynamicsRiemannProblem
...
The user can push and drag the left mouse button again
to see how the solution of the Riemann problem would change as the right state is
changed
...
A user can also execute
a different program by clicking on the link Executable 4
...
Then the user can press the right mouse

4
...
velocity

(b) Velocity vs
...
wave speed

203

(d) Density vs
...
4
...
Afterward, the user can perform a similar process to select the right state
...
The user can view the latter plots by bring each to the top of
the view, and moving the windows around on the screen
...
At this point, it will be possible to interact with the
original window where the left and right states were selected
...
velocity

(b) Velocity vs
...
wave speed

(d) Density vs
...
4
...
After answering “OK” to the question “Do you want
to quit?”, the user needs to respond to the window displaying “Run finished” by
clicking on “Cleanup
...

The solution of the gas dynamics Riemann problem is determined by finding the
intersection of the two wave families
...
The first case involves
shocks in both families; this is illustrated in Figure 4
...
The second case involves
a slow shock and a fast rarefaction; this is illustrated in Figure 4
...
The third case

4
...
velocity

(b) Velocity vs
...
wave speed

205

(d) Density vs
...
4
...
10
...
11
...
4
...
At a reflecting boundary, the normal component of velocity is an
odd function of distance from the wall, while ρ, p and transverse components of
velocity are even functions of distance
...
velocity

(b) Velocity vs
...
wave speed

(d) Density vs
...
4
...
4
4
...
1 The Lagrangian form of the conservation laws for gas dynamics is a bit complicated
...
1
...
This will give you






ρ0
0
0
 , FL ≡  J− |J| p  , bL ≡  gρ0 
...
42)
vρ0
1
p|J|v J−
(e + 2 v · v)ρ0
g · vρ0

4
...
4
...
4
...
4
...
4
...
4
...
4
...
4
...
4
...
4
...

Use Equation (4
...
Normally, gas
dynamics problems are solved in the Eulerian frame of reference
...

Find the maximum value of the ratio of the post-shock density to the pre-shock density for a
polytropic gas
...
What is this maximum value for air (γ = 7/5)?
Suppose that we have a discontinuity propagating with speed σ > 0 into a vacuum
...
Describe the post-shock state
determined by the Rankine–Hugoniot conditions
...
Under what conditions is the discontinuity
thermodynamically stable?
Find the characteristic speeds and directions for Lagrangian gas dynamics
...

Describe how to solve the Riemann problem for Lagrangian gas dynamics
...

Show that for a centered rarefaction wave in a polytropic gas, the velocity v and the sound speed
c are linear functions of x/t
...
)
Write a computer program to evaluate the vector u of conserved quantities and vector g of fluxes,
given the flux variables w for Eulerian gas dynamics
...

Show that in the Lagrangian frame of reference away from discontinuities, conservation of
entropy is given by
dS
g · vρ0
= cv

...
4
...
Given any right state
ρ R , v R , p R , write a computer program to find those states ρL , vL , pL that can be connected to the
right state state by a fast shock of Mach number M R
...
4
...

4
...
13 Suppose that we have a symmetric Riemann problem, in which ρ− = ρ+ , v− = −v+ , p− = p+
...
Find the flux vector
at the state that moves with zero speed
...
)

208

Nonlinear Hyperbolic Systems

4
...
14 Suppose that we have a gas with arbitrarily large density on one side of a Riemann problem
(possibly corresponding to a solid wall)
...
If v− > 0, show that the contact discontinuity moves with zero speed, and find
the flux at the state on the left side of the contact discontinuity
...

4
...
15 Program the Lax–Friedrichs scheme for polytropic gas dynamics
...
e
...
e
...
e
...
(i
...
, pL = 1, vL = 0, ρL = 1; p R = 0, ρ R = 0, v R = 35)
...
4
...

4
...
17 Program Godunov’s scheme for polytropic gas dynamics and apply it to the previous exercise
...
4
...
This is a Riemann
problem for air (γ = 1
...
125, v R = 0, p R = 0
...
Perform the calculation with 100 and 1000 cells
...

4
...
19 Program Godunov’s scheme for the Colella-Woodward interacting blast wave problem [177]
...
4) confined between two reflecting walls at x = 0 and x = 1
...
The initial condition for pressure consists of three constant
states:

 1000
...
1
p = 0
...
1 < x < 0
...
, 0
...
0
...
01, 0
...
026, 0
...
030, 0
...
034 and 0
...

Plot ρ, v, p and the temperature versus x
...


4
...
5
...
The system of equations has conserved quantities, fluxes and
right-hand side given by




ρ
ρv



vρv + I( p + 1 B B) − BB

2
,F = 
u=



Bv − vB
B
(e+ 1 v v)ρ + 1 B B
{eρ + 1 ρv v+B B + p}v −v BB
2
2
2






0



 , r =  gρ 
...
5 Case Study: Magnetohydrodynamics (MHD)

209

Here B is the magnetic induction vector (see Maxwell’s equations in section 4
...
4)
...
Let us examine the implications of this assumption
...
First, we expand the quasi-linear form for
conservation of magnetic induction:
0=

∂Bi
+
∂t

k
j=1

∂(Bi v j − vi B j )
∂Bi
=
+
∂x j
∂t

k
j=1

∂v j
∂B j
∂Bi
∂vi

...

∂xi ∂x j
∂x j ∂xi
∂xi ∂x j
∂xi ∂x j

Inside the double sum, we can switch i and j to cancel the first term against the
eighth, the second term against the sixth, the third term against the seventh, and the
fourth term against the fifth
...
5
...
If for all x and all t > 0 we
have
∂Bi
+
∂t

k
j=1

∂(Bi v j − vi B j )
=0
∂x j

then
∂∇x · B
= 0
...
5
...
For smooth flow, the conservation

210

Nonlinear Hyperbolic Systems

laws imply





ρ
0
k
 gρ 


∂ 






=

+
B
 0  ∂t 
 i=1 ∂xi
p
+ ρ v · v+ 1 B · B
g·vρ
γ −1
2
2

  
1
0
0
0
ρ
 v
 ∂ v

0
0   

=
  +
0
I
0  ∂t B
 0
1
1
v · v ρv B
p
2
γ −1

ρei

k 
vρei + Iρvi

+


Bei − IBi
i=1 




ρvi
 vρv + e ( p + 1 B · B) − BB 
i
i
i


2


Bvi − vBi


{ p γ γ + 1 ρv · v+B · B}vi −v · BBi
−1
2




0
vi
k 
k 


 vvi  ∂ρ
 ei  ∂ p
+




 0  ∂xi
 0  ∂xi
i=1
i=1
γ
1
v
v · vvi
γ −1 i
2


0


k  e B − IB
 ∂v
i

 i
+


 ∂xi

Ivi
i=1 


( p γ γ + 1 ρv · v + B · B)ei + ρvi v − Bi B
−1
2

Note that we used 0 = ∇x · B =

k
∂Bi
i=1 ∂xi



 ∂B


...

∂xi

Summary 4
...
2 If the conserved quantities in MHD are continuously differentiable
and ∇x · B = 0, then the quasilinear form of MHD is


 
1
0
0
 gρ   v


 

=
0
 0   0
1
v · v ρv
g · vρ
2

vi
k 
vvi

+

 0
i=1
v·vvi
2



 
ρ
 ∂ v
  
  
 ∂t B
1
p
γ −1

0
0
I
B

0
0
0

p
[ γγ−1 +

ρv·v
2

ρei
Iρvi + vρei
Bei − IBi
+ B · B]ei + ρvi v − Bi B

0
ei B − IBi
Ivi
2vi B − Bi v

 
ρ
 ∂ v

 

 
...

0 
1
γ −1

Let [n, N] be an orthogonal matrix with first column equal to n
...
5 Case Study: Magnetohydrodynamics (MHD)

we have



ν
∂Fn  vν
=
 0
∂w

νv·v
2

ρn
Iρν + vρn
Bn − Iβ

ρνv + [ γ −1 + ρv·v + B · B]n − βB
2

0
nB − Iβ

2νB − βv


0
n 

...
5
...
1
...
It follows from the discussion in Section 4
...
1 that we want to compute the eigenvalues and eigenvectors
Y of


0
0
ν
ρn
1
1
∂u −1 ∂(Fn) 0

nρ B − Iβ nρ 
ρ

=
0 Bn − Iβ

0
∂w
∂w
0
γ pn
0
ν


0
0
0
ρn
1
1
0
0
nρ B − Iβ nρ 
ρ
 ≡ Iν + M
...

Summary 4
...
3 Given a direction n, and flux variables
 
ρ
v
w≡ 
B
p
define ν ≡ v · n and β ≡ B · n
...

0 Bn − Iβ
0
0  y y
ζ
ζ
0
γ pn
0
0

(4
...
If λ = 0 and β = 0,
then the second equation in (4
...
This
same equation then implies that ζ = 0
...
Thus we have
discovered two eigenvectors of M with zero eigenvalue:



0
ρn
0
0
1 0
1
1
0
0
n ρ B − I β n ρ  0 0
ρ


 = 0
...
This characteristic speed is
linearly degenerate:




1 0
1 0
0 0
∂v · n 0 0




0 n = 0, n , 0, 0 0 n = 0 0
...
43) implies
that ζ = −B · y and the first or fourth equation implies that n · x = 0
...
Thus when β = 0, the eigenvalue 0 of M has multiplicity
2, and when B · n = 0 it has multiplicity 2k
...


0 0
I 
I 
∂w 0 0
0 0 −B
0 0 −B
Summary 4
...
4 Consider the matrix


0
0
0
ρn
1
1
0
0
nρ B − Iβ nρ 
ρ

...
5 Case Study: Magnetohydrodynamics (MHD)

213

If B · n ≡ β = 0, then M has a zero eigenvalue of multiplicity 2:

 


0
0
0
0
0
0
ρn
1 0
0
1
1
0
0
n ρ B − I β n ρ  0 N 0  0
0
−I β  0 0
ρ
ρ
=



...
The corresponding characteristic speed ν ≡ v · n for MHD is linearly
degenerate
...
Since the third equation in
(4
...
(In two dimensions n ⊥ y = 0 = N ⊥ y implies y = 0
...
43) implies that x = nα1 + B × nα2 for some scalars α1
and α2
...
Since x = B × nα2 is orthogonal to n,
the first equation implies that τ = 0 and the fourth equation implies that ζ = 0
...
We now see that α2 = ∓ sign(β)/ ρ,
and λ = ±ca where

ca = |B · n|/ ρ
is the the Alfv´ n speed
...

0
0
so we have found two more eigenvalues and eigenvectors of M
...
Since ρca = (β)2 , we
e
have
2
∂ρca
= [0, 0, 2βn , 0],
∂w

and
∂ν
1
∂ν ± ca
=
±
∂w
∂w ρca

2
∂ρca
2 ∂ρ
− ca
∂w
∂w

= ∓

ca

,n ,
n ,0
...

∂w
0
0

Summary 4
...
5 Given a direction n, define the Alfv´ n speed ca by
e

ca ≡ |B · n|/ ρ

(4
...
Then ±ca are two eigenvalues of M:

 

0
0
ρn
0
0
0
0
1
1
0
n ρ B − I β n ρ  B×nσ −B×nσ   B×nσ −B×nσ  −ca 0
ρ


√  =

√ 
Bn −Iβ
0
0 B×n ρ B×n ρ  B×n ρ B×n ρ  0 ca
0
0
0
0
γ pn
0
0
where σ ≡ sign(β)
...
These characteristic directions are not possible for flow in fewer than three
dimensions
...
Then the third equation
in (4
...
Since y = 0
implies that B and n are linearly independent, the third equation implies that α1 = λ
...
The fourth
equation implies that ρc2 (βα2 + λ) = ζ λ
...


+ ρc2 ), then we can solve the quadratic equation for λ2
2
λ 2 = c∗ ±

4
2
c∗ − c2 ca
...
5 Case Study: Magnetohydrodynamics (MHD)

215

Let us prove that the eigenvalues λ given by this expression are real
...
It follows that
2

ρca c = |B · n| ρc ≤ B n

1
ρc2 ≤ ( B
2

2

2
+ ρc2 ) = ρc∗
...
Since
2
4
2
c∗ − ca c2 ≤ c∗ , λ is real
...
Since ρca =
2
2
(B · n) ≤ B , it follows that
2
ρ(ca + c2 ) ≤ B

2

2
+ ρc2 = 2ρc∗
...


Taking square roots, we obtain
2
2
4
2
− c∗ − ca c2 ≤ ca − c∗ ≤

4
2
c∗ − ca c2
...

f

Finally, we will prove (4
...
Note that the Schwarz inequality implies that
(B · n)2 ≤ B 2
...

2

which in turn implies that
1
1
(γ p + B 2 )2 − γ pβ 2 ≥ ( B
4
4

2

− γ p)2
...

4

Adding either of ± 1 (γ p + B 2 ) to all terms in this inequality gives us
2
2
0 ≤ ρcs ≤ min{ρc2 , β 2 }

and

max{ρc2 , B 2 } ≤ ρc2
...

 


ζ
ρλ2 − B 2
ρλ2 − B 2
This gives us four more eigenvalues, for a total of eight in three dimensions
...
5
...
Also define the slow
2
2
2
4
2
4
2
speed cs by cs = c∗ − c∗ − c2 ca and the fast speed c f by c2 = c∗ + c∗ − c2 ca
...
45)

and
2
0 ≤ ρcs ≤ min{ρc2 , β 2 }

max{ρc2 , B 2 } ≤ ρc2
...

×
 0
0 cs 0 
0
0 0 cf
2

2

2

2

(4
...
5 Case Study: Magnetohydrodynamics (MHD)

The corresponding characteristic speeds for MHD are ν ± cs and ν ± c f where
ν ≡ v · n; these are not necessarily genuinely nonlinear
...
5
...

2
e
Also define the speed of sound c by ρc2 = γ p, the Alfv´ n speed ca by ρca = β 2
1
2
2
2
and the speed c∗ by ρc∗ = 2 (B · B + ρc )
...
The equations of
f
MHD are hyperbolic with characteristic speeds ν, ν ± cs , ν ± ca and ν ± c f
...
In fact,

∂u
∂w

−1

∂(Fn)
Y = Y{Iν +
∂w

}

where if β = 0 we have



Y=


ρc2 − B
f
c2

2

−nc f
B
2
ρc f − B

2

1 0
0

0 N
0
0 0
I
0 0 −B

ρc2 − B
f
c2

2





nc f
,

B
2
2
ρc f − B

and if β = 0 we have σ ≡ sign(β) and
 ρc2 − B 2
2
ρcs − B 2
f
0
c2
c2

β
β
−nc f + B ρc f B × nσ −ncs + B ρcs
Y=

 B − nβ
B×n ρ
B − nβ
2
ρc2 − B 2
0
ρcs − B 2
f

−c f

−ca


−cs


0

=
0



cs


ca
cf

1
0
0
0



−c f
 0

= 0

 0
0

0
0
0
0
0

0
0
0
0
0

0
0
0
0
0


0
0

0

0
cf


2
ρc2 − B 2
ρcs − B 2
f
0
0
c2
c2
β
β 
0 ncs − B ρcs −B × nσ nc f − B ρc f 


n
B − nβ
B×n ρ
B − nβ 
2
0 ρcs − B 2
0
ρc2 − B 2
f








...


218

Nonlinear Hyperbolic Systems

4
...
3 Entropy Function
p
ρ
Recall that the specific entropy of a polytropic gas is S = S0 + cv {ln p0 − γ ln ρ0 }
...

∂w
Similarly, the partial derivatives of the entropy per volume are
∂ Sρ
= S − cv γ , 0, 0, cv ρ/ p
...

To justify this claim, recall from Section 4
...
11 that we must show that
∂ Sn · v
∂ Sρ
=
∂w
∂w

∂u
∂w

−1

∂Fn

...

∂w
∂w
∂w

The entropy function for MHD is a strictly concave function of ρ and p, and a
concave function of w
...
5
...
28) for a centered rarefaction wave in one dimension:
˜
˜
˜
w = Y(w)e j α, w(0) = wL
...


219

4
...

Note that this system of ordinary differential equations says that

ρ
=

...


Note that this implies that
S = S0 + cv ln

p
ργ

is constant
...

Also note that we can multiply the third equation in the system by n to get

= 0
...
Since
equation in the system can be rewritten
1
dB⊥
= B⊥ 2
dp
ρλ − B

2

2

1
= (γ p − B⊥
2

2

− β 2) ±

= 0, the third


...
Further,

+ β 2 )2 − γ pβ 2

Thus we have an ordinary differential equation for the vector B⊥
...

2
γ p(λ2 − ca )

220

Nonlinear Hyperbolic Systems

If we take the inner product of this equation with n, we obtain
λ
λ
dv · n
2
= {(λ2 − ca )}
=

...
5
...
The specific entropy can be used to determine
the density as a function of pressure along a centered rarefaction; further, density
is always an increasing function of pressure along a centered rarefaction
...
Further, the velocity satisfies
the ordinary differential equation
dv
1
2
= {nρ(λ2 − ca ) − B⊥ β}

...

dp
γp
4
...
5 Jump Conditions
Recall from equation (4
...
Here, n is the normal to the
discontinuity and σ is the normal velocity of the discontinuity
...

p
γ −1 2
γ −1 2
2
vρv n + n p + n

While it is possible to solve these equations, the solution is pretty messy except in
special circumstances
...


4
...

Exercises for 4
...
5
...
Show that if α = 0, then the
R
L
R
Rankine–Hugoniot jump conditions imply that the left and right states are the same
...

4
...
2 Suppose that ρL νL = ρ R ν R = 0, σ = 0, B⊥ = B⊥ (1 + α) and B⊥ = 0
...
If B⊥ = 0 and [ p] = 0, show that given the
L
left state and p R we can determine the discontinuity speed and the right state
...

e
4
...
3 Suppose that ρL νL = ρ R ν R = 0, σ = 0 and that b⊥ is not a scalar multiple of B⊥
...
Then show that given the left state
L
R
and b⊥ , the discontinuity speed is determined by a quartic equation
...
5
...
If B⊥ is a linear combination of BL and v⊥ , show
R
L
that the Rankine–Hugoniot jump conditions lead to a quartic equation for β R , from which the
remainder of the right state can be determined
...

4
...
5 Suppose that ρL νL = ρ R ν R = 0 and σ = 0
...
Show that [β] = 0, and that
if βL = 0 then the left and right states are identical
...

4
...
6 Discuss the solution of the Rankine–Hugoniot jump conditions when ρL νL = ρ R ν R = 0 and
σ = 0
...
5
...
See section 4
...
8 for the
reflecting wall conditions with gas dynamics
...
6 Case Study: Finite Deformation in Elastic Solids
Solid mechanics is a much more complicated subject than gas dynamics
...
Traditionally, these problems have been solved by finite element methods
...


4
...
1 Eulerian Formulation of Equations of Motion for Solids
A description of the Eulerian forms of the conservation laws for finite deformation
in solid mechanics can be found in [39]
...
47)

∂ρ
+ ∇x · (vρ) = 0
...
48)

or as the conservation law

Conservation of momentum can be written either as Newton’s second law of
motion
dn · v 1
− ∇x · (Sn) = n · g,
dt
ρ

(4
...

∂t

(4
...
In some cases, g might include the effects of viscous
forces
...
Finally, conservation of
energy can be written either as the first law of thermodynamics
d
1
∂v
− tr S
dt
ρ
∂x



(4
...

2

(4
...
In some cases, ω might include the effects of heat diffusion
...
6
...
20) to discover the equivalent conservation laws in the Lagrangian
frame of reference
...
Here J = ∂x/∂a is the deformation gradient, defined originally in equation (4
...

Lagrangian conservation of mass can be written as
dρL
= 0
...
53)

4
...
54)

∂n · vρL
− ∇a · SL J n = ρL n · g
...
55)

or as a conservation law

Here JSL is the first Piola–Kirchhoff stress tensor
...
Finally, conservation of energy can be written either as the first law of
thermodynamics
d
1
∂v
− tr SL J
dt
ρL
∂a



(4
...

∂t

(4
...

∂t
∂x
If we had transformed the Lagrangian equality of mixed partial derivatives to the
Eulerian frame using (4
...

∂t
These two conservation laws are equivalent, provided that the deformation gradient
satisfies ∇a × J = 0
...
6
...
We can place the model on a firm thermodynamical foundation by
assuming a hyperelastic model
SL = 2

∂ρL ψ
,
∂C

(4
...
A particularly simple free energy function is given by the
Mooney–Rivlin model
ρL ψ(C) =

µ
λ
µ
[ln det(C)]2 + tr(C) − ln det(C)
...
59)

The constants are the shear modulus µ and the Lam´ constant λ = κ − 2 µ,
e
3
where κ is the bulk modulus
...

In practice, it is more common that constitutive laws for solids are given as
a system of ordinary differential equations
...

dt

Again, these ordinary differential equations imply that the first Piola–Kirchhoff
stress tensor is a function of the deformation gradient J; as a result, the second
Piola–Kirchhoff stress tensor SL and the Cauchy stress tensor S are functions of the
deformation gradient
...

dt
dt

Here θ is the absolute temperature and
Hi j =

∂JSL ei
∂JSL ei

...
In many
cases, the equations of motion for solids are assumed to be isothermal, and hi = 0
...

˜
Hi j J
dt
dt
j=1
3

(4
...
6 Case Study: Finite Deformation in Elastic Solids

225

Here
∂Sei
∂Sei
˜
˜

...
Then the equation for the internal energy can either
be differentiated in time or expressed directly in rate form as
dJe j
d

= cj ·

...

∂Je j
∂θ

4
...
4 Conservation Form of the Equations of Motion for Solids
We can write our equations of motion in the Lagrangian frame as
d
dt

uL da +
0



FL n ds =
0

r L da
0

where the vector of conserved quantities, array of fluxes and vector of body forces
are





ρL
0
0


 −JS 
vρL





L 
gρL






( + 1 v · v)ρL 
−v JSL 
(ω + g · v)ρL 
2

...
The first three
entries in these arrays represent conservation of mass, momentum and energy, while
the remaining entries represent the equality of mixed partial derivatives,
dJ
∂v
=

...
61)
dt
∂a
In addition to these conservation laws, we also have the constitutive laws for stress
and internal energy
...


226

Nonlinear Hyperbolic Systems

This may be viewed as a constraint on the initial values for the differential equation;
if this curl condition is satisfied initially, then the conservation law (4
...

In the Eulerian frame, the conservation laws can be written
d
dt

u E dx +



F E n ds =

r E dx

where the vector of conserved quantities, array of fluxes and vector of body forces
are






ρ
ρv
0








vρv − S












1
1


( + 2 v · v)ρ 


 , F E = ( + 2 v · v)ρv − v S , r E = (ω + g · v)ρ 
...

∂t
∂x
This equation can be derived from the equations
dJ
∂v
dJ−1
= −J−1 J−1 = −J−1 ,
dt
dt
∂x

and

∇x × J− = 0
...
6
...
The Lagrangian form of the Rankine–
Hugoniot jump conditions for isothermal solids can be written
0 = [ρL ]σL ,
[−JSL nL ] = [vρL ]σL ,
[−v]nL = [J]σL
...


4
...

The constitutive law can then be used to determine the nonzero discontinuity speeds
...

Similarly, the Eulerian form of the Rankine–Hugoniot jump conditions for
isothermal solids can be written
[ρn E · v] = [ρ]σ E ,
[vρn E · v − Sn E ] = [vρ]σ E ,
[J|J−1 |n E · v − v|J−1 |n E J] = [J|J−1 |]σ E
...
1
...
3 that the discontinuity speeds are related by
σ E = J n E σL + n E · v,
and the normal directions to the discontinuity are related by
n E = J− n L

1

...

If σ E = n E · v, then the normal component of velocity is continuous across the
discontinuity, [S]n E = 0 and [v|J−1 |n E J] = 0
...
6
...

 −H
 ∂a j JS e   0 
j=1
0
0
0
0
L 2
2j
JSL e3
0
0
0
0
−H3 j 0
Here

1

e j SL J − ρL c j , γ =
, cj =
,
γρL
∂θ
∂Je j
∂JSL ei
∂JSL ei

...



JSL e2 
JSL e3
We did not determine the quasilinear form directly from the conservation laws,
although this could be done with careful additional use of the constraint that the
deformation gradient is curl-free
...



0 −In 1 In 2 In 3

3
0
0
0 
j=1 n j b j 0

3
0
0
0
0 
j=1 H1 j n j

3
0
0
0
0 

j=1 H2 j n j
3
0
0
0
0
j=1 H3 j n j

−In 1 /ρL −In 2 /ρL −In 3 /ρL

0
0
0


0
0
0



0
0
0
0

0

0

0

229

4
...

∂Jn

(4
...
Also, let [n, N] be an orthogonal matrix, so that n N = 0
...

∂t
∂t
∂x
This equation follows directly from the conservation law and product rule
∂J−1
∂J−1 v
=−
∂t
∂x

and

∂J−1 v
∂v ∂J−1
− J−1

v = 0
...





230

Nonlinear Hyperbolic Systems

Let us define
∂Sei ˜
∂Sei
1
˜
˜
hi =
, Hi j = − −1 J−1 , b j = −
∂θ
∂J e j
ργ

ej S + ρ


J−1
...


  
 Se2   0 

  
 Se3   0 
0
J−1 v


If we solve the equation for the time derivatives, we see that in order for the system
to be hyperbolic, we require


v·n
 0


 0


 0 −

 0 −


 0 −
0

ρn
Iv · n

0
0

0
−In1 /ρ

0
−In2 /ρ

0
−In3 /ρ

v·n

0

0

0

− h1 b j )n j

0

Iv · n

0

0

− h2 b j )n j

0

0

Iv · n

0

− h3 b j )n j
J v·n

0
0

3
j=1

˜
nj bj

3
˜
j=1 (H1 j
3
˜
j=1 (H2 j
3
˜
j=1 (H3 j
−1


0
0 


0 


0 

0 


0 

0
0
Iv · n
−J−1 n1 /ρ −J−1 n2 /ρ −J−1 n3 /ρ Iv · n

to have real eigenvalues
...


(4
...
6 Case Study: Finite Deformation in Elastic Solids

Then we see that


0
0
0
0
0
v·n
ρn
 0
Iv · n
0
−In1 /ρ
−In2 /ρ
−In3 /ρ
0 




3
˜
nj bj
v·n
0
0
0
0 
 0
j=1


 0 − 3 (H1 j − h1 b )n j 0
˜
Iv · n
0
0
0 
j
j=1




3
˜
0
Iv · n
0
0 
 0 − j=1 (H2 j − h2 b j )n j 0


˜
 0 − 3 (H3 j − h3 b j )n j 0
0
0
Iv · n
0 
j=1
0 −J−1 n1 /ρ −J−1 n2 /ρ −J−1 n3 /ρ Iv · n
0
J−1 v · n


1 0 0
0 0
−ρn X
ρn X


X E
0 0 0
0 0
−X E




3
3
˜ X
˜ X


− j=1 n j b j
0 1 0
0 0
− j=1 n j b j



 3
3
˜
˜ ˜
˜
˜ ˜
(H1 j − h1 b j )n j X
 j=1 (H1 j − h1 b j )n j X 0 0 IN11 IN12 0
j=1

 3
3


˜
˜ ˜
˜
˜ ˜
j=1 (H2 j − h2 b j )n j X
 j=1 (H2 j − h2 b j )n j X 0 0 IN21 IN22 0

 3
3
˜
˜ ˜
˜
˜ ˜
 j=1 (H3 j − h3 b j )n j X 0 0 IN31 IN32 0
j=1 (H3 j − h3 b j )n j X
0 I
−J−1 X ( E + Iv · n)
−J−1 X (− E + Iv · n) 0 0 0


ρn X
1 0 0
0 0
−ρn X


X E
0 0 0
0 0
−X E




3
3
˜ X
˜ X


− j=1 n j b j
0 1 0
0 0
− j=1 n j b j


 3

3
˜
˜ ˜
˜
˜ ˜
(H1 j − h1 b j )n j X
=  j=1 (H1 j − h1 b j )n j X 0 0 IN11 IN12 0
j=1
 3

3


˜
˜ ˜
˜
˜ ˜
j=1 (H2 j − h2 b j )n j X
 j=1 (H2 j − h2 b j )n j X 0 0 IN21 IN22 0
 3

3
˜
˜ ˜
˜
˜ ˜
 j=1 (H3 j − h3 b j )n j X 0 0 IN31 IN32 0
j=1 (H3 j − h3 b j )n j X
0 I
−J−1 X ( E + Iv · n)
−J−1 X (− E + Iv · n) 0 0 0


− E + Iv · n 0
0
0
0
0
0


0
v·n 0
0
0
0
0




0
0 v·n
0
0
0
0




0
0
0 Iv · n
0
0
0


...


n S+ρ


J−1
∂J−1 n

X

232

Nonlinear Hyperbolic Systems

Exercises for 4
...
6
...

∂S
˜
(a) Compute H = ∂JSL and H = − ∂J−1 J−1 for this model
...

(c) Describe the Rankine–Hugoniot jump conditions for this model in both the Eulerian and
Lagrangian frames of reference
...

(e) Program the Rusanov scheme for the Mooney–Rivlin model in the Eulerian frame
...
6
...
Use your results to find the Lagrangian characteristic
speeds
...
6
...

4
...
4 Use the Mooney-Rivlin model to compute the derivatives
∂Sn
˜
H = − −1 J−1
∂J m
for arbitrary fixed directions n and m
...

Relate the Eulerian characteristic speeds to the Lagrangian speeds found in the previous problem
4
...
5 Consider the one-dimensional hypoelastic model
∂S
∂v

=
κ+

...

∂J
(b) Find the Eulerian and Lagrangian characteristic speeds
...

(d) Program the Rusanov scheme for the hypoelastic model in the Lagrangian frame
...

4
...
6 Consider the hypoelastic model

dS
˙
S≡
+ W S + SW,
dt
where W is the spin tensor
W =

1
2

∂v

∂x

∂v
∂x

˙
The derivative S is called the Jaumann stress rate
...


4
...


(b) Show that the Jaumann stress rate satisfies
˙
S=

d

S
dt


...

(c) Suppose that the Jaumann stress rate is related to the rate of deformation
D=

1
2

∂v
+
∂x

∂v
∂x

through Hooke’s law in rate form:

˙
S = D2µ + I κ −
trD
...
(Hint:
˜
if n = m, one of the eigenvectors of H is n, with eigenvalue (κ + µ4/3)/ρ)
...


4
...
In this case, the deformation is assumed
to be infinitesimal, and there is no distinction between Eulerian and Lagrangian
frames of reference
...
Our
system of conservation laws is
∂u
+
∂t

3
k=1

∂Fek
=r
∂xk

234

Nonlinear Hyperbolic Systems

where the vector of conserved quantities u, array of fluxes F and vector of body
forces r are
 


 

−S

Je1 
−ve 
0
1
 
u =  , F = 
Je2 
−ve  , r =  0 
...
64)

where κ is the bulk modulus and µ is the shear modulus
...

Se2 
Se3
Lemma 4
...
1 Linear elasticity with stress given by (4
...
The char√

acteristic speeds are either zero, ± (κ + 4µ/3)/ρ or ± µ/ρ
...
64) leads to
∂Sik
= (δi j δk + δ jk δi )µ + δik δ j
∂J j

2
κ− µ ,
3

where δi j is the Kronecker delta; this can be rewritten in matrix form as
∂Sek
2
= Iδk + e ek µ + ek κ − µ e
...

∂x

The quasilinear form of the conservation law is
 

  
v
0
−Iδ1 j /ρ −Iδ2 j /ρ −Iδ3 j /ρ
g
3 
∂ Se1 
−∂Se1 /∂Je j
0
0
0  0
 +

 =  
...
8 Case Study: Vibrating String

For a given direction n, let us define the linear elasticity acoustic tensor A by
3

3

A=

ni
i=1

j=1

µ
∂Sei
n j = Iµ + n κ +
n
...


The eigenvalues and eigenvectors associated with the quasilinear form of the conservation law for direction n are given in the equation



0
−I n1 I n2 I n3
X
0 0
−X
ρ
ρ
ρ


3
3
3
∂Se1

0
0
0   j=1 ∂Se1 n j X 0 0
− j=1 ∂Se1 n j
j=1 ∂Je j n j X
∂Je
∂Je j

  3 ∂Se j


3
3
∂Se2
∂Se2
−
0
0
0   j=1 ∂Je 2 n j X 0 0
j=1 ∂Je j n j X
j=1 ∂Je j n j


j
3
3
∂Se3
∂Se3
− 3 ∂Se3 n j
0
0
0
j=1 ∂Je j n j X 0 0
j=1 ∂Je j n j X
j=1 ∂Je j



X
0 0
−X

0 0 0
3
3
∂Se1
∂Se1


j=1 ∂Je j n j X  0
0 0 0
 j=1 ∂Je j n j X 0 0

=  3 ∂Se2

3
∂Se2
 0 0 0 0 
...


4
...
This problem will be a simple example of the more general solid
mechanics problem discussed in the previous section
...


4
...
1 Conservation Laws
Since a string is one-dimensional, we can consider its configuration at rest to be
parameterized by a single Lagrangian coordinate a1
...

0
0 1


Since the Green deformation tensor is


(∂x1 /∂a1 )2 + (∂x2 /∂a1 )2 ∂x2 /∂a1 0
C =J J=
∂x2 /∂a1
1
0 ,
0
0
1
its trace is
tr C =

∂x1
∂a1

2

+

∂x2
∂a1

2

+ 2 = Je1

2

+ 2
...

Je1

Here τ is the tension
...
e
...

In order to guarantee real characteristic speeds, we also assume that the tension
increases with strain
...


∂t
∂a1

Note that f is determined by its norm φ = f and an angle θ :


cos θ
f =  sin θ  φ
...


In order to simplify the discussion, we will ignore the zero third components of
v and f
...

sin θ

4
...

+
−v
∂t n(θ )φ
∂a1
4
...
2 Characteristic Analysis
Let us examine the characteristic speeds for the vibrating string
...
8
...
65) is hyperbolic, with characteristic speeds


± τ (φ)/ρ and ±λ2 = τ (φ)/ρφ
...

Proof We can easily compute the quasilinear form to be
 
 
v
v
0 −nτ −n τ ∂  
Iρ 0 0 ∂  
φ = 0
...

0
0 
∂a1
θ
0
0

We see that the eigenvalues and eigenvectors of this matrix take the form



τ
0
−n τ −n ρ
−nλ1 −n φλ2 n φλ2 nλ1
ρ


BY =  −n
0
0
1 
0
0  1
1
0
1
1
0
− φ (n )
0
0


 λ

−nλ1 −n φλ2 n φλ2 nλ1  1

λ2
≡Y
= 1
0
0
1 


−λ2
0
1
1
0
−λ1
where the (positive) characteristic speeds are
λ1 =

τ (φ)
,
ρ

λ2 =

τ (φ)

...


(4
...
Note that both characteristic speeds are functions of φ alone
...

∂w
Since this vector is orthogonal to the characteristic direction for ±λ2 , this characteristic speed is linearly degenerate
...

∂φ
Although the characteristic directions are always distinct, the characteristic
speeds are not
...
Then λ2 ρ is either equal to the slope of the tension curve (if λ = λ1 ), or
the slope of the line from the origin to a point on the tension curve (if λ = λ2 )
...

According to Cristescu, the linearly degenerate characteristic speeds are related
to the propagation of transverse waves, or changes in the shape of the string without
changes in tension
...

4
...
3 Jump Conditions
Lemma 4
...
2 In the vibrating string model (4
...
Then there are three kinds of solutions to the Rankine-Hugoniot
jump conditions
...


The second kind of solution has
θL = θ R ,

σ =±

1 τ (φ R ) − τ (φL )
,
ρ φ R − φL

v R − vL = −n(θ R )(φ R − φL )σ
...


4
...

−v

This implies that the jumps satisfy
[nτ ] = −[v]ρσ = [nφ]ρσ 2
...

Thus either τ R − φ R ρσ 2 = 0 = τL − φL ρσ 2 or tan θL = tan θ R
...
In this case, we have
τ (φ R )
τ (φL )
=
,
φR
φL

σ =±

τ (φ R )
,
ρφ R

v R − vL = −{n(θ R )φ R − n(θL )φL }σ
...
Since τ (1) = 0
and τ is increasing, these discontinuity speeds are real for φ ≥ 1
...
An elastic discontinuity
occurs if θ R = θL and φ R = φL
...

Since τ is increasing, these discontinuity speeds are real
...

Since τ and φ are nonnegative, these discontinuity speeds are real
...


240

Nonlinear Hyperbolic Systems

4
...
4 Lax Admissibility Conditions
In order for an elastic discontinuity to be a shock, we require it to satisfy the Lax
admissibility conditions
...
For a shock with positive
speed, we require
τ (φL ) >

τ (φ R ) − τ (φL )
> τ (φ R )
φ R − φL

which in turn implies that φL < φ R if τ is concave (and the reverse inequality if τ
is convex)
...

We do not consider the Lax admissibility conditions for a contact discontinuity
...


4
...
5 Entropy Function
φ

The sum of the kinetic and strain energy E ≡ 1 ρv v +
τ (η) dη is an entropy
2
function for the vibrating string, with energy flux ≡ −τ (φ)v n(θ)
...



∂E
∂w

∂u
∂w

−1

∂F
= ρv
∂w

0

τ 0  −n
1
− φ (n )


τ
−n τ −n ρ
ρ

0
0 
0
0


,
∂w
which verifies the equation (4
...

= −τ n

−τ v n −τ v n =

4
...
8
...
In this case,
there exists an equivelocity value of φ:
τ (φ∗ ) =

τ (φ∗ )

...

Similarly, for any φ ∈ (φ∗ , ∞) there exist a reciprocal φ ∈ (1, φ∗ ) so that the same
equation holds
...


Given any left state (vL , φL , θL ) and any intermediate state values φ0 , θ0 , we will
consider two cases
...
In this case, we have three
possibilities:
SC: If φ0 < φ L , then we have a shock moving left faster than a contact discontinuity,
and the jump conditions imply that
v− (φ0 , θ0 ) = vL − n(θL )

1
{τ (φL ) − τ (φ0 )}(φL − φ0 )
ρ

+ {n(θ0 ) − n(θL )}

1
τ (φ0 )φ0
...

ρ

(4
...

ρ

φL

On the other hand, if φ∗ ≥ φL > 1 then the negative contact discontinuity is no less
than the negative elastic speed at the left state
...

ρ

+ {n(θ0 ) − n(θL )}

RC: Else if φL ≤ φ0 < φ∗ , then we have a rarefaction moving left no slower than
a contact discontinuity, and the jump conditions imply that
v− (φ0 , θ0 ) = vL + n(θL )

φ0
φL

+ {n(θ0 ) − n(θL )}

1
τ (η) dη
ρ
1
τ (φ0 )φ0
...

ρ

Similarly, given any right state (v R , φ R , θ R ) and any intermediate state values
φ0 , θ0 , we will consider two cases
...
In this case, we
have three possibilities:

243

4
...

ρ

SC: Else if φ R ≤ φ0 < φ R , then we have a contact discontinuity moving right no
slower than a shock, and the jump conditions imply that
v+ (φ0 , θ0 ) = v R + {n(θ R ) − n(θ0 )}
+ n(θ0 )

1
τ (φ R )φ R
ρ

1
{τ (φ R ) − τ (φ0 )}(φ R − φ0 )
...

ρ

On the other hand, if φ∗ ≥ φ R > 1 then the positive contact discontinuity is no
greater than the positive elastic speed at the left state
...

ρ

CR: Else if φ R ≤ φ0 < φ∗ , then we have a rarefaction moving right no slower than
a contact discontinuity, and
v+ (φ0 , θ0 ) = v R − n(θ R )

φ0
φR

1
1
τ (η) dη + {n(θ R ) − n(θ0 )}
τ (φ0 )φ0
...

ρ

φ∗

These exhaust all possible cases for values of φ and θ
...
In fact, we found that
v− (φ0 , θ0 ) = vL + n(θL )νL (φ0 ) + n(θ0 )νL ,0 (φ0 )

(4
...
67b)

where

νL (φ0 ) =


 −σ (φL − φ0 ) − λ2 (φ0 )φ0 , SC



 −λ2 (φL )φL ,
CS or CR






νL ,0 (φ0 ) =

ν R (φ0 ) =

φ0
φL
φ∗
φL

λ1 (η) dη − λ2 (φ0 )φ0 ,

RC

λ1 (η) dη − λ2 (φ∗ )φ∗ ,

RCR


 λ2 (φ0 )φ0 ,



 λ2 (φL )φL − σ (φL − φ0 ),
 λ2 (φL )φL +



 λ (φ )φ +
2 ∗ ∗

φ0
φL
φ0
φ∗

λ1 (η) dη,

CR

λ1 (η) dη,

RCR


 λ2 (φ R )φ R ,



 σ (φ R − φ0 ) + λ2 (φ0 )φ0 ,
−



−

and

ν R,0 (φ0 ) =

φ0
φR
φ∗
φR

SC or RC
CS

λ1 (η) dη + λ2 (φ0 )φ0 ,

SC or RC
CS
CR

λ1 (η) dη + λ2 (φ∗ )φ∗ , RCR


 −λ2 (φ R )φ R + σ (φ R − φ0 ),



 −λ2 (φ0 )φ0 ,
 −λ2 (φ R )φ R −



 −λ (φ )φ −
2 ∗ ∗

φ0
φR
φ0
φ∗

SC
CS or CR

λ1 (η) dη,

RC

λ1 (η) dη,

RCR
...
These equations have been written in a form that is independent

4
...

We can check the continuity of νL and νL ,0 as follows
...
We also have
νL (φ∗ ) = −λ2 (φ∗ )φ∗ +

φ∗
φL

λ1 (η) dη

for a rarefaction-contact transitioning to a rarefaction-contact-rarefaction (at φ0 =
φ∗ )
...


Similarly, we check the continuity of ν R and ν R,0
...
We also have
ν R (φ∗ ) = λ2 (φ∗ )φ∗ −

φ∗
φR

λ1 (η) dη

for a contact-rarefaction transitioning to a rarefaction-contact-rarefaction (at φ0 =
φ∗ )
...
8
...

In order to solve the Riemann problem for the vibrating string, we need to show
that for any values of vL and v R we can find values for φ0 and θ0 so that the negative

246

Nonlinear Hyperbolic Systems

and positive wave families intersect:
v− (φ0 , θ0 ) = v+ (φ0 , θ0 )
...
67) we can rewrite this intersection condition in the form
v R − vL + n(θ R )ν R (φ0 ) − n(θL )νL (φ0 ) = n(θ0 ){νL ,0 (φ0 ) − ν R,0 (φ0 )}
We can eliminate n(θ0 ) by taking the Euclidean norms of both sides of this equation
...
(4
...
8
...
In order to
show that this function always has a unique zero, we will show that g(1) < 0, that
g(φ0 ) > 0 for sufficiently large φ0 , and that g (φ0 ) > 0 whenever g(φ0 ) = 0
...

This is negative, except for one special circumstance in which it is zero
...

ρ
ρ

For large values of φ0 we have
νL (φ0 ) = −λ2 (max{φL , φ∗ })
νL ,0 (φ0 ) = λ2 (max{φL , φ∗ }) +

φ0
max{φ L ,φ∗ }

λ1 (η) dη

ν R (φ0 ) = λ2 (max{φ R , φ∗ })
ν R,0 (φ0 ) = −λ2 (max{φ R , φ∗ }) −

φ0
max{φ R ,φ∗ }

λ1 (η) dη
...
66) guarantees that both νL ,0 (φ0 ) and ν R,0 (φ0 ) become
arbitrarily large as φ0 approaches infinity
...
Since g(φ0 ) is continuous and g(1) ≤ 0, g(φ0 ) must have at least one zero
for φ0 ≥ 1
...
8 Case Study: Vibrating String

Next, we would like to show that g has a positive slope whenever it is zero
...
69a)

ν R,0 (φ0 ) ≤ 0

(4
...
69c)

0 ≤ ν R (φ0 ) ≤ −ν R,0 (φ)

(4
...
This is simply a matter of checking the cases
...
69a):

SC or RC
 λ2 (φ0 )φ0 ,


 (λ2 (φL ) − σ )φL + σ φ0 ,
CS
0 ≤ νL ,0 (φ0 ) =
φ0
 λ2 (φL )φL + φL λ1 (η) dη, CR


 λ (φ )φ + φ0 λ (η) dη, RCR
...
69b):

 −(λ2 (φ R ) − σ )φ R − σ φ0 ,


 −λ2 (φ0 )φ0 ,
0 ≥ ν R,0 (φ0 ) =
φ0
 −λ2 (φ R )φ R − φ R λ1 (η) dη,


 −λ (φ )φ − φ0 λ (η) dη,
2 ∗ ∗
φ∗ 1

SC
SC or CS or CR
RC
RCR
...
69c) we will need to provide more detail
...
In this case λ1 (φ0 ) > σ > λ1 (φL ) and σ ≥ λ2 (φ0 )
...


νL (φ0 ) = −

CS: Next, consider the case of a contact discontinuity moving left faster than a
shock
...



248

Nonlinear Hyperbolic Systems

RC: Next, consider the case of a rarefaction moving left faster than a contact
discontinuity
...

CR or RCR: Finally, consider the case of a contact discontinuity moving left either
faster than a rarefaction or in the middle of a rarefaction
...

Similarly, in order to prove inequalities (4
...

CS: First, consider the case of a shock moving right faster than a contact discontinuity
...
Thus
{σ − λ2 (φ0 )}{λ2 (φ0 ) − σ λ2 (φ0 )}
1
>0
2σ λ2 (φ0 )
λ2 (φ0 ) + λ2 (φ0 )
2
ν R,0 (φ0 ) = − 1
<0
2λ2 (φ0 )
σ 2 + λ2 (φ0 )
1
ν R (φ0 ) + ν R,0 (φ0 ) = −
< 0
...
In this case
ν R (φ0 ) = 0
ν R,0 (φ0 ) = −

λ2 (φ0 ) + σ 2
1
< 0
...
In this case,
{λ1 (φ0 ) − λ2 (φ0 )}2
>0
2λ2 (φ0 )
λ2 (φ0 ) + λ2 (φ0 )
2
ν R,0 (φ0 ) = − 1
<0
2λ2 (φ0 )
ν R (φ0 ) + ν R,0 (φ0 ) = −λ1 (φ0 ) < 0
...
8 Case Study: Vibrating String

RC or RCR: Finally, consider the case of a contact discontinuity moving right
either faster than a rarefaction or in the middle of a rarefaction
...

Now that we have verified the inequalities (4
...
68)
...

The end of this inequality is zero at a zero of g(φ0 )
...
It follows that g has nonnegative
slope at all of its zeros
...


4
...
8 Riemann Problem Solution
After finding φ0 so that the wave families for the vibrating string intersect, we define
Wavespeeds ξ1 ≤ ξ2 ≤ ξ3 ≤ ξ4 ≤ 0 as follows:
SC: If we have a shock moving left faster than a contact discontinuity, then we
define
ξ 1 = ξ2 = −

1 τ (φL ) − τ (φ0 )
,
ρ φL − φ0

ξ3 = ξ4 = −

τ (φ0 )
ρφ0

[v2,3 , φ2,3 , θ2,3 ] = [vL − n(θL ) {τ (φL ) − τ (φ0 )}(φL − φ0 )/ρ, φ0 , θL ]
...


250

Nonlinear Hyperbolic Systems

RC: If we have a rarefaction moving left faster than a contact discontinuity, then
we define

ξ1 = −

τ (φL )
,
ρ

ξ2 = −

τ (φ0 )
,
ρ
φ0

[v2,3 , φ2,3 , θ2,3 ] = [vL + n(θL )

φL

ξ 3 = ξ4 = −

τ (φ0 )
ρφ0

τ (η)/ρ dη, φ0 , θL ]
...


RCR: If we have a contact discontinuity moving left in the middle of a rarefaction,
then we define

ξ1 = −

τ (φL )
,
ρ

τ (φ∗ )
,
ρ

ξ 2 = ξ3 = −

[v2,3 , φ2,3 , θ2,3 ] = vL + n(θL )

φ∗
φL

ξ4 = −

τ (φ0 )
ρ

τ (η)/ρ dη, φ∗ , θL
...


251

4
...


CR: If we have a rarefaction moving right faster than a contact discontinuity,
then

ξ 5 = ξ6 =

τ (φ0 )
,
ρφ0

ξ7 =

τ (φ R )
,
ρ
φ0

[v6,7 , φ6,7 , θ6,7 ] = [v R − n(θ R )

φR

ξ8 =

τ (φ0 )
ρ

τ (η)/ρ dη, φ0 , θ R ]
...


RCR: If we have a contact discontinuity moving right in the middle of a rarefaction,
then

ξ5 =

τ (φ0 )
,
ρ

ξ 6 = ξ7 =

[v6,7 , φ6,7 , θ6,7 ] = v R − n(θ R )

τ (φ∗ )
,
ρ
φ∗
φR

ξ8 =

τ (φ R )
ρ

τ (η)/ρ dη, φ∗ , θ R
...
8-48: string
...
You can execute this Riemann problem solver by clicking on
the link Executable 4
...
” When you have
selected all of your input parameters, click on “Start Run Now” in the window
labeled “guiString
...
8 Case Study: Vibrating String

(a) Deformation gradient (polar coordinates)

(b) Velocity

Fig
...
12 Solution to vibrating string Riemann problem

(a) Deformation gradient (polar coordinates)

(b) Velocity

Fig
...
13 Solution to vibrating string riemann problem

in the windows as requested to selected the left and right state for the Riemann
problem
...
Figures 4
...
13 show two solutions to the vibrating string Riemann problem
...


254

Nonlinear Hyperbolic Systems

Exercises for 4
...
8
...

4
...
2 We would like to examine cases in which the function g(φ0 ), defined in equation (4
...
We expect that in such a case, we should have φ0 = 1
...
First,

[v R , φ R , φ R ] = [vL − n(θL ){ τ (φ R )(φ R − 1)/ρ + { τ (φL )(φL − 1)/ρ, φ R , θL ]
and
[v R , φ R , φ R ] = [vL + n(θL ){ τ (φ R )(φ R − 1)/ρ − { τ (φL )(φL − 1)/ρ, φ R , θL ± π ]
...

4
...
3 Our construction of the solution of the Riemann problem omitted the anomalous shock
[v R , φ R , φ R ] = [vL + n(θL ){ τ (φ R + τ (φL )(φ R + φL )/ρ, φ R , θL ± π ]
in the wave families
...
8
...
Choose the left and right state for a Riemann problem
so that the solution involves
r a shock moving left faster than a contact discontinuity, and a shock moving right faster than a
contact discontinuity;
r a contact discontinuity moving left in the middle of a rarefaction, and a contact discontinuity
moving right in the middle of a rarefaction
4
...
5 Formulate the Eulerian equations of motion for the vibrating string
...
8
...
Find
the value of φ at which the two positive characteristic speeds are equal
...
8
...
How can you tell which waves are shocks, which
are contact discontinuities, and which are rarefactions?
4
...
8 Repeat the previous exercise for the Rusanov scheme
...
8
...
For weak waves (in which the
characteristic directions do not change much) we can approximate


(v1 ) R − (v1 )L
(v2 ) R − (v2 )L 
−X
X
cL



...
9 Case Study: Plasticity

255

Then the state that moves with zero speed can be approximated either by


(v1 )L
(v2 )L 
−X


cL
 φL  +
I
θL
or




(v1 ) R
(v2 ) R 
X


 φR  − I
θR

cR
...
Write a program to implement this
weak wave approximation, by evaluating the characteristic directions at the average of the left
and right states
...
8
...


4
...
This model will
incorporate an important physical effect, known as plasticity
...
If an applied force is sufficient, the material undergoes a permanent
change in shape called a plastic deformation; if the applied force is removed, the
material does not return to its original shape
...
The analysis of
this model is interesting, because it necessarily involves more flux variables than
conservation laws, in order to model hysteresis
...
9
...

We will write conservation of momentum in the form
∂v
∂s

= 0,
∂t
∂a
where s is the first Piola–Kirchhoff stress divided by the initial density
...

∂t
∂a
Since the deformation gradient must have positive determinant (the material can
never be turned inside-out), we require 1 + > 0
...


4
...
2 Constitutive Laws
For any physically realistic strain , there are upper and lower bounds on the stress
s, given by functions γ ( ) and τ ( )
...
Once the stress reaches one of these bounds, the plastic
strain π changes
...

In order to construct a physically realistic model, an infinite force must be
required to totally compress the material:
↓ −1 =⇒ γ ( ) ↓ −∞
...
70)

Further, we assume that plastic compression occurs only for negative stress:
for all

> −1,

γ ( ) < 0,

and that plastic tension occurs only for positive stress:
for all

> −1,

τ ( ) > 0
...

τ (π )

of the strain such that

for all π > πmin

γ ( γ (π )) = e( γ (π), π),

for all π > πmin

τ ( τ (π )) = e( τ (π), π)
...


257

4
...

d d

So that the characteristic speeds will be genuinely nonlinear, we will assume that
for all π > πmin

d 2γ d 2τ
∂ 2e
, 2 and 2 > 0
...
71)
d 2 d

We also assume that the slopes of the plastic loading curves are less than the slopes
of the elastic loading curves at the corresponding yield points:
for all

> −1 for all π > πmin

∂e

( γ (π )) <
( γ (π), π),
d


∂e
( τ (π )) <
( τ (π), π)
...

∂π
Thus elastic curves move to the right (i
...
, toward increasing value of strain) as π
increases
...
1 − (1 + )−2 ,
τ ( ) = 1
...
5 ,
e( , π) = −0
...
3
...
During plastic compression,
s = γ ( ) and the plastic strain π varies so that γ ( ) = e( , π )
...
The hysteresis rule says that plastic compression occurs if and only if the material is at yield and the time derivative of the strain
is negative:
=

during plastic compression

γ (π )

and


∂t

< 0
...

a

Otherwise the material is elastic
...

d

(4
...


4
...
3 Centered Rarefactions
During plastic tension or compression, the stress s is a function of the strain
only, and the plastic strain π does not affect the equations of motion
...
) On the other hand, during elastic
response the plastic strain π is constant
...



Since the stress is always an increasing function of strain, the model is hyperbolic
...
For centered rarefactions, we have the system of
ordinary differential equations
∂v
∂s
∂s
a
1

=− v +
,
∂t
∂a
t

t
∂v
a
1


=−
+v

...


This result determines the characteristic speeds, and shows that the centered
rarefaction curves satisfy
v =±

∂s

...
Thus inequality (4
...


259

4
...


The determination of admissible centered rarefactions and shocks during plastic
response is complicated by hysteresis
...
Recall that the stress is given by
s = γ ( )
...

Because L < R corresponds to unloading during rarefactions moving to the left,
and L > R corresponds to unloading during rarefactions moving to the right, centered rarefactions are impossible during plastic compression
...

During plastic tension, shocks are unphysical and only rarefactions are possible;
tension rarefactions with negative wave speed satisfy
L

=

τ (π L )

<

R

,

and tension rarefactions with positive wave speed satisfy
−1 <

R

<

L

=

τ (π L )
...
9
...
It is straightforward to solve these equations to get
σ =±

s R − sL

...
The Rankine–Hugoniot conditions now show that traveling
discontinuities satisfy
v R − vL = ±

s R − sL
(
R − L

R



L

)
...


(4
...


Similarly, admissible elastic shocks moving to the right satisfy
γ (π L )

<

L

<



R

τ (π L )
...

τ (π L )

>

L

>

γ (π L )

by

e( L , πL ) − γ ( γ (πL ))
e( L , πL ) − γ ( )


...
74)
L − γ (π L )
L −

Note that condition (4
...
Also note that s is a nondecreasing
function of for fixed π; this can be seen by differentiating (4
...
71) and the mean value theorem
...
If the shock speed is negative, we have
v R = vL −

{γ ( R ) − e( L , πL )}(

R



L

)
...


Similarly, an elastic–plastic shock with positive speed satisfies
vL = v R +

{γ ( L ) − e( R , π R )}(

and
−1 <

L

<

s(

R

, π R )
...
9 Case Study: Plasticity

261

4
...
5 Entropy Function
The sum of the kinetic and strain energy E ≡ 1 v 2 + s(θ) dθ is an entropy func2
tion for the plasticity model, with energy flux ≡ −s( )v
...
29)
...

∂w
Then
∂E
∂w

∂u
∂w

−1

∂F
= v s
∂w

∂s

0 ∂
∂s

...


4
...
6 Riemann Problem
In all cases for waves with negative speed, given a left state the admissible right
states involve stress increasing monotonically with strain, and velocity increasing
monotonically with strain
...

Given a left state (vL , sL ) we construct the negative wave family by using rarefaction
curves in the direction of increasing stress, and shock curves in the direction of
decreasing stress
...
The negative wave family involves all stresses
between negative infinity and the maximum tension stress, and all real velocities
because of inequality (4
...
Similarly, the positive wave family involves the same
stresses and velocities, but with negative slope dv
...
Let (v0 , s0 ) be the velocity and stress at the intersection of the two
wave families
...
If the stress s0 at the intersection of the wave families satisfies s0 ≥
e( L , πL ), we define 0,L and π0,L as follows
...
On the other hand, if τ ( τ (πL )) <
s0 then we solve τ ( 0,L ) = s0 for 0,L and then we solve e( 0,L , π0,L ) = s0

262

Nonlinear Hyperbolic Systems

for π0,L
...


For s0 < e( L , πL ) we define 0,L and π0,L as follows
...
On the other hand, if
s0 < γ ( γ (πL )) then we solve γ ( 0,L ) = s0 for 0,L , then we solve e( 0,L , π0,L ) = s0
for π0,L
...
9 Case Study: Plasticity

On the other hand, if

0, L

<

s(

L

, πL ) we define wavespeeds

ξ1 = ξ2 = ξ3 = ξ4 = −

e( L , πL ) − γ (
L − 0, L

0, L )

and intermediate state



v23
23

π23





=

vL −

{e( L , πL ) − γ (

0, L )}(

L





0, L )

0, L
−1 −1
(γ (s0 ))
γ


...
For s0 ≥ e( R , π R ) we define 0, R and π0, R as follows
...
On the
other hand, if τ ( τ (π R )) < s0 then we solve τ ( 0, R ) = s0 for 0, R and then we solve
e( 0, R , π0, R ) = s0 for π0, R
...


264

Nonlinear Hyperbolic Systems

For s0 < e( R , π R ) we define 0, R and π0, R as follows
...
On the other hand, if
s0 < γ ( γ (π R )) then we solve γ ( 0, R ) = s0 for 0, R , then we solve e( 0, R , π0, R ) = s0
for π0, R
...




s(

R

, πR )

4
...


R


πR
For more details concerning the solution of this Riemann problem, see [163]
...
9-49: plasticity
...
You can execute this Riemann problem solver by clicking

266

Nonlinear Hyperbolic Systems

(a) Stress vs
...
stress

Fig
...
14 Solution to plasticity Riemann problem

on the link Executable 4
...
” When you have selected all of your
input parameters, click on “Start Run Now” in the window labeled “guiPlasticity
...
Note that the
states you select must lie between the tension and compression plastic yield curves
in brown
...
An example of the
analytical solution to the plasticity Riemann problem is shown in Figure 4
...

Exercises for 4
...
9
...

Suppose that the left-hand state is given, and lies inside the elastic regime:
γ (π L )

<

L

<

τ (π L )
...
Also recall
that during a rarefaction, the characteristic speeds must increase from left to right
...
10 Case Study: Polymer Model

s R = e( R , π R ) and π R = πL
...

4
...
2 Show that elastic shocks moving to the left satisfy
v R = vL −

(

R



L

)(e( R , π R ) − e( L , πL )) for all

γ (π L )

<

R

<

L

<

τ (π L ),

s R = e( R , π R ) and π R = πL
...
9
...
9
...
9
...
9
...
9
...

Since the time derivative of the strain must be negative during plastic response, show that centered
rarefactions are impossible during plastic compression
...

Since π is constant during elastic response, show that jumps in the plastic strain occur only when
s R = sL and v R = vL
...
For suggestions of test problems,
see [163]
...
For suggestions of test problems, see [163]
...
10 Case Study: Polymer Model
We already saw several examples of nonlinear hyperbolic conservation laws for
flow in porous media in Sections 3
...
2 and 3
...
3
...
Beginning with this section, we
will present some examples of problems for flow in porous media which involve
systems of conservation laws
...
In essentially all oil recovery processes, water is
injected to maintain reservoir pressure and to force the oil toward production wells
...
” In some cases, these viscous instabilities
are reduced by adding a polymer to the water
...

The Riemann problem for the polymer model is interesting because its solution
involves states where the characteristic speeds are equal and there is a single characteristic direction
...


268

Nonlinear Hyperbolic Systems

4
...
1 Constitutive Laws
As in the Buckley–Leverett model, we shall assume incompressibility, so that the
mass densities of oil and water are constant and the porosity of the rock is constant
...
Recall that saturation is phase volume per fluid volume, so so + sw = 1
...
Let
us define the polymer concentration c to be the mass of polymer per water volume
divided by the total mass per water volume
...
Then conservation of mass for the three chemical components
(oil, polymer and water) can be written




so ρo φ
n · vo ρo
d
 csw ρw φ  d x +
 n · vw cρw  ds = 0
...
Since the phase densities are constant,
we can divide each equation in this system by the appropriate phase density to get




so φ
n · vo
d
 csw φ  d x +
 n · vw c  ds = 0
...
75)
dt

(1 − c)sw
n · vw (1 − c)
If we sum these equations, we obtain



n · (vo + vw ) ds = 0
...

Darcy’s law can be written
vo = K[−∇ p + gρo ]λo (1 − sw ),
vw = K[−∇ p + gρw ]λw (sw , c)
...
Here we have written the phase mobilities as the ratios
of relative permeability divided by viscosity:
λo (1 − sw ) =

κr o (1 − sw )
,
µo

λw (sw , c) =

κr w (sw )

...


4
...

With appropriate boundary conditions, this can be solved for fixed values of the
water saturation so and the polymer concentration c to find the pressure p
...
This suggests that in general we might rewrite the
pressure gradient in terms of the total fluid velocity as follows:
−K∇ p = vT

1
ρo λo + ρw λw
− Kg

...

λo + λw
λo + λw

If we are given the total fluid velocity as a function of space, then one of the
conservation laws (4
...
We will ignore conservation of oil mass
...


In one dimension, this implies the partial differential equations
∂ sw φ
∂ vw (sw , c)
+
= 0
...
10
...
10
...
Then the
w 1
w 1
polymer model (4
...
The
∂s
s
latter characteristic speed is linearly degenerate
...

Proof It is obvious that both the conserved quantities and the fluxes are functions
of the flux variables
w=

sw

...
76)

270

Nonlinear Hyperbolic Systems

Thus our quasilinear form of the conservation law is
φ∂vw /∂sw
∂vw /∂c
∂ sw
1 0 ∂ sw
+
= 0
...
Since this matrix is upper triangular, hyperbolicity is obvious
...
At first glance, it would
appear that this characteristic speed could be infinite
...
Since λw (sw , c) = κr w (sw )/µw (c), where the relative permeability
κr w (sw ) ↓ 0 as sw ↓ 0 and κr w > 0 is finite, this characteristic speed is finite
...
This
∂s
is 1/φ times the slope of the Darcy velocity of water with respect to saturation
...
Since we typically have
κr w (0) = 0 and κr o (0) = 0, this Darcy velocity curve is shaped like an “S”
...
This defines a curve, called the
equivelocity curve
...


4
...
3 Jump Conditions
Lemma 4
...
2 Suppose that κr w (sw ) ↓ 0 as sw ↓ 0, and κr w > 0 is finite
...
76) have two kinds
of solutions
...

sw,L φ
sw, R φ

Proof The Rankine–Hugoniot jump conditions for the polymer flooding model
imply that
vw, R − vw,L
sw, R − sw,L
=
φσ
...
10 Case Study: Polymer Model

271

where σ is the discontinuity speed
...

Substituting this result into the second jump condition leads to
0 = (cw, R − cw,L )(vw,L − sw,L φσ )
This requires either that cw, R = cw,L or that vw,L = sw,L φσ
...
In this
case, the first Rankine–Hugoniot jump condition implies that
σ =

vw, R − vw,L 1

...

If cw, R = cw,L , then we must have vw,L = sw,L φσ , which in turn implies that
σ = vw,L /(sw,L φ)
...

It follows that σ = vw, R /sw, R φ as well
...

4
...
4 Riemann Problem Solution
The waves in this problem can be explained graphically in terms of the velocity
curves as follows
...
The particle velocity waves correspond to changes in concentration and
saturation; these follow line through the origin, intersecting the velocity functions
for different polymer concentrations
...
An interactive program to solve the Riemann
problem for polymer flooding can be executed by clicking on the link Executable
4
...
” When you have selected all of your input parameters,
click on “Start Run Now” in the window labeled “1d/polymer riemann
...
saturation

(b) Velocity vs
...
4
...
You may drag the
mouse when selecting the right state to see how the solution changes
...
10-50: polymer
...
Figure 4
...

The Riemann problem for the polymer flooding model was solved by Isaacson,
but never published
...
A paper by Keyfitz and Kranzer [81] on the Riemann problem for the vibrating string included a discussion of a general system of
two conservation laws that encompasses the polymer model, under the assumption
that the velocity function is convex
...

Exercises for 4
...
10
...
Also show that since the water velocity is “S”-shaped, the Buckley–Leverett speed is neither genuinely nonlinear nor linearly
degenerate
...
10
...
Under what
conditions is the centered rarefaction admissible?
4
...
3 Determine the equations for the Hugoniot loci in either wave family
...
11 Case Study: Three-Phase Buckley–Leverett Flow

273

4
...
4 Show that the polymer concentration is the Riemann invariant for the Buckley–Leverett
characteristic speed, and the particle velocity is the Riemann invariant for the other wave
family
...
10
...
Also show that this entropy function
is neither convex nor concave for any choice of β
...
10
...
For help,
see [3]
...
10
...

4
...
8 Program the Lax–Friedrichs scheme for three-phase Buckley-Leverett flow
...
11 Case Study: Three-Phase Buckley–Leverett Flow
4
...
1 Constitutive Models
Another interesting model for flow in porous media concerns the flow of three
immiscible and incompressible phases
...
However, nearly incompressible
three-phase flow does occur in other circumstances, such as chemically-enhanced
recovery
...
)
Since the saturations are the volume fractions of the phases, they sum to one:
sw + so + sg = 1
...
e
...
We will assume that Darcy’s law is
valid for each phase:
vw = −K(∇ p − gρw )λw (sw ),
vo = −K(∇ p − gρo )λo (so ),
vg = −K(∇ p − gρg )λg (sg )
...
Then conservation of mass takes the form



ρw sw
 ρo so  φ dt +
ρg sg

d
dt





n · vw ρw
 n · vo ρo  ds = 0
...

n · vg

If we sum these equations, we obtain



n · (vw + vo + vg ) ds = 0
...
If we
substitute Darcy’s law for the phase velocities, we obtain
∇ · [K(λw + λo + λg )∇ p] = ∇ · [Kg(λw ρw + λo ρo + λg ρg )]
...

We can also write the phase velocities in terms of the total fluid velocity vT =
vw + vo + vg :

  

λw
λw {λo (ρw − ρo ) + λg (ρw − ρg )}
vw
1
vT
 vo  =  λo 
+  λo {λw (ρo − ρw ) + λg (ρo − ρg )}  Kg

...
In particular, in one dimension the divergence-free condition
on the total fluid velocity implies that it is constant in space, and this assumption is
reasonable
...

+
∂t so φ
∂ x vo

275

4
...
11
...
The quadratic formula for the eigenvalues of Aφ shows that
the eigenvalues will be real if and only if the discriminant is positive:
0≤

∂vw
∂vo
+
∂sw
so

2



∂vw ∂vo ∂vw ∂vo

∂sw so
so sw

=

∂vw
∂vo

∂sw
so

2

+

∂vw ∂vo

...
In this case,
∂vo
∂vw

∂sw
so

2

+

∂vw ∂vo
= m Pm
...

λw + λo + λg µw µo µg
µg
We have also used the matrix




κww κwo κwg
P =  κow κoo κog 
κgw κgo κgg

where the entries of P are functions of the relative permeabilities:
κww = (κr o κrg + κrg κr o )2 ,
κoo = (κr w κrg + κrg κr w )2 ,
κgg = (κr o κr w + κr w κr o )2 ,
κwo = −(κrg κr w + κr w κrg )(κrg κr o + κr o κrg ) + 2κr w κr o (κrg )2 ,
κwg = (κr w κr o − κr o κr w )(κrg κr o + κr o κrg ) − 2κr w κr o κrg κr o ,
κog = −(κr o κr w − κr w κr o )(κrg κr w + κr w κr o ) − 2κr w κr o κrg κr w
...

0 4κr w κr o κrg (κrg κr o κr w + κrg κr o κr w + κrg κr o κr w ) κww

It is reasonable to assume that κr w (sw ), κr o (so ) and κrg (sg ) are all increasing
functions, taking values between zero and one, and zero at zero
...
It is possible to show that the three-phase Buckley–
Leverett model is hyperbolic even when gravity is included, and that the relative
permeabilities described here are the only functional forms for which this is true
for all values of gravity and the viscosities [161]
...
11
...
This occurs when m Km = 0
...
An examination of the nullspace of L shows that this
equation is equivalent to
µg
µw
µo
=
=
= α
...

sw = (κr w )−1
α
α
α
Since the saturations are constrained to sum to one, α is defined by
µg
µw
µo
+ (κr o )−1
+ (κrg )−1

...

µw + µo + µg

4
...
4 Elliptic Regions
Other choices of the relative permeability functions can lead to elliptic regions
...
Problems of this sort lead to all kinds of interesting mathematical analysis, but
are of little practical interest
...
12 Case Study: Schaeffer–Schechter–Shearer System

277

problem: people who develop models need to take care that their models are wellposed (in this case, for initial-value problems)
...

Exercise for 4
...
11
...
Experiment with numerical
solution of Riemann problems with states chosen near the umbilic point
...
12 Case Study: Schaeffer–Schechter–Shearer System
An example of a system of conservation laws with no known physical application
has been suggested by Schaeffer, Schecter and Shearer [143]
...
As a result, it is possible for the two wave families associated with the
left and right states in a Riemann problem to have no intersection
...

The system of conservation laws for this model is
∂ p

+
∂t q
∂x

p2 − q
1
3

p3 − p

= 0
...
77)

p

...
12
...
77) is hyperbolic,
with genuinely nonlinear characteristic speeds p ± 1
...

0
p+1

Thus the characteristic speeds are p ∓ 1
...

p±1

278

Nonlinear Hyperbolic Systems

Lemma 4
...
2 Given a left state ( pL , q L ), the points ( p, q) on the slow Rankine–
Hugoniot locus for the Schaeffer–Schechter–Shearer system (4
...

12

Similarly, given a right state ( p R , q R ), the points ( p, q) on the fast Rankine–Hugoniot
locus satisfy
q( p) = q R + ( p − p R )

p + pR

2

1−

( p − p R )2
12

where p R < p < p R +


12

with shock speed
σ+ ( p) =

p + pR
+
2

1−

( p − p R )2

...

3

There are five variables (namely p L , p R , q L , q R and σ ) and two equations
...
Then the jump conditions imply
1 3
p − [ p] = [ p 2 ]σ − [ p]σ 2
...

3 R
Now let z = ( p R − pL )/ pL
...

3 L

4
...

12

We can use the jump relation [q] = [ p 2 ] − [ p]σ to obtain
2
q R = qL + ( p2 − pL ) − ( p R − pL )
R

p R + pL

2

= qL + ( p R − pL )

p R + pL
±
2
1−

1−

( p R − pL )2
12

( p R − pL )2
12

...
On the other hand, for a given value of pL there is a

real solution for σ only for | p R − pL | ≤ 12
...
Using our
solution to the jump conditions in that example, we see that these inequalities
imply that
0>

[ p]

2

1−

[ p]2
+ 1 > [ p]
...

12
2

This can be rewritten

The outermost inequalities imply that [ p] < 0
...
78) to obtain
1−

[ p]2
[ p]2
< 1 − [ p] +
;
12
4

this can be rewritten
0 < [ p]

[ p]
−1
...
If −2 < [ p] < 0, then we can square
both sides of the left inequality in (4
...
78)

280

Nonlinear Hyperbolic Systems

this can be rewritten
[ p]
+1
3

0 < −[ p]

and places no further restrictions on [ p]
...
Thus the slow discontinuity

in this example exists and is admissible if and only if 0 > [ p] > − 12
...

Lemma 4
...
3 The Riemann invariants for the Schaeffer–Schechter–Shearer system (4
...

Proof Centered rarefactions for this system satisfy
d p
1
=

...
If we integrate this ordinary

1
2
q R − q L = ( p 2 − pL ) ± ( p R − pL )
...

2
Theorem 4
...
4 (Schaeffer–Schechter–Shearer Riemann Problem) Suppose that
we are given a left state ( pL , q L ) and a right state ( p R , q R ) in a Riemann problem for the Schaeffer–Schechter–Shearer model (4
...
If a solution exists, it
involves the intermediate state ( p∗ , q∗ ) at the intersection of the slow wave
curve

 q L + ( p − pL ) p+ pL + 1
...
,

p+ p R
2



1−

( p R − p)2
12

,

p < pR

p R + 12 ≥ p ≥ p R
...
12 Case Study: Schaeffer–Schechter–Shearer System

fast rarefaction
...
Then the state
that moves with speed ξ in the Riemann problem is

ξ < ξL
 ( pL , q L ),



 (ξ + 1, q L + ( pξ − pL ) 1 + pξ + pL , ξL < ξ < ξ−


2

( p∗ , q∗ ),
ξ− < ξ < ξ+
( pξ , q ξ ) =



 (ξ − 1, q R + ( p R − pξ ) 1 − pξ + p R , ξ+ < ξ < ξ R

2



( p R , q R ),
ξ R < ξ
...
12
...
12
...
12
...

Programs to solve the Riemann problem for the Schaeffer–Schechter–Shearer
model can be found in Program 4
...
f
...
12-23: guiSchaefferShearer
...
When you
have selected all of your input parameters, click on “Start Run Now” in the window
labeled “1d/schaeffer shearer riemann
...
You may drag the mouse when selecting the
right state to see how the solution changes
...
We would expect numerical
methods to have trouble if they were given such a Riemann problem to integrate
...
16 involves wave families that come
close to intersecting, but do not
...
q

Fig
...
16 Solution to Schaeffer–Schechter–Shearer Riemann problem

The next lemma discusses entropy functions for this model
...
12
...
77) with entropy flux
( p, q) =
2
2
2
2
2
αp[q( p /3 − 1) + 2 p /3(1 − p /5)] + β( p − q) + γ p( p /3 − 1)
...

∂u

4
...
29) to determine the possible forms of P and Q
...
12
p
, plot the fast and slow rarefaction curves going out of w in
q
the directions of increasing characteristic speed
...

4
...
2 Give an example of a choice of left and right states for which the Riemann problem does not
have a finite intersection of the wave families
...
12
...

4
...
1 Given an arbitrary state w =

4
...
The analytical solutions of the vibrating string and polymer flooding Riemann problems are pretty difficult to program,
while the analytical solution of the three-phase Buckley–Leverett model exists only
as a proprietary software program (not ours)
...


4
...
1 Design of Approximate Riemann Solvers
The discussion in this section has been adapted from the review paper by Harten
et al
...
Recall that the solution to the Riemann problem R(uL , u R , x/t) is the
exact solution to the initial value problem in one spatial dimension
∂u ∂f(u)
+
= 0,
∂t
∂x

u(x, 0) =

uL , x < 0

...
If we integrate the conservation
law in space over the interval (− x L /2, x R /2), and in time over the interval
(0, t) where λmax t < min{ x L /2, x R /2}, then the divergence theorem implies
that
x R /2
− x L /2

R uL , u R ,

x
t

d x = uL

xL
xR
+ uR
− t[f(u R ) − f(uL )]
...

For any ξ ∈ (− x L /2 t, x R /2 t) we integrate over the quadrilateral with corners

284

Nonlinear Hyperbolic Systems

(− x L /2, 0), (0, 0), (ξ t, t) and (− x L /2, t) to get
0=

ξ t
− x L /2
t

+

R uL , u R ,
1
1 + ξ2

0

x
t

d x − uL
u
f

−ξ 1

xL
− tf(uL )
2

1 + ξ 2 dt
...
We conclude that the flux along the curve x = ξ t is
given by
x
1 ξ t
xL
R uL , u R ,

dx
(4
...


(4
...
The constraint guarantees that the approximate Riej
mann solver reproduces the left and right states for sufficiently large (either positive
or negative) ξ
...

j

Combining these two equations leads to
x R /2


x
˜
R uL , u R ,
t
x L /2

1
d x = (uL x L + u R x R ) − t
2

λj uj
...
13 Approximate Riemann Solvers

We will typically approximate the flux along the curve x = ξ t by averaging the
expressions for the flux on either side of this curve:
[f(u) − uξ ](ξ t, t) ≈ ˜ξ (uL , u R )
f
=

xL
1
1
f(uL ) + uL

2
2 t
t
+ f(u R ) − u R

=

1
xR
+
2 t
t

ξ t

x
˜
R uL , u R ,
t
x L /2



x R /2
ξ t

x
˜
R uL , u R ,
t

1
f(uL ) + f(u R ) − (uL + u R )ξ −
2

dx
dx

|λ j − ξ | u j
...
80)

j

Note that Godunov’s method does not use the full information from the Riemann
problem solution; it averages that function on the grid at the new time
...
When we do so, we need to make sure that the resulting
scheme is consistent with the original conservation law, and satisfies the entropy
condition
...
13
...
Also assume that R(uL , u R , ξ ) is conservative, meaning that for all states uL and u R and for all timesteps satisfying
t < 1 max j {|λ j |},
2
x R /2


x
˜
R uL , u R ,
t
x L /2

dx =

uL x L + u R x R
− t[f(u R ) − f(uL )]
...
81)

can be rewritten as a conservative difference where the numerical flux
˜i+ 1 (un , un ) = f(un ) −
˜i
f 2 ˜ i ˜ i+1

xi
2 t

˜n
= f(ui+1 ) −

˜n
1 ui −

n+ 2

0

1
t

n+ 1
2

xi+1

˜n
1 ui+1 +

2 t n+ 2

− xi /2

xi+1 /2

1
t

n+ 1
2

˜ ˜ ˜n
R uin , ui+1 ,

0

x
t

n+ 1
2

˜ ˜ ˜n
R uin , ui+1 ,

dx
x
1

t n+ 2

is consistent with the original flux, meaning that for all u, ˜i+ 1 (u, u) = f(u)
...


˜
Further, since R is conservative
+

fi+ 1 (uL , u R ) − fi+ 1 (uL , u R )
2

2

= f(u R ) −

xi+1
2 t

− f(uL ) −

1 uR +

n+ 2

xi
2 t

1 uL +

n+ 2

xi+1 /2

1
t

n+ 1
2

1
t

n+ 1
2

˜
R uL , u R ,

0
0
− xi /2

˜
R uL , u R ,

x
t

n+ 1
2

x
t

n+ 1
2

dx
d x = 0
...
Thus the
scheme (4
...

Note that the notions of conservative difference scheme and conservative approximate Riemann solvers are distinct
...

Let us return to the exact solution of the Riemann problem
...
13 Approximate Riemann Solvers

the inequality
∂ S(u) ∂ (u)
+
≤0
∂t
∂x
holds weakly
...
(4
...

˜
Lemma 4
...
2 Suppose that R(uL , u R , ξ ) is consistent and conservative
...

R ui−1 , uin ,
1
t n+ 2
xi−1/2
(4
...
84)

then the scheme satisfies the entropy inequality
t n+1/2
xi

˜
˜
S(uin+1 ) ≥ S(uin ) −

˜ i+ 1 (uin , ui+1 ) − ˜ i− 1 (ui−1 , uin )
˜ ˜n
˜n ˜
2

2

where the numerical entropy flux
n
˜ i+ 1 (uin , ui+1 ) =
2

=

(uin ) +

xi
2 t

n
(ui+1 ) −

n+ 1
2

S(uin ) +

xi+1
2 t

n+ 1
2

0

1
t

n+ 1
2

n
S(ui+1 ) +

− xi /2

− xi+1 /2

1
t

n+ 1
2

n
˜
S R uin , ui+1 ,

0

x

dx

1

t n+ 2

n
˜
S R uin , ui+1 ,

x
t

n+ 1
2

is consistent with the original entropy flux, meaning that for all u we have
˜ i+ 1 (u, u) = (u)
...
83)
...
84),
xi+1/2
xi

˜ ˜ ˜ n x − xi+1/2
S R uin , ui+1 ,
1
t n+ 2

˜ ˜ n ˜ x − xi−1/2
S R ui−1 , uin ,
1
t n+ 2
xi−1/2
xi

xi +

xi

1

xi
xi+1
t n+ 2
˜
˜n
˜n
S(uin ) +
S(ui+1 ) −
[ (ui+1 ) −

2
2
2
xi+1 /2


0

˜ ˜ ˜n
S R uin , ui+1 ,

x

˜
(uin )]

dx

1

t n+ 2
1

xi−1
xi
t n+ 2
˜n
˜
˜
S(ui−1 ) +
S(uin ) −
[ (uin ) −
+
2
2
2


0
− xi+1 /2

˜ ˜n ˜
S R ui−1 , uin ,
1

˜
= S(uin ) xi − t n+ 2
+

xi+1 /2

1
t

n+ 1
2
1

+ t n+ 2
+

1
t

n+ 1
2

0

− xi−1 /2

t

dx

n+ 1
2

˜n
(ui+1 ) −

xi+1
2 t

n+ 1
2

xi−1
2 t

n+ 1
2

t

t

+
˜ ˜n
(un , ui+1 )
i+ 1 i
2

1

dx

n+ 1
2

n+ 1
2

˜n
S(ui−1 )
x

˜ ˜n ˜
S R ui−1 , uin ,

˜
≡ S(uin ) xi − t n+ 2

˜n
S(ui+1 )

x

˜ ˜ ˜n
S R uin , ui+1 ,

˜n
(ui−1 ) +
0

x

˜n
(ui−1 )]



dx


˜
˜
(un , uin )
i− 1 i−1
2


...


+

Thus both i+ 1 and i− 1 are consistent with the original entropy flux
...
13 Approximate Riemann Solvers
+

...
Suppose that we use

Then
1

˜
S(uin+1 )



˜
S(uin )

i

i

t n+ 2

xi
t

˜
S(uin ) −

=

+
˜n ˜n
i+1/2 (ui , ui+1 )



+
˜n ˜n
i−1/2 (ui−1 , ui )]

[

+
˜n ˜n
i+1/2 (ui , ui+1 )



+
˜n ˜n
i+1/2 (ui , ui+1 )]

i

n+ 1
2

xi

i

=

[

i

˜
S(uin )
...
13
...

f 2
˜
Lemma 4
...
4 Suppose that R(uL , u R , ξ ) is consistent and conservative
...
Then the scheme
˜
uin+1 =

1
xi

˜ ˜ ˜ n x − xi+1/2 d x
R uin , ui+1 ,
1
t n+ 2
xi
˜ ˜ n ˜ x − xi−1/2 d x
R ui−1 , uin ,
1
t n+ 2
xi−1/2

xi+1/2
xi

1
+
xi

(4
...

Proof The proof of Lemma 4
...
1 shows that the scheme (4
...


The lemma now follows immediately from the definition of an upstream
scheme
...
13
...
86)
2
2
2
d(uL , u R ) = A sign(A − Iξ )(u R − uL )
for some function d
...
Let us discuss
the typical situation, in which we seek the state moving at zero speed in the solution
of the Riemann problem (ξ = 0)
...


If we can identify a particular wave family in which the shock belongs, then we can
replace the test on the entropy flux with a test on characteristic speeds: λ j (uL ) >
λ j (u R )
...


Thus, the choice of d is subtle
...
13
...

2
2
2
In this case, d(uL , u R ) = A sign(A − Iξ )(u R − uL )
...

Example 4
...
6 In Burgers’ equation we have f(u) = 1 u2 , and the flux in
2
Godunov’s scheme is
(f − uξ )(uL , u R ) =

=

max{uL , min{u R , ξ }}2 − ξ max{uL , min{u R , ξ }},

uL < u R

max{ 1 u2 − u R ξ, 1 u2 − uL ξ },
2 R
2 L
1 2
 2 uL − uL ξ, ξ < uL < u R or 2ξ < uL + u R < 2uL

− 1 ξ 2 , uL < ξ < u R
1 2
 2
u − u R ξ, uL < u R < ξ or 2u R < uL + u R < 2ξ
...


Note that Godunov adds numerical diffusion in each case, whether the wave involves
a shock or rarefaction
...
13 Approximate Riemann Solvers

Example 4
...
7 The flux in Rusanov’s scheme is
f(uL , u R ) =

1
1
[f(uL ) + f(u R )] − max |λ j | (u R − uL )
2
2 j

where λ j are the characteristic speeds of the conservation law
...

Example 4
...
8 One form of the Lax–Wendroff scheme takes
1
1 ∂f
f(uL , u R ) = [f(uL ) + f(u R )] −
2
2 ∂u

uL + u R
2

A similar Lax–Wendroff flux is
1
1 ∂f
f(uL , u R ) = [f(uL ) + f(u R )] −
2
2 ∂u

[f(u R ) − f(uL )]

uL + u R
2

x

...


Both have trouble with transonic rarefactions in Burgers’ equation, because f(uL ) =
f(u R ) implies that
∂f
∂u

uL + u R
2

= 0,

and thus that d(uL , u R ) = 0
...


Many schemes incorporate a numerical diffusion to help spread discontinuities
and to help entropy production
...
For example, in gas dynamics
we might choose
ψ2 (a) = min{v R − vL , 0}
so that diffusion is added only in compressions (i
...
, shocks)
...
More generally,
one might try
ψ2 (a) = max{max{λi,L − λi,R , 0}},
i

as suggested in [13]
...
87) is user-adjustable, but typically α = 0
...

Note that both of the numerical viscosities in the previous paragraph are such that
ψ(a) = O( x), so the modification of the flux is O( x 2 )
...
87)

292

Nonlinear Hyperbolic Systems

are called quadratic viscosities
...

Sometimes a linear diffusion is used, of the form
f ← f + (u R − uL )ψ(a),
where a is some velocity associated with the problem, and ψ(a) = O(1)
...
A Lax–Friedrichs numerical diffusion would choose
ψ(a) = x
...

[u] [u]

If a convex or concave entropy function S is available, we can also use
ψ(a) =

|[ ∂ S ][f]|
∂u
[ ∂ S ][u]
∂u

,

as suggested in [68]
...
Often, some hybrid of the two
numerical viscosities is used, perhaps by taking the minimum of the quadratic
and linear numerical diffusion coefficients, and then multiplying times the jump
u R − uL
...
13
...
2
...
Let λ be an upper bound on the characteristic
speeds in all waves associated with the Riemann problem arising from uL and u R
...

2

d x = uL −λ t +

(4
...
13 Approximate Riemann Solvers

This equation implies that
1
1
uL R = (uL + u R ) − [f R − fL ]
...
80):
(f − uξ )Rusanov (uL , u R )
1
= {fL + f R − (uL + u R )ξ − | − λ − ξ |(uL R − uL ) − |λ − ξ |(u R − uL R )}
2
1
|λ + ξ | + |λ − ξ |
|λ + ξ | − |λ − ξ |
=
fL + f R − (uL + u R )ξ − (u R − uL )
+ (f R − fL )
2
2

(4
...

We can interpret this approximate Riemann solver as decomposing the jump into
two waves associated with the relative wavespeeds −λ − ξ and λ − ξ :
1
λ

1
(−λ − ξ )
2
1 1
+ [u R − uL ] + [f R − fL ]
(λ − ξ )
...
90)

This formulation will be useful for the wave propagation scheme in Section 6
...
6
below
...
91)

where u = u R − uL and f = f R − fL
...
1
...


4
...
4 Weak Wave Riemann Solver
Given any linearly independent set of characteristic directions X with corresponding
speeds λ j , we might approximate the solution of the Riemann problem by
˜
R(uL , u R , ξ ) = uL +

Xe j α j ,
j:λ j <ξ

294

Nonlinear Hyperbolic Systems

where the scalars α j are determined so that the approximate Riemann solver produces the right state at large wave speed:
Xe j α j = u R − uL
...

j

If we solve the linear systems
Xy = u R − uL

and

Xz = f(u R ) − f(uL )

then we can see that conservation would require that we take the wave speed λ j to
be
λj =

e j X−1 [f(u R ) − f(uL )]
ej · z
=

...


Although Equation (4
...

A non-conservative form of the weak-wave Riemann solver is also sometimes
used
...
After solving Xy = u R − uL , the
numerical flux associated with zero wave speed would be evaluated by
f(uL , u R ) =

f(uL ) +
f(u R ) −

Xe j λ j e j · y, most wavespeeds positive
j:λ j >0 Xe j λ j e j · y, most wavespeeds negative
...

[u R − uL ] · [u R − uL ]

(4
...
13 Approximate Riemann Solvers

295

Example 4
...
9 Let us determine a weak wave Riemann solver flux for Burgers’
equation
...

u R − uL
2

Then
f(uL , u R ) =

f(uL ), λ ≥ 0
f(u R ), λ < 0
...
)
In practice, this approximate Riemann solver does not perform well for transonic
rarefactions: see Example 4
...
15 and Section 4
...
9 below
...


4
...
5 Colella–Glaz Riemann Solver
Colella and Glaz [34] suggested replacing the rarefaction curves by shock curves in
an approximate solution of the Riemann problem
...
Their
original purpose was to avoid a numerical integrator for the ordinary differential
equations associated with a “real gas” equation of state, namely one that includes
such effects as disassociation and recombination of air molecules
...
Such information is difficult to obtain for nonstrictly hyperbolic conservation
laws, or conservation laws with local linear degeneracies
...

Example 4
...
10 The Colella–Glaz approximate Riemann problem solver for a
polytropic gas is initialized by computing
2
C L = γ pL ρL , WL =

2
CL ,

2
C R = γ pR ρR , WR =

2
CR ,

p ∗ = [W R p R + W L pL − W L W R (v R − vL )]/(W R + W L )
...
This amounts to performing the following

296

Nonlinear Hyperbolic Systems

steps:
2
W L = {C L (1 + [ p ∗ / pL − 1](γ + 1)/(2γ )}1/2 ,
2
W R = {C R (1 + [ p ∗ / p R − 1](γ + 1)/(2γ )}1/2 ,

ζR =

3
2W R
,
2
2
WR + C R

ζL =

2W L3
,
2
W L2 + C L

v∗ = v R + ( p R − p ∗ )/W R , v∗ = vL − ( pL − p ∗ )/W L ,
R
L
p ∗ := p ∗ − (v∗ − v∗ )ζ R ζL /(ζ R + ζL )
...

R
L
If v∗ ≤ ξ , then the state moving with speed ξ is between the contact discontinuity
and the right state; in this case, the velocity is initialized by
v± = v R ,

p± = p R ,

ρ± = ρ R
...


Afterword, calculations serve to identify the state on the Hugoniot locus:
c± =

γ p± /ρ± ,

ρ ∗ = ρ±

1−

2
W± = γρ± p± {1 + ( p ∗ / p± − 1)(γ + 1)/(2γ )},

γρ± ( p ∗ − p± )
,
2


c∗ =

γ p ∗ /ρ ∗
...


Otherwise the wave is a rarefaction and the characteristic speeds at the end of the
wave curve are
λi =

v∗ − c∗ ,
v∗ + c ∗ ,

λ0 =

v± − c± ,
v± + c± ,

v∗ > ξ
v∗ ≤ ξ
v∗ > ξ
v∗ ≤ ξ
...
13 Approximate Riemann Solvers

297

If (v∗ − ξ )(ξ − vi ) ≥ 0, then the solution of the Riemann problem is taken to be
the state on this wave family at the contact discontinuity:
ρ = ρ ∗,

p = p∗ ,

v = v∗
...
e
...


Otherwise, the state is interpolated within the rarefaction:
λ0 − ξ
,
λ0 − λi
ρ = αρ ∗ + (1 − α)ρ± ,

v = αv∗ + (1 − α)v± ,

c = αc∗ + (1 − α)c± ,

p = c2 ρ/γ
...
13-52: riemnv
...


4
...
6 Osher–Solomon Riemann Solver
Another approach to the solution of the Riemann problem for gas dynamics is
described in [123]
...

Along a transonic rarefaction, we could use the characteristic speeds at the left
and right states as if they were associated with the respective ends of the waves
families, and use these speeds to estimate the location of internal sonic points
...
The resulting numerical flux is a sum of fluxes at the initial left or right states, and interior
(approximate) sonic points
...
13
...
At the intersection of these curves we have
n · (v R − vL )
c R + cL

2
4
n · (v R + vL )
+ cL − c R
...
Suppose that we are given a speed ξ
...

There is no need for an Engquist–Osher approximation here
...

The Osher–Solomon Riemann problem solver for gas dynamics requires an
iteration to determine the intersection of the rarefaction curves, if it exists
...


4
...
7 Bell–Colella–Trangenstein Approximate Riemann Problem Solver
The previous approximate Riemann problem solvers assumed either that the
Riemann invariants are known, or that wave curves are approximated well by Hugoniot loci
...

However, these approaches do not apply to many important problems, such as solid
mechanics or flow in porous media
...

Suppose that we are given flux variables wL and w R
...


4
...

The discussion that follows concerns the case when at least one of the characteristic
speeds changes sign between wL and w R
...

w

For example, we might choose w = 1 (wL + w R )
...
We can approximate the path from
the left state to the right state in the solution of the Riemann problem by
w R = wL +

Xei ei · y
...
Let us suppose
that we will traverse from left to right
...
For all wave families k ≤ I we compute
the intermediate states
wk = w L +

Xei ei · y
...

The final step is to determine an approximate path integral, mimicking the Engquist–
Osher flux:
ei ·y

f = f(wL ) +

Xei
k≤I

min{λi (η), 0} dη
...
A common model is linear interpolation:
λi (η) = λi |wL +

λi |w R − λi |wL
η
...
Again, arrange the wave families i in order of increasing

300

Nonlinear Hyperbolic Systems

characteristic speed
...
For all wave families k ≥ I we compute the intermediate
states
wk = w R −

Xei ei · y
...

The final step is to determine an approximate path integral, mimicking the EngquistOsher flux:
ei ·y

f = f(w R ) −

Xei
k≥I

max{λi (η), 0} dη
...
13
...
Notice that for gas dynamics
−1 


v
ρ
0
1
0
0
−1
∂f
∂u
v
0   v2
2vρ
1 
= v
∂w
∂w
γ
1 2
1
1 3
1 2
2
v vρ γ −1
v ρ(e + 2 v ) + p + v ρ γ −1 v
2
2


v ρ 0
1
= 0 v ρ  ≡ A + Iv
...

0 0 c

Afterward, we solve Xy = w R − wL for the characteristic expansion coefficients y
...

α=
γp
c

c=

γ p/ρ,

4
...

2
γp
pR
at either end of the contact discontinuity
...
e
...
For example, if all
of the characteristic speeds are positive, we evaluate the flux at the left state
...
If we need to evaluate the flux at either w1 or w2 , we require that both
the density ρ and the pressure p are positive at this state; otherwise, we will resort
to a Rusanov flux
...
Because the contact discontinuity is linearly degenerate, and because the
Engquist–Osher flux is diffusive, we want to avoid using an Engquist–Osher flux
contribution for the contact discontinuity
...
If the speed of the contact discontinuity is positive, we will begin our
2
Engquist–Osher path integral at wL ; otherwise, we will begin at w R
...

If we have a transonic wave, then we must determine an approximate path integral, mimicking the Engquist–Osher flux
...


0

Since the waves other than the contact discontinuity are genuinely nonlinear, there
are no local extrema of the characteristic speeds
...

ei · y

Note that the zero of this linear model occurs at
ηi,s =

λi |wL
ei · y
...


303

4
...
Note
that for gas dynamics, the choice of the initial point for the path integral implies
that contact discontinuity makes no contribution to the sum
...
13
...
He showed that for gas dynamics it is possible to find a
matrix A(wL , w R ) that represents an appropriate average of the flux derivative
...

It is possible to prove the existence of a Roe matrix for any hyperbolic system
of conservation laws with a convex or concave entropy function
...
13
...


Proof Suppose that S is an entropy function with entropy flux
∂S
∂ n
=
∂w
∂w

∂u
∂w

−1

:

∂Fn

...


Suppose that we differentiate the entropy flux equation
∂ n
=
∂u j

m
i=1

∂ S ∂ei Fn
∂ui ∂u j

with respect to uk :
∂ n
=
∂u j ∂uk

m
i=1

∂ 2 S ∂ei Fn
+
∂ui ∂uk ∂u j

m
i=1

∂ S ∂ 2 ei Fn

...

∂u
∂u∂u
It follows that
∂Fn
∂Fn
=
∂z
∂u

∂z
∂u

−1

∂Fn
=
∂u

∂2S
∂u∂u

−1

=

∂ n

∂u j ∂uk

m
i=1

∂ S ∂ 2 ei Fn

...
It follows that ∂Fn
∂z
is symmetric
...

∂u

From the discussion in the previous paragraph, it is obvious that B is symmetric
¯
and P is positive-definite
...

¯
It follows that A is diagonalizable with real eigenvalues
...
13
...
Then the approximate
Riemann solver
¯
¯
Xe j e j X−1 [u R − uL ]

˜
R(uL , u R , ξ ) = uL +
¯
j:λ j <ξ

is consistent and conservative
...
13 Approximate Riemann Solvers

˜
Proof The definition of R shows that it is consistent:
¯
¯
Xe j e j X−1 [u − u] = u
...
13
...


If we need to express the flux jump for wave propagation (Section 6
...
6 below),
then we write
¯
¯
(f R − u R ξ ) − (fL − uL ξ ) = X( ¯ − Iξ )(X)−1 (u R − uL )
...
13
...
We will usually choose different approaches
that depend on the problem
...
93)

306

Nonlinear Hyperbolic Systems

Example 4
...
15 Consider the scalar conservation law
∂u ∂f(u)
+
= 0
...
The Roe approximate
Riemann solver is easily seen to be
˜
R(uL , u R , ξ ) =

¯
uL , λ > ξ
¯
uR , λ < ξ

and the flux associated with speed ξ in this approximate Riemann solver is
1
¯
f(uL ) + f(u R ) − (uL + u R )ξ − |λ − ξ |[u R − uL ]
2
¯
f(uL ) − uL ξ, λ > ξ
=
¯
f(u R ) − u R ξ, λ < ξ
...
13
...
Instead of using z = ∇ u E as
the intermediate variable to use in computing the Roe matrix, we will use
c
ζ
≡ 1 ,
vc
z2

z=
where c =



gh
...
Similarly,
F=

1
ζ1 z2
1 4
z2 z2 + I 2 ζ1 g

so
∂Fn
ζ1 n
z n
= 2 3
n2ζ1 Iz2 n + z2 n
∂z

1
g

involves polynomials in the entries of z as well
...

∂z

307

4
...

¯
z2 Iζ1

Then
f(z R ) − f(zL ) = BP[u(z R ) − u(z L )]
where the Roe matrix is
BP =

ζ3
n ζ1
¯1

0
n
− (¯ 2 /ζ1 )(¯ 2 /ζ1 ) n I(¯ 2 /ζ1 ) n + (¯ 2 /ζ1 )n
z ¯ z ¯
z ¯
z ¯


...


The eigenvectors of the Roe matrix are
¯
X=

1
0
1
¯
¯
¯
¯
v − nc N v + nc

where [n, N] is an orthogonal matrix, and the eigenvalues are


¯
¯
v n−c
0
0
¯ = 0
I¯ n
v
0 
...

v
¯
2c
¯
n (v R h R − vL h L ) − (¯ n − c)(h R − h L )
v
These expansion coefficients give us an approximate path from left state to right
state
...

2
Example 4
...
17 The following discussion of a Roe solver for gas dynamics follows that in Hirsch [73, page 463ff]
...
Then the vector of con2
served quantities can be written


2
ζ1

z2 ζ1
u=
γ −1
ζ3 ζ1
+ 2γ z2 · z2
γ
so



∂u  1
= z2
∂z
ζ3
γ

is linear in the entries of z
...
13 Approximate Riemann Solvers

so


z2 · n

ζ1 n



0


∂Fn  γ −1
−1
−1
= nζ3 γ Iz2 · n + z2 n − n γ γ z2 n γ γ ζ1 


∂z
0
ζ3 n
z2 · n
is linear in the entries of z as well
...

∂z

This would suggest that we compute


ρ R + ρL
 √
√ 1
¯ 
z ≡  v R ρ R + vL ρL 
2


H R ρ R + HL ρ L




and use the linearity of the partial derivatives of u and Fn to compute


¯
2ζ1


¯
P−1 =  z2

¯
ζ3
γ

0
¯
Iζ1
γ −1
¯
z2
γ

0




0


¯
ζ1
γ

and


¯
z2 · n

¯
ζ1 n

0

0

¯
ζ3 n

¯
z2 · n





−1
−1 ¯
¯ −1 z
B = nζ3 γ γ I¯ 2 · n + z2 n − n γ γ z2 n γ γ ζ1 
...

n γ −1 z2¯·¯ 2 − z2 zζ ·n
=
2

¯
¯ ¯
¯
2
ζ1
1


¯3
ζ
¯ 2 ·¯
¯
¯ 2 ·n
z2 ·n
¯ ¯2 2
¯
¯
−ζ3 zζ ·n + (γ − 1) z2ζz32 z2 · n
γ zζ1
¯1 n − (γ − 1) ζ 2 z2
¯
¯
¯
¯
ζ
1

1

1

¯
Next, we note that A = BP depends only on the average velocity


v ρ + vL ρ
¯1 = R √ R √ L
¯ ¯
v ≡ z2 /ζ
ρ R + ρL
and the average total specific enthalpy
¯
¯ ¯
H ≡ ζ3 /ζ1 =
Thus we can write




H R ρ R + HL ρ L

...

2

Then we can see that the eigenvectors of the Roe matrix are


1
0
1
1
¯
¯
¯
¯
¯
¯
X =  v − nc
N
v
v + nc 
1
¯ − v · nc v N v · v H + v · nc
¯ ¯ ¯
¯ ¯
H ¯ ¯ ¯
2
and the eigenvalues are


¯
¯
v·n−c
0
0
0

I¯ · n 0
v
0 

...





n(γ − 1)
...
13 Approximate Riemann Solvers

In order to solve the Riemann problem, Roe solves the linear system u R − uL =
¯
Xy for the expansion coefficients y of the waves by computing

1

¯
(β + b · n) − 1 (β2 v + 1 n ) 1 β2 
¯
2 1
2
2
c
ρ R − ρL

 −N v
¯
0 
N
¯

...

2
These expansion coefficients give us an approximate path from left state to right
state
...

2
Example 4
...
18 Let us see if we can develop a Roe solver for the Schaeffer–
Schechter–Shearer model
...
77) that this model has
u=

p
q

and f =

p2 − q

...
We will take z = u, and compute
1

B=
0

pR
1
2 p dp
p R − pL pL
pR 2
1
p − 1 dp
p R − pL pL

∂f
( p R θ + pL [1 − θ ]) dθ =
∂u

−1
0

=

¯
2 p −1
2
p
0

where
¯
p=

p R + pL
2

and

p2 =

2
p2 + p R pL pL
R

...
Now BX = X ¯ where
¯
X=

1
1
¯
¯
p+r p−r

¯
p−r
0
and ¯ =
¯
0
p+r

and
( p R − p L )2

...

r=

¯
1 + p2 − p2 =

1−

It is, in general, very difficult to construct Roe solvers for the conservation laws in our other case studies
...
Roe solvers have been discussed
for magnetohydrodynamics [23], but only for special cases (γ = 2)
...

Note that if the solution to the Riemann problem consists of a single discontinuity, then the Roe solver gets the exact solution
...
Also recall that a Roe solver
leads to a numerical flux of the form (4
...
By examining the definition of the
numerical diffusion relative to the centered differences flux in Equation (4
...


(4
...
Across a transonic rarefaction, it is common
for the Roe matrix to have a zero eigenvalue, resulting in zero diffusion and an
entropy violation
...
13
...
We will discuss some other alternatives
in the following sections
...
13
...
The Roe approximate Riemann solver
takes
¯
¯
Xe j e j X−1 [u R − uL ]} = uL +

˜
R Roe (uL , u R , ξ ) = uL +
λ j <ξ

uj
λ j <ξ

¯
¯
where u j = Xe j e j X−1 [u R − uL ]
...
The associated approximate Riemann solver
will be
˜
R H H (uL , u R , ξ ) = uL +

uj + βj uj
...
13 Approximate Riemann Solvers

The resulting approximate Riemann solver will still be consistent, because the
change to the solution of the Riemann problem is zero when uL = u R
...

2
From Lemma 4
...
14, we see that in order for the resulting approximate Riemann
solver to be conservative, it is sufficient to require that


¯
λ j L β j + λ j R (1 − β j ) = λ j
...
We also require
0 ≤ β j ≤ 1, so we actually compute
β j = max 0, min 1,

¯
λjR − λj
λjR − λjL


...
94) showed that the Roe solver numerical diffusion has
−1
the form X| − Iξ |X u
...

¯
Lemma 4
...
19 If λ j L < ξ < λ j R and λ j L ≤ λ j ≤ λ j R , then
(λ j R − ξ ) 1 −

¯
¯
λjR − λj
λjR − λj
− (λ j L − ξ )
λjR − λjL
λjR − λjL

¯
≥ |λ j − ξ |
...

On the other hand,
¯
0 ≤ 2(λ j R − ξ )(λ j − λ j L )
¯
¯
¯
¯
= (λ j R − ξ ) λ j − λ j L + (λ j − ξ ) − (λ j L − ξ ) λ j R − λ j + (λ j − ξ ) ,

(4
...
95) is still true
...


Thus this modification of the Roe solver should never be performed for linearly
degenerate waves, such as the contact discontinuity in gas dynamics
...


4
...
10 Harten–Lax–van Leer Scheme
A vastly simpler approximate Riemann solver is due to Harten, Lax and van Leer
[68]
...

In practice [48], these bounds are often approximated by
¯
λ = min min{λ j L , λ j }
j

and

¯
λ = max max{λ j R , λ j }
j

where λ j L are the characteristic speeds at uL , λ j R are the characteristic speeds at
¯
u R , and λ j are the eigenvalues of the Roe matrix
...

˜
Here the intermediate state uL R is chosen so that R is conservative
...
13
...
) Conservation
requires
x R /2


x
˜
R uL , u R ,
t
x L /2

xL
+ uL R (λ − λ) t + u R
2
x L uL + x R u R
− t[f(u R ) − f(uL )]
...


xR
−λ t
2

315

4
...
80):
1
(f − uξ )HLL (uL , u R ) = {f(uL ) + f(u R ) − (uL + u R )ξ − |λ − ξ |(uL R − uL ) − |λ − ξ |(u R − uL R )}
...
96)
If ξ < λ then
(f − uξ )HLL (uL , u R )
1
= {f(uL ) + f(u R ) − (uL + u R )ξ − (λ − ξ )(uL R − uL ) − (λ − ξ )(u R − uL R )}
2
1
= [f(uL ) + f(u R ) − 2uL ξ + uL λ − u R λ + uL R (λ − λ)]
2
1
= [f(uL ) + f(u R ) − 2uL ξ + uL λ − u R λu R λ − uL λ − f(uL ) + f(u R )]
2
= f(uL ) − uL ξ
...
Otherwise λ < ξ < λ
and
(f − uξ )HLL (uL , u R )
1
= {f(uL ) + f(u R ) − (uL + u R )ξ + (λ − ξ )(uL R − uL ) − (λ − ξ )(u R − uL R )}
2
1
= [f(uL ) + f(u R ) − uL λ − u R λ + uL R (λ + λ)] − uL R ξ
2
1
= [f(uL )λ − f(u R )λ + (u R − uL )λλ]
− uL R ξ
...


If we need to write the flux difference as a sum of waves for wave propagation (see
section 6
...
6), then we can use equation (4
...
We can also write this equation in

(4
...
98)

for use with wave propagation methods in multiple dimensions (section 7
...
3)
...
96) for the Harten-Lax-vanLeer flux with the definition (4
...


If we have a jump in a single wave family, so that f(u R ) − f(uL ) = [u R − uL ] σ ,
where λ ≤ σ ≤ λ, then
d(uL , u R ) =

|λ − ξ |(σ − λ) + |λ − ξ |(λ − σ )
λ−λ

[u R − uL ]
...
In general, the HLL solver adds
too much numerical diffusion to linearly degenerate waves, though not as much as
the Rusanov flux
...
Recall that the
˜
intermediate state uL R was chosen to make R conservative, Whenever S is convex,
Jensen’s inequality and inequality (4
...


4
...
11 HLL Solvers with Two Intermediate States
The HLL solver described in section 4
...
10 does a good job in resolving the
slowest and fastest waves, but not so good a job in resolving waves associated with
intermediate characteristic speeds
...


317

4
...
The approximate Riemann solver has the form

 uL , ξ < λ


u L ∗ , λ < ξ < λ∗
˜
RHLLM (uL , u R , ξ ) =
 u R∗ , λ∗ < ξ < λ


uR , λ < ξ

(4
...
In order for this Riemann
solver to be conservative, we require
x L uL + x R u R
− t[f(u R ) − f(uL )]
2
x R /2
x
˜
=
dx
R uL , u R ,
t
− x L /2
xL
= uL λ t +
+ uL ∗ (λ∗ − λ) t + u R∗ (λ − λ∗ ) t + u R
2

xR
−λ t
...


(4
...
80)
...

We will require uL ∗ and u R∗ to satisfy u R∗ − uL ∗ = (u R − uL )α for some scalar
α that will be specified below
...
If we
were willing to use information from characteristic directions, we might hope to
do better, but one purpose of this approximate Riemann solver is to avoid using
information from characteristic directions
...

We now have a linear system for uL ∗ and u R∗ :
I(λ∗ − λ) I(λ − λ∗ )
−I
I

uL ∗
u λ − uL λ − f(u R ) + f(uL )
= R

...

u R λ − uL λ − f(u R ) + f(uL ) + (u R − uL )(λ∗ − λ)α λ − λ

In order to evaluate the flux, we will need to compute
uL ∗ − uL = [u R − uL ](λ(1 − α) + λ∗ α) − [f(u R ) − f(uL )] /(λ − λ)

(4
...


(4
...
100) implies that
(f(u R ) − u R ξ ) − (f(uL ) − uL ξ ) = [f(u R ) − f(uL )] − [u R − uL ]ξ
= [(u R − u R∗ ] (λ − ξ ) + [(u R∗ − uL ∗ ] (λ∗ − ξ ) + [(uL ∗ − uL ] (λ − ξ )
...
102)

This equation can be used with wave propagation methods (see Section 6
...
6 below
...
Linde assumes that a strictly convex entropy S(u) is available, and computes
λ∗ =

∂S
(u R ) − ∂ S (uL ) [f(u R )
∂u
∂u
∂S
(u R ) − ∂ S (uL ) [u R
∂u
∂u

− f(uL )]
− uL ]


...

The definition of λ∗ implies that
∂S
∂S
(u R ) −
(uL ) ([f(u R ) − f(uL )] − [u R − uL ]λ∗ ) = 0
...
13
...

The Pythagorean theorem implies that
1=

[u R − uL ] P[u R − uL ]
λ2
[f(u R ) − f(uL )] P[f(u R ) − f(uL )] ∗
[f(u R ) − f(uL ) − (u R − uL )λ∗ ] P[f(u R ) − f(uL ) − (u R − uL )λ∗ ]
+

...
13 Approximate Riemann Solvers

319

The first term on the right represents the relative strength of waves moving with
speed λ∗ , while the second term represents the relative strength of waves moving
with different speeds
...

The difficulty is that the matrix P is not available
...
His final expression
2
is
α=

˜
([u] P[f])2
,
˜
˜
[f] P[f][u] P[u]

0,

[S]λ∗ − [ ] ≥ 0 (shock)
[S]λ∗ − [ ] < 0 (rarefaction)

where [u] = u R − uL , and so on
...
80) and (4
...
101)
...

[u R − uL ] [u R − uL ]

This corresponds to taking P = I
...


4
...
12 Approximate Riemann Solver Recommendations
Our discussion of approximate Riemann solvers has been somewhat long
...
For
problems in which the exact Riemann problem solution is inexpensive, Godunov’s
method should use the exact Riemann solver
...
For those problems in which the exact Riemann problem solution is
expensive but a Roe solver is available, the Roe solver should be accompanied with
one of the modifications of the Roe solver or a numerical diffusion
...
For Lagrangian solid
mechanics, the characteristic speeds come in plus/minus pairs, and a Roe solver
is almost never available
...
4
...
x/t

could be used
...
The vibrating string is an example of this
situation
...
In both cases, characteristic speeds can coalesce with a loss of a linearly
independent characteristic direction
...
We have used the Harten–Lax–vanLeer scheme
for such problems with some success
...
13 Approximate Riemann Solvers

(a) Exact

(b) Weak wave

(c) Harten–Lax–vanLeer

(d) Linde

Fig
...
18 Various Riemann solvers for plasticity: elastic strain vs
...

Executable 4
...

The user can select input parameters by dragging down on “View” and releasing on “Main
...
” In particular, the user can choose to work with shallow water, gas
dynamics, magnetohydrodynamics, vibrating string, plasticity, polymer flooding,
three-phase Buckley-Leverett flow or the Schaeffer-Schechter-Shearer model
...
The user can

322

Nonlinear Hyperbolic Systems

select the approximate Riemann solver under “Numerical Method Parameters
...
Some options are unavailable for certain models
...
17 and 4
...
Of course, the
Roe solvers fail for transonic rarefactions without the Harten–Hyman modification
...
Here
the failure may be due to hysteresis effects
...
The code Program 4
...
f contains routines to compute
conserved quantities from the flux variables and vice versa, to compute the fluxes
from the flux variables, to compute characteristic speeds, to solve Riemann problems, to perform various approximate Riemann problem solvers, and to select initial
data for Riemann problems
...
13-54: gas
dynamics or Program 4
...
13-56: vibrating string
or Program 4
...
13-58: polymer or Program 4
...
13-60: Schaeffer-Schechter-Shearer model
...
13-61: GUIGodunov
...
As always, a list
of all of the files in the directory can be obtained by deleting the file name from the
web link (i
...
, backing up to the first “/”) in the browser window
...
13
4
...
1 Describe the analogue of the weak wave Riemann solver for the shallow water equations
...
Use 100 grid cells in your calculations
...

Plot h, v and the characteristic speeds versus x/t
...

4
...
2 Trangenstein and Colella [162] suggested using the following weak wave solver for solid
mechanics
...
The
state in the solution of the Riemann problem moving with zero speed was approximated either
by wL + i:λi <0 Yei ei · d or by w R − i:λi >0 Yei ei · c
...

(b) Are the two values for the solution of the Riemann problem the same?
(c) Under what circumstances is this approximate Riemann solver conservative?
4
...
3 LeVeque [97, p
...
If X is any nonsingular matrix with corresponding real eigenvalues , then solve Xz = f(u R ) − f(uL ) for the

4
...
The flux at the solution of the Riemann problem moving with zero speed was approximated either by f(uL ) + i:λi <0 Xei ei · zi
or by f(u R ) − i:λi >0 Xei ei · zi
...

(b) Are the two values for the flux at the solution of the Riemann problem the same?
(c) Is is possible to decide if this approximate Riemann solver is conservative?
4
...
4 The initial guess in the Colella–Glaz Riemann solver is based on a weak wave approximation
...
Using the results from section 4
...
3, we will decompose the jump
between the states in terms of the characteristic directions from left and right:

  

ρL 1 ρ R
y1
ρ R − ρL
 −cL 0 c R  y2  =  v R − vL 
...

p
pL
ρ L c2
L
L(
R(
4
...
5 Show that in the Colella–Glaz Riemann solver, ζL = − dvd p p) and ζ R = − dvd p p)
...

4
...
6 Compare the Colella–Glaz Riemann solver to the exact solution to the Riemann problem for
the following test problems:
(a) a Mach 2 shock moving to the right into air with density 1, velocity 0 and pressure 1

(i
...
, p R = 1, v R = 0, ρ R = 1; pL = 9/2, ρL = 8/3, vL = 35/16);
(b) a stationary shock (σ = 0) in air with density 1, velocity −2 and pressure 1 on the right
(i
...
, p R = 1, v R = −2, ρ R = 1; pL = 19/6, ρL = 24/11, vL = −11/12);
(c) a rarefaction moving to the right from air with density 1, pressure 1 and velocity 0 into a

vacuum
...
e
...

(d) the Colella–Woodward interacting blast wave problem [177]
...
4) confined between two reflecting walls at x = 0 and x = 1
...
The initial condition for pressure consists of three constant states:

 1000
...
1
p = 0
...
1 < x < 0
...
, 0
...
0
...
01, 0
...
026, 0
...
030, 0
...
034 and
0
...
Plot ρ, v, p and the temperature versus x
...

4
...
7 Program the Roe solver for gas dynamics, and compare it to the exact solution to the Riemann
problem
...
e
...
e
...
e
...
(i
...
, pL = 1, vL = 0, ρL = 1; p R = 0, ρ R = 0, v R = 35);
(d) the Sod shock tube problem [131, page 116]
...
4)
in which the left state is given by ρL = 1, vL = 0, pL = 1 and the right state is ρ R = 0
...
1
...
Plot ρ, v, p and the
characteristic speeds versus x/t at a time for which the fastest wave is near the boundary
of the computational domain;
(e) the Colella-Woodward interacting blast wave problem [177]
...
4) confined between two reflecting walls at x = 0 and x = 1
...
The initial condition for pressure consists of three constant states:

 1000
...
1
p = −0
...
1 < x < 0
...
, 0
...
0
...
01, 0
...
026, 0
...
030, 0
...
034 and
0
...
Plot ρ, v, p and the temperature versus x
...

4
...
8 Suppose that we want to develop a Roe solver for the vibrating string, described in Section 4
...

Show that the Roe matrix should take the form
0 −A12

...


How hard is it to compute α?
4
...
9 Show that the plasticity model, described in section 4
...

−1
0

Here s is the stress, is the strain, and [u] = u R − u L is the jump in some state u
...
13
...
Test your Riemann solvers for problems
involving both shocks and rarefactions
...
Which solvers are most accurate in general? Which are most efficient?

4
...
13
...
To do this, generate a uniform mesh in wave speeds covering the range
of wave speeds in your Riemann problem
...
e
...
Now, run Godunov’s method with
mesh expanding at the given mesh speeds; in other words, solve the Riemann problems to find
the flux f − uξ associated with the state that moves with speed ξ , which is the speed associated
with each mesh point
...


5
Methods for Scalar Laws

In Chapters 3 and 4 we examined hyperbolic partial differential equations and some
basic numerical methods to solve these problems
...

5
...
This question is reasonably easy to answer for linear methods applied to
linear advection, which will be the topic for this section
...

5
...
1 Consistency and Order
Suppose that we want to approximate the solution of the conservation law
∂u ∂ f (u)
+
=0
∂t
∂x
by means of an explicit numerical method
n
n
u in+1 = H (u i−k ,
...

2
We shall say that the pointwise error in the method is ein = u in − u(xi , t n )
...
Typically, the numerical solution selects
some intermediate state as its approximate value for the solution at the discontinuity,
326

5
...
Instead, we will
consider other measures of the error in the solution
...
1
...


This suggests that we define the spaces of functions L1 ≡ {w(x) : w 1 < ∞} and
L1,T ≡ {v(x, t) : v 1,T < ∞}
...

For piecewise constant functions, such as we typically see in finite difference numerical methods for conservation laws, the 1-norm of the pointwise error simplifies
to
en

1



|ein | xi
...

Definition 5
...
2 If the solution u(x, t) of the conservation law
∂u ∂ f (u)
+
=0
∂t
∂x
is approximated by the explicit numerical method
n
n
u in+1 = H (u i−k ,
...
, u(xi+k , t); t)]
...


328

Methods for Scalar Laws

A numerical method with local truncation error L has order p if and only if for
all sufficiently smooth initial data with compact support (meaning that the initial
data is identically zero for |x| sufficiently large), we have that
there exists T > 0, there exists t0 > 0, there exists C > 0, such that
for all t < t0 for all 0 < t < T,
L(x, t; t)

1

≤ C t p
...
1
...

By definition, these methods satisfy
n
n
n
n
for all u n for all v n , H u i−k + vi−k ,
...
, u i+k , t + H vi−k ,
...


Since we can write the exact solution in terms of the method and the truncation
error, i
...

for all xi−1/2 < x < xi+1/2 , u(x, t + t) = H (u(xi−k , t),
...
, u i+k − u(xi+k , t n ); t n+1/2

− t L(xi , t n ; t n+1/2 )
...
, ·; t

+1/2

) (e0 )

=0
n−1



n−1

H (·,
...


=i

i=0

In this formula, the products indicate composition of the linear operators
H (·,
...
We will denote the norms of these linear operators by
H (·,
...
, u i+k ; t
u 1

The following lemma is similar to Theorem 2
...
5
...


(5
...
1 Convergence

n
n
Lemma 5
...
3 Suppose that the scheme u in+1 = H (u i−k ,
...
Further, suppose that H is bounded close to 1, in
the sense

there exists t0 > 0 there exists α > 0 for all t < t0 H (·,
...


Then the linear method H is Lax–Richtmyer stable meaning that
for all T > 0 there exists C T > 0 there exists t0 > 0 there exists n such that
if for all 0 ≤

+1/2

< n and t

n−1

< t0 and t n =

t

+1/2

≤T

=0
n−1

H (·,
...
1
...


Proof Assumption (5
...
, ·; t

+1/2

n−1



)

=0

1

(1 + α t

+1/2

) ≤ eα

n−1
=0

t

+1/2

≤ eαT
...
1) of the linear recurrence for the scheme, it follows
that
en

1

≤ eαT e0

1

+ eαT

n−1

t i+1/2 L(·, t i ; t i+1/2 )

1

i=0

≤ eαT e0

1

+ T eαT max

L(·, t ; t

+1/2

)

1


...

Further, the order of the scheme (see Definition 5
...
2) will determine the rate of
convergence
...
2)

330

Methods for Scalar Laws

5
...
3 Convergence of Linear Methods
Recall that in Theorems 2
...
14 and 2
...
15 we proved that stability is necessary and
sufficient for convergence
...
7
...

Example 5
...
4 Consider the explicit upwind scheme for linear advection
...


The local truncation error (see Definition 5
...
2) is
L(x, t; t) =


1
λ t
λ t
u(x, t + t) −
u(x − x, t) − 1 −
t
x
x
1
t

u(x, t) +

− 1−

λ t
x

∂u
∂u

∂t
∂x

=

u(x, t)

∂u
λ t
∂u
∂ 2u t 2
∂ 2u x 2

u(x, t) −
t+ 2
x+ 2
∂t
∂t 2
x
∂x
∂x 2

u(x, t)
+

∂ 2u t
∂ 2u λ x
− 2
∂t 2 2
∂x 2

=

∂u
∂u

∂t
∂x

λ
∂ 2u
+ (λ t − x) 2
...

Since the method is linear, we can easily investigate its stability
...

i

5
...
Since the
explicit upwind scheme is consistent and stable for λ t/ x < 1, the Lax equivalence theorem 2
...
14 show that it is convergent under these restrictions on t and
x
...
It is not hard to see either from the proof of the Lax Equivalence
Theorem 2
...
14 or from Lemma 5
...
3 that the scheme will have order one under
these circumstances
...
1
5
...
1 Consider the scheme u in+1 = u in for the linear advection equation
...
1
...

5
...
3 Answer the questions of the first exercise for the Lax–Friedrichs scheme applied to linear
advection
...
1
...


5
...
1 we studied linear finite difference methods
...
In this
section, we will begin to develop the tools we need to understand methods for
nonlinear conservation laws
...
2
...

n
n
Definition 5
...
1 A numerical flux function F(u i−k+1 ,
...
, w) = f (w)
...
< x J +1/2 = b with for all 0 ≤ i ≤ J xi ≡
xi+1/2 − xi−1/2 ≤ h
and 0 = t 0 < t 1 <
...


a

If so, then we write U − u

1,

→ 0
...
2
...

∂t
∂x
Assume that both f and f˜ are continuous, and that the numerical flux f˜ is consistent
(Definition 5
...
2)
...


Further, suppose that the numerical solution u in converges to the function u in the
following sense (c
...
Definition 5
...
1): given any > 0 we can choose a mesh in
space and time, apply the numerical scheme and find that




tn

n−1
n=1 i=−∞ t

xi+1/2
xi−1/2

u in − u(x, t) d x dt <
...
3)

Finally, suppose that u is locally bounded, meaning that
for all compact K ⊂ R × (0, ∞) there exists Cu,K > 0 so that max

(x,t)∈K

u(x, t) ≤ Cu,K ,

and that the numerical solution is locally bounded, meaning that
for all compact K ⊂ R × (0, ∞) there exists Cu,K > 0 so that
˜
Then u(x, t) is a weak solution of the conservation law
...
2 Entropy Conditions and Difference Approximations

333

Proof First, we will perform a computation to set up the integrals we need to exam∞
ine for limits
...
Define φin = φ(xi , t n ), and assume
that the support of φ is contained in the compact set K ⊂ R
...


(5
...
First, we will deal with the
initial conditions in S0
...


> 0, we can choose the mesh and initial data so that
xi+1/2

xi−1/2

φ(xi , 0)[u i0 − u(x, 0)] d x ≤



xi+1/2

i=−∞

≤ φ

xi−1/2


φ(xi , 0) u i0 − u(x, 0) d x
xi+1/2


i=−∞

xi−1/2

u i0 − u(x, 0) d x <
...


Thus
S0 −


−∞



φ(x, 0)u(x, 0)d x ≤

xi+1/2

i=−∞ xi−1/2


+

φ(xi , 0)[u i0 − u(x, 0)] d x

xi+1/2

i=−∞

xi−1/2

[φ(xi , 0) − φ(x, 0)]u(x, 0) d x <
...
5)
3

Let us examine the terms related to time derivatives of φ, namely the sum Su in
(5
...



0

φin − φin−1 n
u
t n−1/2 i


−∞



∂φ
(x, t)u(x, t) d x dt
∂t

∂φ
(x, t)u(x, t) d x dt
∂t

φin − φin−1 n
[u i − u(x, t)] d x dt
t n−1/2

xi+1/2
xi−1/2

φin − φin−1
∂φ

(x, t) u(x, t) d x dt
n−1/2
t
∂t
(5
...
2 Entropy Conditions and Difference Approximations

> 0, we can further restrict the mesh so that

Let us examine Su,1 first
...

6

(5
...
Since u is locally bounded, we can further restrict the mesh
so that

Su,2 =





tn

n−1
n=1 i=−∞ t

≤ Cu,K
= Cu,K

tn





tn





xi−1/2
xi+1/2

t n−1/2

xi−1/2

tn







xi+1/2

tn

t n−1/2

tn

n−1
n=1 i=−∞ t

+ Cu,K

xi+1/2





tn

n−1
n=1 i=−∞ t

= Bu2a + Bu2b
...
8)

336

Methods for Scalar Laws

We will change order of integration to estimate both of these bounds
...

i

Next,
Bu2b =
=

tn

xi+1/2

n−1
n=1 i=−∞ t


tn

t n−1/2

xi−1/2

n−1
xi−1/2
n=1 i=−∞ t
n


t
xi+1/2

≤2

∂ φ
∂t 2

t

∂ 2φ
(x, τ ) dτ ds d x dt
∂t 2
τ

t n−1

∂ 2φ
(x, τ )
∂t 2

t n−1
tn

s

1
tn

τ

t n−1/2

dt dτ d x ds

1
t n−1/2

dt dτ d x ds

(τ − t n−1 )(t n − τ )
∂ 2φ
(x, τ )
i d x dτ
∂t 2
t n−1/2

n−1
xi−1/2
n=1 i=−∞ t
n


t
xi+1/2
n−1
n=1 i=−∞ t
2

s

s

2

n−1
xi−1/2
n=1 i=−∞ t


tn
xi+1/2

+

t n−1

∂ φ
(x, τ )
∂t 2

xi+1/2

+
=

tn

1

xi−1/2

(τ − t n−1 )(t n − τ )
∂ 2φ
(x, τ )
i d x dτ
∂t 2
t n−1/2

max t n−1/2
...
8) together with the bounds on Bu2a and Bu2b , we see that
we can restrict the mesh and timesteps so that
Su,2 =





tn

xi+1/2

n−1
n=1 i=−∞ t
2

≤ Cu,K

∂ φ
∂t∂ x

1

xi−1/2

φin − φin−1 ∂φ
u(x, t) d x dt ≤ Bu2a + Bu2b

t n−1/2
∂t

max xi + 2
i

∂ 2φ
∂t 2

max t n−1/2 <
...
9)

5
...
4)
...


(5
...
Since the numerical method satisfies the convergence assumption (5
...

Since the numerical flux is consistent (see definition 5
...
2) and continuous, it converges to the true flux almost everywhere
...
Since
the numerical flux is continuous and the numerical solution is locally bounded, the
numerical flux is locally integrable
...

Then Lebesgue’s dominated convergence theorem [139, page 26], shows that the
integral of the norm of the error in the numerical flux tends to zero
...


Thus we can further restrict the mesh, if necessary, so that
Sf1 =






tn

n
φin − φi−1

xi

1
n−1
xi−1 2 (
n=1 i=−∞ t


tn
xi
n=1 i=−∞

∂φ

∂x

t n−1


xi−1 + xi )

xi−1

2
xi−1 + xi



tn

∞ n=1 i=−∞ t n−1

xi
xi−1

n
[ f˜(u i−1 , u in ) − f (u(x, t))] d x dt

∂φ
(ξ, t n )dξ
∂x
xi−1
xi

n
f˜(u i−1 , u in )− f (u(x, t)) d x dt

n
χ K (x, t) f˜(u i−1 , u in ) − f (u(x, t)) d x dt <

6


...
10) Since u is locally bounded and the flux
f is continuous, the flux is locally bounded
...

Then changing the order of integration implies that
S f 2a =
=

tn

xi

n−1
n=1 i=−∞ t





tn





xi



tn

+

xi

tn



tn

i

xi
xi−1

xi−1 + xi
2

2
xi−1 + xi

∂φ
∂φ
(ξ, t n ) −
(x, t n ) dξ d x dt
∂x
∂x

xi
xi−1
x

x
ξ

xi−1

ξ

xi
x

∂ 2φ
(η, t n ) dη dξ d x dt
∂x2

x

∂ 2φ
(η, t n ) dη dξ d x dt
∂x2

2
∂ 2φ
(η, t n )
xi−1 + xi ∂ x 2

xi−1

n−1
n=1 i=−∞ t

≤ 2 max

xi−1
xi

n−1
n=1 i=−∞ t



2
xi−1 + xi

xi−1

n−1
n=1 i=−∞ t



2
xi−1 + xi

xi−1

n−1
n=1 i=−∞ t

+






2
∂ 2φ
(η, t n )
xi−1 + xi ∂ x 2
∂ 2φ
∂x2

1

η

xi

dξ d x dη dt
η

xi−1
η

xi

dξ d x dη dt
xi−1

η

339

5
...

1

It follows that we can choose the mesh so that


Sf2 =



n=1 i=−∞

tn
t n−1

n
φin − φi−1

xi
xi−1

1
(
2



xi−1 + xi )

∂φ
(x, t)
∂x

f (u(x, t)) d x dt

≤ C f,K (S f 2a + S f 2b )
≤ C f,K max{ xi−1 + xi }
i

∂ 2φ
∂x2

+ C f,K max t n−1/2
n

1

∂ 2φ
∂ x∂t

1

<
...


Since is arbitrary, u is a weak solution of the conservation law
...
2
...
, u i+k )
...
However, we should
note that this theorem does not guarantee that the limit u(x, t) satisfies an entropy

340

Methods for Scalar Laws

condition
...

Example 5
...
3 This example concerns the development of a Roe solver for a scalar
conservation law; see Section 4
...
8 for the corresponding development in hyperbolic systems
...

u+ − u−

Note that if the Riemann problem for states u − and u + involves only a discontinuity,
then [ f ] = A(u − , u + )[u]
...

j
j+1

Note that this numerical flux function is consistent (see definition 5
...
2)
...
1 shows some numerical results obtained from Program 5
...
f
...
This is an example of a problem with a scheme that converges,
but does not converge to the analytical solution in the limit of vanishing diffusion
...
For the Buckley–Leverett model, the approximate Riemann solvers
due to Roe and Harten–Hyman both fail to compute the correct solution in cases
involving two shocks and an intermediate transonic rarefaction
...

Students can experiment with different numerical schemes for Riemann problems in a variety of models (Linear Advection, Burgers’, Traffic and Buckley–
Leverett) by clicking on Executable 5
...
The Riemann problem input parameters include the
left and right states, the mesh bounds and the initial jump location, and the choice of

5
...
5
...
The numerical method parameters include the number of grid cells and
timesteps, the max simulation time and the CFL number for selecting the timestep
...
If the number of grid cells is positive,
then the program will use the first scheme selected; if the number of grid cells
is zero, then the program will perform a mesh refinement study with all selected
schemes to compare accuracy and efficiency
...

5
...
2 Monotone Schemes
In this section, we will present a condition on schemes for scalar conservation laws
in one dimension that will guarantee that when the scheme converges (see definition
5
...
1), it converges to the entropy-satisfying solution of the conservation law
...
2
...
, u n ) is
j
j−k
j+k
monotone if and only if it preserves inequalities between sets of numerical results:
for all u in for all vin
if for all i,
then for all i

u in ≤ vin
n
n
u in+1 = H (u i−k ,
...
, vi+k ; xi , t n+1/2 )

= vin+1
...


342

Methods for Scalar Laws

Lemma 5
...
5 Suppose that u n+1 = H (u n ,
...
, wk ; x, t) is differentiable in each of its w
arguments for −k ≤ ≤ k
...
Conversely, if
∂ H /∂w ≥ 0 for all −k ≤ ≤ k, then u n+1 = H (u n ,
...

Proof Given any initial data u i0 and > 0, let vi0 = u i0 + δi j
...
, u i+k ; xi , t n+1/2 ) = u i1 ≤ vi1 = H (vi−k ,
...


It follows that with i + = j for −k ≤
0 ≤

1

=

1

≤ k,

n
n
n
n
[H (vi−k ,
...
, u i+k ; xi , t n+1/2 )]
n
n
[H (u i−k ,
...
, u i+k ; xi , t n+1/2 )
j

n
n
−H (u i−k ,
...
, u i+k ; xi , t n+1/2 )]
j
∂H n
n

(u ,
...


To prove the converse, we note that the intermediate value theorem (see, for
example, [44, pages 70–71]) implies that there is some vector w on the line segment
between u and v such that
n
n
n
n
H (vi−k ,
...
, u i+k ; xi , t n+1/2 )
k

+
=−k

∂H
n
n
(wi−k ,
...

Monotone schemes are useful because they converge to an entropy-satisfying
solution of the conservation law, as the next lemma shows
...
2
...
, u i+k ) − f˜(u i−k ,
...
, u i+k ; xi , t n+1/2 )

u in+1 = u in −

approximating the scalar conservation law
∂u ∂ f (u)
+
=0
∂t
∂x

(5
...
2 Entropy Conditions and Difference Approximations

343

in one dimension
...
1
...
Also suppose that the scheme is monotone (Definition 5
...
4)
...
2
...
Then u is a weak solution of the conservation law, and satisfies the weak entropy
condition

for all φ ∈ C0 (R × [0, ∞)) for all z ∈ R


∂φ
(x, t)|u(x, t) − z| d x dt

0
−∞ ∂t


∂φ
(x, t)[ f (u(x, t)) − f (z)] sign{u(x, t) − z} d x dt

0
−∞ ∂ x





−∞

φ(x, 0)|u(x, 0) − z| d x ≤ 0
...
1
...
For fixed mesh cell index i, timestep n, scalar θ ∈ (0, 1]
and entropy function offset z, define
w(θ) ≡ uθ + z(1 − θ)
n
w (θ ) ≡ u i+ θ + z(1 − θ)

v n+1 (θ ) ≡ H w−k (θ),
...

j
Because the numerical flux f˜ is consistent,
t n+1/2 ˜
[ f (z,
...
, z)] = z
...
11) and of the interpolation function
v n+1 (θ) imply that
j
v n+1 (1) = u n −
j
j

t n+1/2 ˜ n
n
n
n
[ f (u i−k+1 ,
...
, u i+k−1 )] = u n+1
...
, u i+ ) ≡

n
|u i+ −z|
=−k+1

∂ f˜
(wi−k+1 (θ),
...

∂w

1
0

(5
...
1
...
, u) = sign(u − z)
0

1

= sign(u − z)
0

∂ f˜
(w(θ ),
...
, w(θ)) dθ


= sign(u − z)[ f˜(u,
...
, z)] = ψ(u)
...
, wk (θ); xi , t n+1/2 )(u i+ −z)dθ
...
12) of
˜
the numerical entropy flux ψ implies that

t n+1/2 ˜ n
n
n
˜ n
ψ(u i−k+1 ,
...
, u i+k−1 )
xi

−s(u in ) +
1

=−

sign (w0 (θ ) − z)

0

+



=−

t n+1/2
xi
t n+1/2
xi

k

1

dw0



sign (w (θ) − z)

=−k+1 0
k−1
=−k

1

sign (w (θ ) − z)

0

1 k

sign (w (θ )−z)
0 =−k

∂ f˜
(w−k+1 (θ),
...
, wk−1 (θ)) dθ
∂w

∂H
n
w−k (θ),
...

∂w

5
...
, u i+k ) − ψ(u i−k ,
...
, wk (θ); xi , t n+1/2
∂w

− z − sign (w (θ) − z)] dθ
...

n+1
n
sign(u i − z) = −sign(u i+ − z)

0,
n
−2|u i+ − z|,

Thus the monotone scheme satisfies the numerical entropy inequality
s(u n+1 ) − s(u in ) +
j

t n+1/2 ˜ n
n
n
˜ n
[ψ(u i−k+1 ,
...
, u i+k−1 )] ≤ 0
...
2
...

Example 5
...
7 We will show that Godunov’s method is a monotone scheme for
Burgers’ equation
...

j
j
j+1
j+1

It is easy to see that this flux is consistent (see definition 5
...
2)
...


Next, we will show that the Godunov flux is monotone provided that t max |u n | ≤
j
x for all j
...
Using the partial derivatives of the
j
j−1
j+1
n+1/2
fluxes f j±1/2 above, we see that
∂H
t
n =1−
∂u j
x

u n , u n ≥ u n ≥ −u n or 0 ≤ u n ≤ u n
j
j
j
j
j+1
j+1
0, otherwise

u n , −|u n | ≥ u n or u n ≤ u n ≤ 0
j
j
j
j−1
j−1

0, otherwise

t
 1 − x u n , (u n ≥ u n ≥ −u n or 0 ≤ u n ≤ u n ) and (u n > u n and u n > 0)

j
j
j
j
j
j
j+1
j+1
j−1


 1 + t u n , (−|u n | ≥ u n or u n ≤ u n ≤ 0) and
j
j
j−1
j−1
x j
=
n
n
n
n

(u j < u j+1 or u j+1 < −u j ) and (u n < 0 or u n > u n )

j
j
j+1



0,
otherwise
≥ 0,
and
t
∂H
=
n
∂u j−1
x

un ,
j−1

u n ≥ u n ≥ −u n or 0 ≤ u n ≤ u n
j
j
j−1
j−1
j−1

0,

otherwise

≥ 0,

and
∂H
t
=
n
∂u j+1
x

un ,
j+1

−|u n | ≥ u n or u n ≤ u n ≤ 0
j
j
j+1
j+1

0,

otherwise

≥ 0
...
2
...
Since Godunov’s method
is consistent (see Definition 5
...
2) and monotone for Burgers’ equation, it follows
from Lemma 5
...
6 that Godunov’s method converges to the entropy-satisfying
solution
...
2
...

Example 5
...
8 Given the results of Theorem 5
...
6 and Example 5
...
7 we expect
that the Roe solver does not produce a monotone flux for Godunov’s method applied

5
...
To verify this, we compute
t
∂H
un , un + un < 0
un , un + un ≥ 0
j
j
j
j
j+1
j−1

=1−
0, otherwise
0, otherwise
∂u n
x
j

t
 1 − x u n , u n + u n ≥ 0 and u n + u n ≥ 0

j
j
j
j+1
j−1
t
= 1 + x u n , u n + u n < 0 and u n + u n < 0 ≥ 0
j
j
j
j+1
j−1

 1,
otherwise
...
However,
∂H
t
=
n
∂u j−1
x

un ,
j−1
0,

un + un ≥ 0
j
j−1
otherwise

and
t
∂H
=−
n
∂u j+1
x

un , un + un < 0
j
j+1
j+1
0,
otherwise
...
The former
j
j−1
j+1
failure corresponds to a transonic rarefaction between u n and u n , while the latter
j
j−1
failure corresponds to a transonic rarefaction between u n and u n
...

Lemma 5
...
9 Consider the numerical scheme
t ˜ n
n
n
n
u in+1 = u in −
f (u i−k+1 ,
...
, u i+k−1 )
x
n
n
≡ H (u i−k ,
...
Assume that both f and
f˜ are twice continuously differentiable, and that the numerical flux f˜ is consistent
(Definition 5
...
1)
...
2
...
If H depends on more than one
of its arguments, then the scheme is at most first-order accurate (Definition 5
...
2)
...
We assume
˜
that u in ≈ u(i x, n t)
...

+
2
∂t
2 ∂t

348

Methods for Scalar Laws

˜
We assume that u satisfies the modified equation
˜
˜
∂ f (u)
∂u
+
= e = O( t) + O( x)
...

∂x
∂u
∂t

Thus
˜
˜
u(x, t + t) = u + t

˜
t2 ∂
∂u
+
∂t
2 ∂x

∂f
∂u

2

˜
∂u
∂x

+ o( t 2 )

It is a bit more intricate to treat the Taylor expansions for the spatial differences
...
, u(xi+k , t); x, t)
˜
˜
= H (u(xi , t),
...
, u(xi , t); x, t) [u(xi+ , t) − u(xi , t)]
∂w
k

k

=−k m=−k

∂2 H
˜
˜
(u(xi , t),
...


Now
˜
˜
H (u(xi , t),
...
, u(xi , t)) − f˜ (u(xi , t),
...
, u(xi , t); x, t) [u(xi+ , t) − u(xi , t)]
∂w
k

=
=−k

= x
+

∂H
˜
˜
(u(xi , t),
...
, u(xi , t); x, t)
∂w
k
2
=−k

∂H
˜
˜
(u(xi , t),
...
2 Entropy Conditions and Difference Approximations

and
k

1
2

k

=−k m=−k

∂2 H
˜
˜
(u(xi , t),
...
, u(xi , t); x, t)
∂w ∂wm

˜
∂u
+ o( x)
∂x

˜
∂u
∂x

x2
2

=

k

2

k

m x

k

m
=−k m=−k

˜
∂u
+ o( x)
∂x

∂2 H
˜
˜
(u(xi , t),
...

∂w ∂wm

Thus
˜
˜
H (u(xi−k , t),
...
, u(xi , t); x, t)
∂w

∂H
˜
˜
(u(xi , t),
...
, u(xi , t); x, t) + o( x 2 )
∂w ∂wm

∂H
˜
˜
(u(xi , t),
...
, u(xi , t); x, t)
∂w

( m−
=−k m=−k

2

)

∂2 H
˜
˜
(u(xi , t),
...

∂w ∂wm

Next, we note that
k
=−k

t
∂H
˜
˜
(u(xi , t),
...

∂w
x ∂u

k
=−k

∂ f˜
∂w

350

Methods for Scalar Laws

We can also compute
k

k

( m−

2

)

=−k m=−k

=

k

1
2

∂2 H
˜
˜
(u(xi , t),
...
, u(xi , t); x, t)
∂wm ∂w

+ m − m2 ∂ 2 H
˜
˜
(u(xi , t),
...
, u(xi , t); x, t)
∂w ∂wm

k

( m−

k

=

2

∂2 H
˜
˜
(u(xi , t),
...
, u(xi , t); x, t)
∂w ∂wm

∂ 2 f˜
˜
˜
(u(xi , t),
...

∂w ∂wm

It follows that
˜
˜
H (u(xi−k , t),
...
, u(xi , t); x, t) + o( x 2 )
...
, u(xi+k , t); x, t)
t
˜
˜
∂ u ∂ f (u)
=
+
∂t
∂x

0=

t ∂
+
2 ∂x

2

∂f
∂u

˜
∂u
∂x

+ o( t) + o( x / t)
2



x
t

2


∂x

˜
∂u
∂x

k
2
=−k

∂H
˜
˜
(u(xi , t),
...
2 Entropy Conditions and Difference Approximations

which implies
˜
˜
∂ u ∂ f (u)
+
∂t
∂x
=

x2 ∂
2 t ∂x

k
2
=−k

t ∂f
x ∂u

∂H
˜
˜
(u(xi , t),
...
Thus the right-hand side in the modified equation is diffusive
and first-order in t or x, assuming that these two mesh increments are held in
strict proportion
...

Monotone schemes are also L1 contractive, as the next lemma shows
...
2
...
Suppose that
u in+1 = u in −

t ˜ n
n
n
n
[ f (u i−k+1 ,
...
, u i+k−1 )]
x

n
n
≡ H (u i−k ,
...
2
...
If u in and vin are generated by this
scheme using initial data u i0 and vi0 , respectively, then
for all n ≥ 0 for all m > n, u m − v m

1

≤ u n − vn 1
...
We define the functions
w j (θ ) = u n θ + v n (1 − θ)
...
, u i+k ; xi , t n+1/2 ) − H (vi−k ,
...
, wi+k (θ), xi , t n+1/2 ) dθ


0

∂H
n
n
(wi−k (θ ),
...

∂w

k

1

=
0

=−k

Since the partial derivatives of H are nonnegative,
u n+1 − v n+1
=

1

n
n
sign(u in+1 − vin+1 )[H (u i−k ,
...
, vi+k ; xi , t n+1/2 )] xi
k
=−k

i

=

∂H
n
n
(wi−k (θ ),
...
, w j− +k (θ);

xi , t n+1/2 )dθ x j−
...
, w j− +k (θ);

∂ f˜
(w j−
∂w −1
=−k+1

−k+1 ,
...
, w j− +k−1 )

= xj
...
3 Nonlinear Stability

353

Exercises for 5
...
2
...

5
...
2 Determine circumstances under which Rusanov’s method is monotone for the traffic flow problem
with logarithmic flux
...
2
...

5
...
4 When is Rusanov’s method monotone for the Buckley–Leverett problem?
5
...
5 When is Godunov’s method monotone for the Buckley–Leverett problem?

5
...
So far, we have a few
results to guide our selection of numerical methods for scalar hyperbolic conservation laws
...
7
...
However, this result says nothing about nonlinear schemes (such as Godunov’s method), and does not guarantee
convergence to the entropy-satisfying solution
...
2
...
However, this theorem
does not guarantee that the scheme converges, and does not guarantee that the limit
is an entropy-satisfying solution
...
2
...

In general, we will want to understand the circumstances under which we can
guarantee convergence, in particular to the entropy-satisfying solution
...
In order to understand convergence, we will need to develop the
correct notion of compactness
...
Finally, in order to obtain better than first-order
convergence, we will have to forego monotonicity
...
3
...
3
...
A set K is closed if and only if
{vk }∞ ⊂ K and vk → v implies that v ∈ K
...
The support of a

354

Methods for Scalar Laws

function w(x) is the set
supp(w) = {x : w(x) = 0}
...
77]) that sets in Rn are compact if and
only if they are closed and bounded
...
3
...


Note that
for all w ∈ C 1 (−∞, ∞), T V (w) =


−∞

|w (x)| d x

and


T

for all v ∈ C 1 ((−∞, ∞) × (0, T )) , T VT (v) =
0

−∞

∂v
∂v
+
d x dt
...
Note that if w(x, t) has bounded total variation for
x ∈ (−∞, ∞), then w(x, t) must approach constant values as x → ±∞
...
3
...
1
...

Definition 5
...
3 Given initial data u 0 (x) with compact support and flux function
f (u), a numerical approximation u n for the solution of the scalar law ∂u/∂t +
j
∂ f (u)/∂ x = 0 with initial data u(x, 0) = u 0 (x) is TV stable on the closed time

355

5
...

j
Lemma 5
...
4 [96, page 163] Suppose that
(i) u n is a numerical solution generated by a conservative difference scheme
j
u n+1 = u n −
j
j

n+1/2
t n+1/2
[ f j+1/2
xj

n+1/2

− f j−1/2 ] ;
n+1/2

n
(ii) the numerical flux function is given by f j+1/2 = F(u n
j−k+1 ,
...

·

Then
(i) for all n < N − 1, u n+1 − u n 1 ≤ 2k KR t n+1/2 ;
·
·
(ii) the method is TV-stable (Definition 5
...
3) on [0, T ];
(iii) if F is consistent with with a continuous function f (Definition 5
...
2), then u n converges
j
to a weak solution of ∂u/∂t + ∂ f (u)/∂ x = 0
...

n

Next, let us prove that the method is TV-stable
...
The assumption that the cell
j

356

Methods for Scalar Laws

widths are bounded above implies that
x J +kn = x J +

n−1 J +k(m+1)

( x

−1/2 + x

m=0 =J +km+1

≤ x J + kC

N −1

n−1
1
) ≤ xJ +
kC t n+1/2
+1/2
2
m=0

t n+1/2 = x J + kC T

m=0
−J −km−1

n−1

x−J −kn = x−J −

( x

−1/2

+ x

=−J −k(m+1)

m=0
n−1

≥ x−J −

+1/2 )

kC t n+1/2 ≥ x−J − kC
m=0

N −1

1
2

t n+1/2 = x−J − kC T
...


n=0

Thus the numerical solution is TV-stable
...
Suppose that for any weak
solution w of the conservation law, there exists > 0 such that for all discretizations
x j and t n+1/2 satisfying the hypotheses of the lemma we have u n − w >
...
Let v be the limit of this convergent subsequence
...
Since the
method is consistent and conservative, and the flux functions are continuous and
consistent, the Lax–Wendroff Theorem 5
...
2 implies that u n converges to a weak
j
solution of the conservation law; this is a contradiction
...
The difficulty with using this lemma
is the need to verify that the third assumption is valid for all timesteps
...
8
...
13
...
3 Nonlinear Stability

357

5
...
3 Other Stability Notions
Note that weak solutions to scalar conservation laws are L1 -contracting
...
3
...


Then two solutions u 1 and u 2 are L1 -contracting, meaning that
for all t > 0 u 2 (·, t) − u 1 (·, t)

1

≤ u 2 (·, 0) − u 1 (·, 0) 1 ,

if and only if u 1 and u 2 satisfy the Oleinik chord condition (3
...

It is tempting to require numerical solutions to scalar conservation laws to have
similar stability properties
...
3
...


These mesh functions are total variation diminishing if and only if
for all m ≥ n ≥ 0 T V (u m ) ≤ T V (u n )
...


For numerical schemes, some of these nonlinear stability notions are stronger
than others
...
3
...
Suppose that the numerical scheme
n
n
u in+1 = H (u i−k ,
...
If the numerical solution is L1 -contracting, then the scheme is total variation diminishing
...
Given any u in =
n
n
n
H (u i−k ,
...
, u i+k−1 ; x, t
) is also generated by the same scheme
...


i=−∞

Lemma 5
...
8 [96, page 166]
...
, u i+k ) − f˜(u i−k ,
...

xi
If the numerical solution is total variation diminishing, and if the numerical
solution is constant for large spatial indices, meaning that
there exists u − , u + so that for all n > 0 there exists M > 0
so that for all i ≤ −M, u in = u −
and for all i ≥ M, u in = u +
then the scheme is monotonicity-preserving
...

Note that for i ≥ M + k,
t n+1/2 ˜ n
n
n
n
f (u i−k+1 ,
...
, u i+k−1 )
xi
t n+1/2 ˜
= u+ −
[ f (u + ,
...
, u + )] = u +
...
Next, we note that since u in is nondecreasing and T V (u n+1 ) ≤ T V (u n ),


u+ − u− =
=

i=−∞


n+1
u i+1 − u in+1 ≤

n
|u i+1 − u in | =

i=−∞



n+1
u i+1 − u in+1 = T V (u n+1 ) ≤ T V (u n )

i=−∞

n
[u i+1
i=−∞

− u in ] = u + − u −
...


n+1
u i+1 − u in+1 ,

5
...
First, a theorem due to Godunov
[57, 91] shows that any linear monotonicity-preserving scheme is at best firstorder accurate
...
3
...
Total variation diminishing schemes are convergent [96,
page 166], however, convergence to the entropy-satisfying solution is not guaranteed
...
3
...
Lemma 5
...
10
...
2
...

In summary, if we want to guarantee convergence to the entropy-satisfying
solution then we can use a monotone scheme, provided that we are satisfied
with first-order accuracy
...
Thankfully, these are not our only
options
...


5
...

Since almost all numerical schemes involve numerical diffusion in order to guarantee convergence to the desired physical solution, we will study the solution of a
modified equation
...
For
more discussion related to the ideas in this section, see [87, 113, 142]
...


x <0
x > 0
...

dz = 2 4 t
=2
4 t
−∞
−∞

=

λt

1 − erf

Thus if a physical problem involves diffusion, we expect the initial discontinuity
to spread a distance proportional to the square root of the product of the diffusion
constant and time
...
For example, recall
that in example 3
...
1 we saw that the modified equation analysis for the
Lax-Friedrichs scheme produces


x2
1−
4 t

λ t
x

2


...

No scheme is perfect
...
Then the error in the numerical
solution is
u(x j , t n ) − u n
j

1



x j |u(x j , t n ) − u n | ≤ k M x,
j
j∈ discontinuity

where M is the size of the jump in u and x is an upper bound for the cell width
...
1
...

Order p accuracy in the L1 norm at a discontinuity would require that the numerical width of the discontinuity be O( x p )
...
In particular, this
would require a model for the variation of the solution within a grid cell, such as
in [65]
...

Exercises for 5
...
4
...
Define the
front width to be the distance (in x) between the points where u = 0
...
05
...

Plot front width versus time and explain your results
...
5 Monotonic Schemes

5
...
2 Consider the linear advection problem with initial data described in this section
...
The results should be computed at CFL =
0
...
Plot the results for
x = 2−5 , 2−6
...
What rate of convergence do you observe from this plot?

5
...
Since a linear monotonicity-preserving scheme is at best first-order accurate, a
monotonicity-preserving higher-order scheme must be nonlinear
...

5
...
1 Smoothness Monitor
We begin with a definition
...
5
...
An equivalent requirej
j
j−1
ment is that u n+1 − u n lies between 0 and u n − u n
...


Thus the van Leer smoothness monitor for the scheme is defined to be
rn
j

=

un − un
j
j−1
un − un
j
j+1


...
13)

Note that a monotonic scheme is monotonicity-preserving
...
5
...

xj

It follows that explicit upwind differencing for linear advection is monotonic if and
only the Courant numbers satisfy
λ t n+1/2
≤1
xj
for all timesteps
...
Note that r n < 0
j
implies a local extremum in the numerical solution, possibly due to a numerical
oscillation
...
Furthermore, r n ≈ 1
j
implies smooth behavior in the numerical solution, and r n ≈ 0 or ∞ indicates a
j
numerical discontinuity
...
5
...

x 2
x
x

If we multiply this equation by t/(u n − u n ), we obtain
j
j−1


u n+1 − u n
j
j
un
j



un
j−1



1
1
1 + (1 − γ ) n − 1
2
rj

where γ = λ T / X
...
5 that this scheme has second-order
local truncation error
...
174] shows that it cannot be monotonic
...

j

(5
...

Lemma 5
...
3 If 0 ≤ γ ≤ 1 and the function Q(r ) satisfies the inequality
for all r

1
−1
r

1− Q

1
r

≤ 2,

which is equivalent to the inequalities
for all r min

r + 1 1 − 3r
,
1−r 1−r

≤Q

1
r

≤ max

r + 1 1 − 3r
,
,
1−r 1−r

then the function φL W defined by (5
...


(5
...
5 Monotonic Schemes

Proof Note that φL W (0, r ) = 0 and φL W (1, r ) = 1, so φL W is at the required bounds
when γ is at either of its extreme values
...


In particular,
∂φL W
(0, r ) = 1 +
∂γ
∂φL W
for all r 0 ≤
(1, r ) = 1 −
∂γ
for all r 0 ≤

1
2
1
2

1
−1
r
1
−1
r

1
r
1
r

1− Q
1− Q

and

...
16a)
(5
...

∂γ
∂γ
∂γ
It follows that if both of the constraints (5
...
The requirements (5
...
15)
...
Also, note that the Lax–
Wendroff scheme is itself monotonic precisely when Q(1/r ) = 0 satisfies the
inequalities (5
...
Unfortunately, even if we mono1
tonize the Lax-Wendroff method by means of Q( r ), the resulting scheme is not
conservative
...

j−1
2

Again, since this scheme is linear and second-order, it cannot be monotonic
...

j−1

Following the same approach as in Lemma 5
...
3, we can easily prove the following
lemma
...
17)

364

Methods for Scalar Laws

Lemma 5
...
4 If 0 ≤ γ ≤ 1 and the function R(r ) satisfies the inequalities
for all r |(1 − r ) (1 − R(r )) | ≤ 2,
which can be rewritten in the form
r +1 r −3
,
r −1 r −1

for all r min

r +1 r −3
,
,
r −1 r −1

≤ R(r ) ≤ max

(5
...
17) satisfies for all 0 ≤ γ ≤ 1 for all r ∈ R 0 ≤
φ BW (γ , r ) ≤ 1
...
Also, note that the Beam–
Warming scheme is itself monotonic precisely when R(r ) = 0 satisfies the inequalities (5
...
Unfortunately, even if we monotonize the
Beam–Warming method by means of R(r ), the resulting scheme is not conservative
...
If we average the monotonized Lax–Wendroff and monotonized Beam–Warming schemes, the result will
be monotonic:


u n+1 − u n
j
j
un
j

1−γ
4



1+

=



un
j−1

γ
− un
j−1

un
j

− un +
j−1

1
−1
rn
j

un +
j

1−γ
4

1− Q

1
rn
j

+ (1 − r n ) 1 − R(r n )
j−1
j−1

(u n − u n ) − (u n − 2u n + u n )Q
j+1
j−1
j+1
j
j−1

1
rn
j

1−γ
[−(u n − u n ) − (u n − 2u n + u n )R(r n )]
...


5
...
3 MUSCL Scheme
With this function S(r ) in the Fromm monotonization, Lemma 5
...
3shows that the
Lax–Wendroff scheme will be monotonic if
1
−1
r

1−S

1
r

≤2

and Lemma 5
...
4 shows that the Beam–Warming scheme will be monotonic if
|(1 − r ) (1 + S(r )) | ≤ 2
...


365

Q(1/

Q(1/r)=(13r

)/(1-r)

r)= (

1 -3 r ) /

(1- r )

2
...
5

10

5
...
5

−3
−2
−1
0
Q(1/r)=-R(r)=(1+r)/(1-r)

r

=(1+

r)/(

1 -r )

−5

Q(1/

(r)
)=-R

smoothness monitor

Fig
...
2 MUSCL curves: Monotonizers vs
...

Next, because Q is a function of 1/r and R is a function of r , we require that
S (1/r ) = −S(r )
...
As a consequence of this choice, S(1) = 0
...
As a result, we take S(r ) = (1 − 3r )/(1 − r ) for 0 ≤
r ≤ 1/3 and S(r ) = −(r − 3)/(r − 1) for 3 ≤ r
...
In summary, our monotonizer is
 1+r
r ≤0
=⇒ upwind
 1−r ,

 1−3r

, 0 ≤ r ≤ 1/3 =⇒ Beam–Warming
S(r ) = 1−r
1
 0,
≤ r ≤ 3 =⇒ Fromm

3

 r −3
− r −1 ,
3≤r
=⇒ Lax–Wendroff
...
2
...
5
...
9) (red = exact, blue = numerical
solution)

where γ = λ t/ x is the Courant number and
1
s n = δn
[1 + r n − (1 − r n )S(r n )]
j
j
j
j
2 j+1/2
is the MUSCL slope
...


Here “MUSCL” is an acronym for “Monotone Upstream-centered Scheme for
n+1/2
Conservation Laws
...
In Section 5
...

Figure 5
...
This figure was generated by Program 5
...
C
...
5-64: muscl
...
Students can test and compare the upwind, Beam–Warming, Lax–Wendroff, Fromm
and MUSCL schemes for the Zalesak linear advection test problems (see exercise
2
...
5 of section 2
...
5-26: guilinearad
...
6 Discrete Entropy Conditions

chosen initial data, while selecting zero grid cells causes the program to perform
mesh refinement and efficiency studies on all selected programs
...
5
5
...
1 Program the MUSCL scheme for linear advection
...
2
...
2
...
5
...

1 + |r |

Show that this corresponds to using harmonically averaged slopes when the numerical solution
has no local extremum
...
6 Discrete Entropy Conditions
In section 3
...
In this section we would like to study the usefulness of an entropy
function for understanding the behavior of numerical methods
...

∂t
∂x
Also suppose that η is a convex entropy function (definition 3
...
14) for the conservation law, with entropy flux ψ; in other words,
∂ψ
∂η ∂ f
=

...
1
...
, u j+k ) −
xj

(u n ,
...


Then it is possible to modify the proof of the Lax–Wendroff Theorem 5
...
2 (see [96,
section 12
...
Similarly, if η is concave and the inequality on is reversed, then the total
entropy decreases in time
...
2
...

Thus exact Riemann solvers are useful in guaranteeing convergence to the entropysatisfying solution of initial value problems for conservation laws
...
It would
be useful to establish a general principle for numerical schemes which would guarantee convergence to the correct solution at less expense than with the true Godunov
method
...
7 E-Schemes
Definition 5
...
1 [124]
...
1
...
14)) scheme for a scalar conservation law ∂u/∂t + ∂ f (u)/∂ x = 0,
n+1/2
with numerical flux f j+1/2 satisfying
n+1/2

for all u between u n , u n , sign(u n − u n ) f j+1/2 − f (u) ≤ 0
...


u n ≤u≤u n
j
j+1
u n ≤u≤u n
j
j+1

Osher [124] proved the following theorem for continuous-time schemes of the
form
f j+1/2 − f j−1/2
du j
=−
,
dt
xj
and Tadmor [156] proved the following theorem for the discrete-time scheme
u n+1 − u n
j
j
t n+1/2

=−

f j+1/2 − f j−1/2

...
7
...
7
...

Example 5
...
3 Godunov’s method is an E-scheme, since the Oleinik chord condition (Lemma 3
...
19) shows that the Godunov flux is
G
F j+1/2 = f (R(u j , u j+1 ; 0)) =

minu j ≤u≤u j+1 f (u), u j ≤ u j+1
maxu j ≥u≥u j+1 f (u), u j ≥ u j+1
...
7 E-Schemes
n+1/2

n+1/2

G
Note that any flux f j+1/2 of the form f j+1/2 = f j+1/2 − λ(u j+1 − u j ), where
λ ≥ 0, generates an E-scheme, and all other E-scheme fluxes are bounded by the
Godunov flux
...
In other words, Godunov’s method is the least diffusive
E-scheme
...
7
...


uj

This can be rewritten either as
EO
f j+1/2 = f (u j ) +

1
2

= f (u j ) +

f (u j+1 ) − f (u j ) −

u j+1

| f (v)| dv

uj
u j+1

min{ f (v), 0} dv,
uj

or
EO
f j+1/2 = f (u j+1 ) −

u j+1

max{ f (v), 0} dv
...
When viewed in these forms, it is easy to
see that the Engquist–Osher scheme is an E-scheme
...
7-65: Schemes
...
Students can experiment with
the Engquist–Osher scheme for Riemann problems in a variety of models (Linear
Advection, Burgers’, Traffic and Buckley–Leverett) by clicking on Executable 5
...

Exercises for 5
...
7
...

2

Show that this flux generates an E-scheme if and only if

for all u ∈

int[u n , u n ]
j
j+1

λn 1
j+ 2



1
2

f (u n ) + f (u n ) − f (u)
j
j+1
un − un
j
j+1


...
19)

370

Methods for Scalar Laws

5
...
2 Under what circumstances does Marquina’s flux (see also exercise 3
...
3), given by

 f (u L ), f (u) > 0 for all u ∈ int[u L , u R ]
n+1/2
f i+1/2 = f (u R ), f (u) < 0 for all u ∈ int[u L , u R ]

...
)
5
...
3 Under which circumstances is Murman’s scheme [120], in which
n+1/2

f j+1/2 =

5
...
4

5
...
5

5
...
6
5
...
7

f (u j+1 ) − f (u j )
1
,
[ f (u j ) + f (u j+1 )] − λ j+1/2 (u j+1 − u j ), λ j+1/2 =
2
u j+1 − u j

an E-scheme? (You may want to compare this problem to Example 5
...
3
...

Consider the Engquist–Osher flux for Burgers’ equation
...
e
...

j
j+1
(b) Show that the Engquist–Osher flux has Lipschitz continuous partial derivatives with respect
to the states u n and u n , while the Godunov flux does not
...
(Note
that u sonic = 1/e is important because f (1/e) = 0
...


5
...
8
...
3
...
This means that the total variation T V (u) (Definition
5
...
2) is non-increasing in time
...

The following lemma is crucial to our development of total variation diminishing
schemes
...
8
...


and

0 ≤ D j+1/2

and C j+1/2 + D j+1/2 ≤ 1,

371

5
...

j+1
j
j

Our discussion in the remainder of this section follows the original development
due to Sweby [155]
...


Note that we can perform the flux splitting
+

n
f j+1/2 = f j+1/2 + f j+1/2

where
+
f j+1/2 ≡ − f j+1/2 − f (u n ) ,
j+1
n+1/2


f j+1/2 ≡ f j+1/2 − f (u n )
...
8
...
7
...

Proof Using the definitions of the split flux differences and the definition of an
E-scheme, we compute
n+1/2

+
γ j+1/2

n
n
2 t n+1/2 sign( u j+1/2 ) f j+1/2 − f (u j+1 )
=−
≥ 0,
x j + x j+1
| un
j+1/2 |


γ j+1/2

n
n
2 t n+1/2 sign( u j+1 ) f j+1/2 − f (u j )
=−
≥ 0
...
20)

372

Methods for Scalar Laws

In order to simplify the expressions, we will define the dimensionless mesh
factors
2 xj
2 x j+1
α j+1/2 =
and β j+1/2 =

...
21)
x j + x j+1
x j+1 + x j
Note that α j+1/2 + β j+1/2 = 2
...

Also note that we can relate the flux difference to the solution difference by
2 t n+1/2
+

fn
= (γ j+1/2 − γ j+1/2 ) u n
j+1/2
...
8
...
21) and the
+

split CFL numbers γ j+1/2 and γ j+1/2 be given by (5
...
Then E-scheme fluxes
(Definition 5
...
1) generate a TVD conservative difference scheme if the timestep
t n+1/2 is chosen so that
+
γ j+1/2

β j+1/2

+


γ j+1/2

α j+1/2

≤ 1
...

j
α j+1/2
β j−1/2 j−1/2

u n+1 = u n −
j
j

The result follows from Harten’s Lemma 5
...
1
...

Lemma 5
...
4 The Engquist–Osher scheme (5
...

du

±
Proof Since the Engquist-Osher scheme is an E-scheme, γ j+1/2 ≥ 0
...
8
...


373

5
...
19) of the Engquist–Osher flux can be rewritten
n+1/2
f j+1/2

un
j

= f (u) +

un
j+1

max{ f (v), 0} dv +

min{ f (v), 0} dv
...

un
j

By choosing u = u n we obtain
j

f j+1/2



n+1/2
f j+1/2

=

un
j+1

min{ f (v), 0} dv
...

min{ x j , x j+1 } u between u j , u j+1 du

Note that the proof of this lemma actually says that the Engquist–Osher scheme
will be TVD if the timestep is chosen to be less than the min of the cell widths
divided by the average of the absolute value of the flux derivative
...
Sometimes, developers will try to take a larger timestep based
on this chord slope
...
In order to keep the timestep
from varying abruptly when this happens, the timestep selection in Lemma 5
...
4 is
suggested
...
8
...
As in the fluxcorrected transport scheme [22], we will view the higher-order flux as the sum of
a lower-order flux and a correction:
n+1/2

L
H
L
f j+1/2 = f j+1/2 + φ j f j+1/2 − f j+1/2
...

Consider the linear advection problem, in which f (u) = λu with λ > 0
...
Then
L
f j+1/2 = λu n and
j
H
L
f j+1/2 − f j+1/2 = λ 1−λ

xj
t n+1/2
(u n −u n )
j+1
j
xj
x j+1 + x j

1
+
= (α j+1/2 −γ j+1/2 )λ u n
j+1/2 ,
2
where we previously defined the mesh factor α j+1/2 in Equation (5
...
20)
...


Note that since the characteristic speed is always positive, we wrote the scheme so
that it involves a factor times the difference u n
j−1/2
...
8
...


− φ j−1


...
22)

375

5
...
23)

+
α j+1/2 − γ j+1/2 u n
j+1/2

is the smoothness monitor, which on a uniform mesh is the same as that defined
previously in Equation (5
...
The limiter function φ should have the following
properties
...
Second φ(r ) = 0 for r < 0, so that we
use the low-order scheme near local extrema
...
Finally, φ should be
as large as possible while remaining TVD, so that the scheme has as little numerical
diffusion as possible
...
8
...
24)

for linear advection, where the mesh factors α j+1/2 are given by (5
...
20), and the smoothness monitor r n is
j
given by (5
...
If the timestep t n+1/2 is chosen so that
for all j,

1
( x j − x j+1 ) ≤ λ t n+1/2 ≤ min
2

1
x j , ( x j + x j+1 )
2

and the limiter φ(r ) is chosen so that
r ≤ 0 =⇒ φ(r ) = 0

(5
...
25b)

then the scheme (5
...

Proof Recall from Equation (5
...


376

Methods for Scalar Laws

+
The assumed timestep restriction λ t n+1/2 ≤ x j is equivalent to γ j+1/2 ≤ α j+1/2 ,
and the assumed bounds on the limiter φ imply that

C j−1/2 ≥
C j−1/2 ≤

+
γ j+1/2

α j+1/2
+
γ j+1/2
α j+1/2

+
{1 − α j−1/2 + γ j−1/2 }
+
{1 + α j+1/2 − γ j+1/2 }
...
Also, the timestep restric+
tion λ t n+1/2 ≤ min{ x j , 1 ( x j + x j+1 )} implies that γ j+1/2 ≤ min{1, α j+1/2 },
2
which in turn implies that

1−

+
γ j+1/2

α j+1/2

+
+
+
(1 + α j+1/2 − γ j+1/2 ) = (1 − γ j+1/2 )(α j+1/2 − γ j+1/2 )/α j+1/2 ≥ 0
...
Harten’s Lemma 5
...
1 now completes the proof
...
8
...
8
...


(5
...
26b)
(5
...
24) is TVD, has a three-point stencil, and is second-order
accurate away from local extrema in the numerical solution
...
Since the Lax–Wendroff scheme
corresponds to choosing φ(r ) = 1, and the Beam–Warming scheme corresponds to
choosing φ(r ) = r , we require that
φ(r ) = (1 − θ(r )) + θ(r )r = 1 + θ (r )(r − 1)
for some weighting factor θ(r ) satisfying 0 ≤ θ (r ) ≤ 1
...
25) require that 0 ≤ φ(r ) ≤ 2r , and the assumption that 0 ≤ θ(r ) ≤ 1
imposes the additional constraint that r ≤ φ(r ) = 1 − θ(r )(1 − r ) ≤ 1
...
25) require that 0 ≤ φ(r ) ≤ 2, and the assumption that 0 ≤
θ(r ) ≤ 1 imposes the additional constraint that 1 ≤ φ(r ) = 1 + θ(r )(r − 1) ≤ r
...
26)
...
8 Total Variation Diminishing Schemes

377

There are several examples of second-order limiters, corresponding to different
schemes
...

n+1/2

The van Leer limiter chooses φ(r ) = (r + |r |)/(1 + |r |)
...
27)

n
f j+1/2 > 0

otherwise
...
The minmod
limiter chooses φ(r ) = max{0, min{1, r }}
...
27) chooses the monotonized slope to be
n
n
n
f jn = sign( f j+1/2 ) min{| f j+1/2 |, | f j−1/2 |},

provided that the side slopes have the same sign
...
The
MUSCL limiter chooses φ(r ) = max{0, min{2, 2r, 1/2(1 + r )}}
...
27) is given by
n
n
n
f jn = sign( f j+1/2 ) min 2| f j+1/2 |, 2| f j−1/2 |,

1
2

n
n
f j+1/2 + f j−1/2

,

provided that the side slopes have the same sign
...
Here the monotonized slope is
defined to be
n
n
n
n
n
f jn = sign( f j+1/2 ) max min{| f j+1/2 |, 2| f j−1/2 |}, min{| f j−1/2 |, 2| f j+1/2 |}

provided that the side slopes have the same sign
...
4 shows the graph of φ
versus r , and several of the limiters
...
8-66: LinearAdvectionSchemes
...
867: GUILinearAdvectionMain2
...
8-28: guilinearad2 The user can select a variety of initial values from
the Zalesak test problems in exercise 2
...
5 of section 2
...
In addition, the user can
select from a variety of limiters
...


378

Methods for Scalar Laws

Fig
...
4 Second-order TVD region and TVD limiters: φ versus r

5
...
3 Extension to Nonlinear Scalar Conservation Laws
Next, let us extend our development of TVD schemes to general nonlinear scalar
L
conservation laws
...
As before, we will define the flux differences f j+1/2 = f (u n ) −
j+1

n
L
L
f j+1/2 and f j+1/2 = f j+1/2 − f (u j )
...
20)
...
28) that the Lax–Wendroff
flux is
LW
f j+1/2 =

f (u n ) x j+1 + f (u n ) x j − t n+1/2 d f [ f (u n ) − f (u n )]
j
j
j+1
j+1
du
x j + x j+1
df

t n+1/2 du
1
=
α j+1/2 f (u n ) + β j+1/2 f (u n ) −
j+1
j
2
x j + x j+1
=

L
f j+ 1
2

2 t n+1/2 d f
1
du
α j+1/2 −
+
2
x j + x j+1

+

f j+ 1 + f j+ 1
2

2

+
f j+1/2

df

+

t n+1/2 du
1
β j+1/2 −
2
x j + x j+1


f j+ 1
...
21), and the flux derivative
is approximated by difference quotients
...
8 Total Variation Diminishing Schemes

flux:
1
1
+
+


LW
L
f j+1/2 = f j+1/2 + (α j+1/2 − γ j+1/2 ) f j+1/2 − (β j+1/2 − γ j+1/2 ) f j+1/2
...
8
...

Next, we will modify the second-order terms by limiters
...


Lemma 5
...
7 Suppose that we have a mesh
...
and mesh
values u n approximating cell averages of the solution u to the conservation
j
n
n
law ∂u/∂t + ∂ f (u)/∂ x = 0
...

L
Suppose that f j+1/2 (u n , u n ) is generated by an E-scheme (definition 5
...
1)
...
21), and the split Courant
numbers as in equation (5
...
Define the smoothness monitors by
r+ =
j

+
+
(α j−1/2 − γ j−1/2 ) f j−1/2
+
+
(α j+1/2 − γ j+1/2 ) f j+1/2

Suppose that 1 ≤

and r − =
j



(β j−1/2 − γ j−1/2 ) f j−1/2


(β j+1/2 − γ j+1/2 ) f j+1/2


...


If the timestep t n+1/2 is chosen so that
+
+
γ j+1/2 > 0 =⇒ |α j+1/2 − γ j+1/2 | ≤

2



γ j+1/2 > 0 =⇒ |β j+1/2 − γ j+1/2 | ≤

2

+
γ j+1/2

β j+1/2

+


γ j+1/2

α j+1/2



1
2

and the flux is given by
1
1
n+1/2
+
+


L
f j+1/2 = f j+1/2 + φ(r + ) (α j+1/2 − γ j+1/2 ) f j+1/2 − φ(r − ) (β j+1/2 − γ j+1/2 ) f j+1/2
j
j+1
2
2
(5
...


380

Methods for Scalar Laws

Proof To check that the scheme is TVD, we write
u n+1 = u n
j
j


t n+1/2
xj

1

+
+
f j+1/2 + φ(r + )(α j+1/2 − γ j+1/2 ) f j+1/2
j
2

1


− φ(r − )(β j+1/2 − γ j+1/2 ) f j+1/2
j+1
2
1
+
+
+
+ f j−1/2 − φ(r + )(α j−1/2 − γ j−1/2 ) f j−1/2
j−1
2
1


+ φ(r − )(β j−1/2 − γ j−1/2 ) f j−1/2
j
2
= un −
j

un
j+1/2
α j+1/2

1

+
+
−γ j+1/2 + φ(r + )(α j+1/2 − γ j+1/2 )γ j+1/2
j
2

1


− φ(r − )(β j+1/2 − γ j+1/2 )γ j+1/2
j+1
2


un
j−1/2
β j−1/2

1
+
+
+
−γ j−1/2 + φ(r + )(α j−1/2 − γ j−1/2 )γ j−1/2
j−1
2

1


+ φ(r − )(β j−1/2 − γ j−1/2 )γ j−1/2
j
2
= un −
j
+

+
γ j−1/2 u n
j−1/2

β j−1/2


γ j+1/2 u n
j+1/2

α j+1/2

φ(r + )
1
j
+
1 − (α j−1/2 − γ j−1/2 ) φ(r + ) − +
j−1
2
rj

φ(r − )
1
j


1 − (β j+1/2 − γ j+1/2 ) φ(r j+1 ) − −
2
rj


...
29a)

...
29b)

L
Since f j+1/2 is generated by an E-scheme, lemma 5
...
2 shows that the split
±
Courant numbers γ j−1/2 are nonnegative
...
In order for Harten’s lemma
5
...
1 to guarantee that the scheme is TVD, we want C j+1/2 + D j+1/2 ≤ 1
...
8 Total Variation Diminishing Schemes

that the timestep restrictions imply that
C j+1/2 + D j+1/2



+
γ j+1/2

1
+
1 + |α j+1/2 − γ j+1/2 |
2

β j+1/2
+
γ j+1/2

β j+1/2

+


γ j+1/2

+


γ j+1/2

α j+1/2

1

1 + |β j+1/2 − γ j+1/2 |
2

2 ≤ 1
...
8
...
8
...
In addiL
tion, suppose that f j+ 1 (u n , j n ) is given by the Engquist–Osher flux and the
j
j+1
2

timestep t n+1/2 is chosen so that
x j + x j+1

xj −
x j+1 −

≤ t

x j + x j+1

un
j+1
|f
un
j
t n+1/2
n
u j+1

un
j+1
un
j
n+1/2

un − un
j
j+1

≤ t

un
j+1
un
j
n+1/2

(u)| du
max

− un
j

max{ f (u), 0} du

≤ xj

max{− f (u), 0} du
un − un
j
j+1

(5
...
30b)

≤ 1
...
30c)

Then the conservative difference scheme with fluxes given by (5
...

Proof Since the lower-order flux is given by the Engquist-Osher flux,
+
γ j+1/2

β j+1/2

γ j+1/2

α j+1/2

t n+1/2
=
x j+1
=

t n+1/2
xj

un
j+1
un
j

max{ f , 0}du

un − un
j
j+1
un
j+1
un
j

max{− f , 0}du
un − un
j
j+1


...
29), it is easy to see that
the timestep restriction (5
...
30b) implies that D j+1/2 ≥ 0
...
30c) implies that
C j+1/2 + D j+1/2 ≤

un
j+1
un
j

× t n+1/2 max



un
j+1
un
j

un
j+1

un
j+1
max{− f , 0}du
un
j
un − un
j
j+1
+
1
1 + 2 (α j+1/2 − γ j+1/2 )

max{ f , 0}du +

| f |du


un
j

t n+1/2 max

x j+1

,


1 + 1 (β j+1/2 − γ j+1/2 )
2

xj

1 + α j+1/2 /2 1 + β j+1/2 /2
,
x j+1
xj

The result follows from Harten’s lemma 5
...
1
...


382

Methods for Scalar Laws

On a uniform grid, these requirements are satisfied whenever
t n+1/2
t n+1/2
t n+1/2

max

max{ f (u), 0} ≤ x

max

max{− f (u), 0} ≤ x

maxn

| f (u)| ≤

u between u n ,u n
j
j+1
u between u n ,u n
j
j+1

u between

u j ,u n
j+1

x
1+

/2


...

A C++ program to implement the TVD scheme for a variety of nonlinear scalar
conservation laws can be found in Program 5
...
C
...
8-69: GUIRiemannProblem2
...
Students can exercise this program by
clicking on Executable 5
...
In addition, the user can select from a variety of limiters
...

Exercises for 5
...
8
...
8
...
8
...
Compare the minmod, van Leer, MUSCL and
superbee limiters at CFL = 0
...
5 and 0
...
2
...
2
...

5
...
4 Program the TVD scheme for the Burgers equation
...


5
...
8 required two kinds of fluxes
...
The other was the
n
flux f (u j ), which was used to compute the anti-diffusive flux corrections
...
e
...
The flux-splitting approach did avoid the solution of Riemann problems
...
9 Slope-Limiter Schemes

was necessarily convergent, but some choices of the limiter may allow the limited
scheme to converge to an entropy-violating solution
...
This method will consist of four basic steps
...
9
...
Second, characj
teristic tracing (Section 5
...
4) will produce values of the solution at cell sides and
half-time by tracing characteristics back to data provided by the piecewise polynomial reconstruction u n (x)
...
9
...
Finally, a conservative difference will compute the new solution by applying
the divergence theorem to the conservation law
...
The resulting scheme is
convergent, as shown in [125]
...
9
...
We would like to
develop a conservative difference scheme that is exact for this problem, given
piecewise linear initial data
...
9
...
Let v + = max{v, 0} and v − = min{v, 0}
be the positive and negative parts of the advection speed
...


Suppose that the fluxes at the cell sides are given by
f i+1/2 = v + u in +
n+1/2

sin xi
2

1−

v + t n+1/2
xi

n
+ v − u i+1 −

n
si+1 xi+1
v − t n+1/2
1+
2
xi+1

Then the conservative difference
n+1/2

n+1/2

u in+1 xi = u in xi − t n+1/2 f i+1/2 − f i−1/2
produces exact cell averages at time t n+1
...


384

Methods for Scalar Laws

Proof Since the initial data is piecewise linear, the initial cell average is
xi+1/2
xi−1/2

u(x, t n ) d x = u in xi
...
For
v ≥ 0 the cell average at t n+1 = t n + t n+1/2 is
xi+1/2

u(x, t n+1 ) d x

xi−1/2
xi+1/2

=

u(x − v t n+1/2 , t n ) d x

xi−1/2
xi−1/2

=

xi−1/2 −v

t n+1/2

n
n
u i−1 +si−1 (x − xi−1 ) d x +

1 n
1
n
2

= u i−1 v t n+1/2 + si−1 xi−1
2
4
+ u in (

xi − v t

n+1/2

1
) + sin xi2
2

xi+1/2 −v t n+1/2
xi−1/2

1 v t n+1/2

2
xi−1
1 v t n+1/2

2
xi

u in +sin (x − xi ) d x

2

2



1
4

n
= u in xi − v t n+1/2 [u in − u i−1 ]
s n xi−1
s n xi
v t n+1/2
v t n+1/2
v t n+1/2 1 −
v t n+1/2 1 −
− i
+ i−1
2
xi−1
2
xi
n
n
n+1/2
xi−1
s
s xi
v t
v t n+1/2
n
= u in xi − v t n+1/2 u in + i
1−
1−
− u i−1 + i−1
2
xi
2
xi−1


...


We can combine these two results in the form
xi+1/2
xi−1/2

u(x, t n+1 ) d x = u in xi

− v + t n+1/2
− v − t n+1/2

s n xi−1
sin xi
v + t n+1/2
n
1−
− u i−1 + i−1
2
xi
2
n
− n+1/2
xi+1
s
s n xi
v t
n
1+
u i+1 − i+1
− u in − i
2
xi+1
2
u in +

v + t n+1/2
xi−1
− n+1/2
v t
1+
xi

1−

This equation has the form of a conservative difference using the fluxes given in
the lemma
...


5
...


5
...
2 Piecewise Linear Reconstruction
In one dimension, the piecewise linear reconstruction step in the MUSCL (Monotone Upwind Scheme for Conservation Laws) takes the form
u n (x) = u n + s n (x − x j ) for all x ∈ (x j−1/2 , x j+1/2 )
...
The choice s n = 0 will produce Godunov’s method
...
The cubic polynomial
can be constructed by using Newton interpolation
...
, J − 1, then we compute the first-order divided differences
u n [xk+1 , xk ] ≡

un − un
k
k+1
, −1 ≤ k ≤ J
xk+1 + xk

and the second-order divided differences
u n [xk+1 , xk , xk−1 ] ≡

u n [xk+1 , xk ] − u n [xk , xk−1 ]
, 0 ≤ k < J
...

The derivative of this Newton interpolating polynomial at x j+1/2 is
dcn
j
dx

(x j+1/2 ) = u n + u[x j , x j−1 ](2 x j + x j−1 ) + u n [x j+1 , x j , x j−1 ] x j ( x j + x j−1 ),
j−1
and the derivative at x j−1/2 is
dcn
j
dx

(x j−1/2 ) = u n + u[x j , x j−1 ] x j−1 − u n [x j+1 , x j , x j−1 ] x j x j−1
...

x j−1 + x j + x j+1
x j+1 + x j + x j−1

(5
...


The slopes s n used in the flux computation are found by applying a limiter to the
j
˜j
cell average slopes s n
...
Specifically, if the cell averages are monotonically
increasing (i
...
, u n ≤ u n ≤ u n ), then we want
j
j−1
j+1
u n ≤ u n (x j−1/2 ) = u n − s n x j /2
j−1
j
j

and

u n ≥ u n (x j+1/2 ) = u n + s n x j /2
...

j+1
j
j
j−1
Similarly, if the cell averages are monotonically decreasing then we want
s j x j ≥ 2 max{u n − u n , u n − u n }
...
In the MUSCL scheme,
we define the side differences
n
n
un
j+1/2 = u j+1 − u j ,

and compute the limited slope by the formula
sn x j =
j

n
n
sign(˜ n x j ) min{2| u n
sj
sn
un
j−1/2 |, 2| u j+1/2 |, |˜ j x j |},
j−1/2 u j+1/2 > 0
(5
...


Note that the MUSCL slopes actually allow the piecewise linear reconstruction
u (x) to have greater total variation than the discrete data u n
...
Sometimes,
n

387

5
...


This choice typically leads to greater smearing of discontinuities
...
This choice has an even greater
tendency to develop sawtooth profiles than MUSCL, and occasionally converges
to inappropriate discontinuities
...
This is because there is extra diffusion in computing the new cell averages
in the conservative difference
...
5)
shows that MUSCL, minmod and superbee slopes are all TVD for linear advection
...
9
...


In order to compute with this integral form of the conservation law, we need to
approximate the time integrals of the flux
...


Here f j+1/2 ≈ f (u(x j+1/2 , t n + 1 t n+1/2 )) where u(x, t) represents the exact solu2
tion of the conservation law with initial data given by the reconstruction u n (x)
...


388

Methods for Scalar Laws

5
...
4 Characteristic Tracing
In regions of smooth behavior, we can approximate
1
t n+1/2
x j, tn +
2
2
xj
∂u
t n+1/2
∂u
(x j , t n )
+
(x j , t n )
≈ u(x j , t n ) ±
∂x
2
∂t
2
xj
∂f
t n+1/2
∂u
∂u
(x j , t n )

(u(x j , t n )) (x j , t n )
= u(x j , t n ) ±
∂x
2
∂u
∂x
2
λ j t n+1/2
xj
xj
t n+1/2
= un ± sn
− λn s n
= un x j ±
1∓
j
j
j j
2
2
2
xj

u xj ±

Thus for arbitrarily small


...

u x j+1/2 + , t n + t n+1/2 ≈ u n −
j+1
2
2
x j+1

u x j+1/2 − , t n +

This corresponds to tracing the solution backward along characteristics to the initial
data
...
To avoid this problem, it is common to use the characteristic
projection
uL
j+1/2
uR
j+1/2

=
=

un +
j

1
2

1−

λ j t n+1/2
xj

sn x j ,
j

un ,
j
un −
j+1
un ,
j+1

λn > 0
j
λn ≤ 0
j

1
2

1+

λ j+1 t n+1/2
x j+1

s n x j+1 , λn < 0
j+1
j+1
λn ≥ 0
...

When a characteristic traces the wrong way, the state determined by characteristic
n
projection is only first-order accurate
...
If λn ≤ 0 and λn ≥ 0
j
j+1
2
R
(corresponding to a transonic rarefaction), then both u L
j+1/2 and u j+1/2 will be
first-order accurate
...
We have chosen not to use the characteristic projection in our numerical
experiments
...
9 Slope-Limiter Schemes

5
...
5 Flux Evaluation
The flux in the MUSCL scheme is computed at the solution of the Riemann problem
R
with left and right states given by u L
j+1/2 and u j+1/2 :
n+1/2

R
f j+1/2 = f (R(u L
j+1/2 , u j+1/2 ; 0))
...
A similar statement holds in the
case when ∂ f /∂u < 0 for all u
...
e
...
For transonic compressions (i
...
, when (∂ f /∂u) j > 0 >
(∂ f )(∂u) j+1 ,) the characteristic tracing is used on both sides of x j+1/2 , but the
limited slopes should be zero
...
9
...
Given the values u n , we compute λn = ∂ f (u n ) = u n , and choose
j
j
j
j
∂u
t n+1/2 so that
t n+1/2 = γ x min
j

1

...
Next, we compute
the side increments
n
n
un
j+1/2 = u j+1 − u j ,

the centered increments
1
n
un = ( un
j
j+1/2 + u j−1/2 )
2
and the MUSCL slopes
sn x =
j

n
n
n
un
sign( u n ) min{2| u n
j
j−1/2 |, 2| u j+1/2 |, | u j |},
j+1/2 u j−1/2 > 0
0,
otherwise
...

j+1

390

Methods for Scalar Laws

These states are used to evaluate the flux at the solution of the Riemann problem
for Burgers’ equation:
n+1/2
f j+1/2

=

1
2

R
2
max{|u L
j+1/2 |, |u j+1/2 |} ,

R
uL
j+1/2 > u j+1/2

1
2

R
2
max{u L
j+1/2 , min{u j+1/2 , 0}} ,

R
uL
j+1/2 ≤ u j+1/2
...

x

A C++ program to implement the MUSCL scheme for nonlinear scalar conservation laws can be found in Program 5
...
C Students can exercise this
program by clicking on Executable 5
...
In addition, the user can select from a variety of limiters
and Riemann solvers
...


5
...
6 Non-Reflecting Boundaries with the MUSCL Scheme
Finally, let us discuss the treatment of a non-reflecting boundary with the MUSCL
scheme
...
Suppose that we use ghost cells and set the solution in the
ghost cells to be equal to u n , the solution in the last cell within the domain
...
Characn
n
n+1/2
teristic tracing will approximate w (x j+1/2 , t + t
/2) ≈ u n on either side of
j
the right-hand boundary
...
Since the waves should be outgoing at the nonreflecting boundary, the
first-order treatment should not significantly degrade the quality of the solution in
the interior of the domain
...
9
5
...
1 Program the slope-limiter scheme for linear advection, and test it on the problems in
Exercise 2
...
5 of Section 2
...

5
...
2 Program van Leer’s MUSCL scheme for Burgers’ equation on the domain −1 < x < 1
...
4:
(a) u(x, 0) = 1 for x < 0 and u(x, 0) = 2 for x > 0
(b) u(x, 0) = 2 for x < 0 and u(x, 0) = 1 for x > 0

5
...

Describe how you evaluated the L1 norm
...
Also plot the error for Godunov’s method for these problems
...
9
...
Let x j = 2/(3N ) for j even and x j =
1/(3N ) for j odd
...
9
...
13
...
13 we suggested the use of a moving mesh to capture the
solutions of Riemann problems
...
Program your scheme and test it on the problems in Exercise 4
...
11

5
...
These
are intended to be used for convex flux functions only, although they work well
for the Buckley–Leverett problem
...


5
...
1 Cell-Centered Wave Propagation
Suppose that we want to solve ∂u/∂t + ∂ f (u)/∂ x = 0 where f (u) is convex
...
Recall that the minmod limiter is
defined by

minmod(a, b) =

min{|a|, |b|}, ab > 0
0,
ab ≤ 0
...

Define the values of the reconstruction at the cell sides by
1 n
n
n
uL
j+1/2 = u j (x j+1/2 ) = u j + s j x j
2
1 n
n
n
uR
j+1/2 = u j+1 (x j+1/2 ) = u j+1 − s j+1 x j+1
...
We will approximate the solution of the original

392

Methods for Scalar Laws

problem by the solution of
˜
∂ u ∂ f˜(u)
+
=0
∂t
∂x
˜
u(x, t n ) = u n (x), x ∈ (x j−1/2 , x j+1/2 )
...


f˜j+1/2 =

L
Then for u ∈ int(u R
j−1/2 , u j+1/2 ),
L
R
R
˜
˜
f˜(u) = f (u L
j+1/2 ) + f j (u − u j+1/2 ) = f (u j−1/2 ) + f j (u − u j−1/2 )
R
and for u ∈ int(u L
j+1/2 , u j+1/2 ),
L
R
R
˜
˜
f˜(u) = f (u L
j+1/2 ) + f j+1/2 (u − u j+1/2 ) = f (u j+1/2 ) + f j+1/2 (u − u j+1/2 )
...

First, let us consider the case in which f˜j > 0 and f˜j+1 > 0
...
Then Equation (3
...
10 Wave Propagation Slope Limiter Schemes

provided that f˜j t n+1/2 ≤ x j
...

Next, let us consider cases in which the slopes change sign
...
If
u ∗ = argmin( f )
then we can add (u ∗ , f (u ∗ )) as a interpolation point for f˜, and get
t n+1

1
t n+1/2

f˜(u(x j+1/2 , t) dt =

tn

t n+1

1
t n+1/2

tn

f˜(u ∗ ) dt = f (u ∗ )
...
Because the
initial data is not constant, the speed of this shock is not constant at x j+1/2 and
R
t > t n
...


R
If either f˜j+1/2 = 0 or u L
j+1/2 = u j+1/2 , then we will approximate

1
t n+1/2

t n+1
tn

f˜(u(x j+1/2 , t) dt ≈

L
f˜j+1/2 ,

( f˜j )2 s n > ( f˜j+1 )2 s n
j
j+1

R
f˜j+1/2 ,

otherwise
...


The resulting algorithm is second-order accurate, because we used a second-order
accurate (piecewise-linear) approximation to the flux function
...


5
...
2 Side-Centered Wave Propagation
The next algorithm is described in even greater detail in [97, p
...
We are given the current cell averages u n ,
j
mesh widths x j and a timestep t n+1/2 satisfying
t n+1/2 max
For each cell side j +
and the average speed

1
2

df
du

≤ xj
...


we compute the limited slope

limiter( u j−1/2 , u j+1/2 ),
limiter( u j+1/2 , u j+3/2 ),

un
j+1/2 =
Then the flux at side j +

1
2

f (u n ) − f (u n )
j
j+1

λn
j+1/2 ≥ 0
n
λ j+1/2 < 0
...


Here f (R(u n , u n ; 0)) is the flux at the state that moves with zero speed in the
j
j+1
solution of the Riemann problem, or any numerical flux that approximates this
value
...

LeVeque prefers to implement the scheme by decomposing the flux jump into
waves (CLAWPACK subroutine rp1),
f (u n ) − f (u n ) = [ f (u n ) − f (R(u n , u n ; 0))] − [ f (u n ) − f (R(u n , u n ; 0))]
j+1
j
j+1
j
j+1
j
j
j+1

n
n
≡ α+
j+1/2 u j+1/2 + α j+1/2 u j+1/2 ,

defining the second-order corrections to the flux integrals (loop 120 in CLAWPACK
subroutine step1)
˜
f j+1/2 = |λn
j+1/2 | 1 −

2 t n+1/2
|λn
|
x j + x j+1 j+1/2

un
j+1/2

5
...

xj
2

Some care must be taken in the evaluation of λn
j+1/2 in constant states within
the numerical solution
...

A C++ program to implement the wave propagation schemes for nonlinear scalar
conservation laws can be found in Program 5
...
C Simplified versions
of these schemes for linear advection on uniform grids can be found in Program
5
...
C
...
10-31: guiriemann2 The user can select Riemann problem initial data
for linear advection, Burgers’ equation, traffic models and the Buckley-Leverett
model
...
By setting the number of cells to 0, the user will cause the program to
perform a mesh refinement study, and the user can select several different schemes
for comparison
...
10-32: guilinearad2 The user can select a variety of initial
values from the Zalesak test problems in exercise 2
...
5 of section 2
...
In addition,
the user can select from a variety of limiters
...


5
...
3
...
The essential differences between the Nessyahu–Tadmor
scheme and classical Lax–Friedrichs are the use of a piecewise linear reconstruction
of the solution in space, and the use of second-order quadratures in time
...
A limiter is then
n
applied to obtain cell-centered slopes u n = limiter( u n
j
j−1/2 , u j+1/2 )
...
8
...
The cell-centered slope provides a piecewiselinear reconstruction u n (x) = u n + u n (x − x j )/(x j+1/2 − x j−1/2 ) as in the slopej
j
j
limiter scheme of Section 5
...
2
...

j
∂u

396

Methods for Scalar Laws

Integration of the conservation law over the two half-cells x ∈ (x j , x j+1 ) and a
half-timestep t ∈ (t n , t n + t n+1/2 /2) with this piecewise linear initial data leads
to
x j+1
x j+1/2
x j+1
x − xj
x − x j+1
u(x, t n+1/2 ) d x =
un + un
dx +
un + un
dx
j
j
j+1
j+1
xj
x j+1
xj
xj
x j+1/2
t n + t n+1/2 /2



tn

= un +
j

t n + t n+1/2 /2
tn

un
xj
j+1
+ un −
j+1
2
4

un
j
4

t n + t n+1/2 /2



f (u(x j+1 , t)) dt +

tn

f (u(x j+1 , t)) dt +

f (u(x j , t)) dt

x j+1
2
t n + t n+1/2 /2
tn

f (u(x j , t)) dt
...
In order to approximate the flux time integrals, we will use the
midpoint rule for time integration, and a Taylor approximation for the function
value:
t n + t n+1/2 /2

t n+1/2
t n+1/2
f u xj,
2
4
tn
∂u
t n+1/2
t n+1/2
f u(x j , t n ) +
(x j , t n )

2
∂t
4
n+1/2
t
t n+1/2
∂f
∂u
f (u n ) −
(u(x j , t n )) (x j , t n )

...
These results suggest the following computations for
the first half-step of the scheme
...


and then at each cell side we compute the conserved quantity
n+1/2

u j+1/2 =

un +
j

un
j

x j + un −
j+1

4

n+1/4

n+1/4

− f j+1 − f j

t n+1/2

un
j+1
4

x j+1

1

...
First, we compute u j
At the cell sides, we apply the limiter to get
n+1/2

n+1/2

u j+1/2 = limiter( u j

n+1/2

, u j+1 ),

n+1/2

n+1/2

= u j+1/2 − u j−1/2
...
11 Higher-Order Extensions of the Lax–Friedrichs Scheme

and compute the conserved quantity and flux by
n+3/4

u j+1/2 = u n
j+1/2 −

t n+1/2
∂ f n+1/2 n+1/2
(u j+1/2 ) u j+1/2
∂u
2( x j + x j+1 )

n+3/4

n+3/4

f j+1/2 = f (u j+1/2 )
...

xj

In a later paper [110], Liu and Tadmor describe a third-order version of the
Lax–Friedrichs scheme
...
Their algorithm is
designed for uniform grids only, but the algorithm described below is a natural
extension of their ideas
...
Then the Newton
form of this interpolating polynomial is
p j (x) = u n (x − x j−3/2 ) + u n [x j−1 , x j ](x − x j−3/2 )(x − x j−1/2 )
j−1
+ u n [x j−1 , x j , x j+1 ](x − x j−3/2 )(x − x j−1/2 )(x − x j+1/2 )
...

x j+1 = x j + x j−1

The derivative of this interpolating polynomial is
q j (x) =

dp j
x − xj
1
= u n + α j + ξ j (x)β j + ξ j (x)2 γ j where ξ j (x) ≡

...


xj
2

+ x j−1 )

398

Methods for Scalar Laws

The derivative of q j is
q j (x) = 2u n [x j−1 , x j ] + 2u n [x j−1 , x j , x j+1 ]{(x − x j−3/2 ) + (x − x j−1/2 ) + (x − x j+1/2 )}
=

β j + ξ j (x)γ j
xj

From this it is easy to compute
β j = x j q j (x j ) = 2 x j

xj 2

=

x j + x j−1

un
j+1/2

+2 xj
=

un
j−1/2



x j+1 + x j
un
j−1/2
x j + x j−1

un
j−1/2
x j + x j−1

+

un
j−1/2

(

xj
2

x j + x j−1
un
j+1/2
x j+1 + x j

(2 x j+1 + x j ) +



x

+ x j−1 ) + 2 j −
x j+1 + x j + x j−1
un
j−1/2

x j + 2 x j−1
x j+1 + x j + x j−1

x j + x j−1

un
j+1/2
x j+1 + x j

xj
2

( x j + 2 x j−1 )

xj

...


On a uniform grid, these simplify to
αj =

n
un
j−1/2 − u j+1/2

24

, βj =

n
un
j+1/2 + u j−1/2

2

and

n
γ j = un
j+1/2 − u j−1/2
...

j
j
2
8
2
The extreme point of q j (x) occurs at x ∗ where ξ j (x ∗ ) = −β j /γ j
...
Using
j
j
2

5
...

x j+1 + x j 2 x j + x j+1

n
On a uniform grid, these conditions are equivalent to either u n
j+1/2 > 0 > u j−1/2
n
n
or u j+1/2 < 0 < u j−1/2
...

In order to avoid introducing spurious new extrema, the scheme will work with
an average of the original quadratic and a constant:

q j (x) ≡ u n + θ j [q j (x) − u n ]
...


Otherwise, we choose θ j = 1
...


n
If 0 ≤ min{ u n
j−1/2 , u j+1/2 } then

u n − min{
j

θ j = min

u j +u j−1
, q j−1 (x j−1/2 )}
2
,
n
uj − mj

max{

u j +u j+1
, q j+1 (x j+1/2 )
2
M j − un
j

− un }
j

, 1

n
and if 0 ≥ max{ u n
j−1/2 , u j+1/2 } then

θ j = min

max{

u j +u j−1
, q j−1 (x j−1/2 )}
2
M j − un
j

− un
j

,

u n − min{
j

u j +u j+1
, q j+1 (x j+1/2 )}
2
,
n
uj − mj

1
...


The integrals of the limited quadratic reconstruction are
x j+1/2

0

xj

=
x j+1

1/2

q j (x) d x =

q j+1 (x) d x =

x j+1/2

=

xj
2

1
u n + θ j α j + ξβ j + ξ 2 γ j dξ x j
j
2
un + θ j α j + θ j β j
j

1
1
+ θjγj
4
24

=

xj n 1
u j + θjβj
2
4

(5
...
33b)

401

5
...

12

The values of u(x, t + τ ) can be provided by a Taylor expansion of the
form
u(x, t + τ ) ≈ u + τ

τ2 ∂
∂f
∂u τ 2 ∂ 2 u
+

=u−τ
∂t
2 ∂t 2
∂x
2 ∂x

=u−τ

∂ f ∂u τ 2 ∂
+
∂u ∂ x
2 ∂x

=u−τ

∂ f ∂u τ 2
+
∂u ∂ x
2

∂f
∂u
∂f
∂u

2

2

∂f
∂t

∂u
∂x

∂ 2u
∂ f ∂2 f
+2
∂x2
∂u ∂u 2

∂u
∂x

2


...

j
Recently, the piecewise quadratic reconstruction and limiting of Liu and
Tadmor has been deprecated in favor of the central WENO reconstruction
in [99]
...
However, the use of the
staggered grid requires twice as many applications of the algorithm as for our
previous schemes that use unstaggered grids
...
A C++
program to implement the higher-order versions of the Lax-Friedrichs scheme for
nonlinear scalar conservation laws can be found in Program 5
...
C
Simplified versions of these schemes for linear advection on uniform grids can
be found in Program 5
...
C
...
11-33: guiriemann2 The user can select Riemann
problem initial data for linear advection, Burgers’ equation, traffic models and the
Buckley-Leverett model
...
By setting the number of cells to 0, the user will cause
the program to perform a mesh refinement study, and the user can select several
different schemes for comparison
...
11-34: guilinearad2 The user can select
a variety of initial values from the Zalesak test problems in exercise 2
...
5 of section 2
...
In addition, the user can select from a variety of limiters
...

Exercises for 5
...
11
...
Describe how this idea could be implemented in the higher-order versions
of the Lax–Friedrichs scheme
...
11
...
For
example, we could approximate
u(x, t + τ ) ≈ u −

∂f
τ
...
Program this version of the Nessyahu–Tadmor scheme and compare it to the
version presented above
...
11
...
Starting with the third-order approximation

∂f
τ
x, t +
τ,
∂x
2
we compute fluxes at (x, t + τ/2) as in the previous exercise, limit slopes in these fluxes, and
then compute u(x, t + τ ) from the slopes in the fluxes at (x, t + τ/2)
...

n
5
...
4 At the right-hand side of a zero state, we expect |u n
|u n
j+1/2 |
j−1/2 |
...
Show that the Liu–Tadmor
n
limiter θ is not a continuous function of u n
j−1/2 and u j+1/2
...

u(x, t + τ ) ≈ u n −
j

5
...
The ideas are due to Colella and Woodward [35],
and will lead to other higher-order extensions in Section 5
...
The new approach
will involve a piecewise quadratic reconstruction u n (x), using the cell averages
u n
...

j
The scheme will also use a more accurate quadrature for the temporal flux integrals
...
12 Piecewise Parabolic Method

In each cell we will have
u n (x) = α j + ξ (x){β j + [1 − ξ (x)]γ j },

where

ξ (x) ≡

x − x j−1/2

...
Also

un =
j

1
xj

x j+1/2

1

u n (x) d x =
0

x j−1/2

1
1
α j + ξ [β j + (1 − ξ )γ j ] dξ = α j + β j + γ j ,
2
6

R
so we require γ j = 6[u n − α j − 1 β j ] = 6[u n − 1 (u L
j
j
j+1/2 + u j−1/2 )]
...

j
In order to determine a value for u j+1/2 , we will construct a quartic interpolation
x
to x j −3/2 u(s, t n ) ds, and evaluate the derivative of this quartic at x j+1/2 to get
un
j+1/2
...
9
...

x j+2 + x j+1 + x j + x j−1

Then the quartic Newton interpolating polynomial is
x
x j− 3

u(s, t n ) ds ≈ Q n (x)
j

2

≡ u n (1 − x j−3/2 ) + u n [x j , x j−1 ](x − x j−1/2 )(x − x j−3/2 )
j−1
+ u n [x j+1 , x j , x j−1 ](x − x j+1/2 )(x − x j−1/2 )(x − x j−3/2 )
+ u n [x j+2 , x j+1 , x j , x j−1 ](x − x j+3/2 )(x − x j+1/2 )(x − x j−1/2 )(x − x j−3/2 )
...
34)

404

Methods for Scalar Laws

The derivative of this interpolating polynomial at x j+1/2 is
d Qn
j

(x j+1/2 ) = u n
j+1/2
dx
≡ u n + u n [x j , x j−1 ](2 x j + x j−1 )
j−1
+ u n [x j+1 , x j , x j−1 ] x j ( x j + x j−1 ) − u n [x j+2 , x j+1 , x j , x j−1 ]( x j + x j−1 ) x j+1 x j
= u n + u[x j , x j−1 ] x j + {u n [x j+1 , x j ] − u n [x j , x j−1 ]}
j

x j ( x j + x j−1 )
x j+1 + x j + x j−1

− u n [x j+2 , x j+1 , x j , x j−1 ]( x j + x j−1 ) x j x j+1
= u n + u[x j+1 , x j ] x j + {u n [x j+1 , x j ] − u n [x j , x j−1 ]} x j 1 −
j

x j + x j−1
x j+1 + x j + x j−1

− u n [x j+2 , x j+1 , x j , x j−1 ]( x j + x j−1 ) x j x j+1
= u n + u[x j+1 , x j ] x j + u n [x j+1 , x j , x j−1 ] x j x j+1
j
− {u n [x j+2 , x j+1 , x j ] − u n [x j+1 , x j , x j−1 ]}

( x j + x j−1 ) x j x j+1
x j+2 + x j+1 + x j + x j−1

= u n + u[x j+1 , x j ] x j
j
− u n [x j+1 , x j , x j−1 ]( x j+2 + x j+1 ) + u n [x j+2 , x j+1 , x j ]( x j + x j−1 )
x j x j+1
×
x j+2 + x j+1 + x j + x j−1
= u n + u[x j+1 , x j ] x j
j


x j x j+1
x j+2 + x j+1
u n [x j+1 , x j ]
x j+2 + x j+1 + x j + x j−1
x j+1 + x j + x j−1

− u n [x j , x j−1 ]

x j+2 + x j+1
x j + x j−1
+ u n [x j+2 , x j+1 ]
x j+1 + x j + x j−1
x j+2 + x j+1 + x j

− u n [x j+1 , x j ]

x j + x j−1
x j+2 + x j+1 + x j


...
31) for the average s n of the second derivative of the cubic
x
n
interpolant to x j−3/2 u (s) ds at x j−3/2 , x j−1/2 , x j+1/2 and x j+3/2 , we obtain
˜ j+1
u n [x j+2 , x j+1 ] = s n − u n [x j+1 , x j ]
˜j
u n [x j , x j−1 ] = s n − u n [x j+1 , x j ]

2 x j+2 + x j+1
x j+2 + x j+1 + x j

x j + 2 x j−1
x j+1 + x j + x j−1

x j+2 + x j+1 + x j
x j+1 + 2 x j
x j+1 + x j + x j−1

...
12 Piecewise Parabolic Method

405

As a result, we can write
n
un
j+1/2 = u j + u[x j+1 , x j ] x j

x j x j+1
x j+2 + x j+1
u n [x j+1 , x j ]
x j+2 + x j+1 + x j + x j−1
x j+1 + x j + x j−1
x j + 2 x j−1
x j+2 + x j+1
˜j
− s n − u n [x j+1 , x j ]
x j+1 + x j + x j−1 2 x j+1 + x j
2 x j+2 + x j+1
x j + x j−1
˜ j+1
+ s n − u[x j+1 , x j ]
x j+2 + x j+1 + x j
x j+1 + 2 x j
x j + x j−1
− u n [x j+1 , x j ]
x j+2 + x j+1 + x j
= u n + u[x j+1 , x j ] x j
j
x j+1 x j
− u[x j+1 , x j ]
x j+2 + x j+1 + x j + x j−1
x j+2 + x j+1
x j + 2 x j−1
x j+2 + x j+1
×
+
x j+1 + x j + x j−1 2 x j+1 + x j x j+1 + x j + x j−1
2 x j+2 + x j+1
x j + x j−1
x j + x j−1


x j+1 + 2 x j x j+2 + x j+1 + x j
x j+2 + x j+1 + x j
x j+2 + x j+1
x j + x j−1
x j+1 x j
˜ j+1
˜j
− sn
+ sn
2 x j+1 + x j
x j+1 + 2 x j
x j+2 + x j+1 + x j + x j−1
n
= u j + u[x j+1 , x j ] x j


2 x j+1 x j
x j+2 + x j+1 + x j + x j−1
x j+2 + x j+1
x j + x j−1
˜j
˜ j+1
+ sn
− sn
2 x j+1 + x j
x j+1 + 2 x j

− u[x j+1 , x j ]

x j+2 + x j+1
x j + x j−1

2 x j+1 + x j
x j+1 + 2 x j
x j+1 x j

...

j+1/2 = (u j + u j+1 ) −
2
6 j+1
˜ j+1
˜j
In practice, Colella and Woodward replace the slopes s n and s n with their limited
values s n and s n , given by formula (5
...

j
j+1
These values at the cell sides must be adjusted further to produce the values
R
uL
j+1/2 and u j−1/2 used in the piecewise quadratic reconstruction
...

2
2γ j

If β 2 ≥ |β j γ j |, then x ∗ ∈ (x j−1/2 , x j+1/2 ), and we have the rule
j
j
n
L
n
β 2 ≥ |β j γ j | =⇒ u R
j
j−1/2 = u j−1/2 , u j+1/2 = u j+1/2
...
This is equivalent to taking β j = −γ j , producing the rule
n
β 2 < −β j γ j =⇒ u R
j
j−1/2 = u j−1/2 ,

n
R
uL
j+1/2 = 3u j − 2u j−1/2
...
This is equivalent to taking β j = γ j , producing the
rule
n
β 2 < β j γ j =⇒ u L
j
j+1/2 = u j+1/2 ,

n
L
uR
j−1/2 = 3u j − 2u j+1/2
...
Colella and Woodward [35] describe their algorithm for
linear advection and gas dynamics only
...
Recall that in smooth flow, the solution of the conservation law is
constant along characteristics; as a result,
u(x j+1/2 , t n + τ ) = u n (x j+1/2 − λτ )
where the characteristic speed λ solves
λ=

df
(u(x j+1/2 − λτ ))
...

The flux at the cell side is computed by
t n+1/2

1
t n+1/2
=

f (R(u(x j+1/2 − 0, t n + τ ), u(x j+1/2 + 0, t n + τ ); 0)) dτ

0
t n+1/2

1
t n+1/2

≈ f R

f (R(u n (x j+1/2 − λτ ), u n (x j+1/2 − λτ ); 0)) dτ
j
j+1

0

t n+1/2

1
t n+1/2

0

u n (x j+1/2
j

− λτ ) dτ,

t n+1/2

1
t n+1/2

0

u n (x j+1/2 − λτ ) dτ; 0
j+1


...
12 Piecewise Parabolic Method

Colella and Woodward apparently keep the characteristic speed constant in these
integrals
...
Provided that λ < 0 they compute

uR
j+1/2

=
=

t n+1/2

1
t n+1/2

0
t n+1/2

1
t n+1/2

0

x j+1
= n n+1/2
λj t
= uR
j+1/2 −

u n (x j+1/2 − λn τ ) dτ
j+1
j+1
α j+1 −

λτ
λτ
β j+1 + 1 +
γ j+1
x j+1
xj

n+1/2
λn
/ x j+1
j+1 t



α j+1 − σ β j+1 + [1 + σ ]γ j+1 dσ

0

n
n
n+1/2
n+1/2
2 λ j+1 t
1 λ j+1 t
β j+1 + γ j+1 1 +
2
x j+1
3
x j+1

;

L
R
R
otherwise they take u R
j+1/2 = u j+1/2
...

A C++ program to implement the piecewise parabolic method for nonlinear
scalar conservation laws can be found in Program 5
...
C A simplified
version of this scheme for linear advection on uniform grids can be found in Program
5
...
C
...
12-35: guiriemann2 The user can select Riemann problem initial data for
linear advection, Burgers’ equation, traffic models and the Buckley-Leverett model
...
By
setting the number of cells to 0, the user will cause the program to perform a mesh
refinement study, and the user can select several different schemes for comparison
...
12-36: guilinearad2 The user can select a variety of initial
values from the Zalesak test problems in exercise 2
...
5 of section 2
...
In addition,

408

Methods for Scalar Laws

the user can select from a variety of limiters
...


5
...
In order to do so, it will assume that the flux function in the
conservation law has as many continuous derivatives as needed
...

Let w be an arbitrary function of x and define the moving cell average
w(x) =

1
x

x/2
− x/2

w(x + y) dy ≡ (A

x w)(x)
...
At points x where w is smooth,
w(x) = w(x) + O( x 2 )
...

Integrating the conservation law in space leads to the ordinary differential equations
1
∂u
+
∂t
x

f u x+

x
,t
2

− f u x−

x
,t
2

= 0
...


The analytical form of the ENO scheme is u n+1 = AE x ( t)R(·, u n ), where R
j
j
constructs a piecewise polynomial interpolant to the cell averages u n , E x evolves
j
the polynomial interpolant through a time increment t, and A averages the result
onto the mesh
...
For any
conservation law, the cell average is always monotone
...
It follows that for a scalar conservation
law
T V (u n+1 ) = T V (AE
j

x(

t)R(·, u n )) ≤ T V (R(·, u n )) ≤ T V (u n ) + O( x r )
...
13 Essentially Non-Oscillatory Schemes

Note that if the numerical flux satisfies
f j+1/2 = f˜(x j+1/2 , t n ) + d(x j+1/2 ) x r + O( x r +1 ),
where d(x) is Lipschitz continuous, and if the numerical solution is given by the
conservative difference
u n+1 = u(x j , t n ) −
j

t
[ f j+1/2 − f j−1/2 ] ≡ (E
x

x(

t)u(·, t n )) j ,

then the local truncation error in the cell averages satisfies
u(x j , t n+1 ) − (E

x(

t
[d(x j+1/2 ) − d(x j−1/2 )] x r + O( x r +1 )
x
= O( x r +1 )
...
e
...
e
...
e
...

When the error coefficient e(x) = [R(x, w) − w(x)]/ x r fails to be Lipschitz
continuous at a point, then the local truncation error of ENO is only O( x r )
...
Due to local accumulation, the pointwise error
at t N with N = O(1/ x) is O( x r −1 )
...
Shu and Osher claim that the scheme has order r − 1 in L∞ , and order r
in L1 , where r is the order of accuracy of the reconstruction function
...
Rather, we
observe first-order convergence at propagating discontinuities and second-order
convergence for rarefactions surrounded by constant states for all versions of the
ENO scheme, other than the first-order scheme
...
One is an appropriate ordinary
differential equation solver to integrate ∂u/∂t(t) = L(u(t))
...
For first-order ENO, the suggested ordinary differential equation solver is
the forward Euler method
...
The resulting scheme is stable for
CFL ≤ 1
...

3
The resulting scheme is also stable for CFL ≤ 1
...

3
6
˜
The resulting scheme is stable for CFL ≤ 2/3, and the reason for the notation L
will be explained at the end of the next paragraph
...
Here the goal is to construct a polynomial of degree r + 1 approximating the integral of the flux, and then evaluate the derivative of this polynomial at each cell side x j+1/2
...
In more recent versions of ENO, priority has been given
to making the stencil vary more smoothly with j [77, 109]
...
, x j+r −1/2 , computing
divided differences up to order r
...
, x j+r +1/2
...
The actual piecewise polynomial interpolation within
2
these stencils is selected by choosing the smaller divided difference of two alternatives as the order of the divided difference is increased
...
13 Essentially Non-Oscillatory Schemes

the form
for all − r ≤ j ≤ r δ j,0 = f j
for all 1 ≤ k ≤ r
for all − r ≤ j ≤ r − k δ j,k =
0

δ j+1,k−1 − δ j,k−1
x j+k+1/2 − x j−1/2

=0

p j+1/2 (ξ ) = δ0,0
for all 1 ≤ k ≤ r
D=
if |δ

d
dx
k−1 ,k

k−1 +k

(x − x j−1/2 )|x=ξ
j=

k−1

| ≥ |δ

k−1 ,k

p j+1/2 (ξ )+ = Dδ

| then

k ,k

k

=

k−1

− 1 else

k

=

k−1


...

A C++ program to implement the ENO schemes for a variety of nonlinear scalar
conservation laws can be found in Program 5
...
C , which calls several
Fortran subroutines in Program 5
...
f
...
13-79: LinearAdvectionSchemes
...
Students can exercise the former program by clicking on Executable
5
...
13-38: guilinearad2 By setting the number of cells to 0,
the user will cause the program to perform a mesh refinement study
...
13
5
...
1 Show that the first-order version of the ENO scheme is the same as Godunov’s method using
Marquina’s flux (see exercise 3
...
3)
...
13
...

xj
x j + x j−1

x j+1 + x j

x j + x j−1

On a uniform grid, this is similar to using a minmod limiter, except that the limited slope is not
set to zero when the left and right slopes have opposite signs
...
14 Discontinuous Galerkin Methods
5
...
1 Weak Formulation
The discontinuous Galerkin method [29] is another technique for generating
arbitrarily high order schemes for hyperbolic conservation laws
...
For any
w(x) ∈ C ∞ ( ) we have
∂u ∂ f
+
w dx =
∂t
∂x

0=
=
i

d
dt

xi+1/2
xi−1/2

xi+1/2
i

xi−1/2
x

∂f w
∂w
∂u
w+
− f
∂t
∂x
∂x

uw d x + ( f w)|xi+1/2 −
i−1/2

xi+1/2

f
xi−1/2

dx

∂w
dx
...
One is that C ∞ ( ) is infinite-dimensional
...
Another difficulty is that the fluxes at the cell sides are
difficult to determine
...
This will be acceptable for
a numerical timestep small enough that there are no interactions from Riemann
problems arising from other grid cells
...

∂x
xi−1/2
Here R(u L , u R ; ξ ) is the state moving at speed ξ in the solution of the Riemann
problem with left state u L and right state u R
...
We also need
to determine appropriately accurate numerical quadrature rules for the integrals in
(5
...
It will also be useful to apply a limiter to the
states that are used in the Riemann problems
...
35)

5
...
14
...
In order to
simplify the computations, we will choose orthonormal basis functions for these
polynomials, and map these basis functions from ξ ∈ [−1, 1] to x ∈ [xi−1/2 , xi+1/2 ]
by ξi (x) = 2 x−xi i
...

x
If we define p−1 (ξ ) ≡ 0, p0 (ξ ) ≡ 1 and
p j (ξ ) =

2j − 1
j −1
ξ p j−1 (ξ ) −
p j−2 (ξ ),
j
j

(5
...

2j + 1

The polynomials p j (x) are easily generated by the three-term recurrence (5
...

So that our basis functions for the discontinuous Galerkin method are orthonormal,
we take
b j (ξ ) =

p j (ξ )
1
−1

1
= p j (ξ ) j +
...
37)

Note that for all j, b2 j (ξ ) is an even function of ξ and b2 j+1 (ξ ) is an odd function
of ξ
...
36) implies that p j (1) = 1 for
j ≥ 0
...

xi

It is sufficient that the Galerkin equations (5
...
In order to simplify the resulting Galerkin equations, let
us define




u i,0 (t)
b0 (ξ )

...

ui (t) = 
...


...

u i,k (t)

bk (ξ )

414

Methods for Scalar Laws

Then the Galerkin equations can be written in the form of a system of ordinary
differential equations in each mesh interval:
0=

d
dt

xi+1/2

b(ξi (x)) b(ξi (x)) ui (t) d x + b(1) f (R(b(1) ui (t), b(−1) ui+1 (t); 0))

xi−1/2

− b(−1) f (R(b(1) ui−1 (t), b(−1) ui (t); 0))−

xi+1/2
xi−1/2

db(ξi (x))
f (b(ξi (x)) ui (t)) d x
...

dt 2
dt 2

Eventually, a limiter will be used to replace the states in the Riemann problems
...


Then the system of ordinary differential equations is dui /dt = fi (t)
...
14
...
For the spatial integral of the flux, it
will be advantageous to use numerical quadrature rules that involve function values
at the ends of the integration interval
...
In general, if ξ0 = −1, ξm = 1 and ξ1 ,
...
38)

415

5
...

The first four rules are
1
−1

φ(x) d x ≈ φ(−1) + φ(1) (trapezoidal rule; exact for φ ∈ P 1 )


1
{φ(−1) + 4φ(0) + φ(1)} (simpson’s rule; exact for φ ∈ P 3 )
3



1
1
φ(−1) + 5φ − √
6
5



1
3
9φ(−1) + 49φ −
90
7

+ 5φ

1

5

+ φ(1)

(exact for φ ∈ P 5 )

+ 64φ(0) + 49φ

3
7

+ 9φ(1) (exact for φ ∈ P 7 )
...
These rules suggest that we pre-compute the values of b(ξ )
and b (ξ ) at the quadrature points, since these will be the same for all grid
cells
...
13)
...
14
...
The solution of this
minimization problem has error orthogonal to the space of piecewise polynomials
...

2
−1

This gives us a formula for ui (0)
...
Using the orthonormality of the
basis functions and the fact that the first basis function is constant, it is easy to see

416

Methods for Scalar Laws

that this value for ui (0) conserves the initial data:
xi+1/2

b(ξi (x)) ui (0) d x =

xi−1/2

=
=
=
=

1

1

b(ξ )
−1

−1

1

1

−1

−1

1



−1
1
−1

b(ξ )u xi + ξ

xi
xi
, 0 dξ dξ
2
2

b(ξ ) dξ b(ξ )u xi + ξ

2e0 b(ξ )u xi + ξ

u xi + ξ

xi
xi
, 0 dξ
2
2

xi
xi
, 0 dξ
2
2

xi
xi
, 0 dξ
2
2

xi+1/2

u(x, 0) d x
...
14
...
They suggest that we compute the cell averages
u i (t) ≡

1
xi

xi+1/2

U (x, t) d x = u i,0 (t)b0

xi−1/2

and the values of the solution at the cell boundaries
u i+1/2,L (t) ≡ U (xi+1/2 − 0, t) = b(1) ui (t),
u i−1/2, R (t) ≡ U (xi−1/2 + 0, t) = b(−1) ui (t)
...
If u(x, 0) ∈ C 2 , let M be a bound on the second spatial derivative
of the initial data near critical points
...

dx2

In practice, people often experiment with M until they achieve acceptable
results
...
If the polynomial order k is greater than 1 and |u i+1/2,L (t) − u i (t)| ≥ M x 2 , then u i+1/2,L (t)
is replaced by 1 u i, j (t)b j (1)
...
Let

5
...
Then
u i+1/2,L (t) = u i (t) +

s min{ u i−1/2 (t), u i+1/2 (t)},
0,

s = sign( u i−1/2 (t)) = sign( u i+1/2 (t))
otherwise
...
If we still have
2
u i (t) − |u i−1/2, R (t)| ≥ M x , then we use the minmod limiter
...
Then
u i−1/2, R (t) = u i (t) −

s min{ u i−1/2 (t), u i+1/2 (t)},
0,

s = sign( u i−1/2 (t)) = sign( u i+1/2 (t))
otherwise
...

Here the flux at the solution of the Riemann problem could be given either by the flux
at the exact solution of the Riemann problem, the Engquist-Osher flux (see Example
5
...
4), the Rusanov flux (see Section 3
...
4), or the Harten–Hyman modification of
the Roe solver (see Section 4
...
9)
...
38) to compute the
right-hand side fi (t) in the ordinary differential equations dui/dt = fi (t)
...
14
...

A C++ program to implement the discontinuous Galerkin schemes for a variety
of nonlinear scalar conservation laws can be found in Program 5
...
C,
which calls several Fortran subroutines in Program 5
...
f
...
14-82: LinearAdvectionSchemes
...
Students can exercise the former program by
clicking on Executable 5
...
14-40:
guilinearad2 By setting the number of cells to 0, the user will cause the program to perform a mesh refinement study
...
Also, the numerical solution and analytical solution are plotted throughout each mesh interval, so that the students can
see the behavior of the piecewise polynomials as time evolves, or as the mesh is
refined
...
14
5
...
1 Show that the first-order discontinuous Galerkin scheme, which uses piecewise constant polynomials, is the same as Godunov’s method
...
14
...


5
...

For nonlinear problems, we might also want to know which of the numerical fluxes
are best
...
The answers, of course, depend on the intended application
...
For Riemann problems, none of the schemes is better than second-order
accurate
...
Thus, it might appear that the
nominal high order of some schemes will be apparent in the numerical results only
at small time for nonlinear conservation laws, or for problems also involving some
reasonable amount of physical diffusion
...
These results do not by any means
determine the suitability of a scheme in general
...
The timestep
was chosen to be 90% of the stability limit for each scheme
...
Also note that the errors
are measured differently for the discontinuous Galerkin method
...

5
...
1 Case Study: Linear Advection
Consider the linear advection problem with periodic boundary conditions
∂u
∂u
+
= 0 for all x ∈ (0, 1) for all t > 0
∂t
∂x
u(1, t) = u(0, t) for all t > 0
u(x, 0) given, for all x ∈ (0, 1)
...
15 Case Studies

419

Zalesak [180] proposed several initial values for testing schemes applied to this
problem:
square pulse: u(x, 0) =

2, 0
...
2
1, otherwise

triangular pulse: u(x, 0) =

2 − 20|x − 0
...
1 ≤ x ≤ 0
...
15)2 ) − exp(−25), 0
...
2
1,
otherwise
...
We
have performed several numerical experiments with the schemes described in this
chapter for these test problems
...
5 ), while the higher-order
schemes were all roughly O( x 0
...
For a given (fine) mesh, the most accurate
second-order schemes were the side-centered wave propagation, MUSCL, TVD
and the Nessyahu–Tadmor scheme
...

Second-order ENO was the least accurate and least efficient, and discontinuous
Galerkin was not much better
...
The most accurate schemes were PPM,
discontinuous Galerkin, wave propagation and the Liu–Tadmor scheme, while the
most efficient schemes were PPM, wave propagation, Liu–Tadmor and then discontinuous Galerkin
...

For the triangular pulse, the upwind scheme was O( x), while most of the higherorder schemes were O( x 1
...
All of the second-order schemes obtained roughly the
same accuracy for a given mesh size, except the discontinuous Galerkin and ENO
schemes, which were less accurate
...
Of wave propagation and the
third-order schemes, the most accurate were discontinuous Galerkin, followed by
Liu-Tadmor, PPM, second-order wave propagation and third-order ENO
...
The most efficient of wave propagation and the third-order schemes
were wave propagation, PPM, Liu–Tadmor and discontinuous Galerkin; ENO was
the least efficient
...


420

Methods for Scalar Laws

(a) PPM

(b) Liu–Tadmor

(a) Third-order ENO

(b) Third order Discontinuous Galerkin

Fig
...
5 Comparison of schemes for linear advection Gaussian pulse, 100 grid cells

For the smooth Gaussian pulse, upwind was first-order, the second-order schemes
were all second-order, and the third-order schemes were mostly somewhat over
second order, typically around O( x 2
...
In this case, we could determine that the
second derivative of the initial data at the critical point x = 0
...
Figure 5
...
Note that the peak
values of the solution are reduced substantially with PPM and the Liu–Tadmor
schemes; third-order ENO is far worse
...
15 Case Studies

(a) Second order accuracy

(b) Second order efficiency

(a) Third-order accuracy

(b) Third-order efficiency

Fig
...
6 Comparison of schemes for linear advection Gaussian Pulse (box =
MUSCL, diamond = TVD, box plus = wave propagation, box cross = NessyahuTadmor, diamond plus = Liu–Tadmor, diamond cross = PPM, box plus cross =
ENO, diamond plus cross = discontinuous Galerkin)

and after the pulse
...

The least accurate and least efficient second-order schemes were ENO and discontinuous Galerkin, with the other schemes all roughly the same
...
Discontinuous Galerkin

422

Methods for Scalar Laws

(a) Accuracy

(b) Efficiency

Fig
...
7 Comparison of wave propagation and third-order schemes for linear
advection Gaussian pulse, unlimited discontinuous Galerkin (box = MUSCL,
box cross = Nessyahu–Tadmor, box plus cross = ENO, diamond plus cross =
discontinuous Galerkin)

was most accurate at coarse meshes but then the limiter caused a convergence failure; ENO was generally the least accurate third-order scheme
...
These results are displayed in Figure 5
...

Since it is possible that our implementation of the discontinuous Galerkin limiter
has an error, to produce Figure 5
...
For
this problem, wave propagation had order 1
...
3, Liu–Tadmor had
order 2
...
3 and third-order discontinuous Galerkin
had order 3 for coarse mesh and 1
...
In this case, the discontinuous Galerkin method was nearly as efficient as the best third-order schemes
...
15-41: guilinearad2 By setting the number of cells to 0,
the user will cause the program to perform a mesh refinement study
...
The errors for the other schemes are the sums of the
absolute values of the errors in the cell averages, times the mesh width
...
15
...

∂t
∂x

-0
...
5

1

-1
...
25

-2

log(error)

-1
...
5

-2
...
75

-2
...
5

3

3
...
5

1

-

0

-

-0
...
5

-

-2

-

-2
...
5

1
...
5

-3
-4
...
5

-3
...
5

-2
...
75

-

2
...
25

-

2

-

1
...
5

log(time)

- log(dx)

log(error)

0

-

-1

-

-

-1
...
5

-1
...
5

-

-

-3

-

3
...
75

-

2
...
25

-

-

-

2

-1
...
2

1
...
15 Case Studies

- log(dx)

(c) Shock accuracy

log(time)

(d) Shock efficiency

Fig
...
8 Comparison of approximate Riemann solvers for Burgers’ transonic
rarefaction (u L = −1, u R = 1) and Shock (u L = 2, u R = −1) (box = exact,
diamond = Rusanov, box plus = Marquina, box cross = Harten–Hyman, diamond
cross = Harten–Lax-vanLeer, box plus cross = Linde, diamond plus cross =
Engquist–Osher)

First, we considered a transonic rarefaction (u L = −1, u R = 1)
...
8)
...
These all performed better than the flux at the
true solution of the Riemann problem
...
The most

424
3

3
...
5

1

2

-

-

-

1
...
5

3

-2
-2
...
5

-3

log(error)

-4
...
5

-5
...
5

-6

-6

- log(dx)

log(time)

(a) Second-order accuracy
2

-3

(c) Third-order accuracy

0

1

2

-1

-1

-1
...
5

log(error)

-2

-2
-2
...
5
-4
log(time)

-2

-2
...
5

-1

-4

-2

(b) Second-order efficiency

-1

-3

log(error)

-

-

-0
...
5

-1
-1
...
5
-3
-3
...
5

3
...
75

-

2
...
25

-

-

-

2

-

1
...
5
...
These results
appear at the bottom of Figure 5
...

Among the second-order schemes applied to the transonic rarefaction, the
MUSCL scheme was most accurate and most efficient, followed closely by the
Nessyahu–Tadmor scheme (see Figure 5
...
The ENO and discontinuous Galerkin
schemes were the least accurate and least efficient
...
15 Case Studies

(a) Second-order accuracy

(b) Second-order efficiency

(a) Third-order accuracy

(b) Third-order efficiency

Fig
...
10 Comparison of Schemes for Burgers’ Strong Shock (u L = 2, u R = −1)
(box = TVD, diamond = MUSCL, diamond cross = side-centered wave propagation, box cross = PPM, diamond plus = Nessyahu–Tadmor, box plus cross =
Liu–Tadmor, diamond plus cross = ENO, box diamond = discontinuous Galerkin)

because of the differences in the schemes)
...
Among MUSCL and the third-order schemes, MUSCL and PPM were
most accurate and efficient, while discontinuous Galerkin and Liu–Tadmor were
least accurate and efficient
...

Of the second-order schemes, the most accurate and efficient for a strong shock
(u L = 2, u R = −1) were MUSCL and wave propagation, while the least accurate and efficient were discontinuous Galerkin and ENO (see Figure 5
...
In a

426

Methods for Scalar Laws

(a) Shock

(b) Rarefaction

Fig
...
11 Comparison of approximate Riemann solver for Buckley–Leverett
shock–rarefaction–shock (u L = 0
...
999) (box = exact, diamond
= Rusanov, box plus = Marquina, box cross = Harten–Hyman, diamond
cross = Harten–Lax–vanLeer, box plus cross = Linde, diamond plus cross =
Engquist–Osher)

comparison of MUSCL with the third-order schemes, the most accurate and efficient were MUSCL and PPM
...

We also compared the schemes for a weak shock (u L = 1, u R = 0
...
All of the
approximate Riemann solvers achieved essentially the same accuracy, and nearly
the same efficiency
...

Runge–Kutta schemes have also been known to develop spurious oscillations and
convergence to unphysical solutions for nonlinear problems [179]
...
These schemes are accurate for problems with
smooth initial data, but their performance on the Riemann problems we have tested
is not competitive
...
15-42: guiriemann2
By setting the number of cells to 0, the user will cause the program to perform a
mesh refinement study
...
15
...
2
...
In our experiments, the

427

5
...
5
...
001, u R = 0
...
Students should experiment on their own to verify this claim
...
15
...
In this comparison, all of the numerical fluxes performed
similarly, with the Harten-Hyman flux slightly more accurate and efficient, and
the Rusanov flux slightly less
...
11 Comparisons
of schemes appear in Figure 5
...
In this case, the accuracy of the discontinuous
Galerkin scheme is poor because it appears to be converging to a solution involving
two discontinuities and an intermediate constant state (see Figure 5
...
)

428

Methods for Scalar Laws

(a) Second-order accuracy

(b) Second-order efficiency

(c) Third-order accuracy

(d) Third-order efficiency

Fig
...
13 Comparison of Schemes for Buckley–Leverett shock–rarefaction–Shock
(u L = 0
...
999) (box = TVD, diamond = MUSCL, diamond cross =
side-centered wave propagation, box cross = PPM, diamond plus = Nessyahu–
Tadmor, box plus cross = Liu–Tadmor, diamond plus cross = ENO, box diamond
= discontinuous Galerkin)

Exercises for 5
...
15
...
Zalesak’s smooth Gaussian requires a large number of grid cells to look smooth to the
numerical computation
...
Remember to use period boundary
conditions
...
15 Case Studies

5
...
2 Choose one of the schemes in this chapter and compare its performance on linear advection with
Zalesak’s smooth Gaussian, and with initial data
u 0 (x) = 1 + exp(−625(x/2 − 1)2 )
...
15
...
5,
0
...
7 cos(2π x),

x < 0
...
5

for a problem with periodic boundary conditions
...
5) to determine the analytical solution for this problem
...

(b) Program the MUSCL scheme for this problem, and run the method until the solution develops
a shock
...
How does the
development of the shock degrade the accuracy of the scheme?
5
...
4 Cockburn and Shu [29] suggested the initial data
1 1
+ sin π x
4 2
for Burgers’ equation
...

5
...
5 LeVeque [97, page 205] shows results for traffic flow with initial data apparently given by a
smooth Gaussian
u 0 (x) =

u 0 (x) = 0
...
75 exp(−0
...

(a) Use equation (3
...
Your solution should
be in the form of an algorithm
...

(c) Plot the L1 error in the cell averages for your solution as a function of time
...
15
...
25, ρ R = 1
...

5
...
7 Repeat the previous exercise for a green light (LeVeque [97, page 207]) ρL = 1
...
using
the second-order ENO scheme
...
15
...
5) of the conservation law for f (u) to
find an analytical solution for f (u, x) in smooth flow
...

Verify that your scheme is first-order accurate for u max (x) = 2 + sin(π x) and u 0 (x) =
sin2 (π x) where x ∈ (−1, 1)
...
Verify that your scheme is
second-order accurate
...
15
...
15
...
15
...
15
...
15
...

(a) Formulate the integral form of this conservation law
...
5) of the conservation law with no source
terms to find an analytical solution for traffic flow with a source term
...
Verify that
your scheme is first-order accurate
...
Program Godunov’s method for this problem, including reflecting boundary
conditions
...
The steady-state solution
will have oil on the top and water on the bottom
...
2
...

Oil is produced from reservoirs by wells
...
In the plane between the injector
and producer, flow can look roughly one-dimensional, with the injector on the left and the
producer on the right
...
2
...
If the oil reservoir currently has oil saturation so and gravity
number Kg(ρw − ρo )/vT (with ρw > ρo ), determine conditions on so so that fluid flows into
the reservoir from the injector, and out of the reservoir into the producer
...
1
...

In order to produce oil at a specified rate, the pressure at the injector has to be adjusted so that
the desired rate is maintained
...
2
...
Find the analytical solution of this
pressure equation
...
This method depends on the special circumstances in
the formulation of the Buckley-Leverett flux, described in section 3
...
3
...
Phase pressures differ by the capillary pressure, which
is ignored in this form of the Buckley–Leverett model
...
15 Case Studies

431

the phase mobilities λ j = κr j (s j )/µ j , which are phase relative permeability divided by phase
viscosity, to be given by
λ j,i+1/2 =

ψ j,i+1/2 ≥ 0
λ j (s j,i ),
λ j (s j,i+1 ), ψ j,i+1/2 < 0
...

κi + κi+1

The flux of oil is chosen to be
f o,i+1/2 = κi+1/2

ψ j,i+1/2 λ j,i+1/2
...
w

The oil saturation is updated by the conservative difference
sin+1 φi = sin φi −

tn
n
n
[ f i+1/2 − f i−1/2 ] ≡ H (si−1 , sin , si+1 )
...
2
...
Determine how the timestep should be chosen to guarantee that upstream
weighting is monotone
...
However, generalizing the numerical methods of Chapter 5 to hyperbolic systems poses a challenge,
because there are multiple conserved quantities and multiple characteristic speeds
...
As a result,
the theory of numerical methods for nonlinear systems of hyperbolic conservation
laws is even more primitive
...

6
...

∂t
∂x
We will present three first-order schemes for this problem: the Lax–Friedrichs
scheme, the random choice scheme and the Godunov (or upwind) scheme
...
The front tracking scheme
typically requires substantially different data structures from the other schemes in
this text, and its correct implementation for general multi-dimensional problems is
very difficult
...
1
...
2
...
This
scheme involves two half-steps:
n+1/2

n+1/2
u j+1/2 = un x j + un
[f(un ) − f(un )]
j
j+1 x j+1 − t
j+1
j

432

1
x j + x j+1

433

6
...

2

Both of these steps are conservative differences
...
In practice,
it is common to look only at the characteristic speeds associated with the discrete
states, and reduce the timestep by a safety factor (say 0
...

Note that the only characteristic information needed for this method is a bound
on the maximum absolute value of the characteristic speeds, in order to determine a
stable timestep
...
However, the scheme is very diffusive and requires two halfsteps on a staggered grid
...
1-83: schemes
...


6
...
2 Random Choice Method
The random choice method can be implemented in the following form
...

j
j+1
Here ξ is a uniformly distributed random number
...
The timestep is chosen as
in the Lax–Friedrichs scheme
...
1-84: schemes
...

One advantage of the random choice method is that it has no numerical diffusion
...
On the other hand, it tends to
approximate rarefactions in a staircase fashion
...
See [31, 151] for discussions of
these better approaches
...
1
...
At each cell side, we find the flux at
the solution of a Riemann problem:
n+1/2

f j+1/2 = f(R(un , un ; 0))
...

xj

(6
...
We discussed methods
for solving the Riemann problem in the case studies of Chapter 4, and methods for
approximating the solution of the Riemann problem in Section 4
...
We will review
the approximate Riemann solvers below
...
1
...
1 Godunov’s Method with the Rusanov Flux
Rusanov’s flux was described previously in Section 4
...
2
...
First, we
j
j+1
compute the fluxes at the cell centers by
fjn = f(un )
...

2
Here ρ refers to the spectral radius, which is the maximum absolute value of an
eigenvalue of the matrix argument
...
1)
...
1-85: schemes
...
This flux computation is combined
with a conservative difference in procedure runScheme in Program 6
...
C
...

j+1
j
j+1
j

Then we could perform the conservative difference in flux increment form

+
un+1 = un − [ f j+1/2 + f j−1/2 ]
j
j

t n+1/2

...
2)

435

6
...
However, the scheme is first order and diffusive (although usually
not so diffusive as the Lax–Friedrichs scheme)
...
1
...
2 Godunov’s Method with the Harten–Lax–vanLeer (HLL) Solver
In Section 4
...
10 we discussed a technique for approximating the solution of Riemann problems by using a single intermediate state
...


and λ and λ are lower and upper bounds on the characteristic speeds in the solution
of the Riemann problem involving states uL and u R
...
For each cell j, compute the flux
f jn = f(un ),
j
and compute the minimum characteristic speed λn j and the maximum characteristic
1,
speed λm, j
...
Also compute the lower and upper
j
j+1
2
n
bounds, λn
and λ j+1/2 ; for gas dynamics, a good choice is
j+1/2
n
n
λn
j+1/2 = min{λ1, j , λ1, j+1/2 }
n

λ j+1/2 = max{λn j+1 , λn j+1/2 }
m,
m,
Also at the cell side, compute the solution increment and flux
n
n
u j+1/2 = u j+1 − u jn
 n
fj ,



n
n
f j+1/2 = f j+1 ,

 n n
n
 f λ
n
n
n
 j j+1/2 − f j+1 λn
j+1/2 + u j+1/2 λ j+1/2 λ j+1/2

λn
j+1/2 > 0
n

λ j+1/2 < 0
1
,
n
λ j+1/2 −λn
j+1/2

Finally, for each cell j perform the conservative difference (6
...


otherwise
...
1-87: shallow-water
...
1-88: gas-dynamics
...
The
pointer to this function is passed to procedure runScheme in Program 6
...
C, and combined with a conservative difference
...
For
each cell j, compute the minimum and maximum characteristic speeds λn j and
1,
n
and λ j+1/2 as
λn j , and flux f jn as before
...
At the cell sides, also compute the increments
n
n
un
j+1/2 = u j+1 − u j
n
n
f j+1/2 = f j+1 − f jn
...


Finally in each cell j perform the conservative difference (6
...

6
...
3
...
13
...
The algorithm proceeds as follows
...
For each
j
cell side j + 1 , find the Roe matrix An
j+1/2 so that
2
n
n
n
f(u j+1 ) − f(un ) = An
j
j+1/2 (u j+1 − u j ),

and find the eigenvectors Xn
j+1/2 and eigenvalues

n
j+1/2

n
n
An
j+1/2 X j+1/2 = X j+1/2

n
j+1/2
...
For each cell side j + 1/2 and
each transonic wave family i, meaning that wave i is not linearly degenerate and

6
...


For all other waves, the component of the vector of wave-field decomposition
coefficients an
j+1/2 is given by
ei an
j+1/2 = |ei

n
j+1/2 ei |ei

yn
j+1/2
...

2
Next, perform the conservative difference (6
...

A Fortran version of the Harten–Hyman flux computation for the shallow
water equations is available as subroutine harten-hyman-sw in Program 6
...
f; the corresponding subroutine for gas dynamics is subroutine
harten-hyman-gd in Program 6
...
f
...
1-92: GUIRiemannProblem
...

Alternatively, we can implement the Harten–Hyman scheme in terms of flux
increments
...
For genuinely
n
n
nonlinear transonic rarefaction waves, meaning that i, j < 0 < i, j+1 , we have
the following prescription for entries of the vector of wave-field decomposition
coefficients:
1 n
+
n
n
n
n
n
ai, j+1/2 =
− i, j βi, j+1/2 + i, j+1 (1 − βi, j+1/2 ) yi, j+1/2
(6
...
3b)
ai, j+1/2 =
2 i, j+1/2
For all other entries, we have
n+1/2

n
n
f j+1/2 = f jn + f j+1 − Xn
j+1/2 a j+1/2

+
ai, j+1/2 =

ai, j+1/2 =

n
n
i, j+1/2 yi, j+1/2 ,

0,
n
n
i, j+1/2 yi, j+1/2 ,

0,

n
i, j+1/2
n
i, j+1/2
n
i, j+1/2
n
i, j+1/2

>0
≤0

(6
...
4b)

These allow us to compute the positive and negative flux increments

n
f−
j+1/2 = X j+1/2 a j+1/2

and

and perform the conservative difference (6
...


+
n
f+
j+1/2 = X j−1/2 a j+1/2

(6
...
1
6
...
1 Describe the use of Linde’s approximate Riemann solver (see Section 4
...
11) for nonlinear
hyperbolic systems
...
1
...
4
...
The method begins by solving eigenvalue problems at the cell
centers, and finding the wave-field decompositions of the conserved variables and the flux:
∂f n n
(u )X = Xn
j
∂u j j
n n
n
Xjyj = uj

n
j

Xn zn = f(u n )
...

j+1
2 i
The flux at the cell side is then given by

n
[Xn ei ei · z+
j
j+1/2 + X j+1 ei ei · z j+1/2 ]
...
Test this scheme for various problems involving shallow water
...
2 Second-Order Schemes for Nonlinear Systems
6
...
1 Lax–Wendroff Method
For nonlinear systems, it is useful to view the Lax–Wendroff scheme as a predictor–
corrector scheme
...
This gives us the following
algorithm
...
For each cell side j + 1/2
j
compute the conserved quantities
n+1/2

n
n
u j+1/2 = u j+1 x j + un x j+1 − [f j+1 − f jn ] t n+1/2
j

1
x j + x j+1

6
...
Finally, for each cell j compute
n+1/2

n+1/2

un+1 = un − f j+1/2 − f j−1/2
j
j

t

...

This scheme has been implemented as subroutine lax-wendroff in Program
6
...
f
...
2
...

j
2 j
On odd numbered steps, the differencing to the left is performed first
...
In practice, this method would be combined with a numerical
diffusion (see Section 4
...
2)
...
2-94: schemes
...


6
...
3 Higher-Order Lax–Friedrichs Schemes
The second-order version of the Lax–Friedrichs scheme for nonlinear systems of
conservation laws is similar to the scheme for scalar laws [121]
...

Next, we compute the component-wise limited slopes in the conserved quantities
in each cell j:
n
ei un = limiter(ei un
j
j−1/2 , ei u j+1/2 )
...

4 xj
n+1/4

n+1/4

Then we compute the flux variables w j
from u j
, and the flux f j
=
n+1/4
1
)
...

x j + x j+1

t n+1/2

n+1/2

n+1/2

n+1/2

The second half-step is similar
...
Then at each cell side we limit the slopes component-wise by
n+1/2

n+1/2

ei u j+1/2 = limiter(ei u j
n+1/2

n+1/2

, ei u j+1 )
...

2( x j + x j+1 )
n+3/4

n+3/4

Then we compute the flux variables w j+1/2 from u j+1/2 , and the flux f j+1/2 =
n+3/4
f(w j+1/2 )
...

xj

This scheme has been implemented as subroutine nessyahu-tadmor in
Program 6
...
f
...
The piecewise quadratic reconstruction of the
solution is determined for each component of the solution vector u as in Section 5
...


441

6
...


The integrals of the reconstructions are computed component-wise as in Equations
(5
...
The flux integrals are approximated by Simpson’s rule, which requires values
of the flux at u(x j , t n + τ ) for τ = t n+1/2 /4 and τ = t n+1/2 /2
...

∂t
∂t 2

(6
...

Since f is a function of u, and ∂u/∂t + ∂f/∂ x = 0, the chain rule implies that
∂u
∂f
∂f ∂u
=−
=−

...

∂u j ∂uk ∂ x 2

j

∂u j
∂t

k

∂fi ∂
∂u j ∂ x

∂f j ∂uk
∂uk ∂ x

∂fi ∂ 2 f j ∂u ∂uk
∂u j ∂uk ∂u ∂ x ∂ x

442

Methods for Hyperbolic Systems

Let us define the matrices
∂f
∂ 2 fk
and G(k) =

...
Then
F=

∂u
∂u
= −F
∂t
∂x
∂u
∂ 2u
=
ei
2
∂t
∂x
i

(6
...

∂x
∂x

(6
...

Of course, the conserved quantity vector u and the flux vector f are actually
functions of the vector of flux variables w
...

∂w
∂w
∂w∂w
∂w∂w
Then the matrix of flux derivatives with respect to the conserved quantities is
evaluated by
F=

∂f
∂f
=
∂u
∂w

∂u
∂w

−1

= FA−1
...

∂wk
∂wk
We can compute the components of the matrix G(k) by
∂fk

∂fk
=
∂ui ∂u j
∂u j ∂ui
∂fk ∂wm

=
∂wm ∂ui
m ∂w

ei G(k) e j =

∂w
∂u j

∂ 2 fk ∂wm ∂w
+
∂wm ∂w ∂ui ∂u j

=
m

−1

=

m

∂fk
∂A−1 ∂w
em
ei
∂wm
∂w
∂u j

−1

em G(k) e em A ei e A e j
m

ek Fem em A−1 e p e p


m

p

q

∂A
eq eq A−1 ei e A−1 e j
...
8)

443

6
...


(6
...
6) by evaluating each of the time derivatives
of u in (6
...
8) and (6
...

This scheme has been implemented as subroutine liu-tadmor in Program
6
...
f
...
2
...
Following LeVeque [97, pp
...

Lemma 6
...
1 For a constant coefficient hyperbolic system
∂u
∂u
+A
=0
∂t
∂x
with A = X X−1 , the total variation of the characteristic expansion coefficients
y = X−1 u has constant total variation, but the total variation of the solution u can
grow by a factor of the condition number of X in any given time interval
...

∂t
∂x
We can easily solve these scalar equations to get y j (x, t) = y j (x − λ j t, 0)
...

j

y j (x + , t) − y j (x, t)

1

dx

1

dx

444

Methods for Hyperbolic Systems

However, the total variation in the solution u can increase:
T V (ui (x, t)) = lim sup
= lim sup

i



1
1

→0

−∞


→0

≤ X
= X

1

−∞

lim sup



−∞

lim sup

1

1



1

→0

j



1

→0

dx
1

y(x + , t) − y j (x, t)

−∞

lim sup

1

1

X[y(x + , t) − y j (x, t)]

1

→0

j

= X

ui (x + , t) − ui (x, t)

−∞


dx
1

dx

|y j (x − λ j t + , t) − y j (x − λ j t, t)| d x
|y j (x + , 0) − y j (x, 0)| d x

y(x + , 0) − y(x, 0)

= X

1

lim sup

= X

1

lim sup

≤ X

1

X−1

= X

1

X−1 1 T V (u(x, 0))
...

In designing numerical schemes, it is common to limit variations in the characteristic expansion coefficients of nonlinear systems of conservation laws
...
At each cell side j + 1 ,
2
we assume that we have a Roe decomposition
n
n
n
f j+1 − f jn = An
j+1/2 [u j+1 − u j ],

where the Roe matrix is diagonalizable:
n
An
j+1/2 = X j+1/2

n
n
−1
j+1/2 (X j+1/2 )
...


445

6
...
13
...
We
compute


λi, j+1/2

+
λi, j+1/2


n
λn −λi,
n
n
n
 λi, j max 0, min 1, i,λj+1 −λj+1/2 , λi, j < 0 < λi, j+1
n
n

i, j
i, j+1
n
n
= λn
(λi, j ≥ 0 or λi, j+1
 i, j+1/2 ,

n
n
0,
(λi, j ≥ 0 or λi, j+1

n
λi,
−λn
n
n
n
 λi, j max 0, min 1, λnj+1/2−λni, j ,
λi, j < 0 < λi, j+1

i, j
i, j+1
n
n
= 0,
(λi, j ≥ 0 or λi, j+1

 n
n
n
(λi, j ≥ 0 or λi, j+1
λi, j+1/2 ,

n
≤ 0) and λi, j+1/2 < 0
n
≤ 0) and λi, j+1/2 ≥ 0

n
≤ 0) and λi, j+1/2 < 0
n
≤ 0) and λi, j+1/2 ≥ 0

Then the Harten–Hyman flux is given by

n
n
Xn
j+1/2 ei λi, j+1/2 ei y j+1/2 = f j+1 −

n
fL
j+1/2 = f j +
i

+
n
Xn
j+1/2 ei λi, j+1/2 ei y j+1/2
...
3) or (6
...
5), and
the new low-order solution by
n
L
n
u L = un − (f L
j
j
j+1/2 − f j ) − (f j−1/2 − f j )

= un −
j

+
f−
j+1/2 + f j−1/2

t n+1/2
xj

t n+1/2

...
5) applied to the Harten–Hyman flux
would give us
n
f j+1/2 = f jn x j+1 + f j+1 x j −

∂f n
f n − f jn
∂u j+1/2 j+1

t n+1/2

1

...

x j + x j+1

Following the ideas for scalar laws in Section 5
...

j+1/2 y j+1/2
x j + x j+1

+
n
j+1/2 y j+1/2

+
+
We will limit g+
j−1/2 and g j+1/2 component-wise to get g j ; similar limiting will
produce g−
...

n+1/2

Sweby prefers to use this flux in increment form:
+

+

n
un+1 = un − Xn
j
j+1/2 g j − g j+1 − X j−1/2 g j−1 − g j
j

t n+1/2

...
Flux-corrected transport used
a diffusive step followed by an anti-diffusive step designed to steepen fronts
...

Lately, the MUSCL and wave propagation schemes have been more popular than
the TVD schemes
...
2 Second-Order Schemes for Nonlinear Systems

447

The TVD scheme has been implemented as subroutine tvd in Program 6
...
f
...
2
...
We will work with the flux variables w, and compute the characteristic information at each cell center as follows:
∂u n n n
∂f n n
Yj =
Y

...
The justification is that the characteristic expansion approximately decouples the system of conservation laws into separate scalar laws, for
which it is known that the analytical solution does not produce new extrema
...


x j−1 + x j + x j+1

Then we compute the limited characteristic expansion slopes component-wise
n
zi, j =

n
n
n
n
zn
sign(˜ i, j ) min{2|zi, j+1/2 |, 2|zi, j−1/2 |, |˜ i, j |}, (zi, j+1/2 )(zi, j−1/2 ) ≥ 0
zn
0,
otherwise
...

2 i j+1

This scheme has been implemented as subroutine musclwave in Program 6
...
f
...

x j−1 + x j + x j+1

448

Methods for Hyperbolic Systems

Slope limiting in the flux variables is performed component-wise
...

j j
j
Our next step is to compute flux variables at the cell sides:
n+1/2, L

Yn ei 1 −
j

w j+1/2 = wn +
j

(λi )n t n+1/2
j
xj

i
n+1/2, R

Yn ei 1 +
j

w j−1/2 = wn −
j

(λi )n t n+1/2
j
xj

i

1
e zn ,
2 i j
1
e zn
...
2-99:
schemes
...

Limiting slopes in characteristic expansion coefficients makes sense for problems
with smooth flux functions and distinct characteristic speeds, such as gas dynamics
...
For example, in polymer flooding the characteristic speeds can
coalesce with a single characteristic direction, and so the characteristic expansion
coefficients can become very large, corresponding to unphysical intermediate states
in the Riemann problem
...

No matter which way the limiting is performed, we use the left and right states
to solve a Riemann problem and compute a flux:
n+1/2

n+1/2, L

n+1/2, R

f j+1/2 = f R(w j+1/2 , w j+1/2 ; 0)
...

xj

6
...
6 Wave Propagation Methods
LeVeque [97] suggests an approach that combines aspects of both slope limiter and
TVD schemes
...


449

6
...


The conservative difference could be written in the form
t n+1/2
xj

n
n
n
un+1 = un − (fn
j
j+1/2 − f(u j )) − (f j−1/2 − f(u j ))
j

= un − Xn
j
j+1/2


n
j+1/2

+
n
j−1/2

n
an
j+1/2 + X j−1/2

an
j−1/2

t n+1/2

...

xj

The decomposition of the flux differences into waves varies with the method
used to approximate the flux in the solution of the Riemann problem
...
13
...
90), for Roe’s flux we would use (4
...
8), for the Harten–
Hyman modification of Roe’s flux we would use (6
...
4) and (6
...
97), and for Linde’s flux we would use
(4
...
These computations depend on the physical model
...
At
each cell side j + 1 and for each wave family i we compute a limited wave-field
2
decomposition coefficient

n
n
n
n
 φ (X j−1/2 ei ) (X j+1/2 ei ) e an

i j−1/2 , ei a j+1/2 , ei
j+1/2 ei ≥ 0
Xn
ei 2
j−1/2
n
˜
ei a j+1/2 =
(6
...
Then the second-order flux increments are computed
at each cell side by
n+1/2

f j+1/2 = Xn
j+1/2 |

n
j+1/2 |

I −|

n
j+1/2 |

2 t n+1/2
˜ j+1/2
...

2

450

Methods for Hyperbolic Systems

We have implemented this scheme as subroutine wave-propagation in Program
6
...
f
...
This is equivalent to using a
j+1/2 = ∂u (
2
form of the weak wave Riemann solver described in Section 4
...
4
...


we could solve
n
n
n
Xn
j+1/2 a j+1/2 = u j+1 − u j

for an
j+1/2 , and compute the first-order flux increment
fn =
j

Xn
j−1/2 (

n
+ n
j−1/2 ) a j−1/2

+

Xn
j+1/2 (

n
− n
j+1/2 ) a j+1/2
...
Then the second-order flux increments are computed
in each cell by
n+1/2

f j, R

n+1/2

f j,L

t n+1/2 n
˜
a j+1/2
xj
t n+1/2 n
˜
a j−1/2
...

2

Randy LeVeque has developed a library of routines for solving hyperbolic conservation laws, called CLAWPACK
...
2-101: CLAWPACK
...
2
...
2 Second-Order Schemes for Nonlinear Systems

hyperbolic systems
...
32) to get the limited slopes sn
...

x j+2 + x j+1 + x j + x j−1

The values wn
j+1/2 of the flux variables are then limited component-wise as in the
L
scalar case to produce values w R
j−1/2 and w j+1/2 ; these give the quadratic reconstruction
wn (x) = a j + {b j + c j (1 − ξ (x))}ξ (x)

where

ξ (x) =

x − x j−1/2
,
xj

n
L
R
L
in which a j = w R
j−1/2 , b j = wh+1/2 − w j−1/2 and c j = 6w j − 3(w j+1/2 +
wR
j−1/2 )
...
Here the computations proceed as for a
hyperbolic system with constant coefficients A = X X−1
...
1
...


u(x, t) =
i

Our flux variables satisfy
∂w
∂w
+ Y Y−1
=0
∂t
∂x

452

Methods for Hyperbolic Systems

where
∂f
∂u
Y=
Y
...
We have implemented this scheme
as subroutine ppm in Program 6
...
f
...
2
...
This could be done by using
Roe’s approximate Riemann solver (see Section 4
...
8), or by computing the flux
derivatives at the average of the the states in cell j and j + 1
...


Throughout the algorithm, they compute the divided difference table for each
−1 n
component of (Xn
j+1/2 ) f j+k , with the divided difference table being appropriately


...
2 Second-Order Schemes for Nonlinear Systems

upwinded based on the sign of the corresponding eigenvalue in n
j+1/2
...
13 above
...


The Runge–Kutta steps for time integration are the same as in the scalar algorithm
...
2-103:
GUIRiemannProblem
...
The ENO divided difference table is computed in subroutine
eno-rf in Program 6
...
f
...
2
...
14
...

dx

Let b(ξ ) be the vector of orthonormal Legendre polynomials on ξ ∈ (−1, 1), defined
in equation (5
...
The Galerkin approximation will approximate the solution in
the form
for all x ∈ (xk−1/2 , xk+1/2 ), u(x, t) = Uk (t)b(ξk (x))

where

ξk (x) = 2

x − xk

...
The weak form of the conservation law is replaced by a weak
form with b(x) replaced by an arbitrary polynomial of degree at most k
...

dx

454

Methods for Hyperbolic Systems

The orthonormality of the entries of b(ξ ) then gives us the system of ordinary
differential equations
dUk
2
=
−f(R(Uk (t)b(1), Uk+1 (t)b(−1); 0)) + f(R(Uk−1 (t)b(1), Uk (t)b(−1); 0))
dt
xk
1

+

−1

f(Uk (t)b(ξ ))b (ξ ) dξ
...

2

As in the scalar case, the integrals are replaced by Lobatto quadrature rules:
1
−1

Q

φ(ξ ) dξ ≈

φ(ξq )αq , −1 = ξ0 < ξ1 <
...

q=0

Thus our quadrature rule approximation gives us initial values
Q

Uk (0) =

u xk +
q=0

ξq xk
, 0 αq b(ξq ) ,
2

and ordinary differential equations
2
dUk
=
dt
xk

−f (R (Uk (t)b(1), Uk+1 (t)b(−1); 0))
+ f (R (Uk−1 (t)b(1), Uk (t)b(−1); 0))
Q

f Uk (t)b(ξq ) αq b (ξq )

+


...
This requires several modifications of the discontinuous Galerkin formulation
...
Let
ξ0 xk
ξ Q xk
˜
Wk (t) = w xk +
, t ,
...
2 Second-Order Schemes for Nonlinear Systems

455

be the array of flux variables at the Lobatto quadrature points for grid cell k
...

q=0

The values of the initial solution at the Lobatto quadrature points are Uk (0)b(ξq );
these are possibly different from the initial values of the conserved quantities evaluated as functions of the flux variables at the quadrature points
...
Also, the ordinary differential equations must be modified to provide
flux variables for arguments to the flux:
dUk
2
=
dt
xk

− f(R(Wk (t)e Q , Wk+1 (t)e0 ; 0))
+ f(R(Wk−1 (t)e Q , Wk (t)e0 ; 0))
Q

+

f(Wk (t)eq )αq b (ξq )


...

Limiting is performed on the conserved quantities component-wise, as in the
scalar case
...
From these
limited conserved quantities we can determine vectors of flux variables wk+1/2,L (t)
and wk−1/2, R (t) for use in evaluating the fluxes
...
2-105: dgm
...

Exercise for 6
...
2
...
Describe how to modify the weak wave form of wave propagation for this wave-field decomposition
...


456

Methods for Hyperbolic Systems

6
...
3
...
1
...
The numerical methods in this chapter
will perform well for this problem, but will not be especially efficient
...
Some useful numerical methods include spectral methods [61] and
multi-pole expansions [62]
...
7) and Maxwell’s equations (discussed in section 4
...


6
...
2 Shallow Water
The shallow water equations were presented in Example 4
...
1 and analyzed in
Section 4
...
These equations are a very simple nonlinear system with practical
implications
...


(6
...
11b)

If gravity has the value g = 1, then the “parting of the sea” problem has initial data

v(x, 0) =

−2,
2,

h(x, 0) = 1
...
12a)
(6
...
This problem requires some care in programming the numerical methods,
because the characteristic speed computations involve taking the square root of h;
oscillations in the numerical method produce unphysical values of h
...


457

6
...
6
...
x/t

For a problem with two shocks, we can solve the Riemann problem
v(x, 0) =

1,
−1,

x <0
x <0

h(x, 0) = 1
...
13a)
(6
...


x <0
x <0

(6
...
14b)

458

Methods for Hyperbolic Systems

(x-jump)/t

(a) Random choice

(x-jump)/t

(c) Lax–Friedrichs

(x-jump)/t

(b) Godunov with Harten–Hyman flux

(x-jump)/t

(d) ENO 1

Fig
...
2 Various first-order schemes for transonic dam break: Height vs
...
3-43: guiShallowWater
...
3-44: guiRiemannProblem
...
Figure 6
...
The exact solution of the Riemann problem produces a small jump at the
sonic point, and the Rusanov solver smears the waves quite a bit more than the other
Riemann solvers
...
The first-order schemes performed reasonably well for
this problem, as shown in Figure 6
...
Various second-order results are shown in
Figure 6
...


459

6
...
6
...
x/t

6
...
3 Gas Dynamics
The gas dynamics equations were studied in Section 4
...
Some interesting gas
dynamics test problems be found in [106], as well as comparisons between many
of the schemes described in this chapter, and other interesting schemes
...

Almost all of the gas dynamics test problems are for a polytropic gas with
γ = 1
...
One of the famous Riemann problems for this system is
the Sod shock tube, which involves a rarefaction and a shock:
ρ(x, 0) =

1,
1/8,

x <0
x > 0,

v(x, 0) = 0,

p(x, 0) =

1,
1/10,

x <0
x > 0
...
15)

460

Methods for Hyperbolic Systems

Here are some other test problems to consider when debugging code
...
16)

v(x, 0) =

1,
−1,

x <0
x > 0,

p(x, 0) = 1;

(6
...


(6
...
Finally, we mention the Colella-Woodward interacting blast wave
problem [177]

 1000, 0 < x < 0
...
19)
ρ(x, 0) = 1, v(x, 0) = 0, p(x, 0) = 0
...
1 < x < 0
...
9 < x < 1
...
(As
we discussed in section 4
...
8, at a reflecting wall the normal component of velocity
is an odd function of position, while density, pressure and tangential components of
velocity are even functions
...

In numerical experiments with the Sod shock tube problem, we found that
Godunov’s method combined with the exact Riemann solver, Roe, Harten–Hyman,
Harten–Lax van Leer and Linde solvers all produced acceptable results for timesteps
around 0
...
Among first-order schemes using the HartenHyman modification of the Roe approximate Riemann solver, Godunov was most
efficient, followed by first-order ENO, Lax–Friedrichs and discontinuous Galerkin
...
Second-order discontinuous Galerkin
(with M = ∞ for a Riemann problem) required timesteps around 0
...
The most efficient
third-order scheme was PPM, followed by ENO and Lax–Friedrichs (which were
roughly equivalent)
...
3 Case Studies

Students can create their own test problems for gas dynamics with Riemann
problem initial data by clicking on the following link: Executable 6
...

6
...
4 MHD
The equations of magnetohydrodynamics were studied previously in section 4
...

The most famous Riemann problem for these equations is the Brio and Wu shock
tube in air [23]:
ρ(x, 0) =
v(x, 0) = 0

1,
1/8,

x <0
x >0

B(x, 0) =


√4π,
− 4π,

p(x, 0) =

1,
1/10,

(6
...
20b)

x <0
x >0
x <0
x > 0
...
20c)
(6
...
15)
...

The Brio and Wu shock tube is the default test problem for MHD in Executable
6
...
Students can also create their own test problems for
MHD
...
3
...
6
...
To some extent, this is because there are so many different constitutive
models that no one of them has captured the full audience
...
Wilkins [176] described a
problem involving the impact of an elastic-plastic aluminum plate described by a
nonlinear elastic response and a von Mises yield surface
...

6
...
6 Cristescu’s Vibrating String
The equations for a vibrating string were studied in section 4
...
The model in that
section was modified from the one in Keyfitz and Kranzer [81] in order to provide

462

Methods for Hyperbolic Systems

(a) Deformation gradient

(b) Velocity

Fig
...
4 Riemann problem solution for vibrating string: Rarefaction–contact–
rarefaction and rarefaction–contact–rarefaction (vL = [0, 0], φL = 1
...
4157], φ R = 1
...
14159)

a more physically realistic tension
...
However, it is possible to generate rarefactions with contact
discontinuities in their middle for this problem:

 0

x <0

 0 ,
v(x, 0) =
(6
...
4157
φ(x, 0) = 1
...
14159,

(6
...


(6
...
4 shows the solution of this Riemann problem in state space
...
As a result, this Riemann
problem is not resolved well by the methods that use characteristic directions
...
5 shows that the Godunov scheme with either the exact Riemann solver or
the Harten–Lax–van Leer approximate Riemann solver fails to capture the velocity
peaks near the left and right states with 100 grid cells
...
However, Figure 6
...
Second-order Godunov (the

6
...
6
...
x/t

MUSCL scheme) and wave propagation do a poor job in resolving this contact
discontinuity
...
In this case, the average of the left and right deformation gradients is
zero, which represents a string compressed to zero volume
...

As a result, the ENO schemes abort
...
3-106:
string
...
Students can develop their own test problems with Riemann initial data by
clicking on the link Executable 6
...


464

Methods for Hyperbolic Systems

(a) MUSCL with Harten–Lax–van Leer

(b) Wave propagation

(c) Nessyahu–Tadmor

(d) Discontinuous Galerkin 2

Fig
...
6 Second-order schemes for vibrating string: longitudinal velocity vs
...
3
...
9
...
This paper contains a table of 21 Riemann problems with structurally different
solutions
...
1,
−5
...
25,
0
...


(x, 0) =

3
...
12111,

x <0
x > 0,
(6
...
3 Case Studies

(a) Stress vs strain

(b) Velocity vs stress

Fig
...
7 Riemann problem solution for plasticity (vL = −0
...
081, R = 0
...
217)

(a) Godunov with exact Riemann solve

L

= 3
...
25;

(b) Godunov with Harten–Lax–van Leer

Fig
...
8 First-order schemes for plasticity: strain vs
...
7
...
The difficulty is that the plastic strain, which acts as a hysteresis parameter,
has no natural definition during the mesh staggering
...
5

(x-jump)/t

(c) ENO 2

(x-jump)/t

(b) MUSCL, Harten–Lax–van Leer, CFL = 0
...
6
...
x/t

half timestep
...

Some of the schemes perform well for this problem, and some do not
...
It is interesting to note that restoring
the characteristic projection step in the MUSCL scheme (see Section 5
...
4) does
not remedy this problem
...
8
and second-order schemes are shown in Figure 6
...

All 21 of the Trangenstein-Pember Riemann problems can be found in the comments of subroutine initplasticity in Program 6
...
f
...
3 Case Studies

(a) Concentration vs
...
saturation

Fig
...
10 Riemann problem solution for polymer oil bank (sL = 0
...
7;
s R = 0
...
3-48: guiPlasticity
...
3
...
10
...
Allen et al
...
Of the different
Riemann problems, the following water flooding problem [75] is interesting because
it develops an “oil bank” just ahead of a contact discontinuity moving at the same
speed as the leading edge of a rarefaction:
s(x, 0) =

0
...
7,

x <0
x > 0,

c(x, 0) =

0
...
3,

x <0
x > 0
...
23)

2
2
In this model, the mobilities are λw (sw , c) = sw /(µ0 [1/2 + c]) and λo (so ) = so /µo
where the viscosity of oil is µo = 0
...
A second interesting test case [75] which
roughly corresponds to water-flooding after polymer injection is

s(x, 0) =

1
...
3,

x <0
x > 0,

c(x, 0) =

0
...
9,

x <0
x > 0
...
24)

468

Methods for Hyperbolic Systems

(a) Godunov with exact Riemann solve

(b) Godunov with Harten–Lax–van Leer

(c) Lax–Friedrichs

(d) ENO 1

Fig
...
11 First-order schemes for polymer oil bank: saturation vs
...

The solution to the polymer oil bank Riemann problem is shown in Figure 6
...

This problem has a rarefaction with leading edge traveling at the same speed as
a contact discontinuity, with a shock moving ahead of both
...

Figure 6
...
The Lax–Friedrichs scheme performs the worst, but

469

6
...
6
...
x/t

none of the schemes do a good job on resolving the contact discontinuity
...
12
...
MUSCL is less expensive
per step than the other schemes, which involve substeps (and reduced stability
restrictions on the timestep for the discontinuous Galerkin method)
...
3108: polymer
...
Students can develop their own test problems with Riemann initial
data by clicking on the link Executable 6
...


470

Methods for Hyperbolic Systems

(a) Godunov with Harten–Lax–van Leer, t = 1

(b) Godunov with Rusanov, t = 1

(c) Lax-Friedrichs, t = 1

(d) ENO 1, t = 0
...
6
...
x/t

6
...
9 Schaeffer–Schechter–Shearer Model
Finally, let us discuss a computation involving the Schaeffer-Schechter-Shearer
model of Section 4
...
The Riemann problem
p(x, 0) =

3,
1,

x <0
x > 0,

q(x, 0) =

10,
1,

x <0
x >0

has no solution involving waves studied in Chapter 4
...
The computational results could be interpreted as failures of the

(6
...
3 Case Studies

(a) P vs
...
x/t: 400 cells

(c) P vs
...
x/t: 100 cells

Fig
...
14 Convergence study using the Nessyahu–Tadmor scheme for the
Schaeffer–Schechter–Shearer model

numerical method, rather than problems with the model
...

Figure 6
...
The Godunov scheme with either the Harten–Lax–van Leer or the
Rusanov flux shows some numerical oscillation in the discontinuity, while the Lax–
Friedrichs scheme smears the wave so severely (even at CFL = 0
...
The first-order ENO scheme, however, effectively blows up

472

Methods for Hyperbolic Systems

just after time 0
...

In Figure 6
...
Note that the characteristic speeds in part (d) of this figure indicate
a discontinuity of some sort in the slow wave family and a rarefaction in the fast wave
family
...
In addition, mesh refinement leads to ever-larger values in the viscous profile
of the discontinuity
...


Exercises for 6
...
3
...
1
...
Assume
that g = 1
...
Does your numerical
solution show evidence of a wave in the other wave family? How do you explain this?
6
...
2 Suppose that you have a tank of water of some fixed height and zero velocity that is given an
external velocity (“shaking the pan”)
...
Construct a numerical scheme to solve this problem
...
3
...
LeVeque suggested a modification of the wave propagation scheme to overcome the
nonlinear resonance problem
...


Program this scheme and test it on the “parting sea” Riemann problem with h(x, 0) = 1 and
v(x, 0) = ±0
...

6
...
4 How would you change the Harten–Hyman modification of the Roe solver to provide the information needed for the modified wave-field decomposition in the previous exercise?
6
...
5 Perform the previous exercise for the Harten–Lax-van Leer approximate Riemann solver
...

6
...
6 Solve the Colella–Woodward interacting blast wave problem using one of the schemes discussed
above
...
01, 0
...
026, 0
...
030,

6
...
032, 0
...
038
...

6
...
7 Colella and Woodward [35] suggested several techniques specific to gas dynamics for improving
the resolution of shocks and contact discontinuities
...

6
...
8 Colella [32] has suggested using fourth-order slopes in the MUSCL reconstruction step
...
9
...
Test these
fourth-order slopes on the Zalesak test problems for linear advection in exercise 2
...
5
...

6
...
9 Harten [65] has suggested a modification of the ENO scheme to improve the resolution of contact
discontinuities
...


7
Methods in Multiple Dimensions

Most interesting physical problems involve multiple spatial dimensions
...
Very little is known about the appropriate norms to use in discussing the stability and uniqueness of conservation laws in multiple dimensions
...

Nevertheless, people need to solve multidimensional problems
...
In
this chapter, we will discuss several numerical approaches
...
1 Numerical Methods in Two Dimensions
7
...
1 Operator Splitting
Suppose that we want to solve the two-dimensional system of partial differential
equations
∂u ∂f 1 ∂f 2
+
= 0
...

xj

475

7
...
1a)
t n+1/2

...
1b)

This approach is based on approximating the exact evolution operator for the differential equation by a product of one-dimensional evolution operators, and then
approximating the evolution operators by numerical methods
...
Spatial errors (and
additional temporal errors) are due to the approximation of the one-dimensional
evolution operators
...
This
method takes the form
n,n+1/2

ui j

n+1,n+1/2

ui j

uin+1
j

= uinj − (f 2 )i, j+1/2 (un ) − (f 2 )i, j−1/2 (un )

t n+1/2
2 x2, j

(7
...
2b)
x1,i
t n+1/2
n+1,n+1/2
= ui j
− (f 2 )i, j+1/2 (un+1,n+1/2 )−(f 2 )i, j− 1 (un+1,n+1/2 )

...
2c)
2
2 x2, j
n,n+1/2

= ui j

− (f 1 )i+1/2, j (un,n+1/2 ) − (f 1 )i−1/2, j (un,n+1/2 )

Any appropriate numerical flux from Chapter 6 on methods in one dimension can
be used to evaluate the numerical fluxes in these steps
...

For problems on rectangular domains with simple boundary conditions, either
form of operator splitting can be very easy to implement, if a trustworthy onedimensional method is already available
...
They also point out that the treatment of boundary
conditions for the intermediate steps of the splitting are tricky, so it is common to
use the analytical values for the boundary conditions when available
...

We have implemented operator splitting in Program 7
...
C
Procedures runOnce and runSimulation can perform either first-order or

476

Methods in Multiple Dimensions

second-order splitting by calling procedure runSchemeSplit in the appropriate ways
...
Of course,
some modification of the functions for the various models are necessary in multiple dimensions
...
1-110: shallow water
...
Similar modifications were performed to Program
7
...
m4 and Program 7
...
m4
...

Essentially all of the computational routines were written in Fortran for easier array
addressing
...
1-50: guiRectangle
...
In two dimensions, the computational
results for scalar fields (such as water height in shallow water, or pressure in gas
dynamics) can be displayed either as 2D contours, 2D color fills or 3D surface
plots
...
The figure can be sliced along the ends of any coordinate axis using
the middle mouse button
...

By setting the number of grid cells in one of the coordinate directions to zero,
the student can perform a convergence analysis
...

Some computational results for the 2D Riemann problem with Burgers’ equation
are shown in Figure 7
...


7
...
2 Donor Cell Methods
The conservation law
∂u
+
∂t

2
k=1

∂F(u)ek
=0
∂xk

can be written in integral form as
u(x, t
ij

n+1

) dx =

u(x, t ) dx −

t n+1

n

ij

F(u)n ds dt
...
1 Numerical Methods in Two Dimensions

(a) Color fill plot

477

(b) Contour plot

(c) Surface plot

Fig
...
1 2D Riemann problem for Burgers’ equation: Second-order operator splitting with MUSCL on 100 × 100 grid (40 × 40 for surface plot); initial condition is u = −1 for x0 > 0, x1 > 0, u =
...
33 for
x0 > 0, x1 < 0, u = 1 for x0 < 0, x1 < 0
...


(7
...

j

(7
...
1
...
1 Traditional Donor Cell Upwind Method
Early work on unsplit methods for hyperbolic conservation laws took particularly simple forms, as in [131, 137]
...
5a)

n+1/2
f i, j+1/2

(7
...
Unfortunately, this very natural scheme
has a more restrictive stability restriction on its timestep than an operator split
scheme
...

∂t
∂x1
∂x2
The donor cell scheme for this problem operates as follows
...
1 Numerical Methods in Two Dimensions

i + 1 , j we compute a flux integral over the cell side and timestep by
2
n
n
f i+1/2, j = [uinj v+ + ui+1, j v− ] x2, j t n+1/2
1
1
n
= F(R(uinj , ui+1, j ; 0))e1 x2, j t n+1/2

and for each cell side i, j +

1
2

we compute

n
n
f i, j+1/2 = [uinj v+ + ui, j+1 v− ] x1,i t n+1/2
2
2
n
= F(R(uinj , ui, j+1 ; 0))e2 x1,i t n+1/2
...
) Then we perform the conservative difference (7
...
Note that the donor cell
scheme for linear advection can be rewritten
uin+1 x1,i x2, j = uinj
j

x1,i x2, j − |v1 | x2, j t n+1/2 − |v2 | x1,i t n+1/2

n
n
+ ui−1, j v+ x2, j t n+1/2 − ui+1, j v− x2, j t n+1/2
1
1
n
n
+ ui, j−1 v+ x1,i t n+1/2 − ui, j+1 v− x1,i t n+1/2
...


(7
...
This stability restriction
caused early researchers to favor operator-split methods over unsplit methods
...
1
...
2 First-Order Corner Transport Upwind Method
The donor cell timestep restriction can be improved by modifying the scheme
to include the effects of diagonal flow
...
First, we will develop this scheme for
linear advection
...
If we integrate the conservation laws over the grid cell
i j = (x1,i−1/2 , x1,i+1/2 ) × (x2, j−1/2 , x2, j+1/2 ), then the corner transport upwind
scheme computes
un+1 (x) dx =
ij

un (x − v t n+1/2 ) dx =
ij

un (x) dx
Ri j

where
Ri j = (x1,i−1/2 − v1 t n+1/2 , x1,i+1/2 − v1 t n+1/2 )
× (x2, j−1/2 − v2 t n+1/2 , x2, j+1/2 − v2 t n+1/2 )

480

Methods in Multiple Dimensions

Pi,j+1/2

Pi+1/2,j

Fig
...
2 Corner transport upwind: solid lines enclose grid cell i j , dashed lines
enclose transported grid cell Ri j , dotted lines mark parallelograms Pi+1/2, j and
Pi, j+1/2

represents i j translated back in time along the velocity field
...


(See Figure 7
...
) As a result,
un+1 (x) dx =
ij

un (x) dx −

un (x) dx +
Pi+1/2, j

ij



un (x) dx
Pi−1/2, j

un (x) dx +
Pi, j+1/2

un (x) dx
...
7)

Pi, j−1/2

In order to compute these integrals, we will use the fact that un is piecewise
constant on the individual grid cells
...

2

(7
...
1 Numerical Methods in Two Dimensions

481

It is easy to see that the new solution is a weighted average of old solution values
if and only if the timestep is chosen so that in every grid cell i j
max

|v1 | |v2 |
,
x1,i x2, j

t n+1/2 ≤ 1
...
6), and similar to the stability restriction for operator splitting
...
7) we can expand and
collect terms in (7
...

uinj
x1,i − |v1 |
1
1
2
2
2
(7
...
We define the flux side and time integrals in the first coordinate
direction by
n+1/2

f i+1/2, j X z, j t n+1/2
= uinj

x2, j − |v2 |

n
+ ui+1, j

t n+1/2
2

x2, j − |v2 |

t n+1/2
t n+1/2 + n+1/2
n
− ui, j+1 v−
v1 t
2
2
2
t n+1/2
t n+1/2 − n+1/2
n
n
+ ui+1, j−1 v+
− ui+1, j+1 v−
v1 t
2
2
2
2

n
+ ui, j−1 v+
2

t n+1/2
2

482

Methods in Multiple Dimensions

= uinj −

n
uinj v+ + ui, j+1 v−
2
2

n
− ui, j−1 v+ + uinj v−
2
2
n
+ ui+1, j −

x1,i t n+1/2

x1,i t n+1/2

1

n
n
ui+1, j v+ + ui+1, j+1 v−
2
2

n
n
− ui+1, j−1 v+ + ui+1, j v−
2
2

v+ t n+1/2 x2, j
1

2 x1,i x2, j

x1,i+1 t n+1/2

x1,i+1 t n+1/2

1
2 x1,i+1 x2, j

v− t n+1/2 x2, j
...
Similar expressions hold
for the fluxes in the second coordinate direction
...
First, we compute transverse flux side and time integrals by
solving Riemann problems at the cell sides, using the cell averages:
n
n
f i+1/2, j = F R uinj , ui+1, j ; 0 e1 x2, j t n+1/2
n
n
f i, j+1/2 = F R uinj , ui, j+1 ; 0 e2 x1,i t n+1/2
...
10a)

2 x1,i x2, j

(7
...
10b)

2 x1,i x2, j


...
10d)

These allow us to compute flux side and time integrals associated with Riemann
problems at the cell sides:
n+1/2

n+1/2, L

n+1/2, R

e1 x2, j t n+1/2

n+1/2

n+1/2, L

n+1/2, R

e2 x1,i t n+1/2
...
4)
...
1 Numerical Methods in Two Dimensions

7
...
2
...
He would rewrite (7
...


The terms in the first set of square brackets have the interpretation as the wave
through side i − 1 , j times the area in cell i j swept by this wave, plus corrections
2
for waves from sides i − 1, j − 1 and i − 1, j + 1
...
The computation

(7
...

x2, j
x2, j

uin+1 = uinj − (Fe1 )inj
j

Here the donor cell flux differences are
n
n
(Fe1 )inj = ui+1, j − uinj v− + uinj − ui−1, j v+
1
1
n
n
= F R ui+1, j , uinj ; 0 e1 − F uinj e1 + F uinj e1 − F R uinj , ui−1, j ; 0 e1
n
n
(Fe2 )inj = ui, j+1 − uinj v− + uinj − ui, j−1 v+
2
2
n
n
= F R ui, j+1 , uinj ; 0 e2 − F uinj e2 + F uinj e2 − F R uinj , ui, j−1 ; 0 e2
...
The waves are computed at the
cell sides, and stored as flux differences in the grid cells
...

2 x1,i 2

7
...
A Fortran implementation of this method appears in subroutine step2 of CLAWPACK
...
1
...
4 Second-Order Corner Transport Upwind Method
In order to form a second-order corner transport upwind method, it suffices to
compute second-order accurate approximations to the flux side and time integrals in the integral form of the conservation law (7
...
Consider, for example, the
integral
n+1/2
f i+1/2, j

=

t n+1
tn

x2, j+1/2

F u x1,i+1/2 , x2 , t

e1 dx2 dt
...
To this
end, we consider the Taylor expansion
u x1 +

x1
t
, x2 , t +
2
2

∂u x1
∂x1 2
∂u x1
=u+
∂x1 2
v2 t
=u−
x2

≈u+

∂u t
∂t 2
∂u
∂u
t
v1 +
v2

∂x1
∂x2
2
v1 t ∂u x1
∂u x2
+ 1−

...
5)
...
10)
...

Suppose that we want to solve the system of two-dimensional nonlinear conservation laws
∂u ∂Fe1 ∂Fe2
+
+
= 0,
∂t
∂x1
∂x2
where u(w) and F(w) are functions of the flux variables w
...
At the cell sides i + 1 , j and i, j + 1 compute the flux variable
2
2
increments
n
n
wi+1/2, j = wi+1, j − winj

and

n
n
wi, j+1/2 = wi, j+1 − winj
...


Of course, the matrices ∂Fe1 /∂w, ∂Fe2 /∂w, ∂u/∂w, Y1 , Y2 and 1 , 2 vary with
time and grid cell; these dependencies have been suppressed in the notation
...


Compute cell-centered slopes
˜
z1,i j = zi+1/2, j
˜
z2,i j = zi, j+1/2

x1,i + 2 x1,i−1
+ zi−1/2, j
x1,i + x1,i+1
x2, j + 2 x2, j−1
+ zi, j−1/2
x2, j + x2, j+1

x1,i + 2 x1,i+1
x1,i + x1,i−1
x2, j + 2 x2, j+1
x2, j + x2, j−1

x1,i
x1,i−1 + x1,i + x1,i+1
x2, j
x2, j−1 + x2, j + x2, j+1

and componentwise the limited slopes
z
zn j = muscl(˜ 1,i j , zi−1/2, j , zi+1/2, j ) and
1,i

zn j = muscl(˜ 2,i j , zi, j−1/2 , zi, j+1/2 )
...

2,i

Next, we use these corner transport upwind states to compute transverse flux
integrals by solving Riemann problems at cell sides i + 1 , j and i, j + 1 :
2
2
n,L
n,R
n
f i+ 1 , j = F R wi+ 1 , j , wi+ 1 , j ; 0

e1 x2, j t n+1/2 ,

n,L
n,R
n
f i, j+ 1 = F R wi, j+ 1 , wi, j+ 1 ; 0

e2 x1,i t n+1/2
...
1 Numerical Methods in Two Dimensions

In each grid cell i, j, we correct the previous left and right states by incorporating
the transverse fluxes:
n+ 1 ,L
2

wi+ 1 , j =
2

n,L
wi+ 1 , j
2

∂u
∂w



∂u
∂w

n+ 1 ,R

n,R
wi− 12, j = wi− 1 , j −
2

2

∂u
∂w

n+ 1 ,L

n,L
2
wi, j+ 1 = wi, j+ 1 −
2

2

∂u
∂w

n+ 1 ,R

n,R
2
wi, j− 1 = wi, j− 1 −
2

2

−1

n
n
f i, j+ 1 − f i, j− 1
2

ij
−1

2

n
n
f i, j+ 1 − f i, j− 1
2

ij
−1

2

n
n
f i+ 1 , j − f i− 1 , j
2

ij
−1

2

n
n
f i+ 1 , j − f i− 1 , j
2

ij

2

1
2 x1,i x2, j
1
2 x1,i x2, j
1
2 x1,i x2, j
1

...
12a)
(7
...
12c)
(7
...


2

,w

;0

Finally, we perform the conservative difference (7
...

This second-order corner transport upwind scheme is subject to the stability
restriction
t ≤ min{ x1,i /
ij

1 ∞,

x2, j /

2 ∞ }
...
In contrast, second-order
operator splitting has the same order and stability restriction, but requires only an
average of two Riemann problem solutions per cell, provided that the last half-step
of the prior operator split step is combined with the first half-step of the subsequent
split step
...
1-113: ctu2d
...
Students can execute this scheme in two dimensions by
clicking on Executable 7
...
The student can select either of Burgers’
equation, shallow water or gas dynamics under ‘Riemann Problem Parameters
...
In
two dimensions, the computational results for scalar fields (such as water height
in shallow water, or pressure in gas dynamics) can be displayed either as 2D contours, 2D color fills or 3D surface plots
...
The figure can be sliced along the
ends of any coordinate axis using the middle mouse button
...


7
...
3 Wave Propagation
It would be straightforward to implement the MUSCL scheme above as a wave
propagation scheme, by replacing the flux differences in (7
...
4) with the
wave-field decompositions from a Riemann problem solver, as in Section 6
...
6
above
...
For each cell side he decomposes the flux differences into waves,
typically using a Roe decomposition:
n
(Fe1 )i+1, j − (Fe1 )inj = Xi+1/2, j

−1
i+1/2, j Xi+1/2, j

n
ui+1, j − uinj

n
(Fe2 )i, j+1 − (Fe2 )inj = Xi, j+1/2

−1
i, j+1/2 Xi, j+1/2

n
ui, j+1 − uinj

These equations imply that Riemann problem solutions would provide flux
differences
n
F R uinj , ui+1, j ; 0 e1 − F uinj e1 = Xi+1/2, j
n
≡ Ai+1/2, j

i+1/2, j


n
F uinj e1 − F R ui−1, j , uinj ; 0 e1 = Xi−1/2, j
n
≡ Ai−1/2, j

Xi+1/2, j

−1

n
ui+1, j − uinj

−1

n
uinj − ui−1, j

n
ui+1, j − uinj
i−1/2, j

+



+

Xi−1/2, j

n
uinj − ui−1, j

with similar results in the second coordinate direction
...
We have provided information about how to use
interpret the fluctuation matrices A for other approximate Riemann solvers, such
as the Rusanov flux (see equation (4
...
98))
...
13
...

The wave decompositions at the cell sides are used to compute the donor cell
flux differences

+
n
n
(Fe1 )inj = Ai+1/2, j ui+1, j − uinj + Ai−1/2, j uinj − ui−1, j

+
n
n
(Fe2 )inj = Ai, j+1/2 ui, j+1 − uinj + Ai, j−1/2 uinj − ui, j−1
...
2
...
In

7
...
10) to produce ai+1/2, j
...

2 x2, j

The scheme is completed with the conservative difference
t n+1/2
t n+1/2
− (Fe2 )inj
x1,i
x2, j
n+1/2
t
t n+1/2
+ 2 (Fe1 )i+1/2, j
− 2 (Fe1 )i−1/2, j
x1,i
x1,i
n+1/2
n+1/2
t
t
+ 2 (Fe2 )i, j+1/2
− 2 (Fe2 )i, j−1/2

...

We have not implemented the wave propagation scheme in two dimensions
...


7
...
4 2D Lax–Friedrichs
The Lax–Friedrichs scheme in two dimensions uses a staggered grid in two halfsteps, similar to the one-dimensional scheme in Section 6
...
1
...
13a)

x1,i

x1,i+1/2

u x1 , x2 , t n+1 dx1 dx2

x1,i−1/2
x2, j+1/2 x1,i+1/2

=

u x1 , x2 , t n+1/2 dx1 dx2

x2, j−1/2


+

+

t n+1

x1,i−1/2
x2, j+1/2

F w x1,i+1/2 , x2 , t n

t n+1/2 x2, j−1/2
t n+1
t n+1/2
t n+1
t n+1/2
t n+1

e1 dx2 dt

x2, j+1/2

F w x1,i−1/2 , x2 , t n

e1 dx2 dt

F w x1 , x2, j+1/2 , t n

e2 dx1 dt

x2, j−1/2
x1,i+1/2
x1,i−1/2
x1,i+1/2

t n+1/2 x1,i−1/2

F w x1 , x2, j−1/2 , t n

e2 dx1 dt
...
13b)

Unlike the one-dimensional case, the fluxes in the integrals are not necessarily constant in time
...

7
...
4
...
Flux integrals in (7
...
This leads to the following scheme for the conserved

7
...

2
2

n+1
ui+1/2, j+1/2

Note that it is necessary to determine the flux variables w from the conserved
quantities u after each half-step
...

7
...
4
...
In this scheme, we
assume that the current solution is piecewise linear
u (x) =
n

uinj

+

Sinj

x1 −x1,i
x1,i
x2 −x2, j
x2, j


...
2
...


492

Methods in Multiple Dimensions

Flux integrals are approximated by the midpoint rule in time and the trapezoidal
rule in space
...

4

For the second half-step, we compute slopes
n+1/2

ui+1/2, j+1/2 − ui−1/2, j+1/2 , ui+3/2, j+1/2 − ui+1/2, j+1/2

n+1/2

ui+1/2, j+1/2 − ui+1/2, j−1/2 , ui+1/2, j+3/2 − ui+1/2, j+1/2

Si+1/2, j+1/2 e1 = limiter
Si+1/2, j+1/2 e2 = limiter

n+1/2

n+1/2

n+1/2

n+1/2

n+1/2

n+1/2

n+1/2

n+1/2

and states for temporal integrals
n+3/4

n+1/2

ui+1/2, j+1/2 = ui+1/2, j+1/2 −


∂Fe2 ∂u
∂w ∂w

∂Fe1 ∂u
∂w ∂w
−1

n+1/2

−1

n+1/2

Si+1/2, j+1/2 e1

Si+1/2, j+1/2 e2

t

...
1 Numerical Methods in Two Dimensions

Then the solution at the new time is given by
n+1
ui, j x1,i x2, j

=

n+1/2

n+1/2

u i−1/2, j−1/2 + Si−1/2, j−1/2
n+1/2

n+1/2

n+1/2

n+1/2

n+1/2

n+1/2

+ u i+1/2, j−1/2 + Si+1/2, j−1/2
+ u i−1/2, j+1/2 + Si−1/2, j+1/2
+ u i+1/2, j+1/2 + Si+1/2, j+1/2

x1,i 1
x2, j 4
− x1,i 1
x2, j 4
x1,i 1
− x2, j 4
− x1,i 1
− x2, j 4

n+3/4

n+3/4

n+3/4

n+3/4

n+3/4

n+3/4

n+3/4

n+3/4

− (Fe1 )(wi+1/2, j−1/2 + (Fe1 )(wi+1/2, j+1/2
+ (Fe1 )(wi−1/2, j−1/2 + (Fe1 )(wi−1/2, j+1/2
− (Fe2 )(wi−1/2, j+1/2 + (Fe2 )(wi+1/2, j+1/2
+ (Fe2 )(wi−1/2, j−1/2 + (Fe2 )(wi+1/2, j−1/2

x1,i x2, j
2
2
x2, j
2
x2, j
2
x1,i
2
x1,i
2

t n+1/2
2
n+1/2
t
2
t n+1/2
2
n+1/2
t

...
Also, note that the development of a third-order extension of the Lax–
Friedrichs scheme suffers from the same difficulty facing the generalizations of the
MUSCL and wave propagation schemes: the development of appropriate piecewise quadratic reconstructions in multiple dimensions
...

We have implemented the first- and second-order corner Lax–Friedrichs scheme
in Program 7
...
m4
...
1-52: guiRectangle
...
Students should select unsplit for the splitting under Numerical
Method parameters, and Lax-Friedrichs should be the first scheme with
value True
...
The 3D graphics in the surface
plot uses a trackball for rotation with the left mouse button
...
Values at
points in the figure can be determined using the right mouse button
...
1
...
Recall that
ENO views the conservation law in terms of the method of lines:
∂u
∂f 1 ∂f 2
=−


...
Since the ordinary differential equation solvers all involve multiple sub-steps, the overall scheme involves significant
coupling between grid cells, even diagonal neighbors
...
1-115: eno2d
...
Students can
execute this scheme in two dimensions by clicking on Executable 7
...

The student can select either of Burgers’ equations, shallow water or gas dynamics
under Riemann Problem Parameters
...
In two dimensions, the computational results
for scalar fields (such as water height in shallow water, or pressure in gas dynamics)
can be displayed either as 2D contours, 2D color fills or 3D surface plots
...

The figure can be sliced along the ends of any coordinate axis using the middle
mouse button
...

7
...
6 Discontinuous Galerkin Method on Rectangles
The application of the discontinuous Galerkin method to a 2D rectangular grid is
a natural extension of the 1D ideas in Section 6
...
9
...


495

7
...

We approximate our scalar conserved quantity by a linear combination of
orthonormal basis functions,
u(x1 , x2 , t) = b ξ1,i (x1 )

Ui j (t)b ξ2, j (x2 ) ,

where the coordinate transformations are
x1 − x1,i
ξ1,i (x1 ) = 2
, x1 ∈ x1,i−1/2 , x1,i+1/2
x1,i
x2 − x2, j
, x2 ∈ x2, j−1/2 , x2, j+1/2 ,
ξ2, j (x1 ) = 2
x2, j
and Ui j (t) is the array of unknown coefficients of the basis functions for
each conserved quantity
...


x1,i−1/2

Changing integration variables and using the orthonormality of the basis functions
produces
0=

dUi j x1,i x2, j
dt
2
2



1
−1
1
−1

1
−1
1
−1

b (ξ1 ) f 1 b(ξ1 ) Ui j (t)b(ξ2 ) b(ξ2 ) dξ1
b(ξ1 ) f 2 b(ξ1 ) Ui j (t)b(ξ2 ) b (ξ2 )

x2, j
dξ2
2

x1,i
dξ1 dξ2
2

496

Methods in Multiple Dimensions
1

+

−1
1



−1
1

+

−1
1



−1

b(1) f 1 R(b(1) Ui, j (t)b(ξ2 ), b(−1) Ui+1, j (t)b(ξ2 ); 0) b(ξ2 )
b(−1) f 1 R(b(1) Ui−1, j (t)b(ξ2 ), b(−1) Ui, j (t)b(ξ2 ); 0) b(ξ2 )
b(ξ1 ) f 2 R(b(ξ1 ) Ui, j (t)b(1), b(ξ1 ) Ui, j+1 (t)b(−1); 0) b(1)
b(ξ1 ) f 2 R(b(ξ1 ) Ui, j−1 (t)b(1), b(ξ1 ) Ui, j (t)b(−1); 0) b(−1)

x2, j
dξ2
2
x2, j
dξ2
2
x1,i
dx1
2
x1,i
dx1
...
This
gives us the continuous-in-time form of the discontinuous Galerkin scheme for
scalar laws in 2D:
0 =

dUi j x1,i x2, j
dt
4
Q

Q

b (ξq1 ) f 1 b(ξq1 ) Ui j (t)b(ξq2 ) b(ξq2 ) αq1 αq2

x2, j
2

b(ξq1 ) f 2 b(ξq1 ) Ui j (t)b(ξq2 ) b (ξq2 ) αq1 αq2



x1,i
2

q2 =0 q1 =0
Q

Q


q2 =0 q1 =0
Q



x2, j
2

b(1) f 1 R b(1) Ui, j (t)b(ξq2 ), b(−1) Ui+1, j (t)b(ξq2 ); 0 b(ξq2 ) αq2
q2 =0
Q

+

x2, j
2

b(−1) f 1 R b(1) Ui−1 j (t)b(ξq2 ), b(−1) Ui, j (t)b(ξq2 ); 0 b(ξq2 ) αq2
q2 =0
Q



b(ξq1 ) f 2 R b(ξq1 ) Ui, j (t)b(1), b(ξq1 ) Ui, j+1 (t)b(−1); 0 b(1) αq1
q1 =0

x1,i
2

Q

+

b(ξq1 ) f 2 R b(ξq1 ) Ui, j−1 (t)b(1), b(ξq1 ) Ui, j (t)b(−1); 0 b(−1) αq1
q1 =0

x1,i

...
13
...
It is
easy to see that the cell average is u i j (t) = e0 Ui j (t)e0 b2
...
1 Numerical Methods in Two Dimensions

497

direction, we compute
u(x1,i−1/2 , x2, j , t) − u i j (t) = b(−1) Ui j (t)b(0) − b0 e0 Ui j (t)e0 b0 ,
u(x1,i+1/2 , x2, j , t) − u i j (t) = b(1) Ui j (t)b(0) − b0 e0 Ui j (t)e0 b0
...
Otherwise, we compute
u 1,i j = minmod(u i+1, j (t) − u i j (t), u i, j (t) − u i−1, j (t))
where
minmod(a, b) =

min{|a|, |b|}sign(a), ab > 0
0,
ab ≤ 0
...


In other words, the first row of ui j (t) is unchanged, and the first entry of the second
row is the only nonzero below the first row
...
If so, we compute u 2,i j using
similar expressions and zero all but the first column of Ui j (t) and the first entry of
its second column
...

This limiting is performed just after the initial data is determined, and just after
each Runge–Kutta step for time integration
...
Each cell side requires the solution
of Q + 1 Riemann problems, where Q + 1 is the number of quadrature points
...
14
...
The number
of Riemann problems is roughly two times the order of the method times the
number of grid cells, and the number of flux function evaluations in the interior of the grid cells is four times the square of the order times the number of
grid cells
...
14
...

We have implemented the discontinuous Galerkin scheme in Program 7
...
m4
...
1-54: guiRectangle
...
Students should select unsplit for the splitting under Numerical Method
parameters, and Discontinuous Galerkin should be the first scheme
with value True
...
The 3D graphics
in the surface plot uses a trackball for rotation with the left mouse button
...
Values at points in the figure can be determined using the right mouse
button
...
1
7
...
1 Verify that the donor cell scheme is free-stream-preserving: if uinjk = u for all grid cells
then uin+1 = u for all i jk
...
1
...


7
...
In order to reduce the number
of possible cases, we will assume that neighboring constant states are associated
with one-dimensional Riemann problems in which a single wave is involved in the
evolution
...
2
...
For Burgers’ equation, the flux is given by F(u) = 1 u 2 n
...
We will order the
states counterclockwise in the plane, beginning with the upper right-hand quadrant
...
Along each positive or negative axis it is possible to have either a rarefaction or a shock, giving a total of
16 combinations
...
Because
both components of n are positive, five of these combinations are related
by interchanging the axes (R21 S32 R34 R41 =⇒ R21 R32 S34 R41 , S21 R32 R34 R41 =⇒
R21 R32 R34 S41 , S21 R32 S34 R41 =⇒ R21 S32 R34 S41 , S21 S32 R34 S41 =⇒ S21 R32 S34 S41

i jk ,

7
...
This leaves nine distinct cases:
R21 R32 R34 R41 :u 1 > u 2 > u 4 > u 3 or u 1 > u 4 > u 2 > u 3
R21 R32 R34 S41 :u 4 > u 1 > u 2 > u 3
R21 R32 S34 R41 :u 1 > u 2 > u 3 > u 4
R21 S32 R34 R41 :u 4 > u 1 > u 3 > u 2 or u 4 > u 3 > u 1 > u 2
R21 S32 S34 R41 :u 1 > u 3 > u 2 > u 4 or u 1 > u 3 > u 4 > u 2 or
u 3 > u 1 > u 2 > u 4 or u 3 > u 1 > u 4 > u 2
R21 S32 S34 S41 :u 3 > u 4 > u 1 > u 2
S21 R32 R34 S41 :u 2 > u 4 > u 1 > u 3 or u 2 > u 4 > u 3 > u 1 or
u 4 > u 2 > u 1 > u 3 or u 4 > u 2 > u 3 > u 1
S21 R32 S34 S41 :u 2 > u 3 > u 4 > u 1
S21 S32 S34 S41 :u 3 > u 2 > u 4 > u 1 or u 3 > u 4 > u 2 > u 1
...
Similarly, shocks
could have negative or positive speeds
...

We have already displayed some numerical results for this Riemann problem in
Figure 7
...
This Riemann problem used the initial data
u 2 = 0
...
0

u 1 = −1
u 4 = 0
...
The solution involves only shocks
...
2-117: GUIRectangle
...
Students can execute a variety of schemes for this problem by
clicking on Executable 7
...
The student can select Burgers’ equation
under Riemann Problem Parameters
...
In two dimensions, the computational results
for the solution can be displayed either as 2D contours, 2D color fills or 3D surface
plots
...
The figure can be sliced along the ends of any coordinate axis using
the middle mouse button
...
Students can perform an error analysis, including a comparison
of schemes, by setting the number of cells in one of the coordinate directions to
0 under Numerical Method parameters
...


500

Methods in Multiple Dimensions

7
...
2 Shallow Water
As we showed in section 4
...
10, the shallow water model in example 4
...
1 has four
possible elementary waves with associated admissibility conditions:
R− :v R − vL = n2( gh L −

gh R ),

hR ≤ hL

R+ :v R − vL = n2( gh R −

gh L ),

hL ≤ hR

S− :v R − vL = −n(h R − h L )

g
2

1
1
,
+
hL
hR

hR > hL

S+ :v R − vL = −n(h L − h R )

g
2

1
1
,
+
hR
hL

hL > h R
...

Again, we will order the states counterclockwise in the plane, beginning with the
upper right-hand quadrant
...
14a)

h1 > h2 > h4 > h3

and

h1 > h4 > h2 > h3

(7
...


(7
...
This leaves us with three distinct orderings of
the states
...
The wave
curves and admissibility conditions imply that
R21 =⇒ e1 (v1 − v2 ) > 0
S21 =⇒ e1 (v1 − v2 ) < 0
R32 =⇒ e2 (v2 − v3 ) > 0
S32 =⇒ e2 (v2 − v3 ) < 0
R34 =⇒ e1 (v4 − v3 ) > 0
S34 =⇒ e1 (v4 − v3 ) < 0
R41 =⇒ e2 (v1 − v4 ) > 0
S41 =⇒ e2 (v1 − v4 ) < 0
...
14), there are two admissible waves on each positive or negative axis, giving a total of 16 cases for each

7
...
By comparing the signs of the components of (v1 − v2 ) + (v2 − v3 ) with
(v1 − v4 ) + (v4 − v3 ), we see that only four of the 16 cases are possible for each
ordering
...
15a)

R+ S− R− S− , h 1 > h 2 > h 3 > h 4
21 32 34 41
− + + +
S21 R32 S34 R41 , h 1 > h 2 > h 3 > h 4
S− S− S+ S− , h 1 > h 2 > h 3 > h 4
21 32 34 41
R+ R+ R+ R+ , h 1 > h 2 > h 4 > h 3
21 32 34 41
R+ S− R+ S− , h 1 > h 2 > h 4 > h 3
21 32 34 41
− + − +
S21 R32 S34 R41 , h 1 > h 2 > h 4 > h 3
S− S− S− S− , h 1 > h 2 > h 4 > h 3
21 32 34 41
R+ R− R− R+ , h 1 > h 3 > h 4 > h 2
21 32 34 41
R+ S+ R− S− , h 1 > h 3 > h 4 > h 2
21 32 34 41
− − + +
S21 R32 S34 R41 , h 1 > h 3 > h 4 > h 2
S− S+ S+ S− , h 1 > h 3 > h 4 > h 2
...
15b)



(7
...
15d)
(7
...
15f)
(7
...
15h)
(7
...
15j)
(7
...
15l)



Before examining these cases in detail, we note that h R − h L is a strictly increasing function of h R and a strictly decreasing function of h L
...

All but four of the cases in (7
...
For example, the first case
(7
...

=
2( gh 3 − gh 4 )


The first component of this equation implies that h 2 = h 4 , which violates the
assumed ordering of the states
...
15b), the second component of the
same vector sum implies that
(h 2 − h 3 )

1
1
1
1
+
= (h 1 − h 4 )
+
;
h3 h2
h4 h1

(7
...
Case (7
...
Case (7
...
16)
...
15i) is impossible because the first vector component implies that
h1 −

h2 =

h3 −

h4

under the assumption h 1 > h 3 > h 4 > h 2
...
15j) is impossible because the
first vector component implies the same impossible equation
...
15k) is impossible because the first vector component implies
(h 3 − h 4 )

1
1
1
1
+
= (h 1 − h 2 )
+
h3 h4
h1 h2

under the assumption h 1 > h 3 > h 4 > h 2
...
15l) is impossible for the same
reason that the previous case was impossible
...
In case (7
...


Given shallow water heights satisfying this equation and the velocity at one of the
states, the velocities at all of the states are determined
...
15f) we
could have two rarefactions and two shocks, R+ S− R+ S− , under the conditions
21 32 34 41
that h 1 > h 2 > h 4 > h 3 and
h1 −

h2 =

(h 2 − h 3 )

h4 −

h3

1
1
1
1
+
= (h 1 − h 4 )
+
...
15g) we could have two shocks and two rarefactions,
S− R+ S− R+ , under the conditions that h 1 > h 2 > h 4 > h 3 and
21 32 34 41
(h 1 − h 2 )
h2 −

1
1
1
1
+
= (h 4 − h 3 )
+
h2 h1
h3 h4
h3 =

h1 −

h4
...
2 Riemann Problems in Two Dimensions

503

Finally, in case (7
...

h3 h2
h4 h1

For example, the initial conditions

0
...
5 
0



...
0625
w3 =  −0
...
25
w4 =  0
...

We have implemented the 2D Riemann problem for shallow water in Program
7
...
C
...
2-56: guiRectangle
...
Students should select the desired
splitting under Numerical Method parameters, and set the boolean
flag for their desired method to True
...
The 3D graphics in the surface plot uses a trackball for rotation with the left
mouse button
...
Values at points in the figure can be determined using the
right mouse button
...
These comparisons can be very
time-consuming
...
2
...

Following [106], we will recommend six of these Riemann problems for student

504

Methods in Multiple Dimensions

(a) Second-order Corner transport upwind

(b) Second-order operator split MUSCL

(c) Second-order ENO

(d) Second-order Lax-Friedrichs

Fig
...
3 2D Riemann problem for gas dynamics: 400 × 400 grid, initial data in
Equation (7
...
For four shocks producing a narrow jet, try



0
...
206 

w2 = 
 0 
0
...
138
1
...
206
0
...
5
0
w1 =  
0
1
...



0
...
0 

w4 = 
 1
...
3

(Recall that the flux variable vector w is ordered ρ, v then p
...
3
...
17)

7
...
5065
1
...
8939
0

w2 = 
w1 =  
 0 
0
0
...
1




...
1
0
...
8939
 0
...
8939
0
...
1
0
...
75
 0
...
5 
−0
...

1
3
−0
...
75


w3 = 
w4 = 
 0
...
5 
1
1

505

(7
...
19)

The next problem involves two shocks and two contact discontinuities:




1
0
...
7276
 0 


w2 = 
w1 = 
 0 
 0 
1

0
...
4


...
7276
1


(7
...
5197
1
−0
...
1 


w2 = 
w1 = 
 −0
...
3
0
...
21)




0
...
4
 0
...
5313


w3 = 
w4 = 
−0
...
1 
0
...
4276

506

Methods in Multiple Dimensions




2
 0 

w2 = 
−0
...
0625
 0 

w3 = 
0
...
4




1
 0 

w1 = 
−0
...

0
...
5197 

w4 = 


0
−1
...
22)

Exercises for 7
...
2
...
Test your favorite
numerical scheme in 2D on your Riemann problem
...
2
...
Verify your results numerically
...
2
...
Verify your solution numerically
...
2
...
19)
...
What
order of accuracy is your numerical method actually achieving?
7
...
5 We did not discuss MHD in multiple dimensions because there are special issues regarding the
treatment of the ∇ · B = 0 condition
...


7
...
3
...

∂t
∂x1 ∂x2 ∂x3
With spatial operator splitting, we would select a method for the one-dimensional
problem
∂u ∂f
+
= 0,
∂t
∂x
which we will write as
uin+ = uin − [f i+1/2 (un ) − f i−1/2 (un )]

t

...
3 Numerical Methods in Three Dimensions

A first-order operator splitting scheme for the partial differential equation using the
one-dimensional method would take the form
uin+1,n,n = uinjk − (f 1 )i+1/2, jk (un ) − (f 1 )i−1/2, jk (un )
jk
uin+1,n+1,n
jk
uin+1
jk

=
=

(7
...
23b)

...
23c)

No matter what the order of the one-dimensional scheme might be, the resulting
operator splitting scheme would be at most first-order accurate in time
...
The
operator splitting scheme is typically stable if each of its individual steps is stable
...

∂x3

Other pairings of the partial derivatives would also work
...

2 x3,k

As with the two-dimensional scheme, it is possible to combine the last update in
the third coordinate direction at the end of one timestep with the first update at the
beginning of the next timestep
...
Such splittings
necessarily involve negative splitting coefficients, which complicate upwinding
issues and stability considerations
...
This approach can reach a pre-determined temporal order using
lower-order schemes, such as first- or second-order operator splitting
...

Neither of these two approaches are useful for increasing spatial order
...
3
...
Let us denote the intervals
I1,i = (x1,i−1/2 , x1,i+1/2 )
I2, j = (x2, j−1/2 , x2, j+1/2 )
I3,k = (x3,k−1/2 , x3,k+1/2 )
...


(7
...
3 Numerical Methods in Three Dimensions

We will define cell averages
uinjk x1,i x2, j x3,k ≈

u(x1 , x2 , x3 , t n ) dx1 dx2 dx3
I3,k

I2, j

I1,i

and flux side and time integrals
n+1/2
f i+1/2, jk



t n+1
tn

n+1/2
f i j,k+1/2



I2, j

I1,i

I3,k

I2, j

I1,i

t n+1

n+1/2

f i, j+1/2,k ≈

F(u(x1,i+1/2 , x2 , x3 , t))e1 dx2 dx3 dt
I3,k

tn

F(u(x1 , x2, j+1/2 , x3 , t))e2 dx3 dx1 dt

t n+1
tn

F(u(x1 , x2 , x3,k+1/2 , t))e3 dx1 dx2 dt

in order to perform a conservative difference
n+1/2

n+1/2

n+1/2

uin+1 x1,i x2, j x3,k = uinjk x1,i x2, j x3,k + f i−1/2, jk − f i+1/2, jk + f i, j−1/2,k
jk
n+1/2

n+1/2

n+1/2

− f i, j+1/2,k + f i j,k−1/2 − f i j,k+1/2
...
25)

Individual schemes will differ in how the flux integrals are computed
...
26a)

n+1/2
f i, j+1/2,k
n+1/2
f i j,k+1/2

n
= F R uinjk , ui, j+1,k

e2 x3,k x1,i t n+1/2

(7
...


(7
...
If the velocity vector
v is constant and F(u) = uv , then the donor cell upwind flux integrals are
n
f i+1/2, jk = uinjk v+ + ui+1, jk v−
1
1

x2, j x3,k t n+1/2

n
f i, j+1/2,k = uinjk v+ + ui, j+1,k v−
2
2

x3,k x1,i t n+1/2

f i j,k+1/2 = uinjk v+ + uinj,k+1 v−
3
3

x1,i x2, j t n+1/2
...


The coefficients in this equation are nonnegative if and only if the timestep satisfies
|v1 |
|v2 |
|v3 |
+
+
x1,i
x2, j
x3,k

t n+1/2 ≤ 1
...
27)

If this inequality is violated, then the donor cell upwind scheme is unstable
...
3
...
This scheme is
most easily developed for linear advection, for which the analytical solution is
˜
u(x, t) = u0 (x − vt)
...
The
equation i jk un+1 (x) dx = Ri jk un (x) dx can be written
uin+1 x1,i x2, j x3,k
jk
= uinjk

x1,i − |v1 | t n+1/2

x2, j − |v2 | t n+1/2

n
n
+ ui−1, jk v+ + ui+1, jk (−v− )
1
1
n
n
+ ui, j−1,k v+ + ui, j+1,k (−v− )
2
2

+ uinj,k−1 v+ + uinj,k+1 (−v− )
3
3

t n+1/2
t n+1/2
t n+1/2

x3,k − |v3 | t n+1/2

x2, j − |v2 | t n+1/2
x3,k − |v3 | t n+1/2
x1,i − |v1 | t n+1/2

x3,k − |v3 | t n+1/2
x1,i − |v1 | t n+1/2
x2, j − |v2 | t n+1/2

+ ui−1, j−1,k v+ v+ + ui+1, j−1,k (−v− )v+ + ui−1, j+1,k v+ (−v− ) + ui+1, j+1,k (−v− )(−v− )
1 2
1
2
1
2
1
2
t n+1/2

2

x3,k − |v3 | t n+1/2

511

7
...

x1,i x2, j x3,k
This stability restriction is considerably better than the donor cell stability restriction, and identical to the first- and second-order operator splitting stability
restrictions
...


(See Figure 7
...
) The donor cell fluxes are associated with integrating the initial
data un over the signed regions
Si+1/2, jk = (x1,i+1/2 − v1 t n+1/2 , x1,i+1/2 ) × I2, j × I3,k
Si, j+1/2,k = I1,i × (x2, j+1/2 − v2 t n+1/2 , x2, j+1/2 ) × I3,k
Si j,k+1/2 = I1,i × I2, j × (x3,k+1/2 − v3 t n+1/2 , x3,k+1/2 )
...
Correspondingly,
each parallelepiped can in turn be decomposed as a donor cell region plus or minus
prisms associated with the cell edges (see Figure 7
...


3


...
7
...
Further, there are two prisms at each cell edge, each
determined by having one side perpendicular to one of the two coordinate axes that
are perpendicular to the edge
...
The edge prisms can be further decomposed in terms
of prisms contained within the grid cells, and tetrahedrons associated with the cell
corners (see Figure 7
...


7
...
The average of un is the
same for all three of these, so we do not distinguish them in our notation
...
3
...
1 Linear Advection with Positive Velocity
The expressions for the corner transport upwind scheme with general velocity field
are too long to present here
...
The averages over the
prisms Q i, j±1/2,k±1/2 , Q i±1/2, j,k±1/2 and Q i±1/2, j±1/2,k primarily within cell i jk
are (respectively)
v1 t n+1/2
3 x1,i
v2 t n+1/2
1−
3 x2, j
v3 t n+1/2
1−
3 x3,k

n+1/3,1

= uinjk 1 −

n+1/3,2

= uinjk

n+1/3,3

= uinjk

ui jk
ui jk
ui jk

v1 t n+1/2
3 x1,i
v2 t n+1/2
+ ui, j−1,k
3 x2, j
v3 t n+1/2
+ ui j,k−1

...
28a)
(7
...
28c)

Using these definitions, we see that
n
ui−1, j−1,k−1 v1 t n+1/2 v2 t n+1/2 v3 t n+1/2
n+1/3,1

v1 t n+1/2
3 x1,i
v2 t n+1/2
1−
3 x2, j
v3 t n+1/2
1−
3 x3,k

n
= ui, j−1,k−1 − ui, j−1,k−1 1 −
n+1/3,2

n
+ ui−1, j,k−1 − ui−1, j,k−1
n+1/3,3

n
+ ui−1, j−1,k − ui−1, j−1,k

x1,i v2 t n+1/2 v3 t n+1/2
x2, j v3 t n+1/2 v1 t n+1/2
x3,k v1 t n+1/2 v2 t n+1/2
...
Algebraically, we are using equations (7
...
Using the definitions of the prism averages again, we obtain
n
ui−1, j−1,k v1 t n+1/2 v2 t n+1/2 ( x3,k − v3 t n+1/2 )
n
+ ui−1, j,k−1 v3 t n+1/2 v1 t n+1/2 ( x2, j − v2 t n+1/2 )
n
+ ui, j−1,k−1 v2 t n+1/2 v3 t n+1/2 ( x1,i − v1 t n+1/2 )
n
+ ui−1, j−1,k−1 v1 t n+1/2 v2 t n+1/2 v3 t n+1/2

514

Methods in Multiple Dimensions

n+1/3,1

= ui, j−1,k−1 x1,i v2 t n+1/2 v3 t n+1/2
n+1/3,2

+ ui−1, j,k−1 x2, j v3 t n+1/2 v1 t n+1/2
n+1/3,3

+ ui−1, j−1,k x3,k v1 t n+1/2 v2 t n+1/2
n
n
n
− ui−1, j−1,k + ui−1, j,k−1 + ui, j−1,k−1 v1 t n+1/2 v2 t n+1/2 v3 t n+1/2
n+1/3,1

n+1/3,1

n+1/3,1

= ui, j−1,k−1 − ui, j−1,k − ui j,k−1

2
3

x1,i v2 t n+1/2 v3 t n+1/2

n+1/3,2

n+1/3,2

n+1/3,2

x2, j v3 t n+1/2 v1 t n+1/2

n+1/3,3

n+1/3,3

n+1/3,3

x3,k v1 t n+1/2 v2 t n+1/2

+ ui−1, j,k−1 − ui−1, jk − ui j,k−1

+ ui−1, j−1,k − ui−1, jk − ui, j−1,k
n
+ ui−1, jk v1 t n+1/2

1−

v2 t n+1/2
3 x2, j

x2, j v3 t n+1/2 + 1 −

v3 t n+1/2
3 x3,k

x3,k v2 t n+1/2

n
+ ui, j−1,k v2 t n+1/2

1−

v1 t n+1/2
3 x1,i

x1,i v3 t n+1/2 + 1 −

v3 t n+1/2
3 x3,k

x3,k v1 t n+1/2

+ uinj,k−1 v3 t n+1/2

1−

v1 t n+1/2
3 x1,i

x1,i v2 t n+1/2 + 1 −

v2 t n+1/2
3 x2, j

x2, j v1 t n+1/2
...
Algebraically, we are using (7
...
Next, the sum of the
integrals in Ri jk − i jk is
n
ui−1, jk v1 t n+1/2 ( x2, j − v2 t n+1/2 )( x3,k − v3 t n+1/2 )
n
+ ui, j−1,k v2 t n+1/2 ( x3,k − v3 t n+1/2 )( x1,i − v1 t n+1/2 )

+ uinj,k−1 v3 t n+1/2 ( x1,i − v1 t n+1/2 )( x2, j − v2 t n+1/2 )
n
+ ui−1, j−1,k v1 t n+1/2 v2 t n+1/2 ( x3,k − v3 t n+1/2 )
n
+ ui−1, j,k−1 v3 t n+1/2 v1 t n+1/2 ( x2, j − v2 t n+1/2 )
n
+ ui, j−1,k−1 v2 t n+1/2 v3 t n+1/2 ( x1,i − v1 t n+1/2 )
n
+ ui−1, j−1,k−1 v1 t n+1/2 v2 t n+1/2 v3 t n+1/2
n+1/3,1

n+1/3,1

n+1/3,1

= ui, j−1,k−1 − ui, j−1,k − ui j,k−1

x1,i v2 t n+1/2 v3 t n+1/2

n+1/3,2

n+1/3,2

n+1/3,2

x2, j v3 t n+1/2 v1 t n+1/2

n+1/3,3

n+1/3,3

n+1/3,3

x3,k v1 t n+1/2 v2 t n+1/2

+ ui−1, j,k−1 − ui−1, jk − ui j,k−1

+ ui−1, j−1,k − ui−1, jk − ui, j−1,k

515

7
...

3

is

x2, j − v2 t n+1/2

x3,k − v3 t n+1/2

= uinjk x1,i x2, j x3,k
− uinjk v1 t n+1/2 x2, j x3,k + v2 t n+1/2 x3,k x1,i + v3 t n+1/2 x1,i x2, j
+ uinjk 1 −

v1 t n+1/2
3 x1,i

+ uinjk 1 −

v2 t n+1/2
v1 t n+1/2 x2, j v3 t n+1/2
3 x2, j

+ uinjk 1 −

v3 t n+1/2
v1 t n+1/2 v2 t n+1/2 x3,k
3 x3,k

x1,i v2 t n+1/2 v3 t n+1/2

= uinjk x1,i x2, j x3,k
− uinjk v1 t n+1/2 x2, j x3,k + v2 t n+1/2 x3,k x1,i + v3 t n+1/2 x1,i x2, j
+ v1 t n+1/2 x2, j x3,k

n+1/3,2

ui jk

n
− ui, j−1,k

n+1/3,3

+ ui jk
+ v2 t n+1/2 x3,k x1,i

n+1/3,1

ui jk

n+1/3,3

+ v3 t n+1/2 x1,i x2, j

n+1/3,1

ui jk

v3 t n+1/2 v2 t n+1/2
3 x3,k
2 x2, j

v1 t n+1/2 v3 t n+1/2
3 x1,i
2 x3,k

− uinj,k−1

n
− ui−1, jk

n+1/3,2

+ ui jk

− uinj,k−1

n
− ui−1, jk

+ ui jk

v2 t n+1/2 v3 t n+1/2
3 x2, j
2 x3,k

v3 t n+1/2 v1 t n+1/2
3 x3,k
2 x1,i

v1 t n+1/2 v2 t n+1/2
3 x1,i
2 x2, j

n
− ui, j−1,k

v2 t n+1/2 v1 t n+1/2
3 x2, j
2 x1,i

516

Methods in Multiple Dimensions

Putting all of the integrals over the pieces of Ri jk together, we obtain
uin+1 x1,i x2, j x3,k
jk
= uinjk x1,i x2, j x3,k
n+1/3,2

n+1/3,2

+ v1 t n+1/2 x2, j x3,k −uinjk + ui jk
n+1/3,3

+ ui jk

− ui j,k−1

v3 t n+1/2
2 x3,k

v2 t n+1/2
2 x2, j

n+1/3,3

− ui, j−1,k
n+1/3,2

n+1/3,2

n
+ v1 t n+1/2 x2, j x3,k ui−1, jk + ui−1, j,k−1 − ui−1, jk
n+1/3,3

n+1/3,3

+ ui−1, j−1,k − ui−1, jk
n+1/3,1

+ v2 t n+1/2 x3,k x1,i −uinjk + ui jk
n+1/3,3

+ ui jk

v2 t n+1/2
2 x2, j

n+1/3,1

− ui−1, jk

v3 t n+1/2
2 x3,k

v1 t n+1/2
2 x1,i

n+1/3,3

− ui, j−1,k
n+1/3,1

n+1/3,1

n
+ v2 t n+1/2 x3,k x1,i ui, j−1,k + ui, j−1,k−1 − ui, j−1,k
n+1/3,3

n+1/3,3

+ ui−1, j−1,k − ui, j−1,k
n+1/3,1

+ v3 t n+1/2 x1,i x2, j −uinjk + ui jk

n+1/3,1

− ui, j−1,k

v2 t n+1/2
2 x2, j

− ui−1, jk

v1 t n+1/2
2 x1,i
n+1/3,1

n+1/3,2

+ v3 t n+1/2 x1,i x2, j uinj,k−1 + ui, j−1,k−1 − ui j,k−1
n+1/3,2

n+1/3,2

+ ui−1, j−1,k − ui j,k−1
n+1/2, L

v3 t n+1/2
2 x3,k

v1 t n+1/2
2 x1,i

n+1/3,1

n+1/3,2

+ ui jk

v3 t n+1/2
2 x3,k

n+1/2, L

v2 t n+1/2
2 x2, j

v1 t n+1/2
2 x1,i

≡ uinjk x1,i x2, j x3,k + − ui+1/2, jk + ui−1/2, jk v1 t n+1/2 x2, j x3,k
n+1/2, L

n+1/2, L

+ −ui, j+1/2, j + ui, j−1/2,k v2 t n+1/2 x3,k x1,i
n+1/2, L

n+1/2, L

+ −ui j,k+1/2 + ui j,k−1/2 v3 t n+1/2 x1,i x2, j
...
3 Numerical Methods in Three Dimensions

517

The terms in the braces in this equation are the averages over the side parallelepipeds
Pi±1/2, jk , Pi, j±1/2,k and Pi j,k±1/2
...

2 x2, j
2 x1,i

Similarly, the averages over the edge prisms can be written

n+1/3,1

n
= uinjk − uinjk − ui−1, jk

t n+1/2
v1 t n+1/2
n
= uinjk − F(uinjk ) − F(ui−1, jk ) e1
3 x1,i
3 x1,i

n+1/3,2

n
= uinjk − uinjk − ui, j−1,k

v2 t n+1/2
t n+1/2
n
= uinjk − F(uinjk ) − F(ui, j−1,k ) e2
3 x2, j
3 x2, j

n+1/3,3

= uinjk − uinjk − uinj,k−1

ui jk
ui jk
ui jk

v3 t n+1/2
t n+1/2
= uinjk − F(uinjk ) − F(uinj,k−1 ) e3

...
3
...
2 Linear Advection with Arbitrary Velocity
Next, let us extend this scheme to linear advection problems with arbitrary velocity
fields
...

3 x1,i

n
n
uinjk v+ + ui+1, jk v− − ui−1, jk v+ + uinjk v−
1
1
1
1

n
= uinjk − F R uinjk , ui+1, jk ; 0

518

Methods in Multiple Dimensions
n+1/3,2

The expressions for ui jk

n+1/3,2 +
v3

n+1/2, L

ui+1/2, jk = uinjk −


ui jk

n+1/3,3 +
v2

ui jk

n+1/3,2

n+1/3,3

n+1/3,3

− F R ui jk



t n+1/2
2 x3,k

n+1/3,2 −
v3

n+1/3,2

t n+1/2
2 x2, j

+ ui, j+1,k v− − ui, j−1,k v+ + ui jk
2
2
n+1/3,2

n+1/2, R

are similar
...

2 x2, j

n+1/2, R

The expressions for ui, j+1/2,k , ui, j+1/2,k , ui, j,k+1/2 and ui, j,k+1/2 are similar
...
The corner transport upwind scheme for general linear advection is completed with the
conservative difference (7
...

7
...
3
...
First, we compute the flux integrals
n
n
(f 1 )i+ 1 , jk = F R winjk , wi+1, jk ; 0 e1 x2, j x3,k t n+1/2 ,
2

n
and the flux integrals (f 2 )i, j+ 1 ,k and (f 3 )inj,k+ 1 using similar expressions
...
3 Numerical Methods in Three Dimensions

costs a total of three Riemann problems per cell
...
An alternative approach
n+ 1 ,1

n+1/3,1

would be to compute ui jk
in an obvious fashion, then decode wi jk 3
Next, we compute the flux integrals
n+ 1 ,2

n+ 1 ,2

n+ 1 ,2

n+ 1 ,3

n+ 1 ,3

3
(f 1 )i+ 13, jk = F R wi jk 3 , wi+1, jk ; 0
2
n+ 1 ,3
3
i+ 1 , jk
2

(f 1 )

3
= F R wi jk 3 , wi+1, jk ; 0

from it
...
This costs a total of another six Riemann problems per cell
...

Similar expressions hold in the other coordinate directions
...
This costs
2
2
another three Riemann problems per cell
...
25)
...


7
...
3
...
If we
use midpoint-rule quadratures for the flux integrals, then we evaluate the flux in

(7
...

+
+
∂x1 2
∂x1
∂x2
∂x3 2

u x1 +

The first-order corner transport upwind scheme essentially computes
∂Fe2 n+1/3,3 t n+1/2 ∂Fe3 n+1/3,2
ui jk
ui jk

∂x2
2
∂x3
+ O( x2, j t n+1/2 ) + O( x3,k t n+1/2 )
...
This suggests that a second-order corner transport
upwind scheme can be obtained by a simple modification of the first-order scheme
...
29) with
n+ 1 , L

wi+ 12, jk = winjk + Y1 I −

1

2

n+ 1 , R

wi− 12, jk = winjk − Y1 I −
2

1

t n+1/2
∂w
Y−1
1
x1,i
∂x1
n+1/2
t
∂w
Y−1
1
x1,i
∂x1

x1,i
n+ 1 ,1
− hi jk 2
2
x1,i
n+ 1 ,1
− hi jk 2
...
Similar
equations hold in the other coordinate directions
...
Numerical experiments in [14]
2
indicate that the Colella form is preferable for miscible displacement computations
in two dimensions
...
The only modification would be to the states at which the
n+ 1 ,2

n+ 1 ,3

fluxes (f 1 )i+ 13, jk and (f 1 )i+ 13, jk are evaluated
...
4 Curvilinear Coordinates

n+1/3,2

edges in the first coordinate direction, replacing each of the former states wi jk
n+1/3,3
and wi jk

...
Saltzman [140] also described some alternative forms of
his 3D corner transport upwind scheme
...
3
...
We will attempt to describe it succinctly here
...

2 x2, j

These expressions require the evaluation of

+
n
n
ui j,k+1/2 = uinj,k+1/2 − Ai, j+1/2,k+1 ui, j+1/2,k+1 + Ai, j−1/2,k+1 ui, j−1/2,k+1
n+1/3,2


+
n
n
− Ai, j+1/2,k ui, j+1/2,k − Ai, j−1/2,k ui, j−1/2,k

t n+1/2
3 x2, j

n+1/3,3

and a similar expression for ui, j+1/2,k
...
Similar expressions are used for the flux increments in the
other coordinate directions
...
f of
CLAWPACK
...
4 Curvilinear Coordinates
Sometimes it is useful to employ curvilinear coordinates in numerical computation
...
Other cases arise in specific problems, such as stream functions in
incompressible flow [11, 127]
...
The discussion that follows is adopted from [116]
...
4
...
Let H be the matrix of scale
factors
∂a

...
As a result, the
matrix
Q≡

∂a −1
H
∂y

is orthogonal
...

Suppose that we are given a vector x in the Cartesian coordinate system
...
Since Q is orthogonal, this is
easy:
w = Q x
...
Thus the matrix representation of the linear
transformation x → Mx in the curvilinear coordinate system is w → (Q MQ)w
...
Since
∂ω ∂y
∂ω
∂ω
=
=
∂a
∂y ∂a
∂y

∂a
∂y

−1

=

∂ω
∂ω −1
(QH)−1 =
H Q ,
∂y
∂y

we have
∇aω

= QH−1 ∇ y ω
...
We compute
∂x
∂x ∂y
∂Qw −1
=
=
H Q
...

∂a
∂y

(7
...
4 Curvilinear Coordinates

In order to compute the divergence of x, we take the trace of
∂x
∂a

· x = tr

∇a

∂x ∂y
∂y ∂a

= tr

= tr

∂x
:
∂a

∂y ∂Qw

...
18) that the matrix of minors is divergence-free
...


We can add this zero to the previous expression to obtain
∇a

· x = tr

∂y ∂Qw
∂a ∂y

+ ∇y ·

∂y ∂a
∂a ∂y

Qw
...


(7
...
If S ≡ Q SQ, then
Q (∇ a · S) = Q
=

∇y

˜
· H−1 SQ

ei ei Q

∇y

∂a
∂y

˜
· H−1 SQ

∂a
∂y

∂a
∂y

Qei

i

ei

∇y

˜
· H−1 SQ

ei

∇y

˜
· H−1 SQ Qei

ei

=

∇y

˜
· H−1 Sei

i

=
i

=
i

∂y
∂a

∂a
∂y

∂a
∂y

∂y
∂a
∂y
∂a
˜
− tr H−1 SQ

∂Qei ∂a
∂y ∂y

∂Qei ∂a
∂y ∂y

˜
− tr H−1 SQ

∂y
∂a
∂y

...
4
...
It follows that the Cartesian coordinate vector is
a = r sin θ cos φ,

r sin θ sin φ,

r cos θ
...
32)

524

Methods in Multiple Dimensions

From this, it is easy to compute

sin θ cos φ
∂a 
= sin θ sin φ
∂y
cos θ

r cos θ cos φ
r cos θ sin φ
−r sin θ

and


−r sin θ sin φ
r sin θ cos φ 
0



H2 =

∂a
∂y

∂a
∂y

=

1
r2
r sin θ
2

Similarly, the orthogonal matrix of unit base vectors is

sin θ cos φ cos θ cos φ
∂a −1 
Q=
H = sin θ sin φ cos θ sin φ
∂y
cos θ
−sin θ


...

0

Note that the curvilinear derivatives of the columns of Q are
∂Qer
= Qeθ eθ + Qeφ sin θeφ ,
∂y
∂Qeθ
= −Qer eθ + Qeφ cos θeφ ,
∂y


cos φ
∂Qeφ
= −  sin φ  eφ
...

−x1 sin φ + x2 cos φ

Next, we compute the gradient of a scalar using Equation (7
...

∂r
∂θ
∂φ sin θ
∂ω
∂r

cos θ −

∂ω sin θ
∂θ r

1/(r sin θ )

  ∂ω 
∂r
  ∂ω 
 ∂θ 
∂ω
∂φ

(7
...
4 Curvilinear Coordinates

525

The deformation gradient J has physical components
∂x
∂Qw −1
Q=Q
H
Q JQ ≡ Q
∂a
∂y


w cos φ
∂wr
1 ∂wr
1 ∂wr


(
− wθ )
− rφsin θ
∂r
r ∂θ
r sin θ ∂φ
Jrr Jr θ Jr z


w sin φ
1 ∂wθ
1
 = Jθr Jθθ Jθ z 
...
34)
− rφsin θ
=  ∂wθ r ( ∂wθ + wr )
∂θ
r sin θ ∂φ
 ∂r

∂wφ
cos
1 ∂wφ
1 ∂wφ
Jzr Jzθ Jzz
+ wr + wθsin θθ
∂r
r ∂θ
r sin θ ∂φ
r
r
Similarly, the divergence of a vector x can be computed from Equation (7
...

= 2
r ∂r
r sin θ
∂θ
r sin θ ∂φ

·x=

(7
...
32):
Q (∇ a · S) = Q

=

∇y

· H−1 T Q

∂a
∂y

∂y
∂a


˜
˜
˜
˜
˜
∂ Sφr 1
S +S
∂r 2 Srr 1
1
+ ∂ Sθr sin θ r sin θ + ∂φ r sin θ − θ θ r φφ
∂r r 2
∂θ
 ∂r 2 S

˜
˜
˜
˜
 ˜r θ 12 + ∂ Sθ θ sin θ 1 + ∂ Sφθ 1 + Sθr − Sφφ cos θ 
...

∂t
The physical components of the flux are

  
f 1 sin θ cos φ + f 2 sin θ sin φ + f 3 cos θ
fr
 f θ  = f 1 cos θ cos φ + f 2 cos θ sin φ − f 3 sin θ 
...

+
2
∂t
∂r r
∂θ
r sin θ
∂φ r sin θ
Of course, partial differential equations for conservation laws are not as complete a
description as the integral form of the law
...
36)

526

Methods in Multiple Dimensions

form of the conservation law over a spherical element, we obtain
0=
=

t2

θ2

r2

φ2

t1
r1
θ1
φ1
r2
θ2
φ2
θ1
t2

r1

+

φ1
θ2
φ2
θ1
r2

φ1
φ2

t2

+

r1
r2

φ1
θ2

r1

θ1

t1

+
t1

∂f r r 2 sin θ
∂f θ r sin θ
∂f φ r
+
+
∂r
∂θ
∂φ

r 2 sin θ dφ dθ dr dt

[u(r, θ, φ, t2 ) − u(r, θ, φ, t1 )] dφ sin θ dθr 2 dr

t2

t1

1
∂u
+ 2
∂t
r sin θ

2
2
f r (r2 , θ, φ, t)r2 − f r (r1 , θ, φ, t)r1 dφ sin θ dθ dt

[f θ (r, θ2 , φ, t) sin θ2 − f θ (r, θ1 , φ, t) sin θ1 ] dφ r dr dt
f φ (r, θ, φ2 , t) − f φ (r, θ, φ1 , t) dθ r dr dt
...

It is common to assume that the motion of a material is such that the physical
components are functions of r only, and there are no θ or φ component of arrays
...

wr cos θ
The gradient of a scalar simplifies to
∇aω

= QH−1 ∇ y ω =

 ∂ω

∂r
 ∂ω
 ∂r

sin θ cos φ




sin θ sin φ 
...

r 2 ∂r

Consider a scalar conservation law in Cartesian coordinates:
∂u
+ ∇ x · f (u) = 0
...
In this case, the
conservation law simplifies to
∂ur 2 ∂f r r 2
+
= 0
...
4 Curvilinear Coordinates

527

If we integrate the spherically symmetric form of the conservation law over a
spherical shell, we obtain
0=
=

1

r2

t2
t1

π

r2
r1

0


0

1 ∂f r r 2 sin θ 2
∂u
+ 2
r sin θ dφ dθ dr dt
∂t
r sin θ
∂r
t2

[u(r, t2 ) − u(r, t1 )] r 2 dr +

r1

t1

2
f r (r2 , t)r2 − f r (r1 , t)r1 2 dt

7
...
2
...

∂t
We can use equation (7
...

+
2
∂t
∂r r
∂θ
r sin θ
∂z r sin θ
Eulerian conservation of momentum in Cartesian coordinates is
∂vρ
+ ∇ x · (vρv + I p) = gρ
...
36) to obtain conservation of momentum in spherical
coordinates:


gr ρ
 gθ ρ  ≡ Q gρ = ∂Q vρ + Q ∇ a · (vρv + I p)
∂t
gφ ρ


2
(v2 +v2 )ρ+2 p
∂vφ vr ρ 1
∂(vr ρ+ p)r 2 1
∂vθ vr ρ sin θ 1
θ
φ


+
+ ∂φ r sin θ −
∂r
∂θ
r sin θ
r
r2


∂  r   ∂vr vθ ρr 2 1

∂(v2 ρ+ p) sin θ 1
(v2 ρ+ p) cos θ 
∂vφ vθ ρ 1
vφ vr ρ
θ
=
vθ ρ +  ∂r r 2 + θ ∂θ

...


+

528

Methods in Multiple Dimensions

For spherically symmetric gas dynamics, source terms due to gravity are zero
...

+
∂t
∂r r 2
Eulerian conservation of momentum in spherical symmetry is
0=

2
∂vr ρ
∂(vr ρ + p)r 2 1
∂vr ρ
∂v2 ρr 2 1
2p
∂p
+
=
+ r

...

+
∂t
∂r
r2

We can write this system in the form of a system of partial differential equations



  
0
ρ
vr ρr 2
∂ 
1 ∂ 

  ∂p 
2
2
vr ρr
 vr ρ

+ 2
 +  ∂r  = 0,
∂t
r ∂r
1 2
1 2
vr [(e + 2 vr )ρ + p]r 2
(e + 2 vr )ρ
0
or in integral form
n+1
ρ

r 2  vr ρ
dr =
1 2
(e + 2 vr )ρ


r j+1/2
r j−1/2

n
ρ
 dr
r 2  vr ρ
1 2
r j−1/2
(e + 2 vr )ρ


vr ρ
t n+1
2



dt r 2
vr ρ
j+1/2
n
t
2
vr [(e + 1 vr )ρ + p] j+1/2
2


vr ρ
t n+1
2


+
dt r 2
vr ρ
j−1/2
n
t
2
vr [(e + 1 vr )ρ + p] j−1/2
2
 
0
t n+1
r j+1/2
 ∂ p  r 2 dr dt
...

 vr ρ
un ≡  vr ρ
j
r3
− r3
1 2
1 2
j+1/2
j−1/2 r j−1/2
(e + 2 vr )ρ j
(e + 2 vr )ρ

529

7
...
2
...
The characteristic tracing and Riemann
n+1/2
problem solution would also provide a values for the pressures p j± 1 in the pressure
2
derivative for the momentum equation
...
13 can be designed so that they provide values for the conserved quantities
at the solution of the Riemann problem, from which the flux variables can be
decoded
...

r j+1/2 − r j−1/2

This scheme is similar to the approach in [35]
...
LeVeque [97, page 376] suggests that
in wave propagation schemes the source terms due to curvilinear coordinates can
be treated via operator splitting
...

7
...
2
...

Sφr Sφθ Sφφ


v
1 ∂vr
− rφ
r sin θ ∂φ
v cos φ
1 ∂vθ
− rφ sin φ 
...
The physical components of the first Piola–Kirchhoff
stress are


Trr Tr θ Tr φ
 Tθr Tθθ Tθ φ 
Tφr Tφθ Tφφ
≡ T = Q S J− Q|J|



Srr Sr θ Sr φ
Jθ θ Jφφ − Jφθ Jθφ −Jθr Jφφ + Jφr Jθφ Jθr Jφθ − Jφr Jθθ
=  Sθr Sθ θ Sθ φ  −Jr θ Jφφ + Jφθ Jr φ Jrr Jφφ − Jφr Jθφ −Jrr Jφθ + Jφr Jr θ 
...
Thus conservation of momentum in
spherical coordinates is


gr ρ
 gθ ρ  = Q gρ = ∂Q vρ − Q ∇ a · (J−1 |J|S)
∂t
gφ ρ
 ∂r 2 T 1

∂Tφr 1
T +T
∂Tθr sin θ 1
rr


+ ∂φ r sin θ − θ θ r φφ
2 +
∂r r
∂θ
r sin θ

∂  r   ∂r 2 Tr θ 1
∂Tφθ 1
Tφφ cos θ 
1
θ
=
vθ ρ −  ∂r r 2 + ∂Tθ∂θsin θ r sin θ + ∂φ r sin θ + Trθr − r sin θ 
...

In spherical symmetry, the deformation gradient J =
 ∂wr

Q

∂x
Q= 0
∂a
0

∂r

0
wr
r

0

∂x
∂a


0
0 
...
4 Curvilinear Coordinates

The physical components of a spherically symmetric Cauchy stress tensor are

˜
Srr 0
0
˜
Q SQ =  0 Sθθ 0 
...
Thus the physical components of the
stress divergence are


˜
˜
˜
S +S
1 ∂r 2 Srr
− θ θ r φφ
2

 r ∂r
Q (∇ a · S) = 

...

vr
r

We can also write
∂|J|

=
∂t
∂t

2
wr ∂wr
r 2 ∂r

=

2
2
2vr wr ∂wr
wr ∂vr
1 ∂vr wr
+ 2
= 2

...


2
∂t
∂r r
r

Finally, cylindrically symmetric conservation of energy is
2
∂( + 1 vr )ρ
1 ∂Trr vr r 2
2
− 2
= (ω + gr vr )ρ
...


532

Methods in Multiple Dimensions

Let us describe the computations involved in updating the equations of motion
...


n+1/2

The radial stresses (Trr ) j+1/2 can be computed by a slope limiter algorithm, as in
Section 6
...
5
...

+
=
−h r 0 ∂r Trr
h θ vr
∂t Trr
r

Note that
1
0 −ρ
−h r 0

1
1
1
1
=
λρ −λρ
λρ −λρ

where
λ=

h r /ρ
...
4 Curvilinear Coordinates

for the characteristic expansion coefficients, apply a limiter to determine cn , and
j
compute
vr
Trr
vr
Trr

n+1/2,L
j+1/2

vr
=
Trr

n+1/2,R

=
j−1/2

vr
Trr

n
j
n


j

n

1
+
−λρ
1
λρ

1−

λn t n+1/2
j
rj

j

n

1−
j

λn t n+1/2
j
rj

n
2(Trr −Tθ θ )
t n+1/2

+
h θ vr
2
2
r
j
n
−T
er cn
t n+1/2
f r + 2(Trrrρ θ θ )
j
+
h θ vr
2
2
r
j

eθ c n
j

fr +

In summary, we can perform limiting and characteristic tracing to determine
velocity and radial stress at the cell sides and half-time
...

j+1/2 + (vr ) j+1/2 t
j+1/2

The determinant of the deformation gradient is given by
|Q JQ| =

n
3
3
(wn
j+1/2 )r − (w j−1/2 )r
3
r3
j+1/2 − r j−1/2

and its r, r component is given by
∂wr
∂r

n

=
j

n
(wn
j+1/2 )r − (w j−1/2 )r

r j+1/2 − r j−1/2


...
Then we can use the momentum equation to
update the velocity
...
4
...
It follows
that the Cartesian coordinate vector is
a = r cos θ, r sin θ, z
...


r2
1

Thus the orthogonal matrix of unit base vectors is


cos θ − sin θ 0
∂a −1 
Q=
H = sin θ cos θ 0
...

∂y

Given a vector x in Cartesian coordinates, we can compute the physical components of x to be
  
 


x1
wr
x1 cos θ + x2 sin θ
cos θ sin θ 0
wθ  = w = Q x = − sin θ cos θ 0 x2  = −x1 sin θ + x2 cos θ 
...
30)
  ∂ω   ∂ω cos θ − ∂ω sin θ 
cos θ − sin θ 0
∂r
∂r
∂θ r
r
  

−1
cos θ
∇ a ω = QH ∇ y ω =  sin θ
0  ∂ω  =  ∂ω sin θ + ∂ω cos θ 
...

Jzr Jzθ Jzz


(7
...
31):
∇a

·x=

∂y
∂a

∇y

· H−1 w

∂a
∂y

=

1 ∂r wr
∂wθ
∂r wz
+
+

...
38)

535

7
...
Let S = Q SQ
...
32) shows us that
∂Qei ∂a
∂a
˜
−tr H−1 SQ
∂y
∂y ∂y
i

˜
˜
S
∂ Srr r
˜
+ ∂∂θθr + ∂ Szr r − Sθθ
∂r
∂z
 ∂S r
1
˜r
˜
˜

˜
=  ∂rθ + ∂∂θ θ + ∂ Szθ r + Sθr 
...

∂t
The physical components of the flux are

  
f 1 cos θ + f 2 sin θ
fr
f θ  = −f 1 sin θ + f 2 cos θ 
...


However, the more useful expression is the integral form of the law
...


It is common to assume that the motion of a material is such that the physical
components are functions of r and z only, and there is no θ component of arrays
...
39)

536

Methods in Multiple Dimensions

Thus in cylindrical symmetry wθ = 0 and Cartesian coordinates are related to
physical components by
x = wr cos θ, wr sin θ, wz
...

Q
r
∂a
∂wz
0 ∂wz
∂r
∂z
The physical components of the Cauchy stress are


Srr 0 Sr z


Q SQ =  0 Sθθ 0 
...
The conservation law
simplifies to
∂u 1 ∂f r r
∂f z r
+
+
∂t
r ∂r
∂z

= 0
...


r dz dθ dr dt

537

7
...
4
...
1 Case Study: Eulerian Gas Dynamics in Cylindrical Coordinates
Recall that Eulerian conservation of mass in gas dynamics takes the Cartesian form
∂ρ
+ ∇ x · (vρ) = 0
...
38) to obtain the conservation of mass in cylindrical
coordinates:
∂ρ
1 ∂vr ρr
1 ∂vθ ρ
∂vz ρ
+
+
+
= 0
...

∂t
We can use equation (7
...



∂t
vz ρ
∂v2 ρ+ p
∂vr vz ρr 1
∂vθ vz ρ 1
z
+ ∂θ r + ∂z
∂r
r
Finally, conservation of energy in Cartesian coordinates takes the form
∂ρ(e + 1 v · v)
1
2
+ ∇ x · vρ e + v · v + v p = ρg · v
...

∂z

In cylindrical symmetry, mass conservation is
∂vr ρr 1 ∂vz ρ
∂ρ
+
+
= 0
...


538

Methods in Multiple Dimensions

Energy conservation is
2
2
2
∂ρ(e + 1 [vr + v2 ]) 1 ∂r vr [ p + ρ(e + 1 vr + v2 )] ∂vz [ p + ρ(e + 1 vr + v2 )]
z
z
z
2
2
2
+
+
= ρ(gr vr + gz vz )
...

uinj ≈ 2
2


vz ρ
ri+1/2 − ri−1/2 z j z j−1/2 ri−1/2
1 2
2
(e + 2 [vr + vz ])ρ
We could compute flux integrals

t

n+1/2

f i+1/2, j ≈

n+1/2
f i, j+1/2



n+1

tn

t n+1
tn


ρvr
z j+1/2 
2

ρvr

 (ri+1/2 , z, t) dz dt ri+1/2


ρvz vr
z j−1/2
1 2
2
vr p + ρ(e + 2 [vr + vz ])


ρvz
ri+1/2 

ρvr vz

 (r, z j+1/2 , t) r dr dt
2


ρvz
ri−1/2
1 2
2
vz p + ρ(e + 2 [vr + vz ])

using the corner transport upwind scheme with slope limiting
...
The cell
averages could be updated by
n+1/2

n+1/2

n+1/2





2

n+1/2

uin+1 = uinj − f i+1/2, j − f i−1/2, j + f i, j+1/2 − f i, j−1/2
j


2
(ri+1/2

2
− ri−1/2 )



z j+1/2

0
0
 t n+1/2
 p n+1/2 − p n+1/2  t n+1/2 
0
i−1/2, j 

−  i+1/2, j
−  n+1/2
n+1/2 


p
0
ri
zj
i, j+1/2 − pi, j−1/2
0
0

n 
n+1 


0
0







  t n+1/2
gr ρ
gr ρ

 +

+ 


  2
...
The density can be updated at the new time, then
combined with gravity to update the momentum
...
Of course, if g is due
to the force of gravity, then cylindrical symmetry would require that gr = 0
...
4 Curvilinear Coordinates

539

7
...
3
...
Equality of mixed partial derivatives in
cylindrical coordinates gives us


Jrr Jr θ Jr z
∂J
∂v
∂QQ v −1
∂ 
Q=Q
Q=Q
H
Jθr Jθ θ Jθ z  = Q
∂t
∂t
∂a
∂y
Jzr Jzθ Jzz
 ∂vr 1 ∂vr

( − vθ ) ∂vr
∂r
r ∂θ
∂z


1
=  ∂vθ r ( ∂vθ + vr ) ∂vθ 
...

Szr Szθ Szz
˜
Since S is symmetric, so is S
...

Szr Szθ Szz
Jr θ Jzθ − Jθ θ Jr z −Jrr Jθ z + Jθr Jr z Jrr Jθ θ − Jθr Jr θ

Note that T is not necessarily symmetric
...

=
vθ ρ
 ∂r

∂θ
∂z
∂t
r
∂Tθ z
∂r Tzz
∂r Tr z
vz ρ
+ ∂θ + ∂z
∂r

540

Methods in Multiple Dimensions

Finally, Cartesian conservation of energy
∂( + 1 v · v)ρ
2
− ∇ a · (J−1 S|J|v) = (ω + g · v)ρ
∂t
becomes
∂( + 1 v · v)ρ
1 ∂(Trr vr + Tθr vθ + Tzr vz )r
∂Tr θ vr + Tθθ vθ + Tzθ vz
2

+
∂t
r
∂r
∂θ
∂Tr z vr + Tθ z vθ + Tzz vz
+
= (ω + gr vr + gθ vθ + gz vz )ρ
...

0 Jθ θ 0  = Q
r
∂t
∂t
∂a
∂vz
Jzr 0 Jzz
0 ∂vz
∂r
∂z
The physical components of the Cauchy stress are


Srr 0 Sr z
˜
 0 Sθ θ 0  ≡ S = Q SQ
...

Tzr 0 Tzz
Conservation of momentum in cylindrical symmetry is
∂ vr ρ
gr ρ
=

gz ρ
∂t vz ρ

∂r Trr
T
+ ∂r∂zzr − Tθθ
∂r
∂r Tr z
T
+ ∂r∂z zz
∂r

1

...

∂t
r
∂r
∂z
A numerical scheme for cylindrically symmetric isothermal solid mechanics
might proceed as follows
...
This would determine values for the velocity and the first

541

7
...
Then we could update the deformation gradient by
 n+1/2

 n+1/2
 vr

vr


2 t n+1/2
n+1
n
0
0
Ji j = Ji j +
ri+1/2 −
ri−1/2 er 2
2

 ri+1/2 − ri−1/2
 vz

vz i−1/2, j
i+1/2, j
 n+1/2
 n+1/2 
 vr

vr


t n+1/2
+ 0
−0
ez


dz j
 vz
vz i−1/2, j 
i+1/2, j


0
t n+1/2
+ (vr )i+1/2, j + (vr )i−1/2, j + (vr )i, j+1/2 + (vr )i, j−1/2 

...
Then the momentum could be updated by
ρvr
ρvz

n+1

=
ij

ρvr
ρvz
+


n

Trr
Tr z

+
ij

Tzr
Tzz
Tθθ
0

n+1/2

ri+1/2 −
i+1/2, j

n+1/2

Tzr
Tzz


i, j+1/2
n

+
ij

Tθ θ
0

n+1
ij

n+1/2

Trr
Tr z
2 t

i, j−1/2

n+1/2

ri−1/2
i−1/2, j

2 t n+1/2
2
2
ri+1/2 − ri−1/2

n+1/2

zj

2 t n+1/2
g
+ r ρi j t n+1/2
...
4
7
...
1 The spherically symmetric Burgers’ equation has Cartesian flux f (u, x) = 1 u 2 x/ x
...
4
...

7
...
3 The natural formulation of the gas dynamics momentum equation in spherical coordinates is
2
∂vr ρ
1 ∂r 2 (vr ρ + p) 2 p
+ 2


...
4
...

(a) How would we compute the strain tensor in the numerical method described above?
(b) How would we compute the stress tensor?
(c) How would we update the velocity, using a slope limiter scheme?

0=

542

Methods in Multiple Dimensions

7
...
5 Polar coordinates would represent a further simplification of the cylindrically symmetric problem,
in which there would be no dependence on z
...

7
...
6 Determine the equations for cylindrically symmetric shallow water
...
5 Source Terms
Because of the publication constraints, we did not have time to discuss several
advanced topics in detail
...

In section 7
...
Source terms arise quite
naturally in physical systems using Cartesian coordinates as well
...

In many cases, these source terms can be treated accurately by operator splitting
...
With stiff source terms, however, such an approach can produce fictitious waves
...
Jin and Levermore [79] introduced
the local equilibrium flux and an additional equation for relaxation to local equilibrium
...
We invite interested readers to examine
these approaches in more detail
...
6 Geometric Flexibility
Many important physical problems involve flow around obstacles (such as gas flow
around airplanes, water flow around ships, ocean currents around land masses)
...

If an appropriate coordinate transformation is available, sometimes an irregular
flow region can be transformed into a rectangular region, or a union of rectangles
...
If the transformations
are sufficiently smooth, then high-order numerical methods (such as ENO and
discontinuous Galerkin) can be used on the transformed system
...
6 Geometric Flexibility

543

laws into ordinary differential equations within stream-tubes, and self-similarity
can be used to map the solution on a generic stream-tube onto an arbitrary streamtube
...

Alternatively, we can use quadrilateral grids in two dimensions [12, 47, 95, 166]
...
Alternatively, we could use triangles or tetrahedrons
[2, 9, 30, 111]
...

An alternative to gridding an irregular flow domain is the use of Cartesian grids
[16]
...

The corrections can usually be performed easily to achieve second-order accuracy
...
The new book by Li and Ito [102]
provides significant detail regarding these methods
...
1 Localized Phenomena
Many hyperbolic problems involve moving features of the solution that require
additional resolution
...
In order to obtain
good accuracy with such methods near the discontinuities, it is necessary to refine
the mesh
...

Many of the methods we have examined are second-order accurate for smooth
solutions, but only first-order accurate at discontinuities
...
The formally
first-order methods are even worse: because of the large numerical diffusion, their

order of accuracy at discontinuities is typically O( x)
...

Suppose that we are computing the solution to a system of hyperbolic equations
in d dimensions via an explicit method on a grid with n cells in each direction
...
Since the CFL condition requires
that t be proportional to x, which is in turn inversely proportional to n, the
cost to compute the solution over the time required for a wave to cross the grid is
proportional to n d+1
...
With a method that
is formally second-order but actually first-order near discontinuities, we do 2d+1
times as much work to halve the error in the resolution of the discontinuity
...


544

8
...
Suppose that
we could construct, say, an ENO scheme of order p
...
This means that we need to increase the number
of cells in each direction by a factor of 21/ p to reduce the error by a factor of 2
...
This, of course, looks very
attractive, when compared to the results in the previous paragraph
...

General experience in dealing with ordinary differential equations found that it
is more efficient to use low-order methods and fine mesh near rough behavior, and
higher-order methods on coarse meshes for smooth behavior
...

Suppose that we use a coarse mesh with N cells in each direction to compute the
solution, except near regions of rough behavior
...
Suppose that we have a
propagating discontinuity surface, around which we place a mesh with a fixed
number of cells normal to the surface, but refined by a factor of 2r in the other
coordinate directions
...
The CFL condition requires that we take an order of 2r N
timesteps on the locally refined grid
...
This means that we can increase the accuracy by a factor 2r
at a cost similar to solving a problem with one less coordinate dimension
...
One alternative is to obtain
maximal accuracy for a fixed cost [119]
...

Our approach will use nested arrays of (logically) rectangular grid patches, following the ideas developed by Marsha Berger [17, 18, 19, 20]
...

The principal difficulty with all forms of adaptive mesh refinement is programming complexity
...
Each array of patches is
designed so that its union is contained in the union of the next coarser array of
patches
...
In some
problems, the behavior of this communication between scales is interesting in its
own right [28]
...

Typically, it is far easier to generate a robust and reliable numerical method on a
regular grid
...
Our strategy also makes it easier to make efficient use of pipelining and distributed memory
machines
...
2 Basic Assumptions
We assume that we are given some initial coarse mesh and an integer refinement
ratio r
...

Imagine finer levels L defined recursively from the coarsest level L0 according to
several rules
...

Logical Rectangularity We assume that each level L consists of some number of
patches, each of which is a logically rectangular array of cells
...
The grid itself can be nonrectangular in space; we only require that the grid be rectangular in the data
arrays
...
In other words, the boundary of a fine
patch coincides with the boundary of a logically rectangular array of coarse
grid cells
...
Whenever a coarse cell on level L is refined, it is subdivided into
r cells in each coordinate direction on level L +1
...
Note that the assumptions of a fixed refinement ratio
and of grid alignment imply that on any level L with > 0, in any patch
the number of cells in any coordinate direction is an integer multiple of the
refinement ratio
...
However,
an individual fine patch is not required to lie inside any single coarse patch
...
This in turn implies that we must be able to
provide a logically rectangular grid on the coarsest domain
...
3 Outline of the Algorithm

547

Synchronization After we advance the data on patches in level L to some time,
we assume that the data on patches in level L +1 are advanced by as many
timesteps as required by stability and accuracy to reach exactly the same
time as the coarser level L
...

Fine Preference We assume that the numerical scheme for our differential equation produces better results on the fine grid than on the coarse, in regions of
the problem where both fine and coarse grid cells overlap
...
Where fine and coarse grids overlap, we replace the coarse grid
results with conservative coarsenings of the fine grid results; this process is
called upscaling
...
At
the end of each regrid interval, the coarse level L selects coarse cells that
need refinement at the new time, organizes these cells into some number of
logically rectangular arrays of cells, and refines them to form the new cells on
the finer level L +1
...
This is required so that regridding
can be applied recursively
...
3 Outline of the Algorithm
The adaptive mesh refinement process can be represented by the following “pseudo
C++ ” algorithm:
void Level::advance(double dt˙max) {
bool time-to-sync-with-coarser-level=
(coarserLevelExists() ? coarserLevel()->timeToRegrid() : false);
double dt-sum=0
...


8
...
1 Timestep Selection
The first task in integrating the data on the patches belonging to an arbitrary level
L is to select the current timestep tc,
...
Thus, if a coarser level exists, the maximum number of steps on this
level should be roughly r , so we should have that tc, ≈ tc, −1 /r
...
We assume that we can use appropriate
stability conditions to determine the largest stable timestep ts, over all the cells
in all the patches on a given level L
...

Rapid decreases in t may be required for stability, but rapid increases allow for the
algorithm to jump too far past the time when discontinuities develop
...
Typically, f = 1
...

If a coarser level does not exist, we have no synchronization to perform
...
If necessary,
we reduce tc,0 to reach the desired time at a regridding interval
...

Thus the number of timesteps remaining until synchronization with the coarser
level is at least ( tc, −1 − tt, )/ t
...

If the current level can be refined, then the maximum number of steps must be an
integer multiple of the regridding interval
...


8
...
3
...
This need not involve actual memory allocation at each timestep;
rather existing memory associated with the patch is cleared and marked with the
new time
...
This depends on the integration scheme, and is
typically based on the CFL condition
...

8
...
2
...
This allows the integration scheme to perform a
very regular and efficient algorithm
...

The number of ghost cells is determined by the stencil of the integration scheme
...
A
complicated scheme such as fourth-order ENO would require 16–20 ghost cells
in each direction, since the flux stencil for each of the four Runge–Kutta steps
requires 4–5 cells to either side of the intended location of the flux
...
Note that discontinuous Galerkin
methods do not use any ghost cells, because higher-order accuracy is achieved by
carrying information about derivatives of the solution within each grid cell
...
Thus

550

Adaptive Mesh Refinement

fine patches cannot provide boundary data for coarser patches
...


Note that the union of patches and ghost cells on level L +1 may extend beyond the
union of patches on level L
...
The
alternative is to expand coarse grid patches enough to contain the fine grid patches
and their ghost cells
...
1 illustrates the determination of boundary data for a patch
...
Boundary data
must be found for the ghost cells (in this case four) around the outside of the patch;
the boundary of the ghost cells is drawn as a thin solid line around the patch
...
The remainder of the boundary data must
be obtained by refining data from the overlying coarse patches, which are illustrated
by dashed lines where no fine patches occur
...
1 indicates that the
remaining boundary data can be provided by the coarser level of patches, in general
it is possible that some of these refined boundary data could come from even coarser
levels
...
For conserved quantities, this means that the space and time
interpolation should preserve the overall accuracy of the integration scheme
...
If we
required that fine patches and their ghost cells must be contained the union of the
patches on the next coarser level, then we could avoid recursion in filling the ghost
cells
...

The safe strategy is to program the adaptive mesh refinement algorithm so that
recursive filling of ghost cells is possible
...

8
...
2
...
The choice of scheme used to integrate the
conservation law dictates the form of this subroutine
...
3 Outline of the Algorithm

551

Fig
...
1 Sources of boundary data during adaptive mesh refinement
...
The fine patch requires data in “ghost cells”
inside a larger rectangle (two coarse cells wider in both directions) surrounding
the patch, represented by solid lines both inside and outside the physical domain
...
If we choose to avoid the copies
to the work space, then the extra ghost cells on each patch represent a redundant use
of computer memory, wherever ghost cells from one patch overlap cells on another
patch in the same level
...
An alternative is to do

552

Adaptive Mesh Refinement

all work in the flux computation and time integration within the work space, at the
extra cost of copying the necessary input and output
...
We have chosen not to store any ghost cells
with the patches
...
3
...
3 Time Integration
Essentially all schemes for hyperbolic conservation laws involve a conservative
difference for time integration
...

This is a simple calculation, and should use the same subroutine that would be used
in a non-adaptive algorithm
...
There are two ways in which the fine results replace the
coarse results
...
3
...
The
other issue is discussed in Section 8
...
4, in which the coarse fluxes are replaced
by an appropriate upscaling of fine fluxes, and the coarse conservative difference
is repeated with the upscaled fluxes
...
In order
to synchronize the current level with the coarser, we will take some sequence of
timesteps t
...
Similarly, suppose that some coarse cell
side I + 1/2, J coincides with the boundary of a fine patch
...
Similar notation could be used in other coordinate directions,
and in one or three dimensions
...
Then the total flux on the coarse cell side S I +1/2,J should be replaced with the
n+1/2
n+1/2
sum of fine flux integrals

...

When we reflux, we will integrate these time integrals in space over all fine cell
sides contained in a coarse cell side
...


(8
...
3 Outline of the Algorithm

553

8
...
3 Regridding
Because we are interested in solving time-dependent problems, we allow the mesh
refinement to move in time
...

Proper Nesting: We want the union of patches on each level of refinement to be
contained in the interior of the union of patches on the next coarser level
...

With respect to the Necessity principle, we shall use an error estimation procedure
(described below) to determine where the unacceptably large errors occur on this
level
...

With respect to the Infrequency principle, we obviously do not want to move the
mesh every timestep on each level
...

A “pseudo C++ ” algorithm describing the regridding process consists of the
following two procedures:
//called from Level::advance
void Level::regridFinerLevels(double efficiency-tolerance) {
findProperNestingList();
if (finerLevelExists()) {
finerLevel()->findProperNestingListFromCoarserLevel();
}

}

TagBoxArr dummy;
updateFinePatchArr(lplot,efficiency-tolerance,dummy);

In the remainder of this subsection, we will discuss these ideas in greater detail
...
3
...
1 Proper Nesting
We want the union of the fine patches to be contained in the interior of the union of
the coarser patches
...
As a result, all interfaces between
coarse and fine grids are related by a fixed ratio
...


554

Adaptive Mesh Refinement

We require that the boundary of the union of the fine patches be a fixed number
of coarse cells from the boundary of the union of the coarser patches
...
If chosen properly, it can be reasonably
small and still guarantee that the interpolation needed to provide initial data on new
fine cells does not need to recurse over coarser levels
...
e
...
The complement list is initialized by finding
a list of boxes that exactly cover the complement of the union of the patches with
respect to the physical domain
...
The proper
nesting list is the list of boxes that forms the complement of the union of theses
buffered boxes
...
The purpose of the buffering is to prevent the waves
of interest from moving off the refined mesh before the next regridding step
...

Another purpose of the proper nesting list is to guide the selection of the patches
on finer levels
...
3 Outline of the Algorithm

555

Fig
...
2 The role of the proper nesting list during regridding: boxing of cells tagged
for refinement must lie inside the union of current patches

interesting waves will lie inside the union of the patches until the patches have
been advanced in time to synchronization with the next coarser level
...

When the union of patches on the current level is not convex, the proper nesting
list prevents patches on the next finer level that straddle an interior corner of the
union
...
2 shows a collection of tagged cells (which are each
marked with an X) on two patches
...
If this containing box were used to generate a refined patch, then some of
the fine cells would not be properly nested
...
3
...
2 Tagging Cells for Refinement
The next regridding step is to update the list of patches on the finer level
...
getNumber()>0) {
tag-box-arr
...
makeTagsUnique();
BoxList box-list;
tag-box-arr
...
usesRichardsonExtrapolation()) {
tag-box-arr
...
coarsenAndCopyTagsTo(coarse-tag-box-arr);
} else if (finerLevelExists()) {
delete finer-level; finer-level=0;
}

First, cells in the patches belonging to the current level are tagged if their global
integration error is too large
...
This
error estimation procedure is a standard procedure in the numerical integration
of ordinary differential equations [42]
...
3 Outline of the Algorithm

that the computation permits a bound M on the growth of these errors
...
1) shows that the computational solution essentially
amounts to applying a perturbation of the identity operator to the previous solution;
it is therefore reasonable to expect M to be close to 1 for smooth flow and sufficiently
fine mesh
...


Then an argument by induction shows that
n−1

en ≤

Mj =
j=0

Mn − 1

...

Suppose that the local truncation error satisfies
= C t k+1 ,
where k is the expected global order of the scheme
...
) Then the error in taking one coarse step of
size r t is
c
en ≈ Cr k+1 t k+1
...

This allows us to estimate the local error of a fine timestep by
f



f

c
c
en − en
wn − wn
= k+1
,
r k+1 − r
r
−r

where w is the quantity being monitored for errors
...
The global error can be estimated by multiplying
the local error by the anticipated number of timesteps N
...
Thus, cells are tagged if the relative
error
f

c
|wn − wn |
f
max |wn |

(r k+1

L
> tolerance
...

(ii) On a patch coarsened by a factor of k,
(a) coarsen the data from the patch at the current time minus (k − 1) timesteps, and
(b) advance the data for one timestep, k t
...


Note that the error estimation is performed on pseudo-patches that potentially lie
in index spaces between the current level of refinement and the next coarser level
(since the pseudo-patches are coarsened by a factor of the regrid interval, and mesh
refinement uses an integer multiple of the regrid interval)
...
The ordering of the coarsening and comparison operations also makes the
algorithm simpler; if we were to compare errors on the current level of refinement
by coarsening, integrating one coarse step and then refining, we would have to
construct a high-order conservative interpolation
...

It is interesting to consider the implementation of this error estimation strategy on
a recursively refined mesh
...
At first glance, this would appear to be undesirable
...
This is because the error estimation
on the coarse mesh places the refined cells where the disturbance will be moving,
plus or minus buffer cells
...
If the
errors had been computed at the same times, then it would be necessary to buffer
by an additional cell on each level
...
Since the mesh is going to be
moved, this is extra work being performed for data that are mostly going to be
discarded
...
If a cell is
not currently tagged, it is tagged if its global error estimate exceeds some specified
tolerance
...
3 Outline of the Algorithm

559

regrid interval
...

A cell is also tagged if it has an underlying fine cell
...

8
...
3
...
The width of this
buffer is called the “error buffer,” and has been chosen to be equal to the regrid
interval minus 1
...

8
...
3
...
First, a
large box containing all of the tags is found; then “cut points” are sought in order
to split this big box into smaller boxes that cover the tagged cells more efficiently
...
Cut points are selected according to goodness: a zero histogram
entry near the center is best; an inflection point in the histogram near the center
is next best; the mid-point is the choice of last resort
...
This procedure is due to Berger, and differs from
that in [18]
...
First, each
box is further subdivided, if necessary, so that it lies inside the proper nesting list
...
Afterward, the list of boxes is searched to see if any two share
a common side, so that they can be coalesced to make a larger box
...
e
...
Once these boxes are found, they are shrunk to the smallest size
needed to contain the tagged cells, then expanded within their former boundaries
to avoid physical boundaries among the ghost cells
...
3
...
5 Initializing Data after Regridding
The final step is to make the new patches
...
If there are tagged cells and no current
finer level, then a new finer level is created; the data on these new fine patches
are obtained by refining the data on the overlying patches in the current level of
refinement
...
In this

560

Adaptive Mesh Refinement

case, a temporary memory bulge can occur while the finest level data are copied
from old patches to new
...
3
...
We have already seen that boundary data
for fine patches may be obtained from refinement of data on coarser patches
...

This coarsening of data takes two forms
...

The computational form of this coarsening procedure varies from one flow variable
to another, and will be discussed in section 8
...
5
...
This coarsening process, by itself, could
not preserve conservation; it is also necessary to replace the coarse fluxes around
the boundary of the fine patches with the boundary and time integral of the fluxes
determined on the fine patches
...

Because of the peculiarities of the hypoelastic equations of state for solids,
we perform this refluxing process in a form different from that in [18]
...
1)
...
However, other solid mechanics variables (such as stress) may have a nonlinear dependence on the fluxes and need re-computation
...
3
...


8
...
5 Upscaling
Suppose that we have a coarse cell (A J , A J + x J ) on level Lk , and we compute a
numerical result
uJ ≈

1
xJ

AJ + xJ
AJ

u(x, t + t K ) d x
...
4 Object Oriented Programming

561

If this cell is refined, then after R timesteps on the fine grid, we also have fine grid
results
uj ≈

1
xk+1

aj+ xj

u(x, t + t K ) d x,

(a j , a j + x j ) C (A J , A J + x J )

aj

on the fine cells contained in the coarse cell (A J , A J + xk )
...

(a j ,a j + x j ) C (A J ,A J + x J )

8
...
6 Initialization
The beginning of the computation is somewhat different from the process presented
above
...

Then, a user-supplied procedure is called to place the initial data on the patches;
this procedure also determines a stable timestep
...
Here, the initial data are advanced regrid interval timesteps and coarsened;
they are also coarsened and advanced one timestep
...
These cells are buffered by regrid interval cells in each coordinate
direction, since that is the number of timesteps that will be taken before the first
regridding is performed
...
Then the user-supplied procedure is called to determine the initial data on
the new fine patches
...
After the finer levels have been initialized, we return to the initial
data, forgetting the results of the integrations on all of the levels, since the size of
the first timestep on each level may be affected by the work on coarser levels during
the normal integration process
...
4 Object Oriented Programming
Adaptive mesh refinement involves much more complicated programming than
straightforward integration on regular meshes
...

Other aspects of material models also add to the program complexity
...

Users also need to perform computations in one, two or three dimensions
...
In this way, adaptive mesh refinement code could be debugged
in one dimension and used in any number of dimensions
...
The equation of state should decide how the
variable is represented on the grid; for example, pressure in gas dynamics might
be associated with cell centers, while momentum fluxes might be associated with
cell sides
...
If these goals are achieved, then no modification of the
adaptive mesh refinement program is required to make changes in the equation of
state
...
4
...
Fortran 90 still does not offer all
the features we need, for reasons we will describe later
...

Fortran 90 is attractive because it allows for dynamic memory allocation, and for
the development of more complex data structures (called modules)
...

However, Fortran 90 modules are fundamentally different from C++ classes
...
Fortran 90 does not have access permissions for module
data members
...
This point will be especially important in our development of the EosModel
class below
...
4 Object Oriented Programming

563

Axisedge, corner, side:

Axiscell, cell:

Outerside, outercorner:

Fig
...
3 One-dimensional geometries for variables

8
...
2 AMR Classes
There is no commonly accepted set of C++ classes for adaptive mesh refinement
...
Some of his
notions and the ideas in this book were merged into the SAMRAI code written by
Richard Hornung (PhD student of John Trangenstein) and Scott Kohn (PhD student
of Scott Baden) at Lawrence Livermore National Laboratory
...

There are several basic classes we will use in our C++ implementation of adaptive
mesh refinement
...

8
...
2
...
For example,
the conserved quantities in the conservation laws are commonly associated with
the cell centers, since their numerical values are approximations to the average
value of the exact conserved quantity in the cell
...

Figure 8
...
On
a grid with cells indexed from first(0) to last(0), cell-centered variables
would be dimensioned
cell(first(0):last(0),nvar)
while corner-centered variables would be dimensioned
corner(first(0):last(0)+1,nvar)

564

Adaptive Mesh Refinement

Cell:

Corner:

Fig
...
4 Two-dimensional geometries

Variables with outerside geometry would be dimensioned
outerside(0:1,nvar)
Here, a first subscript of “0” refers to the left side and “1” refers to the right side
...
Cell-centered and cornercentered variables are easy to understand from Figure 8
...
Cell-centered variables

8
...
Variables associated
with sides in the first coordinate direction would be dimensioned
side0(first(0):last(0)+1,first(1):last(1),nvar)
while variables associated with sides in the second coordinate direction would be
dimensioned
side1(first(1):last(1)+1,first(0):last(0),nvar)
In the latter case, we reverse the order of the first two subscripts in order to perform
approximate Riemann problem solutions with unit stride
...
The axisedge geometry (useful for rectangular mesh data) is dimensioned
axisedge0(first(0):last(0)+1,nvar)
and
axisedge1(first(1):last(1)+1,nvar)
We can also identify three-dimensional geometries, illustrated in Figure 8
...

The cell-centered and corner-centered arrays are the easiest to understand
...


566

Adaptive Mesh Refinement

Fig
...
5 Three-dimensional geometries

8
...


Axisedge geometries are also easy to understand:
axisedge0(first(0):last(0)+1,nvar)
axisedge1(first(1):last(1)+1,nvar)
axisedge2(first(2):last(2)+1,nvar)
...
In general, we want to avoid array addressing via C++ , because it is potentially much
slower than Fortran array addressing
...
In this way, C++ can prevent the addressing of a cell-centered
array at a corner index, for example
...
4-1: IntVect Class
...
Note that the implementation of IntVect is necessarily
dimensionally-dependent
...
For example, the definition of
the CornerIndex class is described in Program 8
...
4-121: CellIndex
Class
...
However, nearly all of the dimensionally-dependent operations on these
index classes are encapsulated in the IntVect class
...
4
...
2 Boxes
A Box is a C++ class designed to represent a rectangular array of grid cells
...
4-122: Box Class, the data for a Box consists of two
CornerIndex members, representing corners at the far ends of a diagonal of the
Box
...
Boxes in various dimensions are shown in Figure 8
...

A LevelBox is a Box that contains extra data to determine its index space;
see Program 8
...
This extra information consists of two integers: a level-number and a multilevel-number
...
The

568

Adaptive Mesh Refinement

Box in one dimension:
smallend

bigend

Box in two dimensions:

bigend

smallend

Box in three dimensions:

bigend

smallend

Fig
...
6 Boxes

8
...

Essentially all arrays in the adaptive mesh refinement code are dimensioned by
describing their geometry and a Box
...

8
...
2
...
In order to eliminate programming errors in passing these pointers around,
we have developed a Program 8
...
class
...

If a NumPtr is a copy of an original memory allocation, it can be used just like
a regular pointer, including operations such as operator++
...
4
...
4 Lists
Lists can be singly-linked or doubly-linked, and intrusive or non-intrusive
...
We do not use the standard template library lists in this code for
two reasons
...
Second, our list functions operate faster, with controllable memory
allocation
...
On the other hand, doubly-linked list members have pointers to both the
previous and next items on the list
...
It is also difficult to remove an
item from the middle of a singly-linked list, unless the previous item is known
...
Intrusive doubly-linked list members
would have pointers to both the previous and the next items
...
In other words,
intrusive lists require that members already have pointers to next and previous,
while non-intrusive lists add extra storage for this information
...
For the description
of the intrusive singly-linked list, see Program 8
...
The intrusive doubly-linked list is implemented in Program 8
...
The non-intrusive lists are implemented in Program
8
...
4-128: Non-Intrusive
Doubly-Linked List Template
...
Classes derived from two base classes designed for intrusive lists can get confused about the pointers to next and previous members
...

Currently, we use intrusive singly-linked lists for graphics (GraphTool lists
and PaletteList), program timing (TimedObjectList), equation of states
EosModelList and grids (GridList)
...
We use intrusive doubly-linked lists for FlowVariableList and keeping track of memory
allocation in MemoryDebugger
...

8
...
2
...
As the
simulation time evolves, the computer memory requirements change, and the interaction among the data varies with the changes in the grid patches
...

A FlowVariable describes the information by adaptive mesh refinement in
order to perform memory allocation and inter-patch communication
...
g
...
g
...
Here, Program 8
...
Some
common (self-explanatory) values of IOSTATUS are INPUT, INOUT, TEMP,
FLUX, FLUXSUM, PLOT and MESH
...
4-130: FlowVariableBase class
...
4-131: FlowVariableDimensions class
...
Lists of FlowVariableBases can
determine the total amount of data required to store everything with a specific
IOSTATUS on a Box
...
4-132: FlowVariable
template
...
Data types of double, int or bool are common
...
Thus
the memory required to represent a FlowVariable on a Box involves an array
of integers for the number of data values in each sub-array, and an array of data

8
...
This extra information is contained in the
Program 8
...

Occasionally, we would like to address the individual entries of the memory for
a FlowVariable on a Box
...
4134: Array template
...
The Array class has several member
functions that allow us to address individual numbers within the data storage for
the FlowVariable
...
4
...
6 Timesteps
We allocate the memory for all FlowVariables with a given IOSTATUS on a
patch at the same time
...
4-135: TimestepBase
...

A Timestep uses a specific LevelBox to allocate all the needed space for an
array of FlowVariables with a given IOSTATUS
...
4-136: Timestep
is derived from TimestepBase
...

8
...
2
...
This
process has already been described in section 8
...
3
...

The Program 8
...
In the regridding process, we might use a patch to make a TagBox, then
set the boolean values to true for individual cells that need refinement
...

We also have a TagBoxArr class, to work with an array of TagBoxes
...

8
...
2
...
However, the Timestep class is designed to hold the data
for variables of the same IOSTATUS
...
This is implemented in Program 8
...
A

572

Adaptive Mesh Refinement

DataBox owns an IOStatusArray, and a corresponding array of Timestep
pointers
...

Some DataBoxes are also used for regridding operations, and therefore need
tags
...
4-139: DataTagBox
...

8
...
2
...
All user models are derived from the library class Program 8
...
An EosModel owns lists of FlowVariables defined by the user
in the derived class
...

Many of these are pure virtual functions, meaning that the function pointer in the
EosModel class is zero
...

These virtual functions are very useful
...
Because of this design
principle, the adaptive mesh refinement code does not need to know anything about
the integration techniques, the tests for error estimation, the determination of variables intended for graphical display, or even the individual FlowVariables
themselves
...
In fact, there are only two
places where it is necessary to identify the specific user equation of state to the
adaptive mesh refinement library
...
The second place is where the problem model name is read from
a restart file before constructing the derived equation of state
...
4-141: EosModel
...

8
...
2
...
Now it is time to make
this concept concrete, by discussing the corresponding data structure
...
4-142: Patch
...
In addition, it owns
a pointer to an EosModel
...
Thus the
Patch class performs such important operations as Patch::initialize and
Patch::advance
...
5 ScalarLaw Example

573

Within a given level of refinement, we can use several patches to cover the
region of physical space requiring refinement
...
4-143: PatchArr
...
A PatchArr is derived
from an array of Patch pointers
...

All loops over Patches are encapsulated in the PatchArr class
...
The calculations on an individual
Patch involve very similar operations on regular data arrays, with communication
between Patches needed only for boundary values
...
4-144: PatchArr
...
Almost all of the
special programming for distributed computing is contained in PatchArr
...
C
...

8
...
2
...
4-145: Level
...
This class encapsulates the data structures needed to perform the adaptive mesh refinement computations on an individual level of refinement
...

More importantly, a Level contains a pointer to a PatchArr, which holds the
array of Patches on that level of refinement
...

Level class member functions contain all recursions over levels of refinement,
while PatchArr member functions contain all loops over Patches on some level
of refinement
...
This makes it
difficult to follow the code in many editors
...
5 ScalarLaw Example
It should not be necessary for a user of the adaptive mesh refinement code to be
familiar with all of the various C++ classes described above
...
In
this subsection, we will describe how to apply adaptive mesh refinement to a scalar
conservation, especially the Buckley–Leverett model
...
Without being specific
about the arguments to these routines, the outline of the code might look like the

574

Adaptive Mesh Refinement

following:
extern ”C” {
void initsl-(
...
);
void bccells-(
...
);
void method-(
...
);
}
void main(int argc, char *argv[]) {
int ncells=
...
;
double conserved[ncells+2*nghosts};
double mesh[ncells+2*nghosts};

}

initsl-(ncells,nghosts, conserved,mesh);
stabledt-(
...
);
fluxderv-(
...
);
consdiff-(
...
);
}

// initial values
// CFL stability
//
//
//
//
//

physical boundary values
characteristic speeds
scheme
conservative difference
CFL stability

When we use the adaptive mesh refinement code, we will basically call these same
routines from the the adaptive mesh refinement library
...
) {
GridList:initialize(
...
) {
Level::initialize(
...
}
}
PatchArr::initialize(
...
);
}
}
}
}
if (Level::canBeRefined()) {
Level::findInitialErrorCells() {
...
);
Level::finerLevel()->initialize(
...
5 ScalarLaw Example
}

}

}

575

}

}
}
while ( sim-time < tmax && lmore-steps ) {
GlobalMain::advance() {
GridList::advance(
...
) {
Level::advance(
...
) {
for (int i=0;iLevel::fillModel(
...
) {
EosModel::stuffModelGhost(
...
);
}
EosModel::computeFluxes(
...
);
method-(
...
) {
consdiff-(
...
);
}
}
}
}
if (Level::finerLevelExists()) {
Level::finerLevel()->advance(
...
);
}
}
Level::findStableStepSize(
...
);
coarserLevel()->patch-arr->conservativeDifference(
...
The difficulty for new users is that the call stack involves procedures from a
number of different C++ classes
...
5-146: ScalarLaw
...
A ScalarLaw owns several
FlowVariable pointers, in addition to the data needed to describe a computational problem
...

8
...
1 ScalarLaw Constructor
When we construct a ScalarLaw, we declare each of the FlowVariables
we will use in the computations; see Program 8
...
For
example, the conserved quantity consists of one variable with INOUT status
using CELL-centered data
...
This FlowVariable constructor specifies all of the information
needed to allocate the data on any patch at any point in the simulation, and to
address that data
...

8
...
2 initialize
At some point in the execution of the adaptive mesh refinement code, we call
Level::initialize to initialize all of the data on a given level of refinement
...
Run-time binding of C++ virtual
functions causes the ScalarLaw::initialize procedure to be called at that
point
...
In order
to call the Fortran routine, we need to determine the dimensions of the arrays for
conserved and the mesh-var
...

In this particular implementation of ScalarLaw::initialize, we are
using the EosModel workspace to hold the output from the Fortran initialization routine initsl
...
Afterward, we use EosModel::postProcessInitialize to copy the data from
the model workspace to the Patch
...


8
...
This is so that all of the data for an individual Patch and its extra
boundary data can be contained in the work space
...
This
must be set separately in Fortran, in the mym4
...
EosModel::setSizes
checks that the C++ and Fortran values for these parameters are the same
...
5
...
This is
performed in ScalarLaw::stableDt
...

In this case, we work with data for conserved on the Patch; this data pointer
is obtained by the DataBoxFlowVariable::getPtrFrom procedure
...
As a result, the
computer memory for dfdu is taken from the EosModel workspace
...
5
...
Since the computation of the
fluxes depends on the numerical scheme, and high-order schemes typically have
large computational stencils, we need information on cells beyond the interior of
the Patch in order to compute all of the fluxes on the Patch
...

The number of ghost cells needed depends on the computational method, and
on the choice of FlowVariable
...
An even simpler
strategy is to give all FlowVariables the same number of ghost cells
...
C just before ScalarLaw::ScalarLaw
...
i
...

The numerical treatment of ghost cells is the most difficult aspect of developing
the user model code
...
As a result, it is common for users to mix the code that
assigns boundary values with the code that applies the numerical integrator
...


578

Adaptive Mesh Refinement

Before calling ScalarLaw::computeFluxes, we need to provide values
for the ghost cells used in the flux computation
...

For those Patches that have ghost cells interior to the physical domain,
the ghost cell information is provided by Level:fillModel, called from
PatchArr::advance just before we call Patch::advance
...
3
...
Since physical boundary conditions are problemdependent, the adaptive mesh refinement library expects the user to provide these
values
...
There are two separate
activities in this procedure
...

8
...
5 stuffBoxGhost
In order to refine data, the adaptive mesh refinement library typically needs data on
ghost cells in order to implement higher-order interpolation
...
Since the
refinement process may be recursive, we cannot use the EosModel workspace for
the computations with the ghost cells
...
Since some of the ghost cells for these
DataBoxes may lie outside the physical domain, we have to provide ScalarLaw::stuffBoxGhost to set these values
...

8
...
6 computeFluxes
After we define the data on the Patch and its ghost cells at the beginning of a
time step, we are ready to compute the values of conserved at the end of the
time step
...
This routine is just a C++ wrapper around two Fortran function, namely fluxderv, which computes the characteristic speeds, and method,
which in this case computes the fluxes using a second-order MUSCL scheme
...
5 ScalarLaw Example

579

can change the integration technique merely by changing the code in subroutine
method
...
5
...
This is done in ScalarLaw::conservativeDifference,
which is merely a C++ wrapper around the Fortran routine consdiff
...
It is also
called from Patch::conservativeDifference, which is called by
PatchrArr::conservativeDifference from Level::advance during refluxing; see Section 8
...
4
...
5
...
The adaptive mesh refinement
library will help the user by providing the results from coarse and fine integrations
for user comparison
...

There are two versions of this procedure
...
This routine uses a gradient detector to tag cells
for refinement
...

If the EosModel parameter use-richardson is true, then EosModel::
usesRichardsonExtrapolation will cause the adaptive mesh refinement
library to call the second form of ScalarLaw::findErrorCells
...
This
Fortran routine compares the coarse and fine integration results from the adaptive
mesh refinement library and decides where to tag cells for refinement
...
3
...

8
...
9 Numerical Example
In Figure 8
...
The size of the data markers represents the size of
the finest grid cell in that spatial region of the computation
...

These are two locations where the MUSCL scheme fails to achieve second-order

580

Adaptive Mesh Refinement

(a) Saturation

(b) Characteristic speed

Fig
...
7 Adaptive mesh refinement for Buckley–Leverett model

accuracy
...
5-57: cpphog
...
For example, the
student could vary max-levels to control how many levels of mesh refinement
are used, refinement-ratio to control the refinement ration between the grid
levels
...
6 Linear Elasticity Example
Next, let us briefly discuss the application of adaptive mesh refinement to linear elasticity
...
Because the model is linear, the problem does not involve shocks
...

In order to implement the linear elasticity model in the adaptive mesh refinement
code, we develop a C++ class called LinearElasticity
...
6-148: LE
...
This model involves
FlowVariables for displacement, deviatoric stress, pressure and velocity
...

Figure 8
...
We show 30 equally spaced contours of the second invariant
of the deviatoric stress, and the corresponding adaptively refined grid
...


581

8
...
8
...
6-58: cpphog
...


8
...

We will focus on the Colella–Woodward interacting blast wave problem in one
dimension [177], and on the Schulz–Rinne two-dimensional Riemann problem case
number 3 [144, 145]
...

Students can view the definition of this class by clicking on Program 8
...
H
...
The one-dimensional code uses the MUSCL
scheme, and the two-dimensional code uses the corner transport upwind scheme
...
9 shows some numerical results for the blast wave problem using AMR
...
However, a careful study of the results will see that the finest
grid is concentrated at the discontinuities
...
7-59: cpphog
...

Figure 8
...
At early time, the mesh is primarily along the coordinate axes, where

(a) t = 0
...
016

(c) t = 0
...
030

(e) t = 0
...
038

Fig
...
9 Adaptive mesh refinement for blast wave problem: density vs
...

AMR uses 10 cells on coarse grid, a refinement ratio of 4, and a maximum of
5 levels of mesh

583

8
...
5

(b) Grid, t = 0
...
8
...
AMR uses 40 × 40 grid, a refinement ratio of 2, and a maximum of
five levels of mesh refinement
...
At later time, the solution develops some
interesting shocks, and contact discontinuities that produce a variety of physical
instabilities
...
Students can perform their own adaptive mesh
refinement calculations by clicking on Executable 8
...
The program will
open up a graphical user interface in which the student can adjust a variety of
parameters
...
D
...
Wave Propagation in Elastic Solids
...

[2] N
...
Zafer, and R
...
A godunov-type scheme for atmospheric flows
o
on unstructured grids
...
Pure and Applied Geosciences, 163:
1699–1735, 2005
...
B
...
Behie, and J
...
Trangenstein
...
34 of Lecture Notes in
Engineering
...

[4] S
...
Antman and W
...
Szymczak
...
Contemp
...
,
100:27–54, 1989
...
E
...
Ayala
...
PhD thesis, Stanford University,
Department of Petroleum Engineering, 1995
...
Aziz and A
...
Petroleum Reservoir Simulation
...

[7] S
...
Baden
...
Appl
...
Rev
...

[8] L
...
Baker
...
In SPE/DOE Enhanced
Oil Recovery Symposium, Tulsa, Oklahoma, 1988
...

[9] T
...
Barth and Mats G
...
A posterior error estimates for higher order
Godunov finite volume methods on unstructured meshes
...

[10] T
...
Barth and D
...
Jespersen
...
In AIAA Paper 89-0366, January, 1989
...
Bear, ed
...
Dover, 1972
...
B
...
Colella, J
...
Welcome
...
In Proceedings of the AIAA 9th Computational Fluid
Dynamics Conference, Buffalo, June, 1988
...
B
...
Colella, and J
...
Trangenstein
...
J
...
Phys
...

[14] J
...
Bell, C
...
Dawson, and G
...
Shubin
...
J
...
Phys
...

[15] J
...
Bell, J
...
Trangenstein, and G
...
Shubin
...
SIAM J
...
, 46:1000–1017,
1986
...
Berger and J
...
An accuracy test of a cartesian grid method for steady
flow in complex geometries
...

[17] M
...
Berger and S
...
A partitioning strategy for non-uniform problems on
multiprocessors
...
Comp
...

[18] M
...
Berger and P
...
Local adaptive mesh refinement for shock
hydrodynamics
...
Comp
...
, 82:64–84, 1989
...
J
...
Saltzman
...
Appl
...
Math
...

[20] M
...
Berger and J
...
Adaptive mesh refinement for hyperbolic partial
differential equations
...
Comp
...
, 53:484–512, 1984
...
J
...
R
...
Relative permeabilities from two and three dimensional
pore scale network modeling
...

[22] J
...
Boris and D
...
Book
...
III
...
J
...
Phys
...

[23] M
...
C
...
An upwind differencing scheme for the equations of ideal
magnetohydrodynamics
...
Comp
...
, 75:400–422, 1988
...
M
...
Application of a model system to illustrate some points of the
statistical theory of free turbulence
...
Akad
...
Proc
...

[25] M
...
Celia, T
...
Russell, I
...
E
...
An Eulerian–Lagrangian
localized adjoint method for the advection–diffussion equation
...
Water
Resources, 13:187–296, 1990
...
Chern and P
...
A conservative front tracking method for hyperbolic
conservation laws
...

[27] A
...
Chorin and J
...
Marsden
...

Springer-Verlag, 1979
...
B
...
Simulation of Granular and Fluid Systems Using Combined
Continuous and Discrete Methods
...

[29] B
...
Shu
...

Math
...
, 52:411–435, 1989
...
Cockburn, S
...
Shu
...
Math
...
, 54:545–581, 1990
...
Colella
...
SIAM J
...
Stat
...
, 3:76–110,
1982
...
Colella
...
SIAM J
...
Stat
...
, 6:104–117, 1985
...
Colella
...
J
...
Phys
...

[34] P
...
M
...
Efficient solution algorithms for the Riemann problem
for real gases
...
Comp
...
, 59:264–289, 1985
...
Colella and P
...
Woodward
...
J
...
Phys
...

[36] A
...
Corey, C
...
Rathjens, J
...
Henderson, and M
...
J
...
Three-phase
relative permeability
...
Trans
...

[37] R
...
O
...
Supersonic Flow and Shock Waves
...


586

Bibliography

[38] M
...
Crandall and A
...
Monotone difference approximations for scalar
conservation laws
...
Comp
...

[39] N
...
Dynamic Plasticity
...

[40] C
...
Dafermos
...
J
...

[41] C
...
Dafermos
...
Springer,
2000
...
Dahlquist and Å
...
Numerical Methods
...
Translated
o
by N
...

[43] Akhil Datta-Gupta and M
...
King
...

Society of Petroleum Engineers, Textbook Series, 2006
...
E
...
B
...
Numerical Methods for Unconstrained
Optimization and Nonlinear Equations
...

[45] R
...
Marquina
...

J
...
Phys, 125:42–58, 1996
...
Dutt, L
...
Spectral deferred correction methods
for ordinary differential equations
...

[47] M
...
Edwards and C
...
Rogers
...
Comp
...
, 2:259–290,
1998
...
Einfeldt
...
SIAM J
...
Anal
...

[49] B
...
Osher
...
Math
...
, 34:45–75, 1980
...
C
...
F
...
Measure Theory and Fine Properties of Functions
...

[51] J
...
Fromm
...
J
...
Phys
...

[52] Y
...
Fung
...
Prentice-Hall, 1965
...
Furati
...
In
Proceedings of the Fifth International Conference on Hyperbolic Problems, Theory,
Numerics, and Applications, Stony Book, NY, 1994
...
R
...
Partial Differential Equations
...
S
...
(eds) World Scientific, Singapore, 1996
...
Glimm
...

Comm
...
Math
...

[56] J
...
Isaacson, D
...
McBryan
...
Adv
...
Math
...

[57] S
...
Godunov
...
Mat
...
, 47:271–295,
1959
...

[58] D
...
J
...
nth-order operator splitting schemes and nonreversible
systems
...
Numer
...
, 33:349–367, 1996
...
Goodman and R
...
LeVeque
...
SIAM J
...
Anal
...

[60] J
...
Majda
...
J
...
Phys
...

[61] D
...
A
...
Numerical Analysis of Spectral Methods: Theory and
Applications, vol
...

SIAM, 1977
...
Greengard and J
...
Li
...
J
...
Phys
...

[63] A
...
Mathematical Theory of Non-Linear Elasticity
...

[64] A
...
On a class of high resolution total-variation-stable finite-difference
schemes
...
Numer
...
, 21:174–201, 1984
...
Harten
...
J
...
Phys
...

[66] A
...
M
...
Self-adjusting grid methods for one-dimensional
hyperbolic conservation laws
...
Comput
...
, 50:235–269, 1983
...
Harten, J
...
Hyman, and P
...
Lax
...
Comm
...
, 29:297–322, 1976
...

[68] A
...
D
...
van Leer
...
SIAM Review, 25:35–61, 1983
...
Harten and S
...
Uniformly high-order accurate nonoscillatory schemes I
...
Numer
...
, 24:279–309, 1987
...
Hedstrom
...
Math
...
, 29:969–977, 1975
...
G
...
Theory of multicomponent multiphase displacement in porous
media
...
Pet
...
J
...

[72] C
...
Numerical Computation of Internal and External Flows, vol
...
John Wiley, 1988
...
Hirsch
...
2:
Computational Methods for Inviscid and Viscous Flows
...

[74] L
...
On the strict hyperbolicity of the Buckley-Leverett equations for
three-phase flow in a porous medium
...
O
...

[75] K
...
A Conservative Front-Tracking Method for Two-Dimension Polymer
Flooding
...

[76] G
...
Discrete shocks
...
Pure Appl
...
, XXVII:25–37, 1974
...
-S
...
W
...
Efficient implementation of weighted ENO schemes
...
Comput
...
, 126:202–228, 1996
...
-S
...
Tadmor
...
SIAM J
...
Comput
...

[79] S
...
D
...
Numerical schemes for hyperbolic conservation laws
with stiff relaxation terms
...
Comput
...
, 126:955–970, 1996
...
Johansen and R
...
The solution of the Riemann problem for a hyperbolic
system of conservation laws modeling polymer flooding
...
Math
...
,
19:541–566, 1988
...
L
...
C
...
A system of non-strictly hyperbolic conservation
laws arising in elasticity theory
...
Rat
...
Anal
...

[82] Z
...
Numerical Analysis, with Emphasis on the Application of Numerical
Techniques to Problems of Infinitesimal Calculus in a Single Variable
...

[83] E
...
Introductory Functional Analysis with Applications
...

[84] S
...
Kruzkov
...
Math
...
In
Russian
...
N
...
First order quasi-linear equations in several independent variables
...
USSR Sb
...

[86] A
...
Levy
...

Math
...
Numer
...
, 3:397–425, 2002
...
N
...
Accuracy of some approximate methods for computing the weak
solutions of a first-order quasi-linear equation
...
Math
...

Phys
...

[88] J
...
Langseth and R
...
LeVeque
...
J
...
Phys
...

[89] P
...
Lax
...
11 of Regional Conference Series in Applied Mathematics
...

[90] P
...
Lax and B
...
Systems of conservation laws
...
Pure Appl
...
, 13:217–237, 1960
...
D
...
Wendroff
...
Comm
...

Math
...

[92] B
...
Leonard
...
Int J
...
Methods Fluids, 8:1291–1318, 1979
...
LeVeque and H
...
Yee
...
J
...
Phys
...

[94] R
...
LeVeque
...
J
...
Phys
...

[95] R
...
LeVeque
...
J
...
Phys
...

[96] R
...
LeVeque
...
Birkhauser, 1990
...
J
...
Finite Volume Methods for Hyperbolic Problems
...
Cambridge University Press, 2002
...
J
...
M
...
Two-dimensional front tracking based on high
resolution wave propagation methods
...
Comp
...
, 123:354–368, 1994
...
Levy, G
...
Russo
...
Math
...
Numer
...
, 33:547–571, 1999
...
Levy, G
...
Russo
...
SIAM J
...
Comput
...

[101] D
...
Puppo, and G
...
A third order central WENO scheme for 2D
conservation laws
...
Numer
...
, 33:407–414, 2000
...
Li and K
...
The Immersed Interface Method – Numerical Solution of PDE’s
Involving Interfaces and Irregular Domains, vol
...
SIAM, 2006
...
A practical, general-purpose, two-state HLL riemann solver for
hyperbolic conservation laws
...
J
...
Math
...

[104] W
...
Lindquist
...

Comput
...
Appl
...

[105] W
...
Lindquist
...
SIAM J
...
Anal
...

[106] R
...
Wendroff
...
SIAM J
...
Comput
...

[107] T
...
Liu
...
J
...

Eqns
...


Bibliography

589

[108] T
...
Liu
...
Comm
...
Math
...

[109] X
...
Liu, S
...
Chan
...

J
...
Phys
...

[110] X
...
Liu and E
...
Third order nonoscillatory central scheme for hyperbolic
conservation laws
...

[111] R
...
Extensions and improvements of the advancing front grid generation
o
technique
...
Numer
...
Engineering, 12:683–702, 1996
...
L¨ hner, K
...
Peraire, and M
...
Finite element flux-correct
o
transport (FEM-FCT) for the Euler and Navier–Stokes equations
...
J
...
Meth
...

[113] B
...
Lucier
...
SIAM
J
...
Anal
...

[114] R
...
MacCormack
...

Technical Report 69-354, AIAA, 1969
...
Majda and A
...
Discrete shock profiles for system of conservation laws,
1979
...
E
...
Introduction to the Mechanics of a Continuous Medium
...

[117] G
...
Marchuk
...
In P
...
Ciarlet and
J
...
Lions, eds
...
1
...

[118] G
...
Miller and P
...
A high-order eulerian godunov method for
elastic-plastic flow in solids
...
Comp
...
, 167:131–176, 2001
...
N
...
and
...
Moving finite elements I
...
Numer
...
,
18:1019–1032, 1981
...
M
...
Analysis of embedded shock waves calculated by relaxation
methods
...
, 12:626–633, 1974
...
Nessyahu and E
...
Non-oscillatory central differencing for hyperbolic
conservation laws
...
Comp
...
, 87:408–448, 1990
...
A
...
On the uniqueness of the generalized solution of Cauchy problem for
nonlinear system of equations occurring in mechanics
...
Nauk
...
S
...

[123] S
...
Upwind difference schemes for hyperbolic systems of
conservation laws
...
Comp
...

[124] S
...
Riemann solvers, the entropy condition, and difference approximations
...
Numer
...
, 21:217–235, 1984
...
Osher
...
SIAM J
...
Anal
...

[126] S
...
Chakravarthy
...

SIAM J
...
Anal
...

[127] Ronald L
...
Incompressible Flow
...

[128] D
...
Peaceman
...
Elsevier
Scientific Publishing, 1977
...
W
...
Interpretation of well-block pressure in numerical reservoir
simulation with non-square grid blocks and anisotropic permeability
...
AIME,
275:531–543, 1983
...

[130] R
...
Pember
...
Higher-order Godunov methods
...
Sci
...
, 14:955–970,
1993
...
Peyret and T
...
Taylor
...

Springer-Verlag, 1983
...
A
...
The application of fractional flow theory to enhanced oil recovery
...
, 20:191–205, 1980
...
Keyfitz Quinn
...
Comm
...
Math
...

[134] J
...
Remacle, J
...
Flaherty, and M
...
Shephard
...

SIAM Review, 45:53–72, 2003
...
H
...
A front tracking alternative to the random choice method
...

Amer
...
Soc
...
4):1125–1139, 1993
...
H
...
Tveito
...
SIAM J
...
Stat
...
, 12:1401–1419, 1991
...
J
...
Computational Fluid Dynamics
...

[138] P
...
Roe
...
J
...
Phys
...

[139] W
...
Real and Complex Analysis
...

[140] J
...
An unsplit 3-D upwind method for hyperbolic conservation laws
...

Comput
...
, 115:153–168, 1994
...
H
...
An analysis of upstream differencing
...
Pet
...
J
...
Engrg
...

[142] R
...
On convergence of monotone finite difference schemes with variable
spatial differencing
...
Comp
...

[143] D
...
Schaeffer, M
...
Schecter
...
J
...
Eqns
...

[144] C
...
Schulz-Rinne
...
SIAM J
...
Anal
...

[145] C
...
Schulz-Rinne, J
...
Collins, and H
...
Glaz
...
SIAM J
...
Comput
...

[146] C
...
The Riemann Problem for Two-Dimensional Gas
Dynamics and New Limters for High-Order Schemes
...

[147] M
...
Loss of strict hyperbolicity of the Buckley–Leverett equations for
three-phase flow in a porous medium
...
I
...
A
...

[148] M
...
A
...
Loss of real characteristics for models of
three-phase flow in a porous medium
...

[149] C
...
Shu and S
...
Efficient implementation of essentially non-oscillatory
shock capturing schemes
...
J
...
Phys
...

[150] Joel Smoller
...
Springer-Verlag,
1982
...
A
...
Numerical Methods in Fluid Dynamics
...

[152] G
...
On the construction and comparison of difference schemes
...

Numer
...
, 5:506–517, 1968
...
Strauss
...
Partial Differential Equations: An Introduction
...

[154] J
...
Strikwerda
...

Wadsworth & Borrks/Cole, 1989
...
K
...
High resolution schemes using flux limiters for hyperbolic
conservation laws
...
Numer
...
, 21:995–1011, 1984
...
Tadmor
...
Math
...
, 43:369–381, 1984
...
Tang and T
...
T
...
Wave curves for the Riemann problem of plane waves in
isotropic elastic solids
...
J
...
Sci
...

[158] M
...
Partial Differential Equations III
...
117
...

[159] E
...
Toro
...
Springer,
1997
...
The ∇ · b = 0 constraint in shock-capturing magnetohydrodynamics
a
o
codes
...
Comp
...
, 161:605–652, 2000
...
A
...
Three-phase flow with gravity
...
Math
...

[162] J
...
Trangenstein and P
...
A higher-order Godunov method for modeling
finite deformation in elastic-plastic solids
...
Pure Appl
...
, XLIV:41–100,
1991
...
A
...
B
...
The Riemann problem for longitudinal motion
in an elastic-plastic bar
...
Sci
...
Comput
...

[164] J
...
Trangenstein and R
...
Pember
...
J
...
Phys
...

[165] J
...
Trangenstein and Z
...
Multi-scale iterative techniques and adaptive mesh
refinement for flow in porous media
...
Water Resources, 25:1175–1213, 2002
...
P
...
Colella
...
J
...
Phys
...

[167] C
...
The Elements of Continuum Mechanics
...

[168] B
...
Springer Lecture Notes in Physics, vol
...
I
...
Springer-Verlag,
1973
...
van Leer
...
II
...
J
...
Phys
...

[170] B
...
Towards the ultimate conservative difference scheme
...

Upstream-centered finite-difference schemes for ideal compressible flow
...
Comp
...
, 23:263–275, 1977
...
van Leer
...
IV
...
J
...
Phys
...

[172] H
...
Liang, R
...
Ewing, S
...
Lyons, and G
...
An ELLAM-MFEM
solution technique for compressible fluid flows in porous media with point sources
and sinks
...
Comput
...
, 159:344–376, 2000
...
F
...
W
...
Upwind second order difference schemes and
applications in aerodynamic flows
...

[174] B
...
The Riemann problem for materials with nonconvex equations of
state
...
Isentropic flow
...
Math
...
Appl
...

[175] G
...
Linear and Nonlinear Waves
...

[176] M
...
Wilkins
...
Meth
...
Phys
...

[177] P
...
Colella
...
J
...
Phys
...


592

Bibliography

[178] N
...
Yanenko
...
Springer-Verlag, 1971
...
C
...
Sweby, P, and D
...
Griffiths
...
1
...
J
...
Phys
...

[180] S
...
Zalesak
...

J
...
Phys
...


Index

L1 -contracting, 357
accuracy, 71, 73–75, 78, 80, 341, 360,
409, 418, 544
acoustic tensor, 189, 229, 235
adaptive mesh refinement, 17, 545, 547,
549, 550, 560, 562, 563, 568,
570–574, 576–580
admissibility, 90–92, 98, 150–153, 155,
157, 159, 498, 500
advection
–diffusion, 1, 9–11, 31, 32, 129, 359
linear, 6, 14, 55, 81, 326, 330, 331,
362, 418, 478, 510
Alfv´ n speed, 214
e
amplitude, 40, 43, 44
anomalous, 238–240, 254
aquifer, 103
Beam, 133, 363, 364, 366, 367, 376,
377
Berger, 545
bounded, 353
Buckley, 107, 427, 542
buffering, 554
bulk modulus, 224, 234
Burgers, 82–84, 87, 88, 92, 97, 291,
319, 382, 389, 390, 395, 401, 407,
422, 498
capillary pressure, 106, 108, 268, 430,
542
Cartesian
coordinates, 522
grid, 543
Cauchy
stress, 222–224, 529, 536
cell, 12, 477, 508
centered
difference, 26, 32, 119, 312
rarefaction, 97, 98, 156–159, 192,
193, 201, 207, 218–220, 258, 259,
266, 267, 272, 280

CFL
condition, 15, 16, 395, 410, 417, 544,
545, 549, 554, 577
factor, 389
number, 15, 24, 25, 115, 118, 119,
128, 134, 341, 371, 460
characteristic
cone, 140
coordinate, 8, 81, 140
direction, 137, 151, 154, 155, 157,
159, 293, 298, 452
expansion coefficient, 139, 161, 323,
447, 497
line, 7, 84, 121
projection, 388, 389, 466
speed, 82, 98, 101, 120, 136–138,
153–155, 157, 158, 161, 176, 432,
433, 579
tracing, 388, 520, 529, 533
CLAWPACK, 450
closed, 353
Colella, 208, 295, 298, 322, 402, 450,
479
Colella–Woodward interacting blast
wave problem, 208, 323, 324
compact, 353
set, 333, 337, 353, 356
support, 172, 328, 354–356, 418
concentration, 103, 104, 111, 129,
268–271, 273
conservation law, 8, 10, 81, 99, 135,
136, 326, 474
conservative
approximate Riemann solver,
285–287, 289, 292, 294, 295,
304, 305, 313, 314, 316, 317, 322,
323
flux, 377, 487
scheme, 14, 286, 289, 332, 356, 364,
367, 368, 370, 477, 547
consistent
approximate Riemann solver,
285–289, 304, 305, 313

numerical flux, 285, 287, 288, 331,
332, 343, 347, 355, 438
scheme, 43, 57, 58, 62, 327, 330,
353, 368
constitutive law, 222–225, 227, 229,
259
contact discontinuity, 138, 159, 297,
314, 473, 544
continuity equation, 222
contractive, 351
convection–diffusion, 40, 80
convergence, 25, 37, 44, 63, 66, 69, 90,
170, 180, 286, 289, 329, 331, 332,
343, 353, 355, 359, 368, 432, 433
coordinate
Cartesian, 522
curvilinear, 521–523, 529
cylindrical, 521, 533, 535–537, 539
Eulerian, 145
Lagrangian, 140, 145, 235
polar, 542
self-similar, 98, 202
spherical, 521, 523, 525, 527–529,
541
corner transport upwind, 479
Courant, 187, 188
CFL condition, 15, 395, 410, 417,
544, 545, 549, 554, 577
CFL number, 15, 115, 118, 119, 128,
134, 341, 460
d‘Alembert, 174
Darcy
law, 103, 106, 107, 268, 273, 274
velocity, 108, 268, 270
decomposition, 437, 488
deferred correction, 508
deformation
finite, 221, 233, 255
gradient, 141, 142, 145, 222–225,
228, 236, 253, 255, 324, 463, 525,
530, 533, 534, 536, 541
Green tensor, 223, 236

594
deformation (cont
Title: differential equation
Description: it is an book about maths