Handbook of Numerical Methods for Hyperbolic Problems Applied and Modern Issues [1st Edition] 9780444639110, 9780444639103

Handbook on Numerical Methods for Hyperbolic Problems: Applied and Modern Issues details the large amount of literature

658 106 21MB

Pages 610 [587] Year 2017

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Handbook of Numerical Methods for Hyperbolic Problems  Applied and Modern Issues [1st Edition]
 9780444639110, 9780444639103

Table of contents :
Content:
Series PagePage ii
CopyrightPage iv
ContributorsPages xv-xvi
Editors’ IntroductionPages xvii-xixR. Abgrall, C.-W. Shu
Chapter 1 - Cut Cells: Meshes and SolversPages 1-22M. Berger
Chapter 2 - Inverse Lax–Wendroff Procedure for Numerical Boundary Treatment of Hyperbolic EquationsPages 23-52C.-W. Shu, S. Tan
Chapter 3 - Multidimensional UpwindingPages 53-80P. Roe
Chapter 4 - Bound-Preserving High-Order SchemesPages 81-102Z. Xu, X. Zhang
Chapter 5 - Asymptotic-Preserving Schemes for Multiscale Hyperbolic and Kinetic EquationsPages 103-129J. Hu, S. Jin, Q. Li
Chapter 6 - Well-Balanced Schemes and Path-Conservative Numerical MethodsPages 131-175M.J. Castro, T. Morales de Luna, C. Parés
Chapter 7 - A Practical Guide to Deterministic Particle MethodsPages 177-202A. Chertock
Chapter 8 - On the Behaviour of Upwind Schemes in the Low Mach Number Limit: A ReviewPages 203-231H. Guillard, B. Nkonga
Chapter 9 - Adjoint Error Estimation and Adaptivity for Hyperbolic ProblemsPages 233-261P. Houston
Chapter 10 - Unstructured Mesh Generation and AdaptationPages 263-302A. Loseille
Chapter 11 - The Design of Steady State Schemes for Computational AerodynamicsPages 303-349F.D. Witherden, A. Jameson, D.W. Zingg
Chapter 12 - Some Failures of Riemann SolversPages 351-360R. Abgrall
Chapter 13 - Numerical Methods for the Nonlinear Shallow Water EquationsPages 361-384Y. Xing
Chapter 14 - Maxwell and Magnetohydrodynamic EquationsPages 385-401C.-D. Munz, E. Sonnendrücker
Chapter 15 - Deterministic Solvers for Nonlinear Collisional Kinetic Flows: A Conservative Spectral Scheme for Boltzmann Type FlowsPages 403-433I.M. Gamba
Chapter 16 - Numerical Methods for Hyperbolic Nets and NetworksPages 435-463S. Čanić, M.L. Delle Monache, B. Piccoli, J.-M. Qiu, J. Tambača
Chapter 17 - Numerical Methods for AstrophysicsPages 465-477C. Klingenberg
Chapter 18 - Numerical Methods for Conservation Laws With Discontinuous CoefficientsPages 479-506S. Mishra
Chapter 19 - Uncertainty Quantification for Hyperbolic Systems of Conservation LawsPages 507-544R. Abgrall, S. Mishra
Chapter 20 - Multiscale Methods for Wave Problems in Heterogeneous MediaPages 545-576A. Abdulle, P. Henning
IndexPages 577-589

Citation preview

Handbook of Numerical Analysis Series Editors Qiang Du Columbia University, New York, United States of America Roland Glowinski University of Houston, Texas, United States of America €ller Michael Hintermu Humboldt University of Berlin, Germany €li Endre Su University of Oxford, United Kingdom

North-Holland is an imprint of Elsevier Radarweg 29, PO Box 211, 1000 AE Amsterdam, The Netherlands The Boulevard, Langford Lane, Kidlington, Oxford OX5 1GB, United Kingdom Copyright © 2017 Elsevier B.V. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or any information storage and retrieval system, without permission in writing from the publisher. Details on how to seek permission, further information about the Publisher’s permissions policies and our arrangements with organizations such as the Copyright Clearance Center and the Copyright Licensing Agency, can be found at our website: www.elsevier.com/permissions. This book and the individual contributions contained in it are protected under copyright by the Publisher (other than as may be noted herein). Notices Knowledge and best practice in this field are constantly changing. As new research and experience broaden our understanding, changes in research methods, professional practices, or medical treatment may become necessary. Practitioners and researchers must always rely on their own experience and knowledge in evaluating and using any information, methods, compounds, or experiments described herein. In using such information or methods they should be mindful of their own safety and the safety of others, including parties for whom they have a professional responsibility. To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume any liability for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas contained in the material herein. ISBN: 978-0-444-63910-3 ISSN: 1570-8659 For information on all North-Holland publications visit our website at https://www.elsevier.com/

Publisher: Zoe Kruze Acquisition Editor: Kirsten Shankland Editorial Project Manager: Hannah Colford Production Project Manager: Stalin Viswanathan Cover Designer: Victoria Pearson Typeset by SPi Global, India

Contributors Numbers in Parentheses indicate the pages on which the author’s contributions begin.

 A. Abdulle (545), ANMC, Section de Mathematiques, Ecole polytechnique federale de Lausanne, Lausanne, Switzerland R. Abgrall (351, 507), Institute of Mathematics, University of Z€ urich, Z€ urich, Switzerland  c (435), University of Houston, Houston, TX, United States S. Cani M. Berger (1), Courant Institute, New York University, New York, NY, United States M.J. Castro (131), Universidad de Ma´laga, Ma´laga, Spain A. Chertock (177), North Carolina State University, Raleigh, NC, United States M.L. Delle Monache (435), Rutgers University—Camden, Camden, NJ, United States I.M. Gamba (403), The University of Texas at Austin, Austin, TX, United States H. Guillard (203), Universite C^ote d’Azur, Inria, CNRS, LJAD, France P. Henning (545), KTH Royal Institute of Technology, Stockholm, Sweden P. Houston (233), School of Mathematical Sciences, University of Nottingham, Nottingham, United Kingdom J. Hu (103), Purdue University, West Lafayette, IN, United States A. Jameson (303), Stanford University, Stanford, CA, United States S. Jin (103), University of Wisconsin-Madison, Madison, WI, United States C. Klingenberg (465), Institut f€ ur Mathematik, Universit€ at W€ urzburg, W€ urzburg, Germany Q. Li (103), University of Wisconsin-Madison, Madison, WI, United States A. Loseille (263), INRIA Saclay-Ile de France, France S. Mishra (479, 507), Seminar for Applied Mathematics, ETH Z€ urich, Z€ urich, Switzerland T. Morales de Luna (131), Universidad de Co´rdoba, Co´rdoba, Spain C.-D. Munz (385), Institute for Aerodynamics and Gas Dynamics, University of Stuttgart, Stuttgart, Germany B. Nkonga (203), Universite C^ote d’Azur, Inria, CNRS, LJAD, France C. Par es (131), Universidad de Ma´laga, Ma´laga, Spain B. Piccoli (435), Rutgers University—Camden, Camden, NJ, United States

xv

xvi

Contributors

J.-M. Qiu (435), University of Houston, Houston, TX, United States P. Roe (53), University of Michigan, Ann Arbor, MI, United States C.-W. Shu (23), Brown University, Providence, RI, United States E. Sonnendr€ ucker (385), Max-Planck Institute for Plasma Physics; Mathematics Center, TU Munich, Garching, Germany J. Tambacˇa (435), University of Zagreb, Zagreb, Croatia S. Tan (23), Brown University, Providence, RI, United States F.D. Witherden (303), Stanford University, Stanford, CA, United States Y. Xing (361), University of California Riverside, Riverside, CA, United States Z. Xu (81), Michigan Technological University, Houghton, MI, United States X. Zhang (81), Purdue University, West Lafayette, IN, United States D.W. Zingg (303), University of Toronto Institute for Aerospace Studies, Toronto, ON, Canada

Editors’ Introduction R. Abgrall* and C.-W. Shu† * †

Institut fur € Mathematik, Universitat € Zurich, € Zurich, € Switzerland Brown University, Providence, RI, United States

These two volumes represent the volumes 17 and 18 of Handbook of Numerical Analysis. It is entirely devoted to the numerical methods designed for approximating the solution of hyperbolic equations, or of equations that write as a sum of operators where the most important, in terms of the behaviour of the solution, is the hyperbolic one. An example is the Navier–Stokes equations with high Reynolds number where the solution behaviour is essentially dictated by the hyperbolic operator (here the Euler system), except in boundary layers because of the boundary conditions. Hyperbolic partial differential equations appear often in applications. The most important application, already mentioned, is fluid dynamics, including specific flows such as multiphase flows, magnetohydrodynamics, water waves, etc. Other application areas include Maxwell equations, kinetic equations, traffic flow models and networks, etc. The solutions of hyperbolic partial differential equations often involve discontinuities, making mathematical analysis and numerical simulations difficult. In the past few decades there has been a large amount of literature in the design, analysis and application of various numerical algorithms for solving hyperbolic equations. The current volumes attempt to have experts in different types of algorithms write concise summaries so that the readers can find a variety of algorithms under different situations and become familiar with their relative advantages and limitations. This is a formidable task. We had to make choices because the field has grown tremendously since the early ages dating back to von Neumann in the United States and researchers from the former Soviet Union such as Rusanov and Godunov. This field has grown up for various reasons. The demand on diverse high tech areas ranging from airplanes and rockets, to the nuclear and car industries as well as more recently the green industry, to name just a few, necessitates to master better and better tools to improve performance. If it was possible in the early ages to rely on analytical solutions and experimental facilities only, this is no longer the case because of various constraints: economical, technological (weight, etc.), energy consumption, etc. This evolution has needed improved algorithms, i.e., more and more xvii

xviii

Editors’ Introduction

accurate as well as more and more robust ones. Hence the research on algorithm has grown up and then exploded since the early 1970s. In parallel, and also triggered by the same needs, computers have been more and more powerful from scalar, to vectors, then parallel and now massively parallel and hybrid architectures. This evolution of technology has also had a strong impact on the algorithms development. Because of its success, it is now possible to compute more and more complicated problems, both in terms of geometry and physics. There is still a lot to do to improve and understand the numerical methods designed for hyperbolic problems. The aim of these two volumes is to give a picture of the current state of the art. In order to introduce the subject, we have asked Professor Dafermos from Brown University to provide a short summary on the theory of hyperbolic equations. Then, if one looks at the table of content, one would realize that we have tried to cover not only the classical topics, such as the finite volume method and the Riemann solvers that are the building blocks of many of the algorithms, but also less standard methods. Examples include algorithms for computing sharp transition propagated by linearly degenerate waves. Other examples are given by the ENO/WENO family. In that case we have tried to go over the classical description, by giving some analysis of the methods. Other high-order methods are also considered such as the discontinuous Galerkin (DG) ones, the more recent hybrid DG schemes, high-order finite element methods, front-tracking methods, methods for Lagrangian hydrodynamics, entropy stable schemes, etc. Time discretisation is also considered, as well as more specialized problems like the simulation of flows with low Mach numbers, level set techniques, numerical methods for Hamilton–Jacobi equations, etc. Unfortunately, it is not possible, even in two quite thick volumes, to provide an exhaustive coverage of the state of the art. Even though the table of content seems to be exhaustive, many topics are still missing. For example, we have chosen to be quite restrictive on the subject of time stepping: there is no coverage on ADER and IMEX methods. The handling of problems with source terms is touched by chapters 5 and 6 (well-balanced schemes and asymptotic-preserving schemes), but there is no direct coverage on stiff source terms. If we have a chapter on methods for Cartesian meshes, there is no direct coverage on the application of immersed boundary methods. Similarly we have chosen to consider the problem of meshing in a specific way; there is no direct coverage on adaptive mesh refinement (AMR). The problem on boundary conditions is considered in chapter 2 this volume (volume 18) and chapter 19 previous volume (volume 17) of the handbook (SATSPB schemes and inverse Lax–Wendroff procedure), but much more could have been said. It was simply impossible to cover the whole field, and we apologize for this. To end this introduction, we would like to thank all the contributors to these volumes, as well as the referees. Both have been extremely efficient.

Editors’ Introduction

xix

ACKNOWLEDGEMENTS R.A. has been supported in part by SNF grant # 200021_153604. C.-W.S. has been supported in part by NSF grant DMS-1418750.

Chapter 1

Cut Cells: Meshes and Solvers M. Berger Courant Institute, New York University, New York, NY, United States

Chapter Outline 1 2 3 4

Introduction Brief Early History Mesh Generation Data Structures and Implementation Issues 5 Finite Volume Methods for Cut Cells

1 3 5 8 10

5.1 Steady-State Solution Techniques 5.2 Explicit Time-dependent Solution Techniques 5.3 Viscous Flows 6 Conclusions Acknowledgements References

12 13 17 18 18 18

ABSTRACT Embedded boundary Cartesian grids have greatly simplified the grid generation process for complicated engineering geometries. This approach to mesh generation uses a background regular mesh and takes special care of cut cells where the geometry intersects the grid. Grid generation is fast and robust. This chapter gives an overview of cut-cell grids. We discuss mesh generation and data structures used for implementation. We describe some stable and accurate discretizations for the small irregular cells that occur at the boundary. Much of this technology is mature and forms the basis for widely used CFD packages. Some possible directions for future research are presented. Keywords: Cut cells, Embedded boundary meshes, Small cell problem AMS Classification Codes: 65M08, 65M12, 65M50, 76M12

1

INTRODUCTION

This chapter describes the development and current status of Cartesian cut-cell mesh generators and solvers. Mesh generation can be the most expensive and time-consuming part of the flow solution process, particularly for complex engineering geometries from CAD systems. Cartesian mesh methods simplify and automate the grid generation process by using a regular Cartesian mesh that is not aligned with the geometry. This reduces the process of mesh generation to Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.10.008 © 2017 Elsevier B.V. All rights reserved.

1

2

Handbook of Numerical Analysis

computing intersections of the geometry and the Cartesian mesh on the lower-dimensional surface where the geometry intersects the Cartesian mesh. There are many advantages to embedded boundary meshes, and a few notable difficulties. The mesh generation process is fast, easy to automate, and can handle configurations of arbitrary complexity. The meshes are also very computationally efficient: typically 90% of the mesh is regular Cartesian cells, with no metric terms to store or use. Discretizations on Cartesian meshes are also more accurate than their unstructured counterparts (Aftosmis and Berger, 2002). The difficulties lie with the cut cells. Cut cells are much more irregular than unstructured meshes. There is no grid smoothness at cut cells, and so there error depends on the mesh in a complex way. This makes it difficult to estimate truncation error using Richardson-type methods. The use of explicit methods to update the solution on cut cells is problematic due to their arbitrarily small size. Perhaps the biggest problem is the lack of anisotropic refinement, or boundary layer zoning, for noncoordinate-aligned bodies. This makes embedded boundary grids hard to apply for computing high Reynolds number flow, a current research topic. All of these points will be discussed in more detail in the sections that follow. Cartesian mesh methods differ in their mesh assumptions, geometry representation, data structures, and solution techniques, including what equations are solved and how. The goal of this chapter of the handbook is to survey the range of these approaches. We will not be able to go into much detail, but hope to provide enough context and references to bring a reader new to Cartesian mesh methods to the frontier today. The terminology used to describe embedded boundary Cartesian meshes varies widely, particularly when describing cut cell vs immersed boundary meshes. In our definition, a cut-cell mesh computes detailed intersections with the geometry, and actually removes the portion of the mesh that lies outside the flowfield. This leaves a border of highly irregular cells on the remaining part of the Cartesian mesh. The flow computation is done only on these remaining flow cells, and the solid wall boundary conditions are applied only to the cut cells that are still part of the mesh. By contrast, the original immersed boundary method was proposed by Peskin in 1972 (Peskin, 1972, 1977) for biological fluid flows. He used a series of nodes and fibres to represent the heart, superimposed on a Cartesian mesh. The fibres represented a two-dimensional heart, and both sides of the structure were fluid. The fibrous interface interacted with the Cartesian mesh by applying forces, discretized over a set of points on the regular mesh in the neighbourhood surrounding both sides of the interface. In more recent immersed boundary research, the boundary has been represented using level sets (a very nice survey article is Mittal and Iaccarino (2005)). For greater accuracy in interface calculations, more detailed mesh intersection quantities have been computed. It is no longer always assumed that both sides of an interface are part of a calculation. Similarly, some cut-cell researchers have used level sets to represent the geometry, to make it easier, for example, to compute curvature. The term embedded boundary

Cut Cells: Meshes and Solvers Chapter

1

3

FIG. 1 Example of an adaptive cut-cell mesh for the launch abort vehicle, a complicated configuration with grid fins, abort motors, and multiple length scales. Computation by M. Aftosmis.

mesh is now in common usage, and covers all these types of nonbody-fitted meshes. Often, the term Cartesian mesh is used by itself, and the type is not even specified. We will still mostly use the term cut-cell mesh to refer to a Cartesian mesh with the geometry cut out from the mesh, as shown in Fig. 1, where no computation is performed on the solid side. There are many issues in common, however, and the demarcation between the two approaches is disappearing. This chapter is organized as follows. Section 2 gives a very brief history of the development of cut cells, with apologies in advance for those that are accidentally overlooked. Sections 3 and 4 discuss issues related to mesh generation and data structures, two related concerns. Section 5 discusses flow solvers for cut-cell meshes. Many interesting mathematical questions arise because of the irregularity of cut cells, and their possibly tiny cell volumes. Some conclusions and open problems are in Section 6.

2

BRIEF EARLY HISTORY

The earliest work using Cartesian meshes intersected coordinate lines with the geometry to build the mesh, and solved using finite difference methods modified by Shortley–Weller formulas to account for the uneven mesh spacing at the geometry boundary. This earliest work solved elliptic equations, so stability of these modified schemes was not an issue, although conditioning could be affected. (In current work solving hyperbolic equations, however, it is a big issue, discussed in Section 5.2.) In other very early work, Cartesian meshes used a piecewise constant discretization of the geometry, resulting in so-called staircase meshes. A cell was declared to be part of the computational mesh or conversely inside the geometry, depending on a simple test. For example, the test could be whether the cell centroid, or alternatively at

4

Handbook of Numerical Analysis

least 50% of a cell volume, was inside or outside the geometry. This enabled simple applications of boundary conditions, and for hyperbolic finite volume schemes allowed for conservation to be maintained in a stable way, but was quite inaccurate. Staircase meshes lead to boundary conditions that are inconsistent and perform poorly even with highly refined grids. The earliest cut-cell reference in computational fluid dynamics that we are aware of is from Purvis and Burkhalter (1979), who solved the full potential equations on a nonbody-fitted mesh with a finite volume scheme. This was extended to more flow conditions by Wedan and South (1983), and then extended to the Euler equations on multielement airfoils in Clarke et al. (1986), which also provided the earliest use of cell merging that we are aware of (see Section 5.2 for a discussion of cell merging). The extension to three dimensions was in Gaffney et al. (1987). They intersected the geometry with the grid lines in the mesh, and then computed the face areas and volume of the resulting cut cell. This work showed the utility of cut cells, but suffered from a lack of resolution around important features such as the leading and trailing edges. The paper (Epstein et al., 1992) included multiple objects that were not necessarily aligned with each other, along with a multigrid solver, and a nonconservative boundary condition at the body. The first production code to use Cartesian nonbody-fitted meshes was Boeing’s finite element-based potential flow code TranAir (Johnson et al., 2003). It also incorporated a solution-adaptive grid refinement strategy, to ameliorate the lack of local resolution of a single Cartesian mesh. Over the years TranAir was enhanced to include a boundary layer model, aerodynamic optimization capabilities, stability and control derivatives, and aeroelasticity modelling. In the 1980s, Lockheed also had a cut-cell code called SplitFlow by Karman (1995). With the advent of adaptive mesh refinement for hyperbolic equations, the problem of lack of resolution could be separated from the issue of nonbody-fitted mesh generation. Research picked up in a series of papers (Bayyuk et al., 1993; Berger and LeVeque, 1989; Quirk, 1992) for the time-dependent case and (Coirier and Powell, 1993; DeZeeuw and Powell, 1991) for the steady-state case. Cartesian grids are now very popular, and there are too many references to continue with a history (although we give more references with regard to particular details under discussion). At this point there are now several production codes using cut-cell meshes. The open-source code EB-Chombo (EB-Chombo Web Site, n.d.) is used for time-dependent work by researchers at Lawrence Berkeley. Another effort is Gerris (Popinet, 2002), also freely available. In collaboration with Michael Aftosmis, our own Cart3D code (Cart3D Web Site, n.d.) is used in virtually every new aeronautic design project at NASA Ames, is in use in hundreds of laboratories and companies, and is also commercially licensed. Several CFD companies have their own in-house codes, and more are in development.

Cut Cells: Meshes and Solvers Chapter

3

1

5

MESH GENERATION

The use of cut-cell meshes has greatly alleviated the burden of mesh generation. With Cart3D (Aftosmis et al., 1998), for example, volume meshing is totally automated. The burden instead is on the easier problem of surface meshing, as described below. This section outlines some of the issues associated with Cartesian mesh generation at a relatively high level. For a detailed discussion of the Cart3D mesh generation methodology in particular, the reader is referred to Aftosmis (1997). The job of a Cartesian mesh generator is conceptually simple: given a description of a geometry, produce a volume mesh consisting of regular Cartesian cells and a list of irregular cells cut by the geometry, with the associated quantities needed by the flow solver. For example, a second-order finite volume solver will require each cell’s volume and centroid as well as the face areas and face centroids. This latter includes the boundary face, the portion of the geometry that lies in each cut cell. The boundary face also needs a normal vector, but this can be derived from the other quantities using the divergence theorem. If an unstructured mesh data structure is used, the connectivity of the cells and faces must also be provided. Data structures are discussed in more detail in the next section. The mesh generation algorithm depends on how the geometry is represented. Many engineering designs are represented in CAD systems using NURBS. Some have tried working directly from NURBS (Beall et al., 2003; Melton et al., 1993). However, difficulties can arise when dealing with trimmed NURBS surfaces as a result of the discontinuous change in the polynomial representation along trimming curves. Also, point constructions on NURBS can be expensive since it typically requires solving a nonlinear equation. A level set description of the geometry, if one is available, can be very useful (EB-Chombo Web Site, n.d.). The surface can be represented to high order. There are exact formulas for the normal vector and the surface curvature. A level set representation is often used in the related problem of computing multiphase flow for tracking material interfaces. An interesting combination of approaches by Dawes (2006a,b) imports geometry from a tessellation and converts it to a level set representation for easier downstream handling. To modify the geometry during an optimization step, the level set distance function is edited, and the geometry is sculpted, a term they borrow from computer graphics. Subdivision surfaces may also be used to represent geometry (Persson et al., 2006; Zorin et al., 2000). These surfaces use either structured surface grids or triangulations as an underlying geometry upon which smoothly varying geometry can be produced using only local information. In Cart3D we use watertight triangulations to represent an object. Although approximating a curved surface with planar geometry may take many more triangles than using a higher-order representation (see Zaide et al. (2015)

6

Handbook of Numerical Analysis

and Persson and Peraire (2009) for some higher-order examples), the computational operations of intersecting planar triangles and planar faces of cubes can be done extremely efficiently. CAD programs are also improving in their ability to output quality triangulations, see, for example, Haimes and Aftosmis (2002). CAD export in STEP format has also improved substantially, so that STEP files can be read more reliably and triangulated with other tools. It is straightforward to verify whether a triangulation is watertight—each edge is part of exactly two triangles, and there are no self-intersections. Without this property, it is hard to ascertain if a gap between triangles is a problem to be fixed (e.g. due to NURBS polynomials not meeting exactly on a curve), or a real gap that is important to the flow (for example, between a wing and a flap). Whether or not a triangulation is watertight can be verified using logical operations and exact calculations of intersections (Shewchuk, 1996), which can prevent certain kinds of breakdowns during mesh generation. Numerical precision and robustness of implementation (Kettner et al., 2008; Schirra, 2000) is an ongoing current research topic more generally in the field of computational geometry. We use several such computational geometry algorithms in the Cart3D mesh generator. One illustrative example is the determination of whether a point lies inside or outside the geometry. If the geometry is a watertight solid, this can be done robustly using ray-casting algorithm, which we describe briefly here: l

l

Locate a ray from the point to a distant point outside the bounding box of the geometry. Compute intersections with the geometry. If it intersects the object an odd number of times the point is inside, and correspondingly an even number of intersections means it is outside.

This algorithm puts a burden on the triangulation: gaps and other locally nonmanifold features can lead to a breakdown in the mesh generation procedure. Another type of breakdown comes from computing an intersection numerically, and having round-off error lead to an incorrect determination. In Cart3D, the mesh generator follows a preprocessing step that takes as input multiple, possibly intersecting solid objects, and intersects and retriangulates them to create a single nonintersecting triangulation. The interior triangles are removed. For example, typically the CAD representation for a wing extends into the fuselage. After intersection, only a single exterior triangulation remains which is everywhere manifold. A side benefit of this is that the objects can be repositioned relative to each other, and a new configuration generated, meshed and computed, without a person in the loop. This intersection step uses the ray-casting mentioned above, with an exact arithmetic approach that determines whether an edge and triangle intersect using a sequence of determinants that returns the exact answer (Shewchuk, 1996). It also includes an automatic way to handle degeneracies, e.g., when

Cut Cells: Meshes and Solvers Chapter

1

7

the ray coincides with the edge of a triangle (Edelsbrunner and Mucke, 1990). For more details on both the intersection and mesh generation steps, the reader is referred is to Aftosmis (1997). The existence of split cells is one of the main difficulties that arise in mesh generation. Split cells are illustrated in both two and three space dimensions in Fig. 2. The Cartesian cell is actually split by the geometry into two or more disjoint volumes, each of which should be associated with its own flow state. With thin pieces of geometry, e.g., at a trailing edge, a split cell is likely to occur. Adding more levels of refinement will eventually cure this problem, but it will make the mesh much more expensive to solve on. Split cells are responsible for much of the code even though it occurs in only a tiny fraction of cells. Split cells are recognized during mesh generation when the six faces of a cell, some possibly cut, and the portion of the geometry lying in the cell are assembled into a volume. This is done by matching faces and triangles and putting together the corresponding edges in the polyhedra. Normally there is one internal volume in the solid, and one external volume. If there is more than this, the cell is split. Other approaches are possible. For example, in Lahur and Nakamura (1999) they extend their split cell method to handle sharp trailing edges by splitting the cell starting at the trailing edge. A more rare complication in Cartesian mesh generation is when a geometry tunnels through a cell. It can happen that an entire piece of geometry enters one face and leaves through another, and the flow field to be computed is inside. Some illustrations of this are in Fig. 3. Higher resolution can cure this problem, but it is important to handle it accurately, even on very coarse meshes. With the use of automatic mesh refinement, computations start on very coarse mesh and refine as necessary. If a cell is mis-classified initially, it becomes a problem downstream, when it turns out a “solid” cell should have really been a “cut cell”. Since most of a typical mesh is regular Cartesian cells, the real work in mesh generation is lower dimensional. The real computational work of computing intersections and generating cut cells on an N  N  N mesh is

FIG. 2 Example of split cells in two dimensions at the trailing edge of a NACA 4412, and in three dimensions at the edge of an OneraM6 wing.

8

Handbook of Numerical Analysis

FIG. 3 Two examples of geometry tunnelling through cells in a mesh. Figure courtesy of Marian Nemec.

OðN 2 M log MÞ, where M is the number of triangles in the solid object. This is achieved by using a tree-based data structure (Bonet and Peraire, 1991) to hold the triangles, thus avoiding a brute force approach that tests every triangle for intersection. Formally, of course, if each Cartesian cell has to be created, for example, to be put in an array, then this simple work takes O(N3). This is in contrast to a patch-based method, where a grid can be specified by its lower and upper corners, without enumerating each cell. This section would not be complete without mentioning one major advantage of cut-cell meshes over body-fitted alternatives. For many body-fitted meshes, the volume mesh generation starts with the triangles on the surface and marches outwards to fill the domain, using, for example, an advancing front method (Gumbert et al., 1987; L€ ohner and Parikh, 1988). This is true for both structured (e.g. prismatic or mapped hexahedral) and unstructured (e.g. tetrahedral) meshes. These methods therefore need a nice surface triangulation, with high quality triangles. Cut-cell meshes, however, do not use these triangles for a flow solution: they are only used to cut away parts of a Cartesian cell. The triangulation of the surface only needs to describe the geometry. It does not need to anticipate the flow solution nor the final resolution needed by the volume mesh. Some body-fitted codes deal with this by refining the triangulation if the mesh is refined. This is hard to do in the middle of a long run of a parallel flow code, so usually an approximation to the geometry’s surface curvature is made. For embedded boundary meshes, the decoupling of the surface mesh and volume mesh is an important aspect for both the surface and volume mesh generation.

4 DATA STRUCTURES AND IMPLEMENTATION ISSUES There are three approaches in the literature for representing a Cartesian cut-cell grid. Even more important though than how to represent the cut cells is how to incorporate mesh refinement, a crucial ingredient for accuracy on Cartesian meshes. In addition, the choice of how to parallelize a code will affect the data structure.

Cut Cells: Meshes and Solvers Chapter

1

9

The first data structure uses locally uniform rectangular grid patches. On the coarsest level grids, the union of the grid patches covers the domain. Mesh refinement is handled by superimposing smaller grid patches in the parts of the domain where it is needed. A separate data structure is needed to handle the cut cells. This irregular data structure is a graph that connects the cut cells with its neighbours. This also allows split cells, discussed in the previous section, since a split volume is represented as a different node in the graph with different connectivity than its split sibling. This is the approach taken by EB-Chombo (EB-Chombo Web Site, n.d.). Patch-based grids have the advantage that all cells are at the same level, and a flow solver can obtain maximum efficiency on regular grids. Also, the maximum size of these grid patches can be specified, so that grids fit in cache, or so that enough grids are made to help in load balancing them across multiple cores. Note that there is some computational and memory overhead with this approach: when a grid is divided into two smaller halves, each one now has its own ghost cells. Also, with patch-based grids the solid cells are part of the patch. Hopefully this mostly occurs on coarser patches to reduce waste. The second approach uses quadtrees or octrees to represent the Cartesian mesh. This is used, for example, in Dawes (2006a) and Hartmann et al. (2008). Dawes uses the octree for several purposes—to represent spatial occupancy (i.e. a region is fluid, solid, or cut by the geometry), to actually help with the mesh generation (Demargne et al., 2014), for efficient searching, and to represent an adaptive multilevel mesh during flow solution. Sometimes a different data structure is threaded through the tree to enhance performance of the flow solver. An efficient version of this is the fully threaded tree by Khokhlov (1998). This is implemented in the open source code Gerris (Popinet, 2002), which also includes adaptive mesh refinement, cut cells, and the option to solve several different sets of equations. An octree has the added bonus that a coarsened grid comes automatically as part of the data structure, useful, for example, for multigrid. Some codes (Domel and Karman, 2000) add the capability to refine in only one or two directions instead of all three, if the anisotropic mesh refinement is well aligned with the geometry. The third representation uses an unstructured data structure to store the mesh. This is the approach taken by Cart3D. Essentially, there are two types of arrays: one for storing faces, and one for storing cells. For regular Cartesian faces, each face needs to know its left and right cells (both regular) for the solver to be able to compute a flux. For faces connected to one or more cut cells, a separate array is used since it must also store a face centroid. Similarly, there are two arrays for cells: one for regular cells, which only requires storing a location and level of refinement, and one for cut cells, which stores the volume centroid, area, boundary information of cut triangles, and normal vector. Split cells have their parent Cartesian cell flagged, and each split volume has its own entry in the cut-cell array. This is called a face-based data structure in the CFD literature. It has very little memory overhead, since most

10

Handbook of Numerical Analysis

FIG. 4 The left figure illustrates the operations needed at a regular face between two regular cells. The reconstruction of the solution is only in one coordinate direction. The middle figure shows a face between cells at different levels of refinement. The right figure shows a somewhat more complicated situation with both a cut cell and a cut face. The boundary face centroids are also marked; they will need to have reconstructed states too.

of the mesh is regular Cartesian cells. There is a small penalty for indirect addressing in the flow solver with this approach, but this has been improving in newer compilers over the years. In this approach, cells at different levels of refinement are part of a single global mesh. Neighbouring cells must differ in resolution by at most one level. Thus a coarse cell at an interface will have four neighbouring fine cells in three dimensions. The flow solver has to treat faces between cells at different levels of refinement in a special way. The coarse cell has to reconstruct a solution value at face centroids that are no longer coordinate aligned (see Fig. 4 for a two-dimensional illustration). This is implemented by sorting the faces so that those requiring special treatment are grouped together. A separate loop over the majority of regular faces does not have to do these additional tests.

5 FINITE VOLUME METHODS FOR CUT CELLS Finite volume schemes have been the method of choice for solving on cut-cell grids, since they are easily adapted to handle the different number of faces in a cut cell. The new issue that arises is how to update cut cells and compute fluxes on the irregular faces. This includes computing a flux on the embedded boundary face, which is where the boundary conditions are applied. In this section, most of what we discuss is the application of finite volume methods to inviscid equations. We end with a brief discussion of their application to viscous flows. For a steady-state problem, the main concerns are accuracy of the final solution, and time to convergence. Section 5.1 discusses some of the approaches in this case. For a time-dependent problem, in addition to accuracy a main question is whether an explicit finite volume scheme can be used, and what to do about stability in the cut cells. We survey several approaches to what is known as the small cell stability problem in Section 5.2. The stability problem for finite difference methods seems to be a bit more tractable. One-sided difference schemes can be devised or ghost cell boundary conditions imposed that avoid the small cell problem (Dadone and Grossman, 2007; Ghias et al., 2007; Kang et al., 2009; Kupiainen and Sj€ogreen, 2009; Sj€ ogreen and Petersson, 2007). These schemes are also nonconservative at

Cut Cells: Meshes and Solvers Chapter

1

11

the boundary, which provides enough flexibility to avoid a stability problem. A finite volume approach that is only nonconservative at the boundary is the second-order accurate method of Forrer and Jeltsch (1998). Another interesting approach is the inverse Lax–Wendroff procedure (Tan and Shu, 2010), see also the chapter "Inverse Lax–Wendroff Procedure for Numerical Boundary Treatment of Hyperbolic Equations" by Shu and Tan. This latter method can be implemented to higher-order. In both these approaches only the boundary is nonconservative; there is a fully conservative interior scheme. In several papers a discontinuous Galerkin scheme is used on the regular Cartesian cells (Fidkowski and Darmofal, 2007; Qin and Krivodonova, 2013). This can be higher order than the second-order finite volume scheme we will describe next. To handle the cut cells, in two dimensions they were divided into triangles for integration. This is much harder to do in three space dimensions. In the rest of this section we restrict attention to methods that are conservative including the boundary cells. Note that an implicit finite volume solver can be built on top of a steady state solver by adding a pseudo-time derivative, and marching to steady state in pseudo-time (Jameson, 1991; Merle and Athavale, 1987). This is known as dual time stepping, and is the approach taken in Hartmann et al. (2008), as well as in Cart3D. Start with the equation @u (1) + r  FðuÞ ¼ 0 @t where u is the vector of dependent variables, and F is the vector of fluxes, and discretize using your favourite implicit scheme. For a concrete example, Cart3D uses a BDF2 formula, with a backward Euler step to get started. This can be written as 3 n+1 2 n 1 n1 1 U U + RðUn + 1 Þ ¼ 0:  U + 2Dt Dt 2Dt Vol

(2)

Here, U is the numerical solution, and R, which contains the spatial differences, is called the residual. By adding a pseudo-time variable t and derivative Ut, we can add a term to Eq. (2) @U + R*ðUÞ ¼ 0 @t

(3)

with a modified residual R*ðUÞ ¼

3 n+1 2 n 1 n1 1  U + U U + RðUn + 1 Þ: 2Dt Dt 2Dt Vol

(4)

and solve until R*(U) ¼ 0 in the t derivative using the steady-state techniques discussed next. At convergence, @U/@t is zero, and the solution U at time n + 1 results.

12

Handbook of Numerical Analysis

In a new investigation (May, 2013), a hybrid scheme that is implicit only on the cut cells, and explicit on the full cells is investigated. The accuracy, stability of the transition between the schemes, and solution techniques are being studied. The details of the scheme are still being developed, but it should be a lot cheaper than a fully implicit scheme.

5.1 Steady-State Solution Techniques In this section we will describe only the second-order finite volume scheme used in Cart3D, and explicitly mention what modifications are needed for cut cells. For ease of notation we use two space dimensions. We assume the reader is familiar with a standard finite volume formulation (LeVeque, 2002; van Leer, 1979). The starting point here is cell averages of a given initial solution Uij. The steps are 1. Compute the gradient in cell i, j; 2. Apply a slope limiter to the reconstructed gradient; 3. Predict values at the midpoint of the cell edges (in 3D this will be the centroid of the faces). This includes the boundary face in each cut cell; 4. Solve the Riemann problem at each cell edge using the predicted states from the two adjacent cells. This gives a state U* at each edge; 5. Update the cell average via Dtij X FðU*k Þ  nk Ak Unij + 1 ¼ Unij  (5) Vol ij k2faces

where Ak and nk are the face areas and normals for each face bordering cell i, j. At cut cells, the gradient is often computed using a least squares procedure. On regular Cartesian cells that are not adjacent to cut cells or interfaces, this is mathematically equivalent to central differencing in each direction, if only face neighbours are used. A Green Gauss procedure has also been used (DeZeeuw and Powell, 1991) to compute gradients. Step 2 is a difficult one for cut cells. It is well known that slope limiting can reduce the accuracy of a scheme at local extrema in the solution. Since cut-cell centroids are not coordinate aligned, this is likely to occur even in smooth flow without extrema. There has been some research in the area of cut-cell limiting (Berger et al., 2005; Zeng, 2013), and a special limiter has been proposed in 2D but not yet extended to 3D in May and Berger (2013). Many codes use a scalar limiter in the cut cells. Eq. (5) represents the single stage Forward Euler method. Most of the time a multistage Runge–Kutta method is used, and the sequence of steps is repeated for each stage with a stage coefficient multiplying the time step. In addition, notice that in step 5 each cell uses a different time step Dtij appropriate for the local wave speeds of that cell. This is known as local time stepping.

Cut Cells: Meshes and Solvers Chapter

1

13

It is a very simple technique to help accelerate convergence to steady state. Note that it can only be used with schemes that converge to a solution that is independent of Dt. Thus it is applicable to a Method of Lines scheme, but not to a Wendroff-type scheme, where even at steady state the truncation error includes a term proportional to Dt. Pseudo-time stepping is not sufficient to provide a good convergence rate. Cart3D (Berger et al., 2001) uses the full approximation scheme multigrid method of Jameson (1983) to accelerate convergence. Coarse grids are easily generated by combining cells that are at the same level of refinement that come from the same parent cell. The use of space-filling curves to number the cells means that sibling cells are adjacent, and multigrid coarse mesh generation is quick. (Space-filling curves are also used for parallel partitioning, and to provide good cache reuse, see Aftosmis et al. (2004) for more detail.) The multigrid restriction operator on cell-centred data is second order, and very simple; a volume-weighted average of fine cells gives a cell-centred coarser solution. We use a piecewise constant prolongation operator. A typical setup uses four or five levels of multigrid. On the coarser levels, a first-order scheme is used. On a very coarse grid, much of the geometry can disappear inside a very coarse cell but for inviscid flows this has not posed a problem. For viscous flow where the restriction and prolongation operators have to be higher order, it is important to keep geometric information on coarser grid levels.

5.2

Explicit Time-dependent Solution Techniques

The main difficulty in using explicit integration schemes for cut cells is stability. Explicit methods have to satisfy a CFL condition to be stable. In one space sDt  1, where s is the maximum wave speed dimension this typically looks like Dx over the mesh. More generally, it is the cell volume that appears in the denominator. Cut cells around the geometry can be arbitrarily small, with cell volumes that are orders of magnitude less than the regular cell volume. It would be impractical to takes millions of time steps on these cut cells; instead, something special should be done. In this section we review a number of approaches to this small cell stability problem. This is an active area of research, and new methods continue to appear. Here again we focus on finite volume schemes. The earliest schemes were based on the intuitive concept of cell merging (Bayyuk et al., 1993; Clarke et al., 1986; Domel and Karman, 2000; Gaffney et al., 1987; Ingram et al., 2003; Quirk, 1992). If a cut-cell volume is smaller than the threshold, combine it with one or more suitably chosen neighbouring cells sharing an edge until the threshold is reached. The heart of the algorithm is in the details: how to choose the neighbours, how to modify the data structure, choosing the threshold. (See also an interesting variation which seems to simplify the data structures called cell linking in

14

Handbook of Numerical Analysis

Hartmann et al. (2008).) A common approach is to merge cut cells with neighbours until the final cell volume is half the regular cell volume. The allowable time step is then cut by half. However, there is evidence that this is too stringent and it is not necessary to cut the CFL number at the lower-dimensional boundary cells by the same fraction (Berger, 2016) that would be needed for interior cells. To date, cell merging is not totally robust. It has usually been applied for somewhat simple configurations and static geometries. In Domel and Karman (2000) there was complicated 3D geometry, but they say it is not always possible to merge all sliver cells. Cell merging has been implemented in the context of moving geometries (Hunt, 2004) and moving interface (Udaykumar et al., 2001), where there is a new problem of cells that appear or disappear as the interfaces moves through them. In three dimensions the thesis by Hunt implemented cell merging in the context of moving geometries. In Hunt’s work, cells were merged both to satisfy a stability criteria, and to keep a cell-type invariant during the time step. In other words, cells that would appear or disappear during a time step were merged to prevent this; otherwise conservation is much more difficult to maintain. This also puts a premium on speed, since it is done at every time step, and makes a cell-merging algorithm that generates fairly regular (convex) merged cells without overlapping regions or holes that much more difficult. To my knowledge there are no production codes using this approach, and it is not yet clear how robust and automatic this is. An alternative approach that was investigated at around the same time but has not received much attention was to use a method stable for large time steps. The wave propagation is one such method (LeVeque and Shyue, 1996). Instead of fluxes, waves consisting of the jumps between cells are propagated left or right (in one dimension), and for a large time step it propagates through the cell and into the next one. It was originally applied to shock tracking, which has many of the same issues as cut cells. It was tried with cut cells in Berger and LeVeque (1989) but was found experimentally to be unstable for cut cells with cell volumes less than approximately 5% of the regular cell volume. This problem might have been fixed by using the rotated frame of the h-box method, described next, but was never pursued. The h-box method is a newer alternative. It is based on the idea of changing the domain of dependence of input states rather than changing the domain of influence of the output waves. The following simple one-dimensional example illustrates the main idea of h-boxes. Assume a regular grid with mesh width Dx in one space dimension, with one small cell of size aDx in the middle, 0 < a  1. This is sketched in Fig. 5. A cell update for the small cell k of the form Qnk + 1 ¼ Qnk 

Dt ½FðQk , Qk + 1 Þ  FðQk1 , Qk Þ aDx

(6)

Cut Cells: Meshes and Solvers Chapter

Δx

Q nk−2

1

15

αΔx

Q nk−1

Q nk

k−1/2

Q Lk−1/2 Q Lk+1/2

Q nk+1

Q nk+2

k+1/2

QR k−1/2 Q Rk+1/2

FIG. 5 Model problem for cut cells in 1D has one small cell of size aDx in middle of regular interval with mesh width Dx.

is unstable using a time step Dt suitable for the rest of the grid. The h-box method instead uses  Dt  (7) Qnk + 1 ¼ Qnk  FðQLk + 1=2 ,QRk+ 1=2  FðQLk1=2 ,QRk1=2 Þ aDx with modified left and right states appropriately defined. Stability comes from defining states to maintain a cancellation property, Fk + 1=2  Fk1=2 ¼ OðaDxÞ, (8) R x 1=2 where the enlarged states are defined by QLk + 1=2 ¼ xkk++1=2 Dx QðxÞdx. We give the simplest example of this for linear advection ut + ux ¼ 0, piecewise constant reconstruction for Q(x) in computing the integral, and an upwind flux function that returns the left state. Piecewise constant interpolation gives QLk + 1=2 ¼ aQk + ð1  aÞQk1 :

(9)

We have QLk1 ¼ Qk1 , since cell k  1 is a full cell. The finite volume update is then Dt  QLk1=2 Þ ðQL aDx k + 1=2 Dt ¼ Qnk  ðaQk + ð1  aÞQk1  Qk1 Þ aDx Dt ¼ Qnk  ðaQk  aQk1 Þ aDx Dt ¼ Qnk  ðQk  Qk1 Þ Dx

Qnk + 1 ¼ Qnk 

We see that a has disappeared from the last equation!

(10)

16

Handbook of Numerical Analysis

Accuracy is a separate issue. For this simple case, the local truncation error of (10) would appear inconsistent, since the cell-centred values Qk and Qk1 are not a distance Dx apart. However, one can show supra-convergence using the Wendroff and White technique (Wendroff and White, 1989). This is shown for a second order interpolation h-box method in Helzel et al. (2005), and using a simpler method of lines approach in Berger and Helzel (2012). For linear interpolation, we have a provably second order method that is stable for the Dt of the regular mesh for arbitrarily small a. In two dimensions something more complicated is needed, since coordinatealigned states do not have a cancellation property. It is easy to make up an example where states in the horizontal and vertical directions are orders of magnitude different, e.g., at a shock front that passes through a cut cell. For stability, a rotated coordinate system that is normal and tangential to the geometry of each cut cell is used. A linear combination of the normal and tangential fluxes then recovers the Cartesian flux. Fig. 6 shows the tangential boxes associated with the horizontal and vertical edges of a cut cell. It is seen from the figure that the boxes overlap each other, except for a volume the size of the cut cell. It is this property that gives the rotated scheme the cancellation property it needs for stability. There are also boxes that extend a distance h in the normal direction from an edge. The boundary conditions are imposed using the normal h-boxes. The most careful version of this method (Helzel et al., 2005) gives second-order accurate results at the cut cells; a less expensive version is slightly less accurate at the boundary (Berger and Helzel, 2012). Both versions double the number of Riemann problems to be solved at each cut-cell interface, but the number of cut cells in the mesh is a small fraction of the total. Due to its complexity, this method has not yet been implemented in three dimensions, so its robustness is also not yet known. A simpler, dimensionally split version of the h-box method that operates only along coordinate directions is less accurate (Berger and Helzel, 2002). Another coordinate-split method that uses the flux interpolation to stabilize the cut cell is Klein et al. (2009), which is also not second-order accurate.

Q Rx Q Rx Q Lx

Q Lx

FIG. 6 Illustration of rotated h-boxes in the tangential direction, needed for stability in two dimensions.

Cut Cells: Meshes and Solvers Chapter

1

17

Whether a dimensionally split second-order accurate cut-cell method is possible is still an open question. Flux redistribution (Chern and Colella, 1987; Colella et al., 2006) is the last method we review. This method was also originally developed for shock tracking. One of the earliest papers to simulate incompressible flow used an early version of this technique (Almgren et al., 1999). It has been implemented in three space dimensions and is found in the code EB-Chombo (EB-Chombo Web Site, n.d.). Flux redistribution is the simplest method to implement, and is quite robust, but is not second-order accurate at the boundary. A brief description of this method in one space dimension is included here. The starting point is (6), the unstable equation that updates the small cell. Instead of using the entire flux difference to update cell k, only use a fraction  of it, Qnk + 1 ¼ Qnk 

Dt ½FðQk , Qk + 1 Þ  FðQk1 ,Qk Þ aDx

(11)

The fraction that makes this stable is the ratio of the cut to regular cell volume, so  ¼ aDx/Dx ¼ a. To make the method conservative, the rest of the update that was meant for that cell, (1  ) of the flux difference, is redistributed to the neighbouring cells. This is usually done in a volume-weighted way, although for some applications a density-weighting was used. Although one might worry that some mass is being redistributed to some other possibly very small cut cells, it is done in proportion to the neighbouring cut-cell volume, so small cells take very little of the update. Flux redistribution has demonstrated its stability for many years, first as a shock-fitting method, and later when applied to cut cells.

5.3

Viscous Flows

Viscous terms present several new challenges for cut-cell methods. One is finding stable and accurate stencils for the second derivative terms on cut cells. These are much harder than the first derivatives needed for the inviscid equations. Some successful discretizations of viscous equations are Graves et al. (2013), Ghias et al. (2004), and Kang et al. (2009) for LES simulations. The second and larger difficulty is the resolution of highly anisotropic boundary layers that come with high Reynolds number flows. The standard approach in CFD codes is to use boundary layer zoning, with the grid spacing normal to the body much smaller than the grid spacing along the body. This kind of mesh stretching is not possible for cut-cell grids when the geometry is not coordinate-aligned. It would be prohibitively expensive to resolve such layers using isotropic refinement. For flows where boundary layer resolution is an issue, there are several approaches in the literature. In Wang and Chen (2000), a viscous layer is inserted by removing the cut cells, projecting the nodes to the geometry, and applying a Laplacian smoother to improve the grid irregularity. In Sachdev and Groth (2007), which is also in 2D, the grid points next to the

18

Handbook of Numerical Analysis

body are moved to create a nicer mesh. They also embed the geometry in a body-fitted mesh. In Dawes et al. (2007), the 3D mesh generator Boxer deletes the region of cut cells around the configuration (or technically does not create it), and replaces it with a viscous layer that is approximately normal to the body. Capizzano (2010) couples wall functions to an immersed boundary representation of the geometry. The method is not conservative, but does get around the Cartesian grid problem of isotropic refinement. Our own approach is similar. We use a one-dimensional mesh of linelets in each cut-cell normal to the boundary, and connect them in a fully conservative manner to the background Cartesian grid (Berger and Aftosmis, 2012).

6 CONCLUSIONS Embedded boundary methods have led to better automation and reliability of grid generation and flow solution in complicated engineering geometries. The algorithms can be complicated, but techniques from computer graphics and computational geometry allow fast and robust grid generation. New conservative discretizations are being developed which are stable at cut cells and retain the overall order of accuracy. The hands-off nature of the software allows the codes to be put inside design simulation and optimization loops. There are still open areas for research, despite these successes. We have already mentioned two such topics: simulating high Reynolds number flow, and a coordinate-aligned or dimensionally split h-box method. The last word in stable second-order solutions to the small cell problem has not yet been written. Higher-order cut-cell methods for finite volume schemes would be a very welcome addition. Every new partial differential equation to be solved using cut cells will have to adapt the discretization of choice to handle cut cells. Cut cells promise to be an exciting research area for years to come.

ACKNOWLEDGEMENTS I would like to thank my long-time collaborators, Michael Aftosmis, Christiane Helzel, Randy LeVeque and Sandra May for helping make research on cut cells so much fun. This work was supported in part by DOE grant DE-FG02-88ER25053 and AFOSR grant FA9550-13-1-0052.

REFERENCES Aftosmis, M.J., 1997. Solution adaptive Cartesian grid methods. In: Von Karman Institute Computational Fluid Dynamics Lectures Notes. Aftosmis, M.J., Berger, M.J., 2002. Multilevel error estimation and adaptive h-refinement for Cartesian meshes with embedded boundaries. AIAA-2002-0863. Aftosmis, M.J., Berger, M.J., Melton, J.E., 1998. Robust and efficient Cartesian mesh generation for component-based geometry. AIAA J. 36, 952–960. Aftosmis, M.J., Berger, M.J., Murman, S.F., 2004. Applications of space-filling curves to Cartesian methods for CFD. AIAA-2004-1232.

Cut Cells: Meshes and Solvers Chapter

1

19

Almgren, A.S., Bell, J.B., Colella, P., Marthaler, T., 1999. A Cartesian grid projection method for the incompressible Euler equations in complex geometries. SIAM J. Sci. Comp. 18 (5), 1289–1309. Bayyuk, S.A., Powell, K.G., van Leer, B., 1993. A simulation technique for 2-D unsteady inviscid flows around arbitrarily moving and deforming bodies of arbitrary geometry. AIAA-93-3391. Beall, M.W., Walsh, J., Shephard, M.S., 2003. Accessing CAD geometry for mesh generation. In: Proc. 12th International Meshing Roundtable, 33–42. Berger, M.J., 2016. A note on the stability of cut cells and cell merging. Appl. Numer. Math. 96, 180–186. Berger, M.J., Aftosmis, M.J., 2012. Progress towards a Cartesian cut-cell method for viscous compressible flow, with an appendix by Steve Allmaras. AIAA-2012-1301. Berger, M.J., Helzel, C., 2002. Grid aligned h-box methods for conservation laws in complex geometries. In: Herbin, R., Kr€oner, D. (Eds.), Finite Volumes for Complex Applications III, Porquerolles, France. Hermes Penton Ltd., London, pp. 277–284. Berger, M.J., Helzel, C., 2012. A simplified h-box method for embedded boundary grids. SIAM J. Sci. Comput. 34, 861–888. Berger, M.J., LeVeque, R.J., 1989. An adaptive Cartesian mesh algorithm for the Euler equations in arbitrary geometries. In: 9th Computational Fluid Dynamics Conf., Buffalo, NY. AIAA-89-1930. Berger, M.J., Aftosmis, M.J., Adomavicius, G., 2001. Parallel multigrid on Cartesian meshes with complex geometry. In: Computational Fluid Dyhamics: Trends and Applications, Proc. Parallel CFD Conf., Trondheim. Elsevier. Berger, M.J., Aftosmis, M.J., Murman, S., 2005. Analysis of slope limiters on irregular grids. AIAA-2005-0490. Bonet, J., Peraire, J., 1991. An alternating digital tree algorithm for geometric searching and intersection problems. Int. J. Numer. Meth. Engg. 31 (1), 1–17. Capizzano, F., 2010. A turbulent wall model for immersed boundary methods. AIAA-2010-712. Cart3DWeb Site, n.d. http://www.nas.nasa.gov/publications/software/docs/cart3d. Chern, I., Colella, P., 1987. A conservative front tracking method for hyperbolic conservation laws. Tech. Report UCRL-97200. Lawrence Livermore National Laboratory. Clarke, D.K., Salas, M.D., Hassan, H., 1986. Euler calculations for multielement airfoils using Cartesian grids. AIAA J. 24, 353–358. Coirier, W.J., Powell, K.G., 1993. An accuracy assessment of Cartesian-mesh approaches for the Euler equations. AIAA-93-3335. Colella, P., Graves, D.T., Keen, B.J., Modiano, D., 2006. A Cartesian grid embedded boundary method for hyperbolic conservation laws. J. Comp. Phys. 211, 347–366. Dadone, A., Grossman, B., 2007. Ghost-cell method for analysis of inviscid three-dimensional flows on Cartesian grids. Comput. Fluids 36, 1513–1528. Dawes, W.N., 2006a. Building blocks towards VR-based flow sculpting. AIAA-2005-1156. Dawes, W.N., 2006b. Towards a fully parallel integrated geometry kernel, mesh generator, flow solver & post-processor. AIAA-2006-942. Dawes, W.N., Harvey, S.A., Fellows, S., Favaretto, C.F., Velivelli, A., 2007. Viscous layer meshes from level sets on Cartesian meshes. AIAA-2007-555. Demargne, A.A.J., Evans, R.O., Tiller, P.J., Dawes, W.N., 2014. Practical and reliable mesh generation for complex real-world geometries. AIAA-2014-0119. DeZeeuw, D., Powell, K., 1991. An adaptively refined Cartesian mesh solver for the Euler equations. AIAA-91-1542.

20

Handbook of Numerical Analysis

Domel, N.D., Karman Jr., S.L., 2000. Splitflow: progress in 3D CFD with cartesian omni-tree grids for complex geometries. AIAA-2000-1006. EB-Chombo Web Site, n.d. http://crd.lbl.gov/assets/pubs_presos/ebmain.pdf. Edelsbrunner, H., Mucke, E., 1990. Simulation of simplicity: a technique to cope with degenerate cases in geometric algorithms. ACM Trans. Graph. 9 (1), 66–104. Epstein, B., Luntz, A., Nachschon, A., 1992. Cartesian Euler method for arbitrary aircraft configurations. AIAA J. 30 (3), 679–687. Fidkowski, K.J., Darmofal, D., 2007. An adaptive simplex cut-cell method for discontinuous Galerkin discretizations of the Navier-Stokes equations. AIAA-2007-3941. Forrer, H., Jeltsch, R., 1998. A high-order boundary treatment for Cartesian-grid methods. J. Comput. Phys. 140, 259–277. Gaffney, R., Hassan, H., Salas, M., 1987. Euler calculations for wings using Cartesian grids. AIAA-87-0356. Ghias, R., Mittal, R., Lund, T.S., 2004. A non-body conformal grid method for simulation of compressible flows with complex immersed boundaries. AIAA-2004-0080. Ghias, R., Mittal, R., Dong, H., 2007. A sharp interface immersed boundary method for compressible viscous flows. J. Comp. Phys. 225, 528–553. Graves, D.T., Colella, P., Modiano, D., Johnson, J., Sj€ogreen, B., Gao, X., 2013. A Cartesian grid embedded boundary method for the compressible Navier Stokes equations. Comm. Appl. Math. and Comp. Science 8, 99–122. Gumbert, C., Vahdati, M., Morgan, K., Zienkiewicz, O.C., 1987. Adaptive remeshing for compressible flow computations. J. Comp. Phys. 72, 449–466. Haimes, R., Aftosmis, M.J., 2002. On generating high quality “water-tight” triangulations directly from CAD. In: Proc. of the 8th Intl. Grid Conf., Honolulu, HI. Hartmann, D.J., Meinke, M., Schroder, W., 2008. An adaptive multilevel multigrid formulation for Cartesian hierarchical grid methods. Comput. Fluids 37, 1103–1125. Helzel, C., Berger, M.J., LeVeque, R.J., 2005. A high-resolution rotated grid method for conservation laws with embedded geometries. SIAM J. Sci. Comput. 26, 785–809. Hunt, J., 2004. An Adaptive 3D Cartesian Approach for the Cell-Based Parallel Computation of Inviscid Flow About Static and Dynamic Configurations (Ph.D. thesis). Univ. Michigan. Ingram, D.M., Causon, D.M., Mingham, C.G., 2003. Developments in Cartesian cut cell methods. Math. Comput. Simul. 61, 561–572. Jameson, A., 1983. Solution of the Euler equations for two dimensional transonic flow by a multigrid method. Appl. Math. Comput. 13, 327–356. Jameson, A., 1991. Time dependent calculations using multigrid, with applications to unsteady flows past airfoils and wings. AIAA-91-1596. Johnson, F.T., Tinoco, E.N., Yu, N.J., 2003. Thirty years of development and application of CFD at Boeing commercial airplanes, Seattle. AIAA-2003-3439. Kang, S., Iaccarino, G., Moin, P., 2009. Accurate immersed-boundary reconstructions for viscous flow simulations. AIAA J. 47 (7), 1750–1760. Karman Jr., S.L., 1995. Splitflow: a 3D unstructured Cartesian prismatic grid CFD code for complex geometries. AIAA-1995-343. Kettner, L., Mehlhorn, K., Pion, S., Scchirra, S., Yap, C., 2008. Classroom examples of robustness problems in geometric computations. Comput. Geom. 40, 61–78. Khokhlov, A.M., 1998. Fully threaded tree algorithms for adaptive refinement fluid dynamics simulations. J. Comp. Phys. 143 (2), 519–543. Klein, R., Bates, K.R., Nikiforakis, N., 2009. Well balanced compressible cut-cell simulations of atmospheric flow. Phil. Trans. Royal Soc. A 367, 4559–4575.

Cut Cells: Meshes and Solvers Chapter

1

21

Kupiainen, M., Sj€ ogreen, B., 2009. A Cartesian embedded boundary method for the compressible Navier-Stokes equations. J. Scientific Comp. 41 (1), 94–117. Lahur, P.R., Nakamura, Y., 1999. A new method for thin body problem in Cartesian grid generation. AIAA-1999-0919. LeVeque, R.J., 2002. Finite Volume Methods for Hyperbolic Problems. Cambridge University Press, Cambridge. LeVeque, R.J., Shyue, K.-M., 1996. Two-dimensional front tracking based on high resolution wave propagation methods. J. Comput. Phys. 123, 354–368. L€ ohner, R., Parikh, P., 1988. Generation of three-dimensional unstructured grids by the advancing-front method. Intl. J. Num. Methods Fluids 8, 1135–1149. May, S., 2013. Embedded Boundary Methods for Flow in Complex Geometries (Ph.D. thesis). Courant Institute of Mathematical Sciences, New York University. May, S., Berger, M.J., 2013. Two-dimensional slope limiters for finite volume schemes on non-coordinate-aligned meshes. SIAM J. Sci. Comput. 35, A2163–A2187. Melton, J., Enomoto, F., Berger, M.J., 1993. 3D automatic Cartesian grid generation for Euler flows. AIAA-93-3386. Merle, C.L., Athavale, M., 1987. Time-accurate unsteady incompressible flow algorithms based on artificial compressibility. AIAA-87-1137. Mittal, R., Iaccarino, G., 2005. Immersed boundary methods. Ann. Rev. Fluid Mech. 37, 239–261. Persson, P.-O., Peraire, J., 2009. Curved mesh generation and mesh refinement using Lagrangian solid mechanics. AIAA-2009-949. Persson, P.-O., Aftosmis, M.J., Haimes, R., 2006. On the use of loop subdivision surfaces for surrogate geometry. In: Proc. of the 15th Intl. Meshing Roundtable. Springer-Verlag, Birmingham, AL. Peskin, C.S., 1972. Flow patterns around heart valves:a numerical method. J. Comp. Phys. 10, 252–271. Peskin, C.S., 1977. Numerical analysis of blood flow in the heart. J. Comp. Phys. 25, 220–252. Popinet, S., 2002. Gerris: a tree-based adaptive solver for the incompressible Euler equations in complex geometries. J. Comp. Phys. 190 (2), 572–600. Purvis, J.W., Burkhalter, J.E., 1979. Prediction of critical Mach number for store configurations. AIAA J. 17, 1170–1177. Qin, R., Krivodonova, L., 2013. A discontinuous Galerkin method for solutions of the Euler equations on Cartesian grids with embedded geometries. J. Comput. Sci. 4, 24–35. Quirk, J.J., 1992. An alternative to unstructured grids for computing gas dynamics flows around arbitrarily complex two dimensional bodies. Technical Report 92-7, ICASE. Sachdev, J.S., Groth, C.P.T., 2007. A mesh adjustment scheme for embedded boundaries. Comm. Comp. Physics 2 (6), 1095–1124. Schirra, S., 2000. Robustness and precision issues in geometric computation. In: Sack, J., Urrutia, J. (Eds.), Handbook on Computational Geometry. Elsevier, 597–632. Shewchuk, J.R., 1996. Robust adaptive floating-point geometric predicates. In: Proc. 12th Annual ACM Symp. Comp. Geometry. Association for Computing Machinery (ACM). Sj€ ogreen, B., Petersson, N.A., 2007. A Cartesian embedded boundary method for hyperbolic conservation laws. Comm. Comp. Physics 2, 1199–1219. Tan, S., Shu, C.-W., 2010. Inverse law-Wendroff procedure for numerical boundary conditions of conservation laws. J. Comp. Phys. 229, 8144–8166. Udaykumar, H.S., Mittal, R., Rampunggoon, P., Khanna, A., 2001. A sharp interface Cartesian grid method for simulating flows with complex moving boundaries. J. Comp. Phys. 174, 345–380.

22

Handbook of Numerical Analysis

van Leer, B., 1979. Toward the ultimate conservative difference scheme. V. A second order sequel to Godunov method. J. Comp. Phys. 32, 101–136. Wang, Z.J., Chen, R.F., 2000. Anisotropic Cartesian grid method for viscous turbulent flow. AIAA-2000-0395. Wedan, B., South Jr., J.C., 1983. A method for solving the transonic full-potential equation for general configurations. AIAA-1983-1889. Wendroff, B., White, A., 1989. Supraconvergent schemes for hyperbolic equations on irregular grids. In: Ballmann, J., Jeltsch, R. (Eds.), Nonlinaer Hyperbolic Equations—Theory, Computation Methods, and Applications. Proc. of the 2nd Intl. Conf. on Nonlinear Hyperbolic Problems, 1988. FRG, Aachen. Notes on Numerical Fluid Mechanics, vol. 24. Zaide, D.W., Lu, Q., Shephard, M.S., 2015. A comparison of c0 and g1 continuous curved tetrahedral meshes for high-order finite element simulations. In: Proc. 24th International Meshing Roundtable. Elsevier, New York. Zeng, X., 2013. A general approach to enhance slope limiters on non-uniform grids. ArXiv:1301.0967 (preprint). Zorin, D., Schr€ oder, P., DeRose, A., Kobbelt, L., Levin, A., Sweldens, W., 2000. Subdivision for modeling and animation. SIGGRAPH 2000 Course Notes.

Chapter 2

Inverse Lax–Wendroff Procedure for Numerical Boundary Treatment of Hyperbolic Equations C.-W. Shu and S. Tan Brown University, Providence, RI, United States

Chapter Outline 1 Introduction 2 Problem Description and Interior Schemes 3 Numerical Boundary Conditions for Static Geometry 3.1 One-Dimensional Scalar Conservation Laws: Smooth Solutions 3.2 One-Dimensional Scalar Conservation Laws:

24 27 28

28

Solutions Containing Discontinuities 3.3 Two-Dimensional Euler Equations in Static Geometry 4 Moving Boundary Treatment for Compressible Inviscid Flows 5 Numerical Results 6 Conclusions and Future Work References

31

34 38 42 48 49

ABSTRACT We discuss a high-order accurate numerical boundary condition for solving hyperbolic conservation laws on fixed Cartesian grids, while the physical domain can be arbitrarily shaped and moving. Compared with body-fitted meshes, the biggest advantage of Cartesian grids is that the grid generation is trivial. The challenge is, however, that the physical boundary does not usually coincide with grid lines. The wide stencil of the high-order interior scheme makes a stable boundary treatment even harder to realize. There are two main ingredients of this method. The first one is an inverse Lax– Wendroff procedure for inflow boundary conditions and the other one is a robust and high-order accurate extrapolation for outflow boundary conditions. This method is high-order accurate, stable, and easy to implement. It has been successfully applied to simulate interactions between compressible inviscid flows and rigid (static or moving) bodies with complex geometry.

Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.10.001 © 2017 Elsevier B.V. All rights reserved.

23

24

Handbook of Numerical Analysis

Keywords: Cartesian mesh, Compressible inviscid flow, Extrapolation, Hyperbolic conservation law, Inverse Lax–Wendroff procedure, No-penetration condition, Numerical boundary condition AMS Classification Code: 65M06

1 INTRODUCTION We consider high-order finite difference methods for solving hyperbolic equations involving complex static or moving geometry. For such problems, bodyfitted meshes which conform to the geometry are often used because of the ease of imposing boundary conditions. In the context of finite difference methods, body-fitted grids are usually generated by a curvilinear transformation that maps the physical domain with complex geometry to a rectangular computational domain which can be easily gridded. The design of a curvilinear transformation could be difficult for geometrically complicated domains. In addition, the partial differential equations in the transformed domain are usually more complicated than those in the physical domain, leading to increased computational costs. Alternatively, Cartesian grids can be used to discretize the physical domain regardless of its geometry. The biggest challenge is, however, to accurately impose the boundary conditions while retaining the stability. The challenge mainly results from two facts. First, the physical boundary does not necessarily coincide with grid lines and can intersect the Cartesian grids in an arbitrary fashion. Secondly, high-order interior schemes need proper treatment of several so-called ghost points near the boundary because of the wide numerical stencils. Ghost points refer to artificial grid points defined outside the computational domain and next to the boundary. The only purpose of ghost points is to complete the numerical stencils of grid points inside the computational domain and close to the boundary. Ghost points may not have any physical meaning. There are many successful numerical methods based on Cartesian grids. The immersed boundary method (IBM) introduced by Peskin (1972) is widely used to solve incompressible flows in complicated time-varying domains. The IBM was extended for compressible viscous flows (de Tullio et al., 2007; Ghias et al., 2007; Palma et al., 2006). An immersed interface method was developed for elliptic equations (LeVeque and Li, 1994, 1997) and for streamfunction-vorticity equations (LeVeque and Calhoun, 2001). We emphasize that high-order numerical boundary conditions for hyperbolic equations are more difficult than elliptic or convection–diffusion-type equations mentioned above in the sense that there may be strong discontinuities passing through the boundaries in the hyperbolic case. The boundary treatment should be robust when strong shock waves reflect off rigid walls. The most popular way to impose boundary conditions at rigid boundaries for compressible flows is the reflection technique, where extra rows of ghost

Inverse Lax–Wendroff Procedure Chapter

2

25

points are added. All interior solution components are reflected symmetrically to ghost states except for the normal velocity which is negated. This method works well when the rigid boundary is straight and positioned at half grid points. It might lead to large errors otherwise. The inaccuracy of the approach when applied to curved geometry was demonstrated by Moretti (1969). For finite volume methods, boundary lines may cut Cartesian cells into irregular ones with volumes orders of magnitude smaller than the regular grid cells, leading to a severe time step restriction (the so-called cut-cell problem). The h-box method (Berger et al., 2003; Helzel et al., 2005) was developed to overcome this problem. The basic idea is to approximate numerical fluxes at the interface of a small cell based on initial values specified over regions of a regular length h. For one-dimensional (1D) convection equations, the h-box method is shown to be conservative and stable on arbitrary irregular grids (Berger et al., 2003). Numerical results confirm the same conclusion for Euler equations (Helzel et al., 2005). Another method to avoid the small-cell problem for Euler equations is to maintain cut boundary cells as whole (ghost) cells and obtain ghost cell values by reflecting locally the flow field around the boundary which is approximated by straight lines (Forrer and Jeltsch, 1998). This method is stable and applicable to any finite volume method, but conservation at the boundary is violated although this error may be relatively small. For Euler equations involving moving geometry, an idea similar to that of Forrer and Jeltsch (1998) was developed (Forrer and Berger, 1999) but the ghost cell values are obtained by a mirror flow extrapolation. A cell-merging technique combined with dimension splitting was developed by Falcovitz et al. (1997). Shyue (2008) proposed a moving boundary tracking algorithm based on finite volume wave-propagation method. The method is stable even if there are very small cut cells near the tracked interface. Arienti et al. (2003) developed an Eulerian–Lagrangian coupling scheme. Hu et al. (2006) developed a conservative interface method based on the level set technique. In terms of accuracy, all the finite volume schemes mentioned above are at most second order. In particular, the errors at the boundaries sometimes fall short of second order (Arienti et al., 2003; Forrer and Jeltsch, 1998; Hu et al., 2006). For finite difference methods, a second-order accurate Cartesian embedded boundary method was developed to solve the wave equations with Dirichlet or Neumann boundary conditions (Kreiss and Petersson, 2006; Kreiss et al., 2002, 2004) and to solve hyperbolic conservation laws (Sj€ogreen and Petersson, 2007). The basic idea is to assign values to ghost points outside the domain through extrapolation. To avoid oscillations near shock waves, slope limiters are combined with extrapolation (Sj€ogreen and Petersson, 2007). This approach was extended from second order to fifth order by using Lagrange extrapolation with a filter for the detection of discontinuities (Baeza et al., 2016a) and by a weighted extrapolation technique (Baeza et al., 2016b). Appel€ o and Petersson (2012) modified the embedded boundary method by assigning values to boundary points inside the domain via interpolation. This

26

Handbook of Numerical Analysis

method is fourth-order accurate and is based on a compact finite difference scheme. Fisher et al. (2011) developed stable boundary conditions in L2 norm for fourth-order energy stable weighted essentially nonoscillatory (WENO) schemes (Yamaleev and Carpenter, 2009). The boundary conditions maintain, whenever possible, the WENO stencil biasing properties and satisfy the summation-by-part operator convention. A distinct feature of the schemes is that they require nonuniform flux interpolation points near the boundaries. A Lax–Wendroff-type boundary condition procedure was introduced by Huang et al. (2008) for solving static Hamilton–Jacobi equations with a thirdorder finite difference method. The boundary condition was extended to fifth order (Xiong et al., 2010) and to discontinuous Galerkin (DG) method (Zhang et al., 2011) for the same type of problems. The idea is to repeatedly use the partial differential equations (PDEs) to write the normal derivatives to the inflow boundary in terms of the tangential derivatives of the given boundary condition. With these normal derivatives, we can obtain accurate values of ghost points by a Taylor expansion from a point located on the boundary. In this chapter, we discuss systematically the extension of this procedure to solve time-dependent hyperbolic equations involving complex static or moving geometry. For timedependent problems, the boundary treatment procedure is in essence repeatedly using the PDEs to convert normal spatial derivatives to time and tangential derivatives of the given boundary condition. It is in some sense an inverse to the standard Lax–Wendroff procedure (Lax and Wendroff, 1960), in which the PDEs are repeatedly used to convert time derivatives to spatial derivatives when discretizing the PDEs in time with high-order accuracy. We therefore refer to this method as the inverse Lax–Wendroff (ILW) procedure. This procedure was first proposed by Goldberg and Tadmor (1978, 1981) for analyzing numerical boundary conditions of linear hyperbolic equations in one dimension with boundaries aligned with grid lines. Lombard et al. (2008) applied a similar idea to arbitrary-shaped free boundaries in finite difference schemes for linear elastic waves. We extend the methods of Goldberg and Tadmor (1978, 1981) and Lombard et al. (2008) to nonlinear hyperbolic problems. In particular, strong discontinuities near the boundaries, which are absent in linear elastic waves, are handled by a high-order WENO extrapolation to prevent overshoot or undershoot. Moreover, we propose a simplified and improved implementation, which uses the relatively complicated ILW procedure only for the evaluation of the first-order normal derivatives. High-order WENO extrapolation is used for all other derivatives, regardless of the direction of the local characteristics and the smoothness of the solution. This makes the implementation of a very highorder boundary treatment practical for two-dimensional (2D) nonlinear systems with source terms. For no-penetration boundary condition of compressible inviscid flows, a further simplification is discussed, in which the evaluation of the tangential derivatives involved in the ILW procedure is avoided. Compared with the Cartesian embedded boundary method (e.g. Sj€ogreen and Petersson, 2007), the disadvantage of the ILW procedure is that the

Inverse Lax–Wendroff Procedure Chapter

2

27

formulation and implementation depend on the PDEs being solved. On the other hand, the linear stability of the ILW procedure with up to thirteenth order of accuracy has been guaranteed for 1D problems through rigorous analysis (Li et al., 2016; Vilar and Shu, 2015). To the best of our knowledge, the linear stability of the Cartesian embedded boundary method is unknown for schemes with higher than second order of accuracy. In this chapter, we present the ILW procedure for numerical boundary conditions in the context of finite difference WENO schemes (Jiang and Shu, 1996) for solving hyperbolic conservation laws. The methodology has been applied to other types of problems or schemes, such as compact finite difference schemes (Vilar and Shu, 2015) and Boltzmann equations (Filbet and Yang, 2013).

2

PROBLEM DESCRIPTION AND INTERIOR SCHEMES

We consider hyperbolic conservation laws possibly with source terms for U ¼ Uðx, y, tÞ 2 2 ( Ut + FðUÞx + GðUÞy ¼ SðUÞ ðx,yÞ 2 OðtÞ, t > 0, (1) ðx, yÞ 2 OðtÞ, Uðx,y, 0Þ ¼ U0 ðx,yÞ on a bounded domain O(t) with appropriate boundary conditions prescribed on G(t) ¼ @O(t) at time t. We assume there is an analytical expression for the geometry of G(t). O(t) is covered by a uniform Cartesian mesh with mesh size Dx ¼ Dy ¼ h, but the boundary G(t) does not need to coincide with any grid lines. The semidiscrete approximation of (1) is given by  d 1 ^ ^ Ui, j ðtÞ ¼  F i + 1=2, j  F i1=2, j dt h (2)    1 ^ ^  G ðtÞ , + S U  G i, j i, j + 1=2 i, j1=2 h ^ i, j + 1=2 are the numerical fluxes. We use the third-order ^ i + 1=2, j and G where F total variation diminishing Runge–Kutta method (Shu and Osher, 1988) to integrate the system of ordinary differential equations (2) in time. Our boundary treatment method is applicable to general finite difference schemes. To be more precise for this chapter, we use the fifth-order finite difference WENO scheme with the Lax–Friedrichs flux splitting to form the ^ i, j + 1=2 in (2) (Jiang and Shu, 1996). The ^ i + 1=2, j and G numerical fluxes F scheme requires a seven point stencil in both x and y directions. Near G(t) where the numerical stencil is partially outside of O(t), up to three ghost points are needed in each direction. In some cases of moving boundaries, up to four ghost points may be needed in each direction. We concentrate on how to define the values of the ghost points at time level t ¼ tn in Sections 3 and 4 for static and moving geometry, respectively.

28

Handbook of Numerical Analysis

3 NUMERICAL BOUNDARY CONDITIONS FOR STATIC GEOMETRY 3.1 One-Dimensional Scalar Conservation Laws: Smooth Solutions To illustrate the essential idea of the ILW procedure, we use 1D scalar conservation laws as an example 8 ut + f ðuÞx ¼ 0 x 2 ða, bÞ, t > 0, > > < uða, tÞ ¼ gðtÞ t > 0, > > : uðx,0Þ ¼ u0 ðxÞ x 2 ½a, b: 0

0

We assume f ðuða,tÞÞ  a > 0 and f ðuðb, tÞÞ  a > 0 for t > 0. This assumption guarantees the left boundary x ¼ a is an inflow boundary where a boundary condition is needed and the right boundary x ¼ b is an outflow boundary where no boundary condition is needed. We discretize the interval (a, b) by a uniform mesh a + Ca h ¼ x0 < x1 < ⋯ < xN ¼ b  Cb h, where 0  Ca < 1 and 0  Cb < 1. Notice that both x0 and xN are not necessarily located on the boundary, which is chosen this way on purpose since it is usually impossible to align boundary with grid points in a 2D domain with complex geometry. We assume u0  u(x0, tn), …, uN  u(xN, tn) have been updated from time level tn1 to time level tn. Here we suppress the tn dependence in u0, …, uN without causing any confusion.

3.1.1 Inverse Lax–Wendroff Procedure for Inflow Boundary Conditions At the inflow boundary x ¼ a, we construct a sth order approximation of ghost point values u3, …, u1 by a Taylor expansion uj ¼

s1 X ðxj  aÞk k¼0

ðkÞ

where uL

k!

ðkÞ

uL , j ¼ 3, …,  1,

is a (s  k)th order approximation of

ð0Þ

(3)

 @ k u . We impose @xk x¼a, t¼tn

uL  ¼ gðtn Þ. To obtain the approximation of the spatial derivative @u , we utilize the PDE @xx¼a, t¼tn 0

ut + f ðuÞux ¼ 0

Inverse Lax–Wendroff Procedure Chapter

2

29

and evaluate it at x ¼ a, t ¼ tn. We impose ð1Þ

uL

ð1Þ

¼ uILW ¼ 

ut ða,tn Þ f 0 ðuða, tn ÞÞ 0

¼

g ðtn Þ , f ðgðtn ÞÞ 0

0

where f ðgðtn ÞÞ is bounded away from zero by the assumption that x ¼ a is an inflow boundary. Differentiating the PDE with respect to time yields 00

0

utt + f ðuÞut ux + f ðuÞuxt ¼ 0:

(4)

The term uxt can be written as 0

00

0

uxt ¼ ðut Þx ¼ ðf ðuÞux Þx ¼ f ðuÞu2x  f ðuÞuxx : Substituting it into (4), we obtain an equation for uxx 00

0

00

0

utt + f ðuÞut ux  f ðuÞf ðuÞu2x  f ðuÞ2 uxx ¼ 0:

(5)

Solving (5) for uxx and evaluating it at x ¼ a, t ¼ tn, we impose ð2Þ

uL

ð2Þ

¼ uILW ¼

0

00

f ðgðtn ÞÞg00 ðtn Þ  2f ðgðtn ÞÞg0 ðtn Þ2 f 0 ðgðtn ÞÞ3 ðkÞ

: ðkÞ

Following the same procedure, we can impose values of uL ¼ uILW , k ¼ 1, …, s  1. The idea of converting time derivatives to spatial derivatives by repeatedly using the PDE comes from the original Lax–Wendroff scheme (Lax and Wendroff, 1960). Since we convert spatial derivatives to time derivatives, our method is called the inverse Lax–Wendroff procedure. We remark that this procedure is independent of the location of the boundary. The time derivatives can be obtained by either using the analytical derivatives of g(t) if available or numerical differentiation. In the case of discontinuities going through the boundary, g(t) is discontinuous. The stencil used for numerical differentiation should not contain any discontinuity. For example, an essentially nonoscillatory (ENO) procedure (Harten et al., 1997) or a WENO procedure (Jiang and Shu, 1996) can be used for this numerical differentiation.

3.1.2 Lagrange Extrapolation for Outflow Boundary Conditions At the outflow boundary x ¼ b, values of ghost points uN+1, …, uN+3 are also approximated by a (s  1)th order Taylor expansion uj ¼

s1 X ðxj  bÞk k¼0

k!

ðkÞ

uR , j ¼ N + 1,…, N + 3,

30

Handbook of Numerical Analysis

where

ðkÞ uR

 @ k u is a (s  k)th order approximation of k  . At the outflow @x x¼b, t¼tn

ðkÞ

boundary, uR should be imposed by the values of the interior points, u0, …, uN, because of the outgoing characteristics, even if a boundary condition is ðkÞ improperly prescribed. If u(x) is smooth near the boundary, uR can be easily obtained by  dk pRs1 ðxÞ ðkÞ uR ¼ , dxk x¼b where ps1 R ðxÞ is a Lagrange polynomial of degree at most s  1 interpolating uj, j ¼ N  s + 1, …, N. An explicit formula for the values of ghost points is s X

s! ð1Þk ujk ¼ 0, j ¼ N + 1, …,N + 3: k!ðs  kÞ! k¼0

(6)

For example, for s ¼ 5 uj ¼ uj5  5uj4 + 10uj3  10uj2 + 5uj1 , j ¼ N + 1, …, N + 3:

3.1.3 Simplified Inverse Lax–Wendroff Procedure ðkÞ We recall that the spatial derivatives uL , k  1, in the Taylor expansion (3) are obtained by repeated use of the PDE at the inflow boundary. Obviously, the algebra of converting derivatives of order higher than or equal to two can be very heavy if the PDE is complicated, which is usually the case if we consider 2D fully nonlinear systems (1). The complicated algebra would prevent us from implementing higher than third-order accurate boundary treatment for 2D Euler equations (Tan and Shu, 2010, 2011), although our method is designed to achieve arbitrarily high-order accuracy for general equations with source terms. ðkÞ Alternatively, we may obtain the spatial derivatives uL using extrapolation given by   d k ps1 ðkÞ ðkÞ L ðxÞ uL ¼ uEXT ¼  , k dx x¼a where ps1 L ðxÞ is a Lagrange polynomial of degree at most s  1 interpolating uj, j ¼ 0, …, s  1. A natural way to combine the ILW procedure and extrapolation is that ( ðkÞ uILW k  ks  1, ðkÞ uL ¼ ðkÞ uEXT k  ks : Namely, we use the ILW procedure to obtain the spatial derivatives of order up to ks  1; we switch to simple extrapolation when the algebra of the

Inverse Lax–Wendroff Procedure Chapter

2

31

ILW procedure becomes prohibitive for spatial derivatives of order greater than or equal to ks. This simplified version of the ILW procedure is referred to as the simplified inverse Lax–Wendroff procedure (Tan and Shu, 2013; Tan et al., 2012). A similar idea is proposed by Qiu and Shu (2003) for the Lax–Wendroff time discretization, in which they perform a WENO approximation only for the reconstruction of the fluxes to the first order time derivative to avoid spurious oscillations and use the inexpensive central difference approximation for the reconstruction of the higher order time derivatives.

3.1.4 Linear Stability Vilar and Shu (2015) performed the linear stability analysis of the simplified ILW boundary treatments based on central compact schemes for 1D initialboundary value problems. Later, the analysis was adapted by Li et al. (2016) for the ILW and the simplified ILW boundary treatments based on WENO schemes with linear weights (essentially high-order upwind schemes). For the simplified ILW procedure, the stability depends on ks, which is the number of Taylor expansion terms obtained by the ILW procedure. Simplified ILW maintains stability with the same Courant–Friedrichs–Lewy (CFL) number as the periodic boundary case for any boundary locations when ks is at least taken as ðks Þ min . When ks is less than ðks Þ min , simplified ILW may still be stable but with more restrictive CFL conditions. For example, for the fifth order simplified ILW procedure, ðks Þ min ¼ 3, which means we have to utilize the ILW procedure for up to second-order spatial derivatives in order to use the maximum allowed CFL number of the periodic boundary case. If we utilize the ILW procedure only for the first-order spatial derivative, i.e., ks ¼ 2, we still have a stable boundary treatment. However, the maximum allowed CFL number becomes 1.02, which is compared with the maximum allowed CFL number 1.43 for the periodic boundary case.

3.2 One-Dimensional Scalar Conservation Laws: Solutions Containing Discontinuities When a shock is very close to the outflow boundary, high-order Lagrange extrapolation may lead to severe overshoot or undershoot near the discontinuity (for an example see Fig. 1A). In this situation, we prefer a possibly lower order accurate but more robust extrapolation. The fifth-order WENO extrapolation is developed for this purpose. ðkÞ We need to obtain uR , a (5  k)th order approximation of the kth order derivative of u(x) at the boundary, using the grid point values in the interior of the domain uj, j ¼ N  4, …, N. We consider the stencil S4 ¼ {xN4, …, xN} as five candidate substencils Sr ¼ {xNr, …, xN}, r ¼ 0, …, 4. On each substencil, we can easily construct a Lagrange polynomial pr(x) of degree at most ðkÞ r such that pr(xj) ¼ uj, j ¼ N  r, …, N. Suppose u is smooth on S4, uR can be extrapolated by

32 A

Handbook of Numerical Analysis B

0.4

0.3 u(x)

u(x)

0.3

0.2

0.1

0 −1

0.4

0.2

0.1

0 −1 −0.5 0.5 1 0 0.5 1 x   1 FIG. 1 Burgers equation ut + u2 ¼ 0 with initial condition uðx,0Þ ¼ 0:25 + 0:5sin ðpxÞ, 2 x x 2 ½1,1. h ¼ 1/40 and t ¼ 7.8. The outflow boundary condition is imposed by (A) Lagrange extrapolation and (B) WENO extrapolation. Solid line: exact solution; Symbols: numerical solution. −0.5

0 x

ðkÞ uR

 4 X dk pr ðxÞ ¼ gr  dxk  r¼0

, x¼b

P where g0 ¼ h4, g1 ¼ h3, g2 ¼ h2, g3 ¼ h, and g4 ¼ 1  3r¼0 gr . Borrowing the idea of WENO reconstruction (Jiang and Shu, 1996), we look for WENO-type extrapolation in the form  4 X d k pr ðxÞ ðkÞ or uR ¼ (7)  , dxk  r¼0 x¼b

where or are the nonlinear weights depending on the value of uj. In the case that u is smooth in S4, we would like to have o0 ¼ Oðh4 Þ,o1 ¼ Oðh3 Þ, o2 ¼ Oðh2 Þ, o3 ¼ OðhÞ, and o4 ¼ 1 

3 X or

(8)

r¼0

such that (7) is (5  k)th order accurate. The nonlinear weights or are defined by 

or ¼ Xo4 r  on n¼0 with  or ¼

gr , ðe + br Þq

(9)

Inverse Lax–Wendroff Procedure Chapter

33

2

where e ¼ 106, q  3 is an integer, and br are the smoothness indicators determined by b 0 ¼ h2 , r Z X br ¼ l¼1



b+h

h

2l1

b

dl pr ðxÞ dxl

2

(10)

dx, r ¼ 1,…, 4:

The explicit expressions for the smoothness indicators b1 and b2 are b1 ¼ ðuN1  uN Þ2 ,   b2 ¼ 61u2N + 160u2N1 + 74uN uN2 + 25u2N2  196uN1 uN + 124uN1 uN2 =12:

The expressions for b3 and b4 are tedious but can be easily derived by symbolic computation softwares. Note that a drawback of the smoothness indicators defined in (10) is that they are scale dependent. A proper scaling factor proposed by Filbet and Yang (2013) is that ¼ bscaled r

e+

1 Xr

u2 l¼0 Nl

br , r ¼ 1,…, 4:

The undershoot shown in Fig. 1A is well-controlled by this robust extrapolation, see Fig. 1B. Moreover, the fifth-order accuracy of smooth solutions is maintained, see the errors of the initial-boundary value problem of the Burgers equation in Table 1. Therefore, we use the more robust WENO extrapolation from now on, regardless of the smoothness of the solution.

  1 2 ¼ 0 With Initial u 2 x Condition uðx, 0Þ ¼ 0:25 + 0:5sin ðpxÞ,x 2 ½1,1 TABLE 1 Errors of the Burgers Equation ut +

h

L1 Error

Order

L∞ Error

Order

1/40

3.10E06

1.35E05

1/80

1.31E07

4.57

6.51E07

4.38

1/160

3.97E09

5.05

2.68E08

4.60

1/320

1.02E10

5.29

8.34E10

5.00

1/640

2.86E12

5.15

2.62E11

5.00

1/1280

1.04E13

4.78

9.09E13

4.85

Dt 5 O(h5/3) and t 5 0.3. The inflow boundary condition is imposed by the ILW procedure; the outflow boundary condition is imposed by WENO extrapolation.

34

Handbook of Numerical Analysis

3.3 Two-Dimensional Euler Equations in Static Geometry We consider 2D compressible Euler equations in static geometry Ut + FðUÞx + GðUÞy ¼ 0, ðx, yÞ 2 O, t > 0, where

(11)

0

1 0 1 0 1 0 1 U1 r rv ru B U2 C B ru C B ruv C B ru2 + p C C B C B C B C U¼B @ U3 A ¼ @ rv A, FðUÞ ¼ @ ruv A, GðUÞ ¼ @ rv2 + p A, U4 vðE + pÞ uðE + pÞ E

with appropriate boundary conditions and initial conditions. r, u, v, p, and E describe the density, x-velocity, y-velocity, pressure, and total energy, respectively. The equation of state has the form E¼

p 1 + rðu2 + v2 Þ, g1 2

(12)

where the ratio of specific heats g ¼ 1.4 for air at ordinary temperatures. We assume the values of all the grid points inside O have been updated from time level tn1 to time level tn. For a ghost point P ¼ (xi, yj), we find a point P0 ¼ (x0, y0) ¼ x0 on the boundary G ¼ @O such that the normal n(x0) at P0 goes through P. The sign of the normal n(x0) is chosen in such a way that it is positive if it points to the exterior of O. The point P0 and the normal n(x0) can be obtained analytically, since we assume we have an explicit expression for the geometry of G. We set up a local coordinate system at P0 by        x^ cos y sin y x x ¼ ¼T , (13) y^  sin y cos y y y where y is the angle between the normal n(x0) and the x-axis and T is a rotational matrix. The x^-axis then points in the same direction as n(x0) and the y^-axis points in the tangential direction, see Fig. 2.

FIG. 2 The local coordinate system (13) used in the ILW procedure for 2D Euler equations. For static geometry, tn dependence can be suppressed.

Inverse Lax–Wendroff Procedure Chapter

35

2

In this local coordinate system, the Euler equations (11) are written as ^ t + FðUÞ ^ + GðUÞ ^ ¼ 0, U y^ x^ where

(14)

0^ 1 0 1 r U1   B U^ C B r^ C  u^  u B uC 2C ^ ¼B ¼ , ¼ T : U B C B C @ U^3 A @ r^ vA v v^ E U^4

For a fifth-order boundary treatment, the value of the ghost point P is imposed by the Taylor expansion ðU^m Þi, j ¼

4 X Dk k¼0

k!

ðkÞ U^m , m ¼ 1,…,4,

(15)

ðkÞ where D is the x^-coordinate of P and U^m is a (5  k)th order approximation  @ k U^m  . We denote the Jacobian matrix of of the normal derivative @^ xk  ðx, yÞ¼x0 , t¼tn

the normal flux by  ^  @FðUÞ  ^ , A ? ðU 0 Þ ¼ ^ U¼ @U ^ U ^0 ^ 0 is an approximation to U ^ at P0. Note that we will use U ^ 0 only for where U deciding the number of inflow boundary conditions and the calculation of the local characteristic variables. As long as we achieve stable boundary treat^ 0 is not important. For simplicity, we assume ments, the actual accuracy of U ^ 0 is the value of a grid point nearest to P0 among all the grid points inside O. U ^ 0 seems to work without any problem in all our numerical This choice of U ^ 0 , such as extrapolation, tests. There are more involved ways to calculate U which might help stability in some particular cases. ^ 0 Þ has four eigenvalues l1 ¼ u^0  c0 , The Jacobian matrix A? ðU ^ 0 Þ, l2 ¼ l3 ¼ u^0 , l4 ¼ u^0 + c0 and a complete set of left eigenvectors lm ðU m ¼ 1, …, 4, which forms a left eigenmatrix 0 1 0 1 ^ 0Þ l1, 1 l1, 2 l1, 3 l1, 4 l1 ðU B C B C B l2 ðU ^ 0 Þ C B l2, 1 l2, 2 l2, 3 l2, 4 C B B C C ^ 0Þ ¼ B LðU C¼B C: B l3 ðU B C C ^ l l l l Þ 3, 1 3, 2 3, 3 3, 4 0 @ A @ A ^ 0Þ l4, 1 l4, 2 l4, 3 l4, 4 l4 ðU For definiteness, we assume l1 < 0 and l4 > l2 ¼ l3 > 0. Thus one boundary condition is needed at P0 according to 1D well-posedness theory. For example, the normal momentum is prescribed U^2 ðx0 , tÞ ¼ g2 ðtÞ.

36

Handbook of Numerical Analysis

The local characteristic variables Vm at grid points near P0 are defined by ^ 0 ÞU ^ m, n , m ¼ 1, …,4, ðxm , yn Þ 2 E i, j , ðVm Þm, n ¼ lm ðU

(16)

where E i, j O is a set of grid points used for the fifth-order 2D WENO extrapolation (Tan et al., 2012). We extrapolate (Vm)m,n to P0 and denote the ðkÞ extrapolated kth order x^-derivative of Vm by Vm , k ¼ 0, …, 4. ð0Þ We solve U^m by a linear system of equations 0 1 0 1 0 1 U^ð0Þ g2 ðtn Þ 1 0 1 0 0 B C ð0Þ B l2, 1 l2,2 l2,3 l2,4 CB U^ð0Þ C B V2 C C B CB 2 C ¼ B : (17) B @ l3, 1 l3,2 l3,3 l3,4 AB ^ð0Þ C @ V ð0Þ C A @ U3 A 3 ð0Þ l4, 1 l4,2 l4,3 l4,4 ð0Þ V4 U^ 4

Here the first equation is the prescribed boundary condition. The other equations represent extrapolation of the three outgoing characteristic variables Vm, m ¼ 2, …, 4. Next, we use the ILW procedure for U^2 . The second equation of (14) gives us ! 2 2 @ U^2 g  3 U^2 g  1 U^3 @ U^1 U^2 @ U^2 ¼  ð3  gÞ + 2 2 @t @^ x x 2 U^ 2 U^ U^1 @^ 1 1   @ U^4 @ U^2 U^3 U^3 @ U^3 :  ðg  1Þ  + ðg  1Þ ^ x @^ x @^ y U^1 U 1 @^ At the boundary, the left-hand side of the above equation is the known function g02 ðtÞ. The tangential derivative on the right-hand side can be computed ð0Þ of all the ghost by numerical differentiation, since we have obtained U^ m

ð1Þ points. Thus U^m can be solved by the linear system ! 0 ð0Þ ð0Þ 1 0 ð1Þ 1 @ U^2 U^3 0 ^ U B g ðtn Þ  C @^ y C B 1ð1Þ C B 2 ^ð0Þ U B C B C ^ 1 U2 C B C, ð1Þ Að0Þ B ¼ V2 C B ^ð1Þ C B C @ U3 A B ð1Þ @ A V3 ð1Þ U^4 ð1Þ V4

(18)

where Að0Þ 1 0 ! ! ð0Þ 2 ð0Þ 2 ð0Þ ð0Þ g  3 U^2 g  1 U^3 U^2 U^3 B + ð3  gÞ ð0Þ ð1  gÞ ð0Þ g  1 C ð0Þ ð0Þ C B 2 2 U^1 U^1 U^1 U^1 C B C B B ¼B l2, 1 l2, 2 l2,3 l2,4 C C: C B B l3, 1 l3, 2 l3,3 l3,4 C A @ l4, 1

l4, 2

l4,3

l4,4

Inverse Lax–Wendroff Procedure Chapter

2

37

ðkÞ

There are two ways to obtain the higher order derivatives U^m , k ¼ 2, 3, 4: the ILW procedure and extrapolation. The first option allows the same CFL number as the periodic boundary case and thus allows the largest possible time step size (Li et al., 2016). The ILW procedure, however, involves quite heavy algebra. The other option is easy to implement, but it would lead to a more restrictive CFL condition. Here we choose extrapolation. Namely, ðkÞ U^m , k ¼ 2, 3, 4, are solved by extrapolation equations 0 1 0 1 ðkÞ ðkÞ U^1 B C B V1 C B ^ðkÞ C B ðkÞ C BU C V2 C ^ 0 ÞB 2 C ¼ B (19) LðU C: B ðkÞ C B ðkÞ B U^3 C B V3 C @ A @ A ðkÞ ðkÞ V4 ^ U4 One of the most common boundary conditions in computational fluid mechanics is the no-penetration boundary condition at rigid walls: u^ ¼ 0 or U^2 ¼ 0. In this case, the eigenvalues l1 c0 < 0, l4  c0 > 0, and l2 ¼ l3  0. Since only one boundary condition is prescribed, we consider Vm, m ¼ 2, …, 4, to be outgoing and V1 to be ingoing, which falls into the same ð0Þ case as discussed above. (17) gives us U^2 ¼ 0. Then the first equation of (18) reduces to ! ð0Þ 2 ^ð0Þ g  1 U^3 ^ð1Þ + ð1  gÞ U3 U^ð1Þ + ðg  1ÞU^ð1Þ U 1 4 ð0Þ ð0Þ 3 2 U^1 U^1 (20)  ð0Þ 2 U^3 ¼ , ð0Þ RU^1 where R is the radius of curvature of @O at P0. Notice that there is no tangential derivative in (20). Therefore, we do not need to do any numerical differentiation, which further simplifies the implementation. (20) can also be derived by considering primitive variables, i.e., r, u^, v^, and p, in the ILW procedure. At the rigid walls, we obtain @p v^2 ¼r , R @^ x which is equivalent to (20) because of the equation of state (12). In fact, it is sometimes more convenient to use primitive variables than to use conservative variables U. For problems involving moving geometry, we can only use primitive variables because the boundary condition is prescribed in normal velocity (see Section 4 for details). We now summarize our fifth-order boundary treatment for the 2D problem (11). We assume the values of all the grid points inside O have been updated

38

Handbook of Numerical Analysis

from time level tn1 to time level tn. Our goal is to impose the value of ðU^m Þi, j , m ¼ 1, …, 4, for each ghost point (xi, yj). 1. For each ghost point (xi, yj), we do the following three steps: l Decide the local coordinate system (13). Compute the eigenvalues ^ 0 Þ and left eigenvectors lm ðU ^ 0 Þ of the Jacobian matrix A? ðU ^ 0Þ lm ðU for m ¼ 1, …, 4. Decide the prescribed inflow boundary conditions ^ 0 Þ. gm(t) according to the signs of lm ðU l Form the local characteristic variables (Vm)m, n, ðxm , yn Þ 2 E i, j , as in (16). ðkÞ Extrapolate (Vm)m, n to the boundary to obtain Vm , k ¼ 0, …, 4, with the fifth-order 2D WENO extrapolation (Tan et al., 2012). ^ð0Þ , m ¼ 1, …, 4, by the prescribed boundary conditions l Solve for U m

ð0Þ

and extrapolated values Vm , such as (17). 2. For each ghost point (xi, yj), use the ILW procedure to write the first derivative of gm(t) as a linear combination of first normal derivatives plus tangential derivatives. Together with the extrapolation equations, form a ð1Þ ð1Þ as unknowns, such as (18). Solve for U^ , linear system with U^ m

m

ðkÞ m ¼ 1, …, 4. For k ¼ 2, 3, 4, solve for U^m by extrapolation equations (19) where the ILW procedure is not used. 3. Impose the values of the ghost points by the Taylor expansion (15).

If no-penetration boundary condition is considered at rigid walls, then the first equation of (18) is replaced by (20) in Step 2 with other steps unchanged.

4 MOVING BOUNDARY TREATMENT FOR COMPRESSIBLE INVISCID FLOWS The advantage of using fixed Cartesian mesh may best be shown by problems involving complex moving geometry. We consider Euler equations in moving geometry, i.e., the domain O(t) varies with time t. To describe the boundary conditions, we let Xb(a, t) represent the position vector (in Eulerian coordinates) of a point a on G(t). Here a is the Lagrangian coordinate of the point determined by the condition Xb(a, 0) ¼ a. We mainly consider rigid bodies moving at a prescribed motion. Namely, Xb(a, t) and thus O(t) are explicitly given. The no-penetration boundary condition for inviscid flows is then uðx,tÞ nðx, tÞ ¼ Vb ðtÞ nðx, tÞ, for all x ¼ Xb ða, tÞ 2 GðtÞ,

(21)

@Xb is the prescribed velocity. Notice that Vb(t) is independent @t of a for rigid bodies. The normal n(x, t) is defined as the same way as in Fig. 2. If the motion of a rigid body is induced by the fluid, the acceleration can be expressed as Z @ 2 Xb 1 ¼  pnds, (22) @t2 Mb GðtÞ where Vb ðtÞ ¼

Inverse Lax–Wendroff Procedure Chapter

2

39

where Mb is the rigid body mass. Although Xb(a, t) is not explicitly given in this case, we can obtain it at each time level by integrating (22) in time. There are two underlying issues with the moving boundary problem. First, the no-penetration condition (21) is prescribed in the Lagrangian specification of normal velocity. Thus in the ILW procedure we should use material derivatives of primitive variables, i.e., r, u, v, p, instead of Eulerian time derivatives of conservative variable U. Secondly, in expansion flows there may be grid points which are outside O(tn1) at the previous time level tn1 but enter O(tn) at the current time level tn. Such grid points are called newly emerging points. The newly emerging points do not have any value at time level tn. To update their values to time level tn+1, we not only need to construct their values at time level tn, but also need one extra ghost point in each direction if we assume G(t) travels a distance of at most h in each direction from tn to tn+1, i.e., Dt
0 then the flow is inward across edge j and outward if kj < 0. There will always be two sides of one type and one of the other. The residual fT of every element T can be broken up into parts T fj ¼ aTj fT ðj ¼ 1, 2, 3Þ and each of these added to some nodal content Sjuj.

70

Handbook of Numerical Analysis

P Provided that j aTj ¼ 1:0 (that is to say, all parts of the residual are added somewhere) we will have a conservative scheme. This process is called residual distribution. The targets to which each residual is distributed can be chosen to be consistent with the physics, or to ensure some measure of accuracy or to combine these objectives. This framework and its developments has led to a rich and diverse literature; it is the type of multidimensional upwinding that has seen the greatest development. For a recent summary the reader is referred to Abgrall and de Santis (2015).

8.1 The N Scheme The residual distribution method was first applied to the solution of steady problems,f and attention was given to ensuring positivity in the sense that if the update to a given nodal value is X Sj unj + 1 ¼ Sj unj + Dt akj ðunk  unj Þ k

then the new value of uj will be a convex combination of old values under the condition 0  akj Dt=Sj  1:0

(34)

Dt can be thought of as a time step, although this method is generally only first-order in time. It is convenient if the residual of a given element is used only to update the vertices of that element, so that akj ¼ 0 if vertices j, k do not belong to the same element. In that case the code can be written as a loop over elements, in which no data from other elements is required. To achieve positivity in this sense it is useful to make a distinction between elements having one inflow side or two. If there is only one inflow side, call it side 1, and add the whole of fT to vertex 1 (one-target case). This will be a positive scheme in the sense of (34) because both k2 and k3 are negative. If there are two inflow sides (two-target case) let k2 and k3 be the positive coefficients and employ the second version of (30). The scheme is then S2 un2 + 1 ¼S2 un2  k2 ðu2  u1 ÞDt S3 un3 + 1 ¼S3 un3  k3 ðu3  u1 ÞDt

(35)

and is again positive under a CFL-like condition on Dt. In fact this pair of strategies defines the most accurate positive linear method to solve (27) and is therefore the multidimensional counterpart to the first-order upwind scheme in one f Observe that in general this cannot be done by driving all of the cell residuals to zero. Consider the mesh created by taking n2 square cells and cutting each of them into two triangles. This gives 2n2 residuals but only n2 degrees of freedom (some of which must satisfy boundary conditions). If we define a vertex residual as the sum of the residuals for the cells that meet there, then this can be driven to zero. For an exploitation of this ambiguity the reader is referred to Roe and Nishikawa (2001).

Multidimensional Upwinding Chapter

3

71

dimension (Roe and Sidilkover, 1992). It is called the N scheme because it produces the narrowest possible discontinuities of any linear scheme. Godunov’s theorem applies also here, so that the scheme is only first-order accurate. It is easy to verify that the scheme just described is obtained if X k u T i i i + fj ¼ kj ðuj  u~Þ where u~ ¼ XJ¼3 (36)  k J J¼1 where we use the notation x+ ¼ (x + jxj)/2 to denote the “positive part” of a number (and similarly x ¼ (x jxj)/2 is the negative part). The quantity u~ is the value of u either at the single outflow vertex, or where the characteristic through the single inflow vertex leaves the element. This change of notation proves useful when dealing with systems of equations.

8.2

The NN Scheme

A problem with the N scheme is that it cannot preserve a linearly varying exact steady solution u ¼ A + B(bx  ay). The difficulty is only with the two-target case. Consider a situation where the two terms in (30) are equal and opposite. Although the integrated residual vanishes, changes would be made to two of the vertices. A scheme that could preserve such a solution is said to be linearity-preserving (or “LP”) and would be second-order accurate (in the steady state). By Godunov’s theorem, such a scheme must be nonlinear, and hence this scheme has been designated the NN (nonlinear narrow) scheme. There are several ways to achieve this property. One is to replace the actual propagation speed a with its projection normal to the solution contours a ¼

a  ru ru ru  ru

and to observe that this does not affect the value of the residual because a*ru ¼ a ru. Then replace also the coefficients ki ¼ a ni with ki ¼ a  ni , noting that sgnki ¼ sgnki . Now in the steady state all of the ki vanish, and the LP property is achieved. A drawback to this procedure is that the vector a* is indeterminate for flows that are almost steady, and this impedes convergence. Another possibility is to use a method similar to limiting in the one-dimensional case. Modify the method (35) like this: S2 un2 + 1 ¼S2 u2 + Dt½fT2  BðfT2 ,  fT3 Þ S3 un3 + 1 ¼S3 u3 + Dt½fT3  BðfT3 ,  fT2 Þ

(37)

where B(b1, b2) is a limiter function having the symmetry property B(b1, b2) ¼ B(b2, b1) and the homogeneity property B(kb1, kb2) ¼ kB(b1, b2). With those two properties,

72

Handbook of Numerical Analysis

BðfT2 ,  fT3 Þ ¼ BðfT3 ,fT2 Þ ¼ BðfT3 , fT2 Þ and the additional terms in (37) do not destroy conservation. Given also the property that B(b, b) ¼ b, it is easy to see that whenever fT2 + fT3 ¼ 0, so that the element residual vanishes, no changes will be made. Hence the scheme preserves exactly any linear function u ¼ fn (ay – bx) that is a steady solution to (27) and is therefore second-order in the steady state. A example of a suitable function B(b1  b2) is the minmod function (sgn(b1) + sgn(b2))min(jb1j, jb2j)/2. More compressive limiters can be used, but are not guaranteed to lead to a positive scheme (Sidilkover and Brandt, 1993).

8.3 Systems of Equations The most popular way of applying these ideas to a system of equations @ tu + A@ xu + B@ yu is to write the element residual as X 1 Kj uj , where Kj ¼ ðA, BÞ  nj fT ¼ (38) 2 j It can be seen that Kj is the Jacobian matrix for the component of flux normal to edge j. We can represent it by its eigenvector decomposition Kj ¼ RjLjLj,  and then define K j ¼ Rj Lj Lj . A formal equivalent to (32) is to take !1 X X



T  + (39) fj ¼ Kj ðuj  u Þ, where u ¼ Kj K j uj j

j

and this defines what is called the system N scheme or the matrix N scheme. It can be seen that if Kj+ ¼ 0, so that all waves are leaving edge i, then no

update from the term ðuj  u Þ will be used to update vertex i. Although we have here an “upwinding” property, it seems to be difficult in general to give a clear physical interpretation to this “system N-scheme”. However, the dependence on d + 1 states rather than merely two, does greatly reduce the false diffusion at low speeds, as shown in Fig. 1B. For the extension of these ideas to second-order steady solutions (see Abgrall and Mezine, 2004).

8.4 Unsteady Problems One way to apply the residual distribution concept to unsteady problems (Abgrall and Mezine, 2003) is to employ prismatic elements, consisting of triangular elements T extruded over a time interval t 2 [tn, tn+1]. The residual is evaluated over Dt this space–time element, for example as ½ðfT Þn + ðfT Þn + 1 . The distribution of 2 this residual cannot of course be over all six of its vertices, but only over the three that are at the advanced time level. This automatically makes the method implicit. This time-dependent method is unconditionally stable, and monotone, which

Multidimensional Upwinding Chapter

3

73

would indicate that the design of the system scheme is, at least in some sense, physically appropriate.

8.5

Wave Models

Given data for the Euler equations at the vertices of a triangular element, we can define eight gradient quantities, two each for the density, pressure and the two velocities. Given these eight quantities, can we speculate about the events taking place? One specific question might be, if all of the residual is due to a single simple wave, can we identify that wave even if it is not aligned with any of the element edges? There have been several attempts to devise a technique for doing this. It was noted in Roe (1986) that a pure acoustic wave always propagates along one of the principal axes of the strain-rate tensor, given by tan 2y ¼

@y u + @x v @x u  @y v

(40)

Assume that one wave of unknown amplitude propagates in each of these four directions; that gives five unknowns. An entropy wave of unknown amplitude can propagate in any direction, giving two more unknowns. One remaining degree of freedom can be assumed in several ways, but the most successful seems to be a shear wave of unknown strength propagating in a direction that bisects the rate of strain axes (Roe and Beard, 1993). The results from this approach are typical of methods that try to represent a multidimensional flow as a superposition of plane waves. Flows that are actually dominated by isolated waves that are not aligned with the mesh are indeed well represented, but smoother, more general flows are not improved and may often be worse. This is disappointing, and seems at variance with the well-known theoretical result that an arbitrary three-dimensional function can be decomposed into plane waves. For example, consider a plane acoustic wave in which the pressure is given by pðx, y;yÞ ¼ Pðxcos y + ysin y  ctÞ. Then Z 2p pffiffiffiffiffiffiffiffiffiffiffiffiffi 2 2 pðx,y;yÞ dy Qð x + y ,tÞ ¼ 0

is a radially symmetric function satisfying the two-dimensional wave equation. However, if the integral with respect to y is replaced numerically by a sum over a small number of angles, there is little resemblance to radial symmetry. By themselves, these wave models have not lead to very successful schemes.

8.6

Elliptic–Hyperbolic Splitting

All of the above ideas rely on trying to reduce the behaviour of the data to that of some set of one-dimensional waves, whether or not aligned with directions

74

Handbook of Numerical Analysis

determined by the mesh. No such attempt makes much sense if the flow is steady and subsonic. It is worth recalling that in two-dimensional supersonic flow there are four characteristic directions, corresponding to up-running and down-running Mach waves and the streamline direction counted twice, supporting possible discontinuities in entropy or velocity. Their slopes are l1 ¼

uv  ba2 v uv + ba2 , l 2 ¼ l3 ¼ , l 4 ¼ 2 2 2 u a u  a2 u

(41)

pffiffiffiffiffiffiffiffiffiffiffiffiffiffi u2 + v 2 where b ¼ M2  1 and M2 ¼ . The right eigenvectors in the space of a2 conserved variables corresponding to these four types of steady wave are 0 1 0 1 0 1 r 0 1 B C B C B C 2 B  ðbv + uÞ=M C BuC B0C C, r2 ¼ B C, r3 ¼ B C, r1 ¼ B B ðbu  vÞ=M2 C Bv C B0C @ A @ A @ A gp 0 0 (42) 0 1 r B C B ðbv  uÞ=M2 C B C r4 ¼ B C 2 @  ðbu + vÞ=M A gp where b2 ¼ M2  1. Projecting a nonvanishing residual onto these eigenvectors tells us, in effect, why the solution is not yet steady.g As expected, when the Mach number M is less than 1.0, the eigenvalues and eigenvectors become complex, and therefore there is nothing that can be ascribed to acoustic waves. However, the subspace spanned by the acoustic waves (the complement to the space spanned by r2 and r3) has not changed. It is now spanned by the real vectors (r, u/M2, v/M2, gp)T and (0, v, u, 0)T. A solution that is contained within this space is an isentropic potential flow, whether subsonic or supersonic. The elliptic-hyperbolic splitting method consists of projecting the element residuals onto these vectors (42). In the supersonic case the potential component projects onto real eigenvectors representing the Mach waves, but in the subsonic case it is now the data for an elliptic problem, and the solution can be driven toward a steady state by minimizing this part of the residual in an L2 norm. This idea was developed by two of my students in their Ph.D. theses (Mesaros, 1995; Rad, 2001), and it is from Rad (2001) that Fig. 1C is taken. This is so far the only method among the ones discussed that works well (and spectacularly well) at low Mach number. The code remains well behaved in the incompressible limit. Results for the circular cylinder at M∞ ¼ 0:01 are shown in Fig. 6A; other low-speed results given in Rad (2001) are the g

Recall that the element residuals do not individually vanish.

Multidimensional Upwinding Chapter

Cylinder M = 0.01, superimposed Mach contour lines for potential flow and Euler

A 5

Mmin = 0.001

3

Mmax = 0.02

1

75

B

0.0104954

4

2

Y

0.010023

3

0.0112878

dM = 0.000543

0.0120625

0.00970787 0.00891667

0 0.008125

–1 –2 –3 –4 –5 –5

–4

–3

–2

–1

0

1

2

3

4

5

X

FIG. 6 (A) Flow past a circular cylinder at M∞ ¼ 0:01 using hyperbolic–elliptic splitting. Mach contours from the Euler code are indistinguishable from those from the potential flow solution. (B) Viscous flow over a delta wing at M∞ ¼ 0:5, Re ¼ 4000, a ¼ 12:5°.

nonlifting flow past an ellipse at incidence, and the flow past a cylinder immersed in a shear layer. In all cases the potential flow solution is recovered with impressive accuracy, and in Nishikawa and van Leer (2003) it is shown that the elliptic-hyperbolic splitting enables an Euler code to achieve “textbook” multigrid convergence. So far, however, the extension to three dimensions or to unsteady flow has proved elusive, because then there are not merely two possibilities for a (complex) acoustic wave, but infinitely many. It may be that the division of the problem into hyperbolic and elliptic components is not actually the best way to proceed. In the next section the basis for the splitting is into advective and acoustic components, which is a similar distinction but not identical.

9

THE POISSON FORMULAS

There is an exact integral formula due to Poisson for solving the initial-value problem for the scalar wave equation ftt ¼ c2r2f, which is, in the form usually quoted fðx, tÞ ¼ @t ðtMct ffðx,0ÞgÞ + tMct f@t fðx, 0Þg

(43)

This formula is valid in three dimensions, where Mct{f} is the mean value of a function f(x) over the surface of a sphere with radius ct. Two-dimensional and one-dimensional formulas are obtained when f(x) is independent of one or two coordinates. This formula has been used as the basis for a numerical method for the wave equation (Alpert et al., 2000). Initial data are projected into a finite element basis and the integrals can be found exactly.

76

Handbook of Numerical Analysis

The method can be adapted (Eymann and Roe, 2013; Fan and Roe, 2015) to the acoustic system (2) to give Z ct (44) tMct fr2 pg dt pðx,tÞ ¼ pðx,0Þ  ctMct fr  vðx,0Þg + 0

showing how pressure changes are driven by velocity divergence, and Z ct vðx, tÞ ¼ vðx,0Þ  ctMct frpðx, 0Þg + tMct frr  vg dt

(45)

0

showing how velocity changes are driven by pressure gradients. These formulas are somewhat similar to those derived from the bicharacteristic equations, such as (26). In fact, since they both represent the exact solution they must be equivalent. The Poisson formulas, however, depend only on the initial data, with no approximation of the mantel integral. For low-order polynomial data their evaluation on unstructured grids is extremely simple (Fan and Roe, 2015). These formulas, just like Eq. (18), are not visibly upwinded. However, the upwinding does become visible for one-dimensional data, u(x, y, z) ¼ u(x). In this case the spherical mean formula reduces to Z 1 ct (46) uðxÞ dx Mct fuðxÞg ¼ 2ct ct and then the formulas reduce, as they must, to the one-dimensional characteristic formulas. The Active Flux method is under development by the author and his students (Eymann and Roe, 2013; Fan and Roe, 2015) and is based on these formulas. It is a finite volume method in which the solution values on the cell interfaces are treated as independent degrees of freedom, described by point values of the primitive variables. To solve the acoustic problem the time step begins with these values being updated by a nonconservative second-order finite-difference scheme that is based on the Poisson integrals. Fluxes calculated from the primitive values are integrated to update the conserved variables in each cell. This integration raises the order of accuracy to three. In Fan and Roe (2015) it is shown that the method can be applied to the nonlinear barotropic case p ¼ p(r) by adopting a local linearization. A different approach to separating advection and acoustic behaviour was taken by Sidilkover (2002) who introduced the concept of “factorizable” schemes, although he did not develop the idea beyond the steady two-dimensional case.

9.1 Application to the Euler Equations For the linearized equations, the acoustic and advective operators commute, and an operator-splitting approach can be taken with the acoustic disturbances

Multidimensional Upwinding Chapter

3

77

treated as above and the advective contributions found by streamline tracing (Eymann and Roe, 2013). The nonlinear operators almost commute, and their interaction can be captured in a two-step Lax–Wendroff scheme that updates the primitive variables from which the flux is found. In Table 1 preliminary

TABLE 1 Fast Vortex Transport; Error Convergence Data for Unstructured Grid Level

h

|e|1

O(hp)

|e|2

O(hp)

Density 1

2.768183e02

2.177068e04

3.282809e04

2

1.646439e02

6.098553e05

2.4491

1.150321e04

2.0183

3

8.090604e03

6.471265e06

3.1573

1.135339e05

3.2593

4

4.031046e03

5.129457e07

3.6386

1.137710e06

3.3021

5

2.008498e03

4.920980e08

3.3648

1.314371e07

3.0981

x-velocity 1

2.768183e02

3.877971e01

1.132802e+00

2

1.646439e02

8.753807e02

2.8647

3.455170e01

2.2853

3

8.090604e03

7.059093e03

3.5437

3.092034e02

3.3971

4

4.031046e03

6.820957e04

3.3544

2.994764e03

3.3510

5

2.008498e03

7.813360e05

3.1103

3.582789e04

3.0479

y-velocity 1

2.768183e02

4.542740e01

1.347657e+00

2

1.646439e02

1.046100e01

2.8263

4.178182e01

2.2539

3

8.090604e03

6.517596e03

3.9068

3.029703e02

3.6932

4

4.031046e03

5.672245e04

3.5045

2.819006e03

3.4086

5

2.008498e03

5.839822e05

3.2635

3.035204e04

3.1992

Pressure 1

2.768183e02

2.654692e+01

4.119983e+01

2

1.646439e02

7.414877e+00

2.4547

1.449378e+01

2.0107

3

8.090604e03

7.789805e01

3.1714

1.394142e+00

3.2955

4

4.031046e03

6.177855e02

3.6379

1.395142e01

3.3041

5

2.008498e03

5.954954e03

3.3580

1.620503e02

3.0903

78

Handbook of Numerical Analysis

solutions to the full Euler equations are reported for the fast vortex problem from Wang et al. (2013). They actually surpass the design accuracy of third-order.

10 CONCLUDING REMARKS Despite a quarter-century of ceaseless ingenuity, there is no form of multidimensional upwinding that has gained general acceptance as an improvement over the established methods, but I will attempt to draw some conclusions. I think that it is clear by now that Question 1 is not profitable, but that Question 2 needs to be made precise. The question “what is happening now?” admits of a greater variety of potentially useful answers in higher dimensions. The version that has been most popular so far is about identifying dominant directions in the flow. The version that I currently favour asks for the relevant importance of advection and acoustics. In whatever form the question is posed, however, all of the researchers involved hope for the same benefit. It will be the ability to compute a solution with the minimum of numerical dissipation, thereby simultaneously achieving resolution, stability and accuracy. In my opinion, multidimensional upwinding should be about much more than crisp oblique discontinuities. It should also be about the proper treatment of regions where no waves are present, and therefore about the extension of upwind methods to low-speed flows. There should be no dissipation if no dissipation is needed. There should be distinctly different approaches to the propagation of advective and acoustic disturbances, because in more than one dimension there is little that these phenomena have in common. There are still a great number of approaches that may not yet have been adequately explored, if only because it can often take more than one good idea to solve a problem. One basic assumption that is almost always made is that a flux must be interpreted as the rate of flow through a surface and is therefore to be evaluated on the faces of control volumes. It is rather easy to show that multidimensional phenomena such as vorticity cannot be controlled by such a strategy unless the fluxes are first evaluated at vertices (Mishra and Tadmor, 2011; Morton and Roe, 2001). Despite its lengthy and not entirely successful history, multidimensional upwinding may yet revolutionize the discrete approach to hyperbolic problems.

REFERENCES Abgrall, R., de Santis, D., 2015. Linear and non-linear high order accurate residual distribution schemes for the discretization of the steady compressible Navier-Stokes equations. J. Comput. Phys. 283, 329–359. Abgrall, R., Mezine, M., 2003. Construction of second order accurate monotone and stable residual distribution schemes for unsteady flow problems. J. Comput. Phys. 188 (1), 16–55. Abgrall, R., Mezine, M., 2004. Construction of second order accurate monotone and stable residual distribution schemes for steady flow problems. J. Comput. Phys. 195 (1), 474–507.

Multidimensional Upwinding Chapter

3

79

Alpert, B., Greengard, L., Hagstrom, T., 2000. An integral evolution formula for the wave equation. J. Comput. Phys. 162 (2), 536–543. Balsara, D.S., et al., 2016. A two-dimensional Riemann solver with self-similar sub-structure alternative formulation based on least squares projection. J. Comput. Phys. 304, 138–16. Brio, M., Zakharian, A.R., Webb, G.M., 2001. Two-dimensional Riemann solver for Euler equations of gas dynamics. J. Comput. Phys. 167, 177–195. Chang, T., Hsiao, L., 1989. The Riemann Problem and Interaction of Waves in Gas Dynamics. Wiley, New York. Colella, P., 1982. Glimm’s scheme for gas dynamics. SIAM Sci. Comput. 3 (1), 76–110. Collela, P., 1990. Multidimensional upwind methods for hyperbolic conservation laws. J. Comput. Phys. 87 (1), 171–200. Courant, R., Isaacson, E., Rees, M., 1952. On the solution of nonlinear hyperbolic differential equations by finite differences. Commun. Pure Appl. Math. 5 (3), 243–255. Davis, S.F., 1984. A rotationally biased upwind difference scheme for the Euler equations. J. Comput. Phys. 56 (1), 65–92. Delacherie, S., 2010. Analysis of Godunov type schemes applied to the compressible Euler system at low mach number. J. Comput. Phys. 229 (4), 978–1016. Eymann, T.R., Roe, P.L., 2013. Multidimensional active flux schemes. In: 21st CFD Conference, San Diego, AIAA. Fan, D., Roe, P.L., 2015. Investigations of a new scheme for wave propagation. In: 22nd CFD Conference, Dallas, AIAA. Godunov, S.K., 1959. A difference method for numerical calculation of discontinuous solutions to the equations of hydrodynamics. Mat. Sb. 89 (3), 271–306. Godunov, S.K., 1999. Reminiscences of difference schemes. J. Comput. Phys. 153, 6–25. Kallinderis, Y., Khawaja, A., McMorris, H., 1996. Hybrid prismatic/tetrahedral grid generation for viscous flows around complex geometries. AIAA J. 34 (2), 291–298. Lax, P.D., Liu, X.-D., 1998. Solution of two-dimensional Riemann problems of gas dynamics by positive schemes. SIAM Sci. Comput. 19 (2), 319–340. Leveque, R.J., 1997. Wave propagation algorithms for multidimensional hyperbolic systems. J. Comput. Phys. 131 (2), 327–353. Lukacova-Medvidova, M., Morton, K.W., Warnecke, G., 2004. Finite volume evolution Galerkin methods for hyperbolic systems. SIAM Sci. Comput. 26 (1), 1–30. Lung, T.B., Roe, P.L., 2014. Toward a reduction of mesh imprinting. Int. J. Num. Meth. Fluids 76 (7), 450–470. Margolin, L.G., Shashkov, M., 2008. Finite volume methods and the equations of finite scale: a mimetic approach. Int. J. Num. Meth. Fluids 56 (8), 991–1002. Mesaros, L.M., 1995. Multi-Dimensional Fluctuation Splitting Schemes for the Euler Equations on Unstructured Grids (Ph.D. thesis). Aerospace Engineering, University of Michigan. Mishra, S., Tadmor, E., 2011. Constraint preserving schemes using potential-based fluxes. II. Genuinely multidimensional systems of conservation laws. SIAM Numer. Anal. 49 (3), 1023–1045. Morton, K.W., Roe, P., 2001. Vorticity-preserving Lax-Wendroff-type schemes for the system wave equation. SIAM Sci. Comput. 23 (1), 170–192. Nishikawa, H., Kitamura, K., 2008. Very simple, carbuncle-free, boundary-layer-resolving, rotated-hybrid Riemann solvers. J. Comput. Phys. 227 (4), 2560–2581. Nishikawa, H., van Leer, B., 2003. Optimal multigrid convergence by elliptic/hyperbolic splitting. J. Comput. Phys. 190 (1), 52–63.

80

Handbook of Numerical Analysis

Rad, M., 2001. A Residual Distribution Approach to the Euler Equations that Preserves Potential Flow (Ph.D. thesis). Aerospace Engineering, The University of Michigan. Roe, P.L., 1986. Discrete models for the numerical analysis of time-dependent multidimensional gas dynamics. J. Comput. Phys. 63, 458–476. Roe, P.L., 1987. Linear adection schemes on triangular meshes. Cranfield Institute of Technology, Cranfield. Roe, P.L., 1991. Discontinuous solutions to hyperbolic systems under operator splitting. Numer. Methods Partial Differ. Equ. 7 (3), 277–297. Roe, P.L., Beard (Mesaros), L.M., 1993. An improved wave model for multidimensional upwinding of the Euler equations. In: Napolitano, M., Sabetta, B. (Eds.), Lecture Notes in Physics, vol. 414. Springer, Berlin. Roe, P.L., Nishikawa, H., 2001. Adaptive grid generation by minimizing residuals,. Int. J. Numer. Meth. Fluids 40 (1–2), 121–136. Roe, P.L., Sidilkover, D., 1992. Optimum positive linear schemes for advection in two and three dimensions. SIAM Numer. Anal. 29 (6), 1542–1568. Rumsey, C.L., van Leer, B., Roe, P.L., 1991. A grid-independent approximate Riemann solver with applications to the Euler and Navier-Stokes equations. In: AIAA 10th CFD conference, Honolulu. Schulz-Rinne, C.W., Collins, J.P., Glaz, H.M., 1993. Numerical solution of the Riemann problem for two-dimensional gas dynamics. SIAM Sci. Comput. 14 (6), 1394–1414. Sidilkover, D., 2002. Factorizable schemes for the equations of fluid flow. Appl. Numer. Math. 41 (3), 423–436. Sidilkover, D., Brandt, A., 1993. Multigrid solution to steady state two dimensional conservation laws. SIAM Numer. Anal. 30 (1), 249–274. Sod, G.A., 1978. A survey of several finite difference methods for systems of nonlinear hyperbolic conservation laws. J. Comput. Phys. 27 (1), 1–31. Strang, G., 1968. On the construction and comparison of difference schemes. SIAM Numer. Anal. 5 (3), 506–517. Wang, Z.J., et al., 2013. High order CFD methods: current status and perspective. Int. J. Num. Meth. Fluids 72 (8), 811–845.

Chapter 4

Bound-Preserving High-Order Schemes Z. Xu* and X. Zhang† * †

Michigan Technological University, Houghton, MI, United States Purdue University, West Lafayette, IN, United States

Chapter Outline 1 Introduction 2 A Bound-Preserving Limiter for Approximation Polynomials 2.1 First-Order Monotone Schemes 2.2 The Weak Monotonicity in High-Order Finite Volume Schemes 2.3 A Simple and Efficient Scaling Limiter

82

83 83

84 86

2.4 SSP High-Order Time Discretizations 2.5 Extensions and Applications 3 Bound-Preserving Flux Limiters 3.1 Basic Idea and Framework 3.2 Decoupling for the Flux Limiting Parameters 4 Concluding Remarks Acknowledgements References

91 92 93 93 95 97 98 98

ABSTRACT For the initial value problem of scalar conservation laws, a bound-preserving property is desired for numerical schemes in many applications. Traditional methods to enforce a discrete maximum principle by defining the extrema as those of grid point values in finite difference schemes or cell averages in finite volume schemes usually result in an accuracy degeneracy to second-order around smooth extrema. On the other hand, successful and popular high-order accurate schemes do not satisfy a strict bound-preserving property. We review two approaches for enforcing the bound-preserving property in high-order schemes. The first one is a general framework to design a simple and efficient limiter for finite volume and discontinuous Galerkin schemes without destroying highorder accuracy. The second one is a bound-preserving flux limiter, which can be used on high-order finite difference, finite volume and discontinuous Galerkin schemes. Keywords: Bound-preserving, Positivity-preserving, Conservation laws, High-order accurate schemes, Finite difference, Finite volume, Discontinuous Galerkin AMS Classification Codes: 65M12, 65M06, 65M08, 65M60 Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.08.002 © 2017 Elsevier B.V. All rights reserved.

81

82

Handbook of Numerical Analysis

1 INTRODUCTION The unique entropy solution u(x, t) to the initial value problem of the scalar conservation law, ut + r  FðuÞ ¼ 0, uðx, 0Þ ¼ u0 ðxÞ,

(1)

satisfies a strict maximum principle, min uðx,sÞ  uðx, tÞ  max uðx,sÞ, 8t > s, x

x

thus a bound-preserving property min x u0 ðxÞ  uðx, tÞ  max x u0 ðxÞ: For numerical schemes solving (1), it is desired to have a numerical solution unj satisfying the bound-preserving property min u0 ðxÞ ¼ m  unj  M ¼ max u0 ðxÞ, x

x

(2)

since solutions outside of [m, M] might be meaningless, such as negative percentage and probability distribution larger than one. Moreover, violation of certain bounds in numerical solutions may contribute to instability for systems of equations, e.g. negative density and negative pressure in gas dynamics equations. The first-order accurate E-schemes including Godunov, Lax–Friedrichs and Engquist–Osher methods satisfy an entropy inequality and are total variation diminishing (TVD) thus maximum-principle-satisfying. However, any TVD scheme or TVD limiter in the sense of measuring the variation of grid point values or cell averages is at most first-order accurate around smooth extrema, see Harten (1983) and Osher and Chakravarthy (1984), although such TVD schemes can be designed to achieve any formal order of accuracy for monotone smooth solutions, e.g. the high resolution schemes. For finite difference and finite volume schemes, a popular approach to achieve bound-preserving is to enforce a discrete maximum principle min unj  unj + 1  max unj , j

j

(3)

where un denotes numerical solutions at time step n, and unj denotes the point value of at j-th point in a finite difference scheme or the cell average on j-th cell in a finite volume scheme. Schemes satisfying (3) can be at most secondorder accurate around extrema, see a simple proof in Zhang and Shu (2011a) and Shu (2012). There are many second-order accurate schemes satisfying (3) or (2) in the literature (e.g. Batten et al., 1996; Bell et al., 1988; Bouchut, 2004; Chavent and Cockburn, 1989; Colella, 1990; Guermond and Nazarov, 2014; Guermond et al., 2014; Hubbard, 1999; Jiang and Tadmor, 1998; Kurganov and Tadmor, 2000; Liu, 1993). One heuristic explanation of why (3) prohibits higher-order than secondorder accuracy is due to the numerical extrema defined as those of grid point values, without including the high-order information between two adjacent

Bound-Preserving High-Order Schemes Chapter

4

83

grid points. Towards higher-order accurate schemes, we can measure the extrema in numerical solutions as extrema of approximation polynomials, e.g. reconstruction polynomials in a finite volume scheme. To this end, we can consider an improved discrete maximum principle, min min unj ðxÞ  unj + 1 ðxÞ  max max unj ðxÞ, j

x

j

x

(4)

where uj(x) denotes the reconstruction polynomial on j-th cell in a finite volume scheme, see Sanders (1988), Liu and Osher (1996) and Zhang and Shu (2010a) for third- and higher-order accurate schemes satisfying (4). However, these schemes used the exact time evolution to enforce (4). Unfortunately, it is very difficult, if not impossible, to implement such exact time evolution for multidimensional nonlinear scalar equations or systems of conservation laws. Successful and popular high-order accurate methods solving (1) include, among others, the Runge–Kutta discontinuous Galerkin (RKDG) method with a total variation bounded (TVB) limiter in Cockburn and Shu (1989) and Cockburn et al. (1989), the essentially nonoscillatory (ENO) finite volume and finite difference schemes (e.g. Harten et al., 1987; Shu and Osher, 1988) and the weighted ENO (WENO) finite volume and finite difference schemes (e.g. Jiang and Shu, 1995; Liu et al., 1994). These schemes are nonlinearly stable in numerical experiments and some of them can be proven to be total variation stable, but they are not strictly bound-preserving. To construct high-order accurate bound-preserving schemes for multidimensional nonlinear equations, instead of enforcing a discrete maximum principle (4), we may consider to enforce only a discrete bound-preserving constraint in a high-order scheme. In this chapter, we will review two approaches to enforce (2) on these popular high-order schemes.

2 A BOUND-PRESERVING LIMITER FOR APPROXIMATION POLYNOMIALS We first review the framework of constructing bound-preserving finite volume and DG schemes in Zhang and Shu (2010b), Zhang et al. (2012) and Zhang and Shu (2011a). For simplicity, we only review the main idea for the one-dimensional version of (1): ut + f ðuÞx ¼ 0,

2.1

uðx, 0Þ ¼ u0 ðxÞ:

(5)

First-Order Monotone Schemes

Consider a first-order scheme with the form h i   unj + 1 ¼ unj  l f^ðunj , unj+ 1 Þ  f^ðunj1 , unj Þ  Hl unj1 , unj , unj+ 1 ,

(6)

84

Handbook of Numerical Analysis

Dt with Dt and Dx being the temporal and spatial mesh sizes, and Dx f^ða, bÞ is a monotone flux, which is Lipschitz continuous in both arguments, nondecreasing in the first argument and nonincreasing in the second argument, and consistent f^ða, aÞ ¼ f ðaÞ. Under suitable CFL conditions, typically of the form

where l ¼

max j f 0 ðuÞjl  1,

(7)

u

Hl(a, b, c) is nonincreasing in all three arguments, and consistency of f^ implies Hl(a, a, a) ¼ a. For example, consider the Lax–Friedrichs flux 1 f^ðu, vÞ ¼ ½ f ðuÞ + f ðvÞ  aðv  uÞ with a ¼ max j f 0 ðuÞj, then Hl ðunj1 , unj , unj+ 1 Þ 2 in the scheme (6) can be rewritten as  1   1  Hl ðunj1 , unj , unj+ 1 Þ ¼ ð1  lÞunj + l aunj+ 1  f ðunj+ 1 Þ + l aunj1 + f ðunj1 Þ , 2 2 which is nonincreasing in all three arguments under the constraint (7). Therefore, we have the strict maximum principle (3) thus the bound-preserving property m ¼ Hl ðm, m, mÞ  unj + 1 ¼ Hl ðunj1 , unj , unj+ 1 Þ  Hl ðM, M,MÞ ¼ M:

2.2 The Weak Monotonicity in High-Order Finite Volume Schemes By Godunov’s theorem, a linear scheme that is monotone can be at most firstorder accurate. However, a high-order finite volume or DG scheme with a monotone flux for solving (5) satisfies a weak monotonicity property. We first discuss the forward Euler temporal discretization in this section and leave higher-order temporal discretization in Section 2.4. The finite volume method or the scheme satisfied by the cell averages in the DG method can be written as: h    i + n ^  1, u + 1 n+1  l f^ u 1, u 1  f u ¼ u j j + j + j j uj 2 2 2 2 (8)  n   +  + , u , u , u , u  Gl u j j + 12 j + 12 j 12 j 12 , n

where h u j is the i approximation to the cell averages of u(x, t) in the cell Ij ¼ xj 1 , xj + 1 at time level n, f^ð  ,  Þ is a monotone flux, and u , uj++ 1 j+1 2

2

2

2

are the high-order approximations of the nodal values uðxj + 1 , tn Þ within the 2

cells Ij and Ij+1, respectively. For simplicity we assume the mesh is uniform, but the methodology does not have a uniform or smooth mesh restriction.

Bound-Preserving High-Order Schemes Chapter

4

85

The function Gl(a, b, c, d, e) in (8) is not a monotonically increasing function for any positive time step. Its partial derivatives with respect to b n , uj++ 1 , and e are always nonpositive, which implies that there exist u j , u j+1 2

, u j 12

+ uj 1 2

to ensure

2 ½m, M such that n+1 uj

n+1 u j 62½m,M

2

in (8) for any l > 0. In other words,

2 ½m,M in (8), we need more constraints on the data u nj , u 1 , j+ 2

+ uj++ 1 , u , uj 1 other than that they should be in the range [m, M]. j 1 2

2

2

Suppose there is a polynomial pj(x) (either reconstructed in a finite volume method or evolved in a DG method) with degree  k  1, defined onIj such  that n

+ u j is the cell average of pj(x) on Ij, uj ¼ pj xj + 1 . Let and u 1 ¼ pj xj 1 j+1 2

2

2

2

N ¼ dðk + 3Þ=2e, i.e. N is the smallest integer satisfying 2N  3  k. We considerh an N-point i Legendre Gauss–Lobatto quadrature rule on the interval Ij ¼ xj 1 , xj + 1 , which is exact for the integral of polynomials of degree up 2

2

to 2N  3. Denote these quadrature points on Ij as n o , x^Nj ¼ xj + 1 : Sj ¼ xj 1 ¼ x^1j , x^2j ,…, x^N1 j 2

(9)

2

^ m be the N-point Legendre Gauss–Lobatto quadrature weights for the Let o   P 1 1 1 ^1 ¼o ^N ¼ ^ m ¼ 1 and o then Nm¼1 o . We have interval  , 2 2 NðN  1Þ Z N N 1 X X 1 + n ^ 1 uj ^ N u ^ m pj ð^ ^ m pj ð^ x mj Þ ¼ x mj Þ + o : (10) o o 1 +o u j ¼ Dx pj ðxÞ dx ¼ j + 12 2 Ij m¼1 m¼2 After plugging (10) in, the scheme (8) can be rewritten as        l ^  m  + +  ^ ^ ^ o m pj ð^ f uj + 1 , uj + 1  f uj 1 , uj + 1 x j Þ + o N uj + 1  ^N o 2 2 2 2 2 m¼2       l ^ + + ^ 1 uj f uj 1 , u , u+  f^ u +o 1 j + 12 j 12 j 12 ^1 o 2 2     N1   X +  +  +  ^ m pj x^mj + o ^ N Hl=o^ N uj ^ o ¼ , u , u H u , u , u + o : 1 1 l=o ^1 j+1 j+1 j 1 j 1 j + 1

n+1 uj ¼

N1 X

2

m¼2

2

2

2

2

2

(11)

^ ¼o ^1 ¼o ^ N , then Hl=o^ is monotone under the CFL condition Let o ^¼ max j f 0 ðuÞjl  o u

n+1

1 , NðN  1Þ

(12)

thus u j in (11) is a monotonically increasing function of all the arguments , uj++ 1 and pj ð^ x mj Þ for 1  m  N, which is the weak involved, namely u j 1 2

2

86

Handbook of Numerical Analysis

monotonicity property for a high-order spatial discretization (8). We have the following result on bound-preserving, Theorem 1. Consider a finite volume scheme or the scheme satisfied by the cell averages of the DG method (8), associated with the approximation polynomials pj(x) of degreeZ k (either reconstruction or DG polynomials) in the     1 n + sense that u j ¼ Dx pj ðxÞdx, uj and u 1 ¼ pj xj 1 1 ¼ pj x j + 1 . j + 2 2 Ij 2 2 n+1 2 ½m,M A sufficient condition for u j is   , u , p x^mj 2 ½m, M, m ¼ 2, …, N  1, u (13) j 1 j + 1 j 2

2

under the CFL condition (12). Remark 1. The sufficient condition (13) involves point values pj ð^ x mj Þ for m ¼ 2, …, N  1, which are not available in typical ENO and WENO finite volume reconstructions since the polynomial pj(x) is not reconstructed in ENO and WENO. We can use interpolation to construct an approximation polynomial pj(x) as in Zhang and Shu (2010b). A better method is to avoid explicitly using point values pj ð^ x mj Þ for m ¼ 2, …, N  1. Since PN1 o ^m pj ð^ x mj Þ is a convex combination of point values pj ð^ x mj Þ for m¼2 ^ 1  2o m ¼ 2, …, N  1, by the Mean Value Theorem, there exists some point x j 2 Ij such that N 1 X ^m o pj ð^ x mj Þ ¼ pj ðx j Þ: ^ 1  2 o m¼2

We can rewrite (11) as n+1 uj

    +  +  +  ^ Þpj ðx j Þ + oH ^ l=o^ uj ^ ¼ ð1  2o u 1 , u 1 , u 1 +oH 1, u 1, u 1 , ^ l= o j+ j+ j j j+ 2

2

2

2

2

2

thus we can use the following weaker sufficient condition to replace (13), , u , p ðx Þ 2 ½m, M, u j 1 j + 1 j j 2

2

(14)

 + 1  no ^ N u u j ^ 1 uj 12  o j + 12 by ^ 1  2o (10), even though the location x j is unknown (see Cai et al., 2016; Zhang, 2016; Zhang and Shu, 2011a) where pj ðx j Þ can be computed as pj ðx j Þ ¼

2.3 A Simple and Efficient Scaling Limiter The weak monotonicity and Theorem 1 suggest that it is possible to render a high-order conservative finite volume or DG scheme bound-preserving if we can control certain point values. To enforce the sufficient condition (13) or

Bound-Preserving High-Order Schemes Chapter

87

4

(14), we first consider the simple scaling limiter introduced in Liuhand Osheri (1996). Given piecewise polynomials pj(x) on each interval Ij ¼ xj 1 , xj + 1 2

2

approximating a smooth function u(x) 2 [m, M], with the cell averages Z 1 pj ¼ pj ðxÞ dx 2 ½m, M, we seek a modified approximation polynomial Dx Ij



p j ðxÞ satisfying p j ðxÞ 2 ½m, M for any x 2 Ij, with the same cell average Z Z 1

1 p ðxÞ dx ¼ pj ðxÞ dx. For instance, if pj(x) is the L2 projection of Dx Ij j Dx Ij u(x) 2 [m, M] onto the vector space of polynomials of degree k on the interval Ij, then we have p j 2 ½m, M but not necessarily pj(x) 2 [m, M] for any x 2 Ij. The following limiter was first discussed in Liu and Osher (1996):



) (

Mp mp





j

j

(15a) p j ðxÞ ¼ y pj ðxÞ  p j + p j , y ¼ min 1,

,

,

Mj  p j mj  p j

Mj ¼ max pj ðxÞ, mj ¼ min pj ðxÞ: x 2 Ij



x 2 Ij

(15b)

It is obvious that p j ðxÞ 2 ½m,M for any x 2 Ij and the cell average of p j ðxÞ is still p j . Moreover, this simple limiter does not destroy the approximation accuracy of pj(x). Theorem 2. For the

modified polynomial of degree k in the limiter (15), we

have pj ðxÞ  p j ðxÞ  Ck max x2Ij jpj ðxÞ  uðxÞj, where Ck is a constant depending only on the polynomial degree k. Proof.

We only need to discuss the case that pj(x) is not a constant and

Mp

j



. The other cases are similar. Since p j  M and p j  Mj , we have

Mj  p j

y ¼ ðM  p j Þ=ðMj  p j Þ. Therefore,



p j ðxÞ  pj ðxÞ ¼ y pj ðxÞ  p j + p j  pj ðxÞ  ¼ ðy  1Þ pj ðxÞ  p j M  Mj  ¼ pj ðxÞ  p j Mj  p j pj ðxÞ  p j : ¼ M  Mj Mj  p j





p ðxÞ  p

Mp



j

j

j

Thus jp j ðxÞ  pj ðxÞj  jM  Mj j

: The assumption y ¼



Mj  p j

Mj  p j

implies the overshoot Mj > M. Suppose pj(x**) ¼ Mj for some x**2 Ij, then u(x**)  M < Mj ¼ pj(x**). Thus we have jM

 Mj j  juðx Þ  pj ðx Þj 

p ðxÞ  p

j j

max x2Ij jpj ðxÞ  uðxÞj. We only need to show

 Ck . Consider a

Mj  p j

88

new

Handbook of Numerical Analysis

  qðxÞ ¼ pj xDx + xj 1  p j .

polynomial

2

max x2½0, 1 qðxÞ ¼ max x2Ij pj ðxÞ  p j and We have

Then



R1 0

qðxÞ dx ¼ 0,

min x2½0, 1 qðxÞ ¼ min x2Ij pj ðxÞ  p j .

9 8



max jqðxÞj max qðxÞ  min qðxÞ=

p ðxÞ  p

< jqðxÞj x2½0, 1 x2½0, 1 x2½0, 1

j j

:  ¼ max ,

¼

Mj  p j max qðxÞ : max qðxÞ max qðxÞ ; max qðxÞ x2½0, 1 x2½0, 1 x2½0, 1 x2½0, 1



min qðxÞ

max jqðxÞj



x2½0, 1 x2½0, 1

 Ck . For Thus we only need to prove  Ck or

max qðxÞ max qðxÞ



x2½0, 1 x2½0, 1 quadratic polynomials k ¼ 2 in one dimension, Ck ¼ 3 was proven by explicit calculations in Liu and Osher (1996). For general k and higher dimensions, there are two different kinds of proof. The first proof is similar to proving the equivalence of two norms in a finite-dimensional vector space. □ Lemma 1. Let q(x) be a nonconstant polynomial of degree k with R1 0 qðxÞ dx ¼ 0, then max jqðxÞj

x2½0, 1

max qðxÞ

 Ck ,

x2½0, 1

where Ck is a constant depending only on k. Proof. Let V denote the finite-dimensional vector space consisting of all polynomials of degree k whose averages on the interval [0, 1] are zero. For any



q(x) 2 V, define three functional on V by f1 ½q ¼

max qðxÞ

¼ max qðxÞ, x2½0, 1 x2½0, 1





f2 ½q ¼

min qðxÞ

¼  min qðxÞ and f0 ½q ¼ max jqðxÞj ¼ max ff1 ½q, f2 ½qg. x2½0, 1 x2½0, 1 x2½0, 1 k) be a basis of V. For any vector c ¼ ½ c1 … ck T 2 ℝk , Let ei (i ¼ 1, …, " # X ci ei for j ¼ 0, 1, 2. Notice that f0[] is a norm of V define f j ðcÞ ¼ fj i

and can be denoted as f0 ½q ¼k qk∞ on the interval [0, 1]. For any p(x), q(x) 2 V, f1 satisfies the following properties (similar ones hold for f2): 1. 8a > 0, f1 ½aqðxÞ ¼ max aqðxÞ ¼ af1 ½qðxÞ: x2½0, 1





2. f1 ½q ¼

max qðxÞ

¼ max qðxÞ ¼  min qðxÞ ¼ f2 ½q. x2½0, 1 x2½0, 1 x2½0, 1 3. f1 ½p + q ¼ max ðp + qÞ  max p + max q ¼ f1 ½p + f1 ½q. x2½0, 1 x2½0, 1 x2½0, 1 4. f1 ½q ¼ 0 ) q  0. Thus, for any c,d 2 ℝk , we have

Bound-Preserving High-Order Schemes Chapter

4

89

f 1 ðcÞ  f 1 ðdÞ + f 1 ðc  dÞ  f 1 ðdÞ + f 0 ðc  dÞ, and f 1 ðcÞ  f 1 ðdÞ  f 1 ðd  cÞ ¼ f 1 ðdÞ  f 2 ðc  dÞ  f 1 ðdÞ  f 0 ðc  dÞ, which implies j f 1 ðcÞ  f 1 ðdÞj  f 0 ðc  dÞ ¼ f0

" X

# ðci  di Þei

i



X

jci  di j k ei k∞ 

i

qffiffiffiffiffiffiffiffiffiffiffiffiffiffi rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi X jci  di j2 k ei k2∞ : i

1

Therefore, f (c) is uniformly continuous w.r.t. the variable c. Notice that the unit sphere S1 ¼ {c 2 Rk : kck ¼ 1} is a compact set, so f1 attains its maximum and minimum values on S1: D1  f 1 ðdÞ  D2 , 8d 2 S1 , where D1 and D2 are constants. If there exists d 2 S1 such that f1(d) ¼ 0, then d ¼ 0 by Property 4 above, which is a contraction to d 2 S1 . So we have D1 > 0. By Property 1, we get f1(c/kck) ¼ f1(c)/kck, thus we have 0 < D1 k c k f 1 ðcÞ  D2 k c k , 8c 2 ℝk , c 6¼ 0: Notice that f 0(c) is a norm of ℝk , thus by the equivalence of any two norms of ℝk , we get 0 < D3 k c k f 0 ðcÞ  D4 k c k , 8c 2 ℝk , c 6¼ 0: P Therefore, for q ¼ i ci ei , we have max jqðxÞj

x2½0, 1

max qðxÞ

x2½0, 1

¼

f0 ½q f 0 ðcÞ D4 ¼  : f1 ½q f 1 ðcÞ D1

□ Lemma 2. Let q(x) be a nonconstant polynomial of degree k with R1 0 qðxÞ dx ¼ 0, then



max qðxÞ



x2½0, 1 2



min qðxÞ  ðk + k  1ÞLk + 1 ½0, 1,

x2½0, 1 P +1 jlj ðxÞj is the Lebesgue constant with where Lk + 1 ½0, 1 ¼ max x2½0, 1 kj¼1 lj(x)( j ¼ 1, …, k + 1) being the Lagrange interpolation polynomials at the (k + 1)-point Gauss–Lobatto quadrature points on the interval [0, 1]. 0 0 0 Proof. Let M0 ¼ max

0 x2½0, 1 qðxÞ and m ¼ min x2½0, 1 qðxÞ then M > 0 and m < 0.

M

If M0 m0 , then

0

 1. We only need to discuss the case M0 > m0 . m

90

Handbook of Numerical Analysis

Let x j ( j ¼ 1, …, k + 1) denote the (k + 1)-point Gauss–Lobatto quadrature points for the interval [0, 1] and o j ( j ¼ 1, …, k + 1) denote the corresponding weights. Then this quadrature is exact for integration of polynomials of degree k. Since lj(x)(j ¼ 1, …, k + 1) are the Lagrange interpolation polynomials, we have qðxÞ ¼

k+1 X

qðx j Þlj ðxÞ:

j¼1

Let M00 ¼ max j qðx j Þ and m00 ¼ min j qðx j Þ. If qðx j Þ ¼ 0 for all j, then P +1 qðx j Þlj ðxÞ ¼ 0, which is impossible for a nonconstant polynomial qðxÞ ¼ kj¼1 R1 P +1 q(x). On the other hand, kj¼1 o j qðx j Þ ¼ 0 qðxÞdx ¼ 0. Thus we have m00 < 0 < M00 . So we get qðxÞ 

k+1 X

jqðx j Þjjlj ðxÞj < max fM00 ,  m00 g

j¼1

Thus M < max fM ,  m g max x2½0, 1 ½0, 1. So we have 0

00

00

Pk + 1 j¼1

k+1 X jlj ðxÞj: j¼1

jlj ðxÞj ¼ max fM00 ,  m00 gLk + 1

m0  m00 < 0 < M0 < max fM00 ,  m00 gLk + 1 ½0,1: Without loss of generality, assume qðx 1 Þ ¼ max j qðx j Þ ¼ M00 . Since Pk + 1 Pk + 1 Pk + 1 00 j¼1 o j qðx j Þ ¼ 0, we get o 1 M ¼ o 1 qðx 1 Þ ¼  j¼2 o j qðx j Þ   j¼2 Pk + 1 00 00 o j m ¼ m j¼2 o j , thus k+1 k+1 M00 1 X 1 X  o  oj  j min o j j¼2 m00 o 1 j¼2 j

1  min o j j

min o j

:

j

Therefore,

 00  M0 max fM00 ,  m00 gLk + 1 ½0,1 M   max , 1 Lk + 1 ½0,1 m0 m00 m00 1  min o j j Lk + 1 ½0,1,  min o j

0
0 and Fj + 1  0, 2

! !

2



LM , LM+1, I 1, I 2

j

2

 j

¼

min 1,

GM j

,1 :

lFj 1 + E 2

(d) If Fj 1 > 0 and Fj + 1 < 0,

  2 2 If Eq. (24) is satisfied with yj 1 , yj + 1 ¼ ð1,1Þ, then 2   2 M M L1, I , L +1, I ¼ ð1,1Þ: 2 j 2 j   l If Eq. (24) is not satisfied with yj 1 , yj + 1 ¼ ð1, 1Þ, then 2 2 ! M   G GM j j M M , L1, I , L +1, I ¼ : 2 j 2 j lFj 1  lFj + 1 + E lFj 1  lFj + 1 + E l

2

2

2

2

2. Similarly assume

h i h i m , y , yj 1 2 0, Lm 1 2 0, L 1 1 j+  ,I + ,I 2

2

j

2

2

j

and Lm+1, I are designed to preserve the lower bound by Eq. (25). where Lm 1, I 2

j

2

j

Bound-Preserving High-Order Schemes Chapter

4

97

(a) If Fj 1  0 and Fj + 1  0, 2 2   m , L ¼ ð1,1Þ: Lm 1 1  ,I + ,I 2

j

2

j

(b) If Fj 1  0 and Fj + 1 > 0, 2

2

  m , L ¼ 1, min 1, Lm 1 1  ,I + ,I 2

j

2

j

Gm j lFj + 1  E

!! :

2

(c) If Fj 1 < 0 and Fj + 1  0, 2

! !

2



Lm , Lm+1, I 12, Ij 2 j

 ¼

min 1,

Gm j lFj 1  E

,1 :

2

(d) If Fj 1 < 0 and Fj + 1 > 0,

  2 2 If Eq. (25) is satisfied with yj 1 , yj + 1 ¼ ð1, 1Þ, then 2   2 m , L Lm ¼ ð 1,1 Þ: 12, Ij +12, Ij   l If Eq. (25) is not satisfied with yj 1 , yj + 1 ¼ ð1, 1Þ, then 2 2 ! m   G Gm j j m m , : L1, I , L +1, I ¼ 2 j 2 j lFj 1  lFj + 1  E lFj 1  lFj + 1  E l

2

2

2

2

The parameter E can be chosen slightly greater than machine error to avoid division by 0. Notice that the range of yj + 1 (23) is determined by the need 2

to ensure both the upper bound (24) and the lower bound (25) of numerical solutions in both cell Ij and its neighbouring cells. Thus the locally defined limiting parameter is given as   (26) yj + 1 ¼ min L +1, Ij , L1, Ij + 1 , 2 2 2     m , L : with L +1, Ij ¼ min LM+1, I , Lm+1, I , L1, Ij + 1 ¼ min LM 1 2, Ij + 1 12, Ij + 1 2 2 2 j 2 j The modified flux in Eq. (21) with the yj + 1 designed above ensures the maxi2

mumprinciple. Such  modified flux is consistent since it is a convex combination yj + 1 2; ½0,1 of a high-order flux H^j + 1 with the first-order flux h^j + 1 . 2

2

2

The modified scheme (21) is still in the conservative form.

4

CONCLUDING REMARKS

We have reviewed two approaches for enforcing bound-preserving property in high-order schemes. While the approach in Section 2 is simple and effective, it works most well for finite volume and DG schemes solving conservation

98

Handbook of Numerical Analysis

laws. For finite difference schemes, this approach can also apply to, e.g. compressible Euler equations to maintain positivity (Zhang and Shu, 2012b), but it has restrictions in order to keep the original high-order accuracy. For convection–diffusion equations, this approach works for general DG methods to second-order accuracy on unstructured triangular meshes (Zhang et al., 2013), and to third order accuracy for a special class of DG methods (the direct DG method) (Chen et al., 2016; Liu and Yu, 2014; Yan, 2015). The second approach in Section 3 can also be applied to finite volume and DG schemes for conservation laws, but their real advantage is for finite difference schemes solving conservation laws and schemes for solving convection– diffusion equations, for which the first approach has rather severe restrictions as mentioned earlier. For spectral methods, see Liu et al. (2016) for a globally defined sweeping limiter to enforce bound-preserving property.

ACKNOWLEDGEMENTS The authors are indebted to Prof. Chi-Wang Shu for invaluable discussions, inspirations and encouragement. X.Z. is grateful to Prof. Mark Ainsworth for inspirations on the proof of Lemma 2. X.Z. is supported by the NSF grant DMS-1522593, and Z.X. is supported by the NSF grant DMS-1316662.

REFERENCES Alldredge, G., Schneider, F., 2015. A realizability-preserving discontinuous Galerkin scheme for entropy-based moment closures for linear kinetic equations in one space dimension. J. Comput. Phys. 295, 665–684. Batten, P., Lambert, C., Causon, D., 1996. Positively conservative high-resolution convection schemes for unstructured elements. Int. J. Numer. Meth. Eng. 39 (11), 1821–1838. Bell, J.B., Dawson, C.N., Shubin, G.R., 1988. An unsplit, higher order Godunov method for scalar conservation laws in multiple dimensions. J. Comput. Phys. 74 (1), 1–24. Boris, J.P., Book, D.L., 1973. Flux-corrected transport. I. SHASTA, a fluid transport algorithm that works. J. Comput. Phys. 11 (1), 38–69. Bouchut, F., 2004. An antidiffusive entropy scheme for monotone scalar conservation laws. J. Sci. Comput. 21 (1), 1–30. Cai, X., Zhang, X., Qiu, J., 2016. Positivity-preserving high order finite volume HWENO schemes for compressible Euler equations. J. Sci. Comput. 68, 464–483. http://dx.doi.org/10.1007/ s10915-015-0147-8. Chavent, G., Cockburn, B., 1989. The local projection P0-P1 discontinuous-Galerkin finite element method for scalar conservation laws. ESAIM-Math. Model. Num. 23 (4), 565–592. Chen, Z., Huang, H., Yan, J., 2016. Third order maximum-principle-satisfying direct discontinuous Galerkin methods for time dependent convection diffusion equations on unstructured triangular meshes. J. Comput. Phys. 308, 198–217. Cheng, J., Shu, C.-W., 2014. Positivity-preserving Lagrangian scheme for multi-material compressible flow. J. Comput. Phys. 257, 143–168. Cheng, Y., Gamba, I., Proft, J., 2012. Positivity-preserving discontinuous Galerkin schemes for linear Vlasov-Boltzmann transport equations. Math. Comput. 81 (277), 153–190.

Bound-Preserving High-Order Schemes Chapter

4

99

Cheng, Y., Gamba, I.M., Morrison, P.J., 2013a. Study of conservation and recurrence of Runge-Kuttadiscontinuous Galerkin schemes for Vlasov-Poisson systems. J. Sci. Comput. 56 (2), 319–349. Cheng, Y., Li, F., Qiu, J., Xu, L., 2013b. Positivity-preserving DG and central DG methods for ideal MHD equations. J. Comput. Phys. 238, 255–280. Christlieb, A.J., Liu, Y., Tang, Q., Xu, Z., 2015a. High order parametrized maximum-principlepreserving and positivity-preserving WENO schemes on unstructured meshes. J. Comput. Phys. 281, 334–351. Christlieb, A.J., Liu, Y., Tang, Q., Xu, Z., 2015b. Positivity-preserving finite difference weighted eno schemes with constrained transport for ideal magnetohydrodynamic equations. SIAM J. Sci. Comput. 37 (4), A1825–A1845. Cockburn, B., Shu, C.-W., 1989. TVB Runge-Kutta local projection discontinuous Galerkin finite element method for conservation laws. II. General framework. Math. Comput. 52 (186), 411–435. Cockburn, B., Lin, S.-Y., Shu, C.-W., 1989. TVB Runge-Kutta local projection discontinuous Galerkin finite element method for conservation laws III: one-dimensional systems. J. Comput. Phys. 84 (1), 90–113. Colella, P., 1990. Multidimensional upwind methods for hyperbolic conservation laws. J. Comput. Phys. 87 (1), 171–200. de Dios, B.A., Carrillo, J.A., Shu, C.-W., 2012. Discontinuous Galerkin methods for the multidimensional Vlasov-Poisson problem. Math. Mod. Meth. Appl. Sci. 22 (12), 1250042. Du, J., Shu, C.-W., Zhang, M., 2015. A simple weighted essentially non-oscillatory limiter for the correction procedure via reconstruction (CPR) framework. Appl. Numer. Math. 95, 173–198. Endeve, E., Hauck, C.D., Xing, Y., Mezzacappa, A., 2015. Bound-preserving discontinuous Galerkin methods for conservative phase space advection in curvilinear coordinates. J. Comput. Phys. 287, 151–183. Franquet, E., Perrier, V., 2012. Runge-Kutta discontinuous Galerkin method for interface flows with a maximum preserving limiter. Comput. Fluids 65, 2–7. Gottlieb, S., Ketcheson, D.I., Shu, C.-W., 2009. High order strong stability preserving time discretizations. J. Sci. Comput. 38 (3), 251–289. Guba, O., Taylor, M., St-Cyr, A., 2014. Optimization-based limiters for the spectral element method. J. Comput. Phys. 267, 176–195. Guermond, J.-L., Nazarov, M., 2014. A maximum-principle preserving C0 finite element method for scalar conservation equations. Comput. Methods. Appl. Mech. Eng. 272, 198–213. Guermond, J.-L., Nazarov, M., Popov, B., Yang, Y., 2014. A second-order maximum principle preserving Lagrange finite element technique for nonlinear scalar conservation equations. SIAM J. Numer. Anal. 52 (4), 2163–2182. Guo, W., Nair, R.D., Qiu, J.M., 2014. A conservative semi-Lagrangian discontinuous Galerkin scheme on the cubed sphere. Mon. Weather Rev. 142 (1), 457–475. Harten, A., 1983. High resolution schemes for hyperbolic conservation laws. J. Comput. Phys. 49 (3), 357–393. Harten, A., Engquist, B., Osher, S., Chakravarthy, S.R., 1987. Uniformly high order accurate essentially non-oscillatory schemes, III. In: Upwind and High-Resolution Schemes. Springer, Berlin, Heidelberg, pp. 218–290. Heath, R., Gamba, I.M., Morrison, P.J., Michler, C., 2012. A discontinuous Galerkin method for the Vlasov-Poisson system. J. Comput. Phys. 231 (4), 1140–1174. Hu, X.Y., Adams, N.A., Shu, C.-W., 2013. Positivity-preserving method for high-order conservative schemes solving compressible Euler equations. J. Comput. Phys. 242, 169–180. Hubbard, M., 1999. Multidimensional slope limiters for MUSCL-type finite volume schemes on unstructured grids. J. Comput. Phys. 155 (1), 54–74.

100 Handbook of Numerical Analysis Jiang, G.-S., Shu, C.-W., 1995. Efficient implementation of weighted ENO schemes. Tech. rep., DTIC Document. Jiang, G.-S., Tadmor, E., 1998. Nonoscillatory central schemes for multidimensional hyperbolic conservation laws. SIAM J. Sci. Comput. 19 (6), 1892–1917. Jiang, Y., Xu, Z., 2013. Parametrized maximum principle preserving limiter for finite difference WENO schemes solving convection-dominated diffusion equations. SIAM J. Sci. Comput. 35 (6), A2524–A2553. Jiang, Y., Shu, C.-W., Zhang, M., 2015. High-order finite difference WENO schemes with positivity-preserving limiter for correlated random walk with density-dependent turning rates. Math. Models Methods Appl. Sci. 25 (8), 1553–1588. Kurganov, A., Tadmor, E., 2000. New high-resolution central schemes for nonlinear conservation laws and convection-diffusion equations. J. Comput. Phys. 160 (1), 241–282. Larat, A., Massot, M., Vie, A., et al., 2012. A stable, robust and high order accurate numerical method for Eulerian simulation of spray and particle transport on unstructured meshes. In: Annual Research Briefs. Center for Turbulence Research, Stanford University, pp. 205–216. Liang, C., Xu, Z., 2014. Parametrized maximum principle preserving flux limiters for high order schemes solving multi-dimensional scalar hyperbolic conservation laws. J. Sci. Comput. 58 (1), 41–60. Liu, X.D., 1993. A maximum principle satisfying modification of triangle based adapative stencils for the solution of scalar hyperbolic conservation laws. SIAM J. Numer. Anal. 30 (3), 701–716. Liu, X.D., Osher, S., 1996. Nonoscillatory high order accurate self-similar maximum principle satisfying shock capturing schemes I. SIAM J. Numer. Anal. 33 (2), 760–779. Liu, H., Yu, H., 2014. Maximum-principle-satisfying third order discontinuous Galerkin schemes for Fokker-Planck equations. SIAM J. Sci. Comput. 36 (5), A2296–A2325. Liu, X.-D., Osher, S., Chan, T., 1994. Weighted essentially non-oscillatory schemes. J. Comput. Phys. 115 (1), 200–212. Liu, Y., Cheng, Y., Shu, C.-W., 2016. A simple bound-preserving sweeping technique for conservative numerical approximations. J. Sci. Comput. (submitted for publication). Lv, Y., Ihme, M., 2015. Entropy-bounded discontinuous Galerkin scheme for Euler equations. J. Comput. Phys. 295, 715–739. Olbrant, E., Hauck, C.D., Frank, M., 2012. A realizability-preserving discontinuous Galerkin method for the M1 model of radiative transfer. J. Comput. Phys. 231 (17), 5612–5639. Osher, S., Chakravarthy, S., 1984. High resolution schemes and the entropy condition. SIAM J. Numer. Anal. 21 (5), 955–984. Perthame, B., Shu, C.-W., 1996. On positivity preserving finite volume schemes for Euler equations. Numer. Math. 73 (1), 119–130. Qin, T., Shu, C.-W., Yang, Y., 2016. Bound-preserving discontinuous Galerkin methods for relativistic hydrodynamics. J. Comput. Phys. 315, 323–347. Qiu, J.-M., Shu, C.-W., 2011a. Conservative high order semi-Lagrangian finite difference WENO methods for advection in incompressible flow. J. Comput. Phys. 230 (4), 863–889. Qiu, J.-M., Shu, C.-W., 2011b. Positivity preserving semi-Lagrangian discontinuous Galerkin formulation: theoretical analysis and application to the Vlasov-Poisson system. J. Comput. Phys. 230 (23), 8386–8409. Rossmanith, J.A., Seal, D.C., 2011. A positivity-preserving high-order semi-Lagrangian discontinuous Galerkin scheme for the Vlasov-Poisson equations. J. Comput. Phys. 230 (16), 6203–6232. Sabat, M., Larat, A., Vie, A., Massot, M., 2014. On the development of high order realizable schemes for the Eulerian simulation of disperse phase flows: a convex-state preserving discontinuous Galerkin method. J. Comput. Multiphase Flows 6 (3), 247–270.

Bound-Preserving High-Order Schemes Chapter

4 101

Sanders, R., 1988. A third-order accurate variation nonexpansive difference scheme for single nonlinear conservation laws. Math. Comp. 51, 535–558. Schneider, F., Alldredge, G., Kall, J., 2016. A realizability-preserving high-order kinetic scheme using WENO reconstruction for entropy-based moment closures of linear kinetic equations in slab geometry. Kinet. Relat. Mod. 6, 193–215. Shu, C.-W., 2012. A brief survey on high order accurate maximum principle satisfying and positivity preserving discontinuous Galerkin and finite volume schemes for conservation laws. In: Fifth International Congress of Chinese Mathematicians. vol. 51. American Mathematical Society, p. 747. Shu, C.-W., Osher, S., 1988. Efficient implementation of essentially non-oscillatory shockcapturing schemes. J. Comput. Phys. 77 (2), 439–471. Vilar, F., Shu, C.-W., Maire, P.H., 2016a. Positivity-preserving cell-centered Lagrangian schemes for multi-material compressible flows: from first-order to high-orders. Part I: the one-dimensional case. J. Comput. Phys. 312, 385–415. Vilar, F., Shu, C.-W., Maire, P.H., 2016b. Positivity-preserving cell-centered Lagrangian schemes for multi-material compressible flows: from first-order to high-orders. Part II: the twodimensional case. J. Comput. Phys. 312, 416–442 ISSN 0021-9991. Wang, C., Zhang, X., Shu, C.-W., Ning, J., 2012. Robust high order discontinuous Galerkin schemes for two-dimensional gaseous detonations. J. Comput. Phys. 231, 653–665. Wu, K., Tang, H., 2015. High-order accurate physical-constraints-preserving finite difference WENO schemes for special relativistic hydrodynamics. J. Comput. Phys. 298, 539–564. Xing, Y., Shu, C.-W., 2011. High-order finite volume WENO schemes for the shallow water equations with dry states. Adv. Water Resour. 34 (8), 1026–1038. Xing, Y., Zhang, X., 2013. Positivity-preserving well-balanced discontinuous Galerkin methods for the shallow water equations on unstructured triangular meshes. J. Sci. Comput. 57 (1), 19–41. Xing, Y., Zhang, X., Shu, C.-W., 2010. Positivity-preserving high order well-balanced discontinuous Galerkin methods for the shallow water equations. Adv. Water Resour. 33 (12), 1476–1493. Xiong, T., Qiu, J.-M., Xu, Z., 2013. A parametrized maximum principle preserving flux limiter for finite difference RK-WENO schemes with applications in incompressible flows. J. Comput. Phys. 252, 310–331. Xiong, T., Qiu, J.-M., Xu, Z., Christlieb, A., 2014. High order maximum principle preserving semi-Lagrangian finite difference WENO schemes for the Vlasov equation. J. Comput. Phys. 273, 618–639. Xiong, T., Qiu, J.-M., Xu, Z., 2015. High order maximum-principle-preserving discontinuous Galerkin method for convection-diffusion equations. SIAM J. Sci. Comput. 37 (2), A583–A608. Xiong, T., Qiu, J.-M., Xu, Z., 2016. Parametrized positivity preserving flux limiters for the high order finite difference WENO scheme solving compressible Euler equations. J. Sci. Comput. 67 (3), 1066–1088. Xu, Z., 2014. Parametrized maximum principle preserving flux limiters for high order schemes solving hyperbolic conservation laws: one-dimensional scalar problem. Math. Comput. 83 (289), 2213–2238. Yan, J., 2015. Maximum principle satisfying direct discontinuous Galerkin method and its vairation for convection diffusion equations. Commun. Comput. Phys. (submitted for publication). Yang, Y., Wei, D., Shu, C.-W., 2013. Discontinuous Galerkin method for Krauses consensus models and pressureless Euler equations. J. Comput. Phys. 252, 109–127. Zalesak, S.T., 1979. Fully multidimensional flux-corrected transport algorithms for fluids. J. Comput. Phys. 31 (3), 335–362.

102 Handbook of Numerical Analysis Zhang, X., 2016. On positivity-preserving high order discontinuous Galerkin schemes for compressible Navier-Stokes equations. J. Comput. Phys. (submitted for publication). Zhang, Y., Nair, R.D., 2012. A nonoscillatory discontinuous Galerkin transport scheme on the cubed sphere. Mon. Weather Rev. 140 (9), 3106–3126. Zhang, X., Shu, C.-W., 2010a. A genuinely high order total variation diminishing scheme for onedimensional scalar conservation laws. SIAM J. Numer. Anal. 48 (2), 772–795. Zhang, X., Shu, C.-W., 2010b. On maximum-principle-satisfying high order schemes for scalar conservation laws. J. Comput. Phys. 229 (9), 3091–3120. http://dx.doi.org/10.1016/j. jcp.2009.12.030. Zhang, X., Shu, C.-W., 2010c. On positivity-preserving high order discontinuous Galerkin schemes for compressible Euler equations on rectangular meshes. J. Comput. Phys. 229 (23), 8918–8934. http://dx.doi.org/10.1016/j.jcp.2010.08.016. Zhang, X., Shu, C.-W., 2011a. Maximum-principle-satisfying and positivity-preserving high-order schemes for conservation laws: survey and new developments. Proc. Roy. Soc. A: Math. Phys. Eng. Sci. 467 (2134), 2752–2776. Zhang, X., Shu, C.-W., 2011b. Positivity-preserving high order discontinuous Galerkin schemes for compressible Euler equations with source terms. J. Comput. Phys. 230 (4), 1238–1248. Zhang, X., Shu, C.-W., 2012a. A minimum entropy principle of high order schemes for gas dynamics equations. Numer. Math. 121 (3), 545–563. Zhang, X., Shu, C.-W., 2012b. Positivity-preserving high order finite difference WENO schemes for compressible Euler equations. J. Comput. Phys. 231 (5), 2245–2258. Zhang, R., Zhang, M., Shu, C.-W., 2011. High order positivity-preserving finite volume WENO schemes for a hierarchical size-structured population model. J. Comput. Appl. Math. 236 (5), 937–949. Zhang, X., Xia, Y., Shu, C.-W., 2012. Maximum-principle-satisfying and positivity-preserving high order discontinuous Galerkin schemes for conservation laws on triangular meshes. J. Sci. Comput. 50 (1), 29–62. http://dx.doi.org/10.1007/s10915-011-9472-8. Zhang, Y., Zhang, X., Shu, C.-W., 2013. Maximum-principle-satisfying second order discontinuous Galerkin schemes for convection-diffusion equations on triangular meshes. J. Comput. Phys. 234, 295–316. Zhao, X., Yang, Y., Seyler, C.E., 2014. A positivity-preserving semi-implicit discontinuous Galerkin scheme for solving extended magnetohydrodynamics equations. J. Comput. Phys. 278, 400–415. Zhu, W., Feng, L.-l., Xia, Y., Shu, C.-W., Gu, Q., Fang, L.-Z., 2013. Turbulence in the intergalactic medium: solenoidal and dilatational motions and the impact of numerical viscosity. Astrophys. J. 777 (1), 48. Zhuang, C., Zeng, R., 2014. A positivity-preserving scheme for the simulation of streamer discharges in non-attaching and attaching gases. Commun. Comput. Phys. 15 (1), 153–178.

Chapter 5

Asymptotic-Preserving Schemes for Multiscale Hyperbolic and Kinetic Equations J. Hu*, S. Jin† and Q. Li† * †

Purdue University, West Lafayette, IN, United States University of Wisconsin-Madison, Madison, WI, United States

Chapter Outline 1 Introduction 2 Basic Design Principles of AP Schemes—Two Illustrative Examples 2.1 The Jin–Xin Relaxation Model 2.2 The BGK Model 3 AP Schemes for General Hyperbolic and Kinetic Equations 3.1 AP Schemes Based on Penalization 3.2 AP Schemes Based on Exponential Reformulation

104

105 105 107

110 111

115

3.3 AP Schemes Based on Micro– Macro Decomposition 117 4 Other Asymptotic Limits and AP Schemes 118 4.1 Diffusion Limit of Linear Transport Equation 118 4.2 High-Field Limit 119 4.3 Quasi-Neutral Limit in Plasmas 120 4.4 Low Mach Number Limit of Compressible Flows 121 4.5 Stochastic AP Schemes 122 5 Conclusion 123 Acknowledgements 123 References 124

ABSTRACT Hyperbolic and kinetic equations often possess small spatial and temporal scales that lead to various asymptotic limits. Numerical approximation of these equations is challenging due to the presence of stiff source, collision, forcing terms, or when different scales coexist. Asymptotic-preserving (AP) schemes are numerical methods that are efficient in these asymptotic regimes. They are designed to capture the asymptotic limit at the discrete level without resolving small scales. This chapter aims to review the current status of AP schemes for a large class of hyperbolic and kinetic equations. We will first use simple models to illustrate the basic design principles, and then describe several generic AP strategies for handling general equations. Various aspects of the AP Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.09.001 © 2017 Elsevier B.V. All rights reserved.

103

104 Handbook of Numerical Analysis schemes for different asymptotic regimes, including some recent development, will be discussed as well. Keywords: Asymptotic-preserving, Hyperbolic equations, Kinetic equations, Multiscale, Stiff relaxations AMS Classification Codes: 35L02, 82B40, 65L04, 58J37

1 INTRODUCTION Hyperbolic and kinetic equations usually possess multiple or small spatial and temporal scales that pose tremendous numerical challenges. These scales arise very often from (possibly stiff) source terms, collision terms, strong forcing, etc., and a naive numerical discretization of these equations requires the mesh sizes and time steps smaller than the smallest scales of the problem which is often prohibitively expensive. Typically, to efficiently compute problems with multiple scales one often couples a macroscopic model with a microscopic one through coupling conditions. One classical example is the coupling of the (microscopic) Boltzmann equation with the (macroscopic) fluid dynamic equations (Bourgat et al., 1994; Tiwari and Klar, 1998; Weinan and Engquist, 2003). Such technique requires an interface or connection condition which transfers data between the macroscopic and the microscopic ones (Li et al., 2015). This can be very difficult and is often ad hoc. Another paradigm that has been very popular in the last two decades is the so-called Asymptotic-Preserving (AP) schemes (Jin, 1999) that bridge the two different scales in a seamless way: the transition between the two scales is realized automatically, in that a microsolver becomes a macrosolver automatically if the numerical discretizations do not resolve the physically small scales. A requirement for AP schemes is to preserve the asymptotic transition from the micro models to the macro ones at the discrete level, which can be best illustrated in Fig. 1. Such an AP property

ε h

ε −→ 0

h →0

0 h

h→0 ε −→ 0

ε e

0

FIG. 1 Illustration of AP schemes. P is a microscopic equation that depends on the small scale e (e.g. the Boltzmann equation with the small Knudsen number (ratio of the mean free path over the characteristic length)), and P 0 is its macroscopic limit as e ! 0 (e.g. the Euler equations). Denote the numerical approximation of P e by P eh , where h is the discretization parameter such as the time step or mesh size. The asymptotic limit of P eh as e ! 0 (with h fixed), if exists, is denoted by P 0h . If P 0h is a good (consistent and stable) approximation of P 0 , then the scheme P eh is called AP.

Asymptotic-Preserving Schemes Chapter

5 105

often leads to a uniform convergence in the scaling parameter (Golse et al., 1999; Jin, 2012). This chapter aims at introducing this framework and reviewing the current status of AP schemes for a large class of hyperbolic and kinetic equations, in various asymptotic regimes. Interested readers may also consult earlier reviews in this subject (Degond, 2013; Degond and Deluzet, 2016; Jin, 2012). The rest of this chapter is organized as follows. We will first use two simple models to illustrate the basic design principles of AP schemes in Section 2. Then in Section 3, using the nonlinear Boltzmann equation as an example, we discuss several generic AP strategies for handling general kinetic and hyperbolic equations. Section 4 summarizes some other asymptotic limits and the corresponding AP schemes. The chapter is concluded in Section 5.

2 BASIC DESIGN PRINCIPLES OF AP SCHEMES—TWO ILLUSTRATIVE EXAMPLES While earlier attempts of AP schemes aim at stationary neutron transport in the diffusive regime (Larsen and Morel, 1989; Larsen et al., 1987), the major challenges—and the most recent developments—in the design of AP schemes come from time discretizations (Caflisch et al., 1997; Jin, 1995) or reformulation to a system that is insensitive to the specific spatial discretizations. As described in Jin (1999), a scheme is AP if l

l

it is a good discretization of the microscopic model; when the scaling parameter approaches zero, with numerical parameters fixed, it becomes a good macroscopic solver; an implicit discretization, which is necessary for uniform stability, can be implemented either explicitly or at least very efficiently (avoiding difficult nonlinear iterative algebraic solvers for instance).

We will first use two simple examples to illustrate the basic design principles of AP schemes. The first one is the Jin–Xin hyperbolic relaxation system proposed initially to solve the systems of conservation laws (Jin and Xin, 1995). The second one is the Bhatnagar–Gross–Krook (BGK) model which is a kinetic equation introduced to simplify the complicated Boltzmann collision integral in rarefied gas dynamics (Bhatnagar et al., 1954).

2.1

The Jin–Xin Relaxation Model

The Jin–Xin semilinear hyperbolic relaxation model in one spatial dimension reads as ( @t u + @x v ¼ 0, 1 (1) @t v + a@x u ¼ ð f ðuÞ  vÞ, e where a is a constant, f(u) is a nonlinear function of u and e is the relaxation time. As e ! 0, the second equation above yields the local equilibrium

106 Handbook of Numerical Analysis

v ¼ f(u), which, upon substitution to the first equation, gives the zero relaxation limit: @t u + @x f ðuÞ ¼ 0:

(2)

When e is small but not zero, numerically approximating the system (1) presents a challenge due to the stiff relaxation term. A naive explicit scheme would require the time step to resolve e: Dt ¼ O(e), which can be very timeconsuming. A natural way is to treat this term implicitly which allows Dt ≫ e. The convection term, on the other hand, can be treated explicitly as it is not stiff. Leaving aside the spatial discretization, one can employ the following first-order time-splitting framework to solve (1): 8  u  un > < ¼ 0, Dt ðrelaxation stepÞ (3)  n > : v  v ¼ 1 ð f ðu Þ  v Þ, e Dt 8 n+1  u u > > < + @x v ¼ 0, Dt ðconvection stepÞ (4) n+1  > v  v >  : + a@x u ¼ 0: Dt The second equation in (3) appears implicit at first sight, but note that from the first equation u ¼ un, so the nonlinear term f(u ) is indeed explicit thus requires no Newton-type iterations. Therefore, although implicit, the whole scheme can be implemented explicitly—an important feature of AP schemes. For the spatial derivative in (4), one can apply the usual finite difference/ volume schemes. For example, a first-order upwind scheme (applied to the 1 Riemann invariants u  pffiffiffi v) results in a 8 n+1 pffiffiffi uj  uj vj + 1  vj1 > aDx uj + 1  2uj + uj1 > > + ¼ , > < Dt 2Dx 2 ðDxÞ2 (5) pffiffiffi > vnj + 1  vj uj + 1  uj1 aDx vj + 1  2vj + vj1 > > > +a ¼ : : Dt 2Dx 2 ðDxÞ2 Now let us check the AP property of the above scheme. We will keep Dt, Dx fixed and send e ! 0. Then the relaxation step (3) (with the spatial index j added on) insures uj ¼ unj , vj ¼ f ðuj Þ ¼ f ðunj Þ, which, when substituted to the first equation of (5), yields pffiffiffi n n n unj + 1  unj f ðunj+ 1 Þ  f ðunj1 Þ aDx uj + 1  2uj + uj1 ¼ + : 2Dx Dt 2 ðDxÞ2

(6)

Asymptotic-Preserving Schemes Chapter

5 107

The scheme (6) is nothing but the Lax–Friedrichs or Rusanov scheme applied to the limiting equation (2). Hence the scheme (3) and (4) is AP, in both time and space.

2.2

The BGK Model

The BGK model widely used in kinetic theory takes the following form: 1 @t f + v  rx f ¼ ðM  f Þ, e

(7)

where f ¼ f(t, x, v) is a probability distribution function of particles at time t, position x 2 O  d and velocity v 2 d . e is the Knudsen number defined as the ratio of the mean free path over the characteristic length. M is the local equilibrium or Maxwellian defined through the moments of f: ! r jv  uj2 , (8) exp  MðvÞ ¼ 2T ð2pTÞd=2 where r, u and T are, respectively, the density, bulk velocity and temperature: Z Z Z 1 1 r¼ f dv, u ¼ vf dv, T ¼ jv  uj2 f dv: d d d r dr    It is important to note that M so defined shares the same first d + 2 moments with f: Z Z U :¼ ðr, ru, EÞT ¼ f fðvÞdv ¼ MfðvÞdv, fðvÞ ¼ ð1, v, jvj2 =2ÞT , (9) d

d

1 where E ¼ rðjuj2 + dTÞ is the total energy. Therefore, if one multiplies 2 equation (7) by f(v) and integrates over v, the right-hand side will vanish and one obtains 8 > < @t r + rx  ðruÞ ¼ 0, (10) @t ðruÞ + rx  ðruu + Þ ¼ 0, > : @t E + rx  ðEu + u + qÞ ¼ 0, where  and q are the stress tensor and heat flux defined by Z Z 1 ¼ ðv  uÞðv  uÞf dv, q ¼ ðv  uÞjv  uj2 f dv: d d 2   The system (10) is the local conservation law which is not closed. However, when e ! 0, (7) implies f ¼ M. This, substituted into (10), yields a closed system (the compressible Euler equations):

108 Handbook of Numerical Analysis

8 > < @t r + rx  ðruÞ ¼ 0, @t ðruÞ + rx  ðruu + pIÞ ¼ 0, > : @t E + rx  ððE + pÞuÞ ¼ 0,

(11)

where p ¼ rT is the pressure and I is the identity matrix. Our goal here is to design a numerical scheme for the BGK model (7) that is efficient when e is small and can capture the asymptotic Euler limit (11) at the discrete level. Similarly as the Jin–Xin model, we adopt the time-splitting strategy and treat the stiff collision part implicitly and the nonstiff convection part explicitly (Coron and Perthame, 1991): f fn 1 ¼ ðM  f  Þ, ðcollision stepÞ Dt e fn+1 f + v  rx f  ¼ 0: Dt

(12)

ðconvection stepÞ

(13)

Although the collision step appears implicit (M is defined through f  in a nonlinear way), it can be implemented explicitly. Indeed, taking the moments R n  d  fðvÞdv on both sides of (12) gives U ¼ U due to property (9), that is,  the macroscopic quantities r, u and T are conserved in this step, so is the Maxwellian M ¼ Mn . Therefore, one does not need any iterative solver for the collision step. For the spatial discretization in the convection step, one can still apply the upwind scheme (assume x and v are one-dimensional for simplicity): fjn + 1  fj Dt

v + jvj  v  jvj   ð fj  fj1 ð fj + 1  fj Þ Þ+ 2 2 ¼ 0: + Dx

(14)

Let us verify the AP property of the proposed scheme. Keeping Dt, Dx fixed, and sending e ! 0 in (12) implies f  ¼ M ¼ Mn : Now replacing f with Mn in (14), and taking the moments one gets Ujn + 1  Ujn Fnj+ 12  Fnj 12 + ¼ 0, Dt Dx where the flux Fj + 12 is defined as  Fj + 12 ¼ Fj+ + F j + 1 with Fj ¼

Z 

1

v  jvj Mj fðvÞdv: 2

(15) R 

 fðvÞdv,

(16)

(17)

Thanks to the special form of the Maxwellian, F j can be represented in closed form in terms of the error function as

Asymptotic-Preserving Schemes Chapter

1 rj uj A j  rj Bj   B C 2 B C r T + r u A j  j j j j  rj uj Bj C Fj ¼ B B    C @ 3 A 1 3  1 2 r Tj uj + rj uj Aj  rj uj + rj Tj Bj 2 j 2 2

5 109

0

with A j

 2 1 ¼ 1  erfðsj Þ , Bj ¼ esj 2

(18)

rffiffiffiffiffiffi Tj uj , sj ¼ pffiffiffiffiffiffiffi : 2p 2Tj

(16)–(18) is just the kinetic flux vector splitting (KFVS) scheme (Deshpande, 1986; Pullin, 1980) for the limiting compressible Euler equations (11). Hence the scheme (12) and (13) is AP, in both time and space. The above scheme is not necessarily the only AP scheme. Two variants are immediate. (1) Instead of applying the backward Euler scheme in (12), one can solve this step exactly   Dt Dt f  ¼ e e f n + 1  e e Mn , where we again used the fact that Mn does not change over the collision step. This method is also AP since as e ! 0, we still have (15). (2) Instead of time splitting, one can apply an implicit–explicit (IMEX) type scheme to the original equation (7): fn+1 fn 1 + v  rx f n ¼ ðMn + 1  f n + 1 Þ: Dt e

(19)

This scheme can still be solved inRan explicit manner albeit Mn + 1 is implicit. Specifically, taking the moments d  fðvÞdv on both sides of (19) and using the property (9), one has Z Un + 1  Un (20) + rx  vfðvÞf n dv ¼ 0: Dt d From (20), one can solve for Un+1, which consequently defines Mn + 1 . Thus f n+1 can be obtained from (19) explicitly. To see the AP property, as e ! 0, (19) implies f n ¼ Mn for any n. Replacing f n with Mn , (20) is clearly a consistent discretization of the compressible Euler system (11). Remark 1. The numerical schemes presented in this section are all first-order accurate in both space and time. To achieve higher order in space, standard high-order spatial discretizations (e.g. weighted essentially nonoscillatory (WENO), discontinuous Galerkin (DG) schemes) can be used. The situation for time is, however, different. It is worthwhile to mention that standard highorder time-splitting methods such as the Strang splitting will suffer from order

110 Handbook of Numerical Analysis

reduction when e ! 0 (Jin, 1995). Rather, one can use the Runge–Kutta splitting schemes (Caflisch et al., 1997) or the more general IMEX methods in the nonsplitting framework (Pareschi and Russo, 2005; Puppo and Pieraccini, 2007). In the above two examples, in spite of the nonlinear stiff terms which are treated implicitly, one can implement the schemes explicitly, thanks to the special structure of the relaxation terms. This will not be true for more general source or collision terms. In the next section we will see how these two special examples can be utilized to develop AP schemes for general hyperbolic and kinetic equations in which the nonlinear stiff terms can be implemented explicitly.

3 AP SCHEMES FOR GENERAL HYPERBOLIC AND KINETIC EQUATIONS In this section we discuss several generic AP strategies including the penalization, exponential reformulation and micro–macro decomposition. Since the classical Boltzmann equation (Cercignani, 1988) constitutes the central model in kinetic theory, it will be used throughout to illustrate the ideas of the three techniques. Application of each strategy to other equations will be mentioned at the end of each subsection. We first briefly review the Boltzmann equation and its properties. The equation reads as 1 @t f + v  rx f ¼ Qð f Þ, e

(21)

where, compared with the BGK model (7), the only difference lies in the collision term Qð f Þ—a nonlinear integral operator modeling the binary interaction among particles: Z Z

Bðv  v* , sÞ f ðv0 Þf ðv0 Þ  f ðvÞf ðv* Þ dsdv* : Qð f ÞðvÞ ¼ d Sd1

Here (v, v ) and (v , v0 ) are the velocity pairs before and after a collision, during which the momentum and energy are conserved; hence (v0 , v0 ) can be represented in terms of (v, v ) as 8 v + v* jv  v* j > < v0 ¼ + s, 2 2 > : v0 ¼ v + v*  jv  v* j s,  2 2 0

with the parameter s varying in the unit sphere Sd1. The collision kernel B(v  v , s) is a nonnegative function depending only on jv  v j and cosine s  ðv  v* Þ . of the deviation angle jv  v* j

Asymptotic-Preserving Schemes Chapter

5 111

The collision operator Qð f Þ conserves mass, momentum and energy: Z Qð f ÞfðvÞdv ¼ 0, fðvÞ ¼ ð1, v, jvj2 =2ÞT : (22) d

It satisfies the celebrated Boltzmann’s H-theorem: Z  Qð f Þ ln f dv  0: d

Moreover,

Z d

Qð f Þ ln f dv ¼ 0 , Qð f Þ ¼ 0 , f ¼ M,

(23)

where M is given by (8). This means the entropy is maximized if and only if f reaches the local equilibrium. As for the BGK model, if e ! 0, the macroscopic limit of the Boltzmann equation is also the compressible Euler system (11) (which can be easily seen using (22) and (23)). Via the Chapman–Enskog expansion (Chapman and Cowling, 1991), one can derive from the Boltzmann equation the Navier– Stokes limit while retaining O(e) terms: 8 > < @t r + rx  ðruÞ ¼ 0, @t ðruÞ + rx  ðruu + pIÞ ¼ erx  ðmsðuÞÞ, (24) > : @t E + rx  ððE + pÞuÞ ¼ erx  ðmsðuÞu + krx TÞ, 2 where sðuÞ ¼ rx u + rx uT  rx  uI. m and k are the viscosity and heat cond ductivity, determined through the linearized Boltzmann collision operator (Bardos et al., 1991). The construction of AP schemes for the Boltzmann equation (21) is by no means trivial. Due to its complicated form, the implicit discretization of the collision operator will be difficult.

3.1

AP Schemes Based on Penalization

The penalization method, introduced by Filbet and Jin (2010), was the first AP scheme for the nonlinear Boltzmann equation. The idea is to penalize Qð f Þ by the BGK operator: @t f + v  rx f ¼

Qð f Þ  bðM  f Þ bðM  f Þ + , e e |fflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflffl} |fflfflfflfflfflffl{zfflfflfflfflfflffl} less stiff , explicit stiff , implicit

where b is some constant chosen properly to approximate the Frechet derivative of Qð f Þ around M. After penalization, terms in the first brace become less stiff or nonstiff and can be treated explicitly. The other part has to be

112 Handbook of Numerical Analysis

done implicitly but it is a BGK operator thus many techniques introduced in the previous section can be applied here. A first-order IMEX discretization of (21) can thus be written as follows: fn+1 fn Qð f n Þ  bðMn  f n Þ bðMn + 1  f n + 1 Þ + v  rx f n ¼ + : Dt e e

(25)

This is an implicit scheme but R can be solved explicitly similarly as in (19). Indeed, taking the moments d  fðvÞdv on both sides of (25) and using the properties (9) and (22), we still have (20), from which one can solve for Un+1, hence Mn + 1 . Then f n+1 can be obtained from (25) explicitly. In practice, b can be roughly estimated as b ¼ sup jQ ð f Þj, v 

where Q is the loss part of the collision operator defined such that Qð f Þ ¼ Q + ð f Þ  f Q ð f Þ. b can also be made time and spatially dependent for better numerical accuracy. Concerning the AP property, the following results were established in Filbet and Jin (2010). Proposition 1. Let f n be the numerical solution given by the scheme (25). (i) If e ! 0 and f n ¼ Mn + OðeÞ, then f n + 1 ¼ Mn + 1 + OðeÞ. (ii) Assume e ≪ 1 and f n ¼ Mn + OðeÞ. If there exists a constant C > 0 such that n+1 n+1 f  f n  Un + U C, Dt Dt then the scheme (25) asymptotically becomes a first order in time approximation of the compressible Navier–Stokes equations (24). The property (i) above is a weaker version of AP property since one requires the solution to be close to the equilibrium initially. Although hard to prove theoretically, extensive numerical results in Filbet and Jin (2010) illustrate that the penalization scheme can achieve the following stronger AP property: regardless of the initial condition f 0, there exists an integer N > 0 such that f n ¼ Mn + OðeÞ, for any n  N:

(26)

Substituting (26) into (25) and taking the moments, one has Z Un + 1  Un + rx  vfðvÞMn dv + OðeÞ ¼ 0, for any n  N, d Dt  which is a consistent discretization to the limiting Euler system (11). This means the scheme is AP after an initial transient time.

Asymptotic-Preserving Schemes Chapter

5 113

Remark 2. A possible way to remove the initial layer hence achieve AP in one time step was suggested in Yan and Jin (2013), where the idea is to perform the penalization in two successive steps: 8  f fn Qð f n Þ  bðMn  f n Þ bðM  f  Þ > > + v  rx f n ¼ + , < Dt e 2e n+1 >  f  bðMn + 1  f n + 1 Þ >f : ¼ : Dt 2e The penalization method was also applied to the nonlinear hyperbolic system with stiff relaxation in Filbet and Jin (2010): ( @t u + @x gðu, vÞ ¼ 0, 1 (27) @t v + @x hðu, vÞ ¼ Rðu, vÞ, e where the term R is dissipative: @ v R 0 and possesses a unique local equilibrium: R(u, v) ¼ 0 implies v ¼ f(u). Then when e ! 0, one has the macroscopic limit @t u + @x gðu, f ðuÞÞ ¼ 0:

(28)

Here inverting an implicit R is not as simple as that in the Jin–Xin model (1). Using the penalization, this term can be treated as follows: 8 n+1 u  un > > < + @x gðun , vn Þ ¼ 0, Dt n+1 >  vn 1 b > :v + @x hðun , vn Þ ¼ ½Rðun ,vn Þ + bðvn  f ðun ÞÞ  ½vn + 1  f ðun + 1 Þ : Dt e e (29) For this scheme, one can actually prove a similar AP property (26): for any 1 initial condition v0, u0, as long as b > sup j@v Rj, there exists an integer 2 N > 0 such that vn ¼ f ðun Þ + OðeÞ, for any n  N:

(30)

Plugging (30) into the first equation of (29), we see that the scheme is AP beyond an initial layer. Remark 3. Numerical methods for nonlinear hyperbolic systems with stiff relaxation/source terms were among the earliest AP schemes for timedependent problems. The limit (28) is an analogy of the Euler limit of the Boltzmann equation. If one uses the Chapman–Enskog expansion to O(e) term, then (27) can be approximated by a parabolic equation, an analogy of the Navier–Stokes limit to the Boltzmann equation. Numerical study of system of the type (27) begun in the works (Jin, 1995; Jin and Levermore, 1996), where the AP principle was applied to design numerical schemes to handle the stiff relaxation term. While an IMEX type Runge–Kutta method

114 Handbook of Numerical Analysis

was used in Jin (1995) to capture the solution of (28), to capture the diffusion limit is much more difficult, since the numerical viscosity of O(Dx) in shock capturing methods easily dominates the physical viscosity term of O(e), unless special flux is used that builds in the limit [see Jin and Levermore (1996) and its further study and extension to unstructured meshes in Berthon et al. (2016); Buet et al. (2012)]. For AP schemes for gas dynamics with external force and frictions (see Chalons et al., 2013). In principle one cannot expect to take Dx, Dt ≫ O(e) and still capture the solution of the diffusion limit (likewise, the compressible Navier–Stokes solution in a Boltzmann solver), unless special numerical viscosity can be chosen so it does not pollute the physical viscosity. For smooth solutions this should not be a problem. However, for shocks and boundary layers, which have thickness depending on e, one cannot obtain reliable solution to the diffusion or compressible Navier–Stokes equations with mesh size independent of e. The idea of using a linear/simpler operator to penalize the nonlinear/complicated operator turns out to be a generic approach. For specific problems, one needs to seek appropriate penalization operator that serves the purpose, and this usually relies on the knowledge of the original operator. For example, consider the nonlinear Fokker–Planck–Landau equation whose collision operator is given by Z

 Aðv  v* Þ f ðv* Þrv f ðvÞ  f ðvÞrv* f ðv* Þ dv* , Qð f ÞðvÞ ¼ rv d

where A is a semipositive definite matrix. This equation is relevant in the study of Coulomb interaction (Villani, 2002). The diffusive nature of the collision operator introduces more stiffness. An explicit scheme would require Dt ¼ O(e(Dv)2) which is more restrictive than the Boltzmann case. It was shown in Jin and Yan (2011) that the BGK operator is no longer suitable and the following Fokker–Planck operator was proposed as a penalization:    f : P FP ¼ rv  Mrv M Similar approaches, with variant penalties, have been proposed for the quantum Boltzmann equation (Filbet et al., 2012), the quantum Fokker–Planck– Landau equation (Hu et al., 2012), the multispecies Boltzmann equation (Jin and Li, 2013) and the two-scale collisions for semiconductor equations (Hu and Wang, 2015; Hu et al., 2015a). Another AP scheme, developed later in Liu et al. (2016), relies on the integral representation of the BGK equation. The final form of the scheme also ends up with a linear combination—with slightly different coefficients—of the Boltzmann collision operator and the BGK operator. The coefficients are discontinuous so one turns off the Boltzmann operator and the solver becomes a pure BGK solver when the mean free path is small.

Asymptotic-Preserving Schemes Chapter

3.2

5 115

AP Schemes Based on Exponential Reformulation

Another class of AP schemes is the exponential method. Unlike the penalization idea, this method does not directly look for numerical schemes for the original equation, but instead reformulates the equation into an exponential form, with the equilibrium function embedded in, before applying the standard explicit Runge–Kutta method. Because the new formulation has the Maxwellian function embedded, it is easier to capture the asymptotic limit: in fact a large class of standard numerical methods achieves AP properties automatically if applied to the new equation. Such flexibility allows one to seek for more properties that are hard to obtain with the original form, including the high order of accuracy in both time and space, the strong AP property, positivity and many others. Early studies on the homogeneous Boltzmann equation trace back to the Wild sum approach (Gabetta et al., 1997). It was further elaborated in the IMEX Runge–Kutta framework in Dimarco and Pareschi (2011) for homogeneous case and extended to treat the nonhomogenous case in Li and Pareschi (2014). Consider the space homogeneous Boltzmann equation: 1 @t f ¼ Qð f Þ: e

(31)

Dimarco and Pareschi (2011) introduced the following reformulation: h i bð f  MÞ bt=e Q  bðM  f Þ bt=e @t ð f  MÞebt=e ¼ @t f ebt=e + e ¼ e : e e

(32)

Here b is an auxiliary parameter and as in the penalization method, bðM  f Þ is used to approximate the Frechet derivative of Q. Numerically b could be any O(1) number, but one chooses the smallest value that preserves the positivity of f. Eq. (32) is fully equivalent to the original problem (31), but since the scheme is essentially applied to update the difference between the distribution function and the Maxwellian, it removes the stiffness and forces the convergence of f to M numerically, thus easily guarantees the AP property. It can be shown that all explicit Runge–Kutta methods, when applied, not only achieve the high-order convergence, but also obtains AP property automatically. For the nonhomogenous case, the equilibrium is convecting, making it difficult to extend the scheme. To overcome that Li and Pareschi (2014) explored the possibility of using an evolving Maxwellian function within each time step. The Boltzmann equation is reformulated as:  h i P  bM  v  rx f  @t M ebt=e , @t ð f  MÞebt=e ¼ e

116 Handbook of Numerical Analysis

where P ¼ Q + bf . Meanwhile the moment equations are obtained by taking the moments of the original Boltzmann equation (21): Z (33) @t U + fðvÞv  rx f dv ¼ 0: To compute @t M, note that @t M ¼ @r M@t r + ru M  @t u + @T M@t T, where @r M, ru M and @T M can all be expressed explicitly, and the time derivatives of the other three macroscopic quantities r, u, T can be obtained from (33). Using the Runge–Kutta method on this formulation, one obtains the following scheme: l

Step i

8 i1   i X > hh > > > f ðiÞ  MðiÞ eci l ¼ ð f n  Mn Þ + aij P ðjÞ  bMðjÞ  ev  rx f ðjÞ  e@t MðjÞ ecj l > < e j¼1 ;   Z Z Z i1 X > > ðiÞ n ðjÞ > > ff dv ¼ ff dv + aij h fv  rx f dv > : j¼1

l

Final step

8 n i X  n+1  > hh > >  Mn + 1 el ¼ ð f n  Mn Þ + bi P ðiÞ  bMðiÞ  ev  rx f ðiÞ  e@t MðiÞ eci l > f < e i¼1  , Z Z Z n X > > n+1 n ðiÞ > dv ¼ ff dv + b h fv  r f dv ff > x i : i¼1

in which we denote l ¼ bDt/e and use the coefficients from the following Butcher tableaux: c1 c2 .. . cν

a21 .. .

..

aν,1 b1

aν,2 b2

. ··· ···

···

This method preserves positivity, high-order accuracy and the strong AP properties can also be proved (i.e. f is driven to M in one time step). It has been successfully extended to treat the quantum Boltzmann equation (Hu et al., 2015b), the multispecies Boltzmann equation (Li and Yang, 2014) and the Fokker–Planck–Landau equation (Dimarco et al., 2015).

Asymptotic-Preserving Schemes Chapter

3.3

5 117

AP Schemes Based on Micro–Macro Decomposition

Another framework of AP schemes for the Boltzmann-like equations is termed the ‘micro–macro’ decomposition, in which one decomposes the distribution function into the local Maxwellian, plus the deviation. It was used by Liu and Yu (2004) for analyzing the shock propagation of the Euler equations in passing the fluid limit of the Boltzmann equation. One early attempt of using such a decomposition to design an AP scheme was considered by Klar and Schmeiser (2001) for the radiative heat transfer equations. Its application to the nonlinear Boltzmann equation started with the work of Bennoune–Lemou–Mieussens in Bennoune et al. (2008). The main idea begins with decomposing f into the Maxwellian and the remainder: Z f ¼ M + eg, with fðvÞgdv ¼ 0: Since the collision operator Qð f Þ :¼ Q½ f , f is bilinear, the linearized collision operator, which depends on M, reads as: LM g ¼ Q½M,g + Q½g, M : With several lines of calculation, one gets 8 1 > < @t g + ðI  PM Þðv  rx gÞ  Q½g, g ¼ ½LM g  ðI  PM Þðv  rx MÞ , e Z Z > : @t fMdv + fv  rx Mdv + erx  hvfgi ¼ 0:

(34)

Here PM is a projection operator that maps arbitrary M-weighted L2 function into the null space of LM , namely, for any c 2 L2 ðM1 dvÞ: hPM ðcÞ,fi ¼ hc, fMi, with PM ðcÞ 2 NullðLM Þ ¼ SpanfM, vM, jvj2 Mg: For the Boltzmann equation one can write down the projection operator explicitly: PM"ðcÞ ! * ! +# 1 ðv  uÞ  hðv  uÞci jv  uj2 d 2 jv  uj2 d   c M: + ¼ hci + 2T 2T r T 2 d 2 Unlike the original Boltzmann equation with stiff term Q½f , f , the two stiff terms here are both linear thus their implicit discretization can be inverted easily. In Bennoune et al. (2008), the following discretization is taken: 8 n+1

   g  gn  1 > > < + I  PMn ðv  rx gn Þ  Q½gn , gn ¼ LMn gn + 1  I  PMn ðv  rx Mn Þ , Dt e Z Z Z Z > > : fMn + 1 dv + Dte fv  rx gn + 1 dv ¼ fMn dv  Dt fv  rx Mn dv: (35)

118 Handbook of Numerical Analysis

Dt LM in the first e equation. It is a linear operator, and the negative spectrum guarantees the invertibility. The quadratic operator Q½f , f is no longer stiff and is treated explicitly. We list the AP property proved in Bennoune et al. (2008): Proposition 2. The scheme is AP, more specifically: (i) The time discretization (35) of the system (34) gives in the limit e ! 0 a scheme consistent to the compressible Euler equations (11). (ii) For small e, the scheme (35) is asymptotically equivalent, up to Oðe2 Þ, to an explicit time discretization of the Navier–Stokes equations (24). Obviously the only term that needs to be inverted is I 

Although LM is a linear operator, the computation, however, is far from being satisfactory. In fact many techniques, including the Carleman representation, used to speed up the computation of the Boltzmann collision operator (Mouhot and Pareschi, 2006), cannot be applied for the linear operator. It is perhaps for this reason, so far this method has only been applied to the BGK model, as was done in Bennoune et al. (2008) [see an extension to the multispecies BGK model in Jin and Shi (2009)]. Higher-order schemes can be achieved by combining IMEX scheme in time and DG discretization in space (Xiong et al., 2015).

4 OTHER ASYMPTOTIC LIMITS AND AP SCHEMES In this section we briefly describe several other asymptotic limits and the construction of corresponding AP schemes.

4.1 Diffusion Limit of Linear Transport Equation In many applications, such as neutron transport and radiative transfer, the collision operator is linear. The interesting scaling is the diffusive scaling. A typical such equation has the form of Z 1 sðv, wÞ½MðvÞf ðwÞ  MðwÞf ðvÞ dw, e@t f + v  rx f ¼ (36) e d where M is the normalized Maxwellian MðvÞ ¼

1 exp ðjvj2 Þ: pd=2

The anisotropic scattering kernel s is rotationally invariant and satisfies sðv, wÞ ¼ sðw,vÞ > 0: Define the collision frequency l as Z sðv,wÞMðwÞdw m: lðvÞ ¼ d

Asymptotic-Preserving Schemes Chapter

5 119

R One can show that as e ! 0, f ! r(t, x)M(v) in (36), where rðt, xÞ ¼ f ðvÞdv satisfies the diffusion equation (Markowich et al., 1990; Poupaud, 1991): @t r ¼ rx  ðDrx rÞ, with the diffusion coefficient matrix Z MðvÞ D¼ v  vdv: lðvÞ Developing numerical schemes for such equations that are efficient in diffusive regimes constitutes the earliest works in AP schemes. It was carried out first in Larsen et al. (1987) and Larsen and Morel (1989) for stationary transport equation in which some spatial discretizations were studied. As mentioned earlier, the most challenging issue for AP schemes is the time discretization, or rather, a reformulation of the equation so that it becomes suitable for most spatial or velocity discretizations. It begins independently with the work of Jin et al. (1998, 2000) and Klar (1998). The idea in Jin et al. (2000) was to use an even and odd-decomposition to write f as a linear combination of its even and odd parts (in velocity) satisfying a hyperbolic system with stiff relaxation which can be solved using the ideas developed earlier (Caflisch et al., 1997; Jin, 1995; Jin and Xin, 1995). In Lemou and Mieussens (2008), the micro–macro decomposition approach was used [see also related works Carrillo et al., 2008; Klar and Schmeiser, 2001]. A uniform in e stability for this method was proved in Liu and Mieussens (2010). A high-order DG-IMEX scheme based on micro–macro decomposition was proposed in Jang et al. (2015), and the uniform stability was also established (Jang et al., 2014). Most of the schemes designed, though successfully relaxed the e dependence, still suffer from the parabolic scaling Dt ¼ O(Dx2), and it was solved in Li and Wang (2016), where fully implicit scheme is used. Another interesting approach using well-balanced scheme based on nonconservative product was given by Gosse and Toscani (2004), although the idea has been developed only for one space dimension.

4.2

High-Field Limit

In kinetic equations, often there is a strong external field, such as the electric or magnetic field, that balances the collision term, leading to the so-called high-field limit (Cercignani et al., 1997). Consider for example the interaction between the electrons and a surrounding bath through Coulomb force in electrostatic plasma, where the electron distribution f(t, x, v) is governed by the Vlasov–Poisson–Fokker–Planck system: 1 1 @t f + v  rx f  rx f  rv f ¼ rv  ðvf + rv f Þ, e e

(37)

Dx f ¼ r  h,

(38)

120 Handbook of Numerical Analysis

 2 le is the ratio between the mean free path and the Debye L length. Let e ! 0 in (37), one obtains the high-field limit (Goudon et al., 2005; Nieto et al., 2001):

where e ¼

@t r  rx  ðrrx fÞ ¼ 0, Dx f ¼ r  h: One can combine the force term with the Fokker–Planck term in (37) as 1 @t f + v  rx f ¼ rv  ½Mrv ðMf Þ , e 2

where M :¼ ejv + rx fj =2 . This is the starting point of two existing AP schemes (Crouseilles and Lemou, 2011; Jin and Wang, 2011), based on which other well-developed AP frameworks can be used. For more general collision operator, for example, the semiconductor Boltzmann collision operator, this trick does not apply and one needs other ideas (Jin and Wang, 2013). So far there have not been many AP schemes for this limit and there remain many interesting open questions (Gosse and Vauchelet, 2016).

4.3 Quasi-Neutral Limit in Plasmas Consider the one-species recaled Euler–Poisson equations for charged particles: @t n + rx  q ¼ 0, qq @t q + rx  + rx p ¼ nrx f, n

(39) (40)

e2 Dx f ¼ n  1,

(41) g

where n is the particle number density, q is the momentum, p ¼ n is the pressure law with g  1 and f is the electric potential. Here the negatively charged electrons with scaled charge equal to 1 is considered, with a uniform ion background density set to 1. The dimensionless parameter e ¼ lD/L is the scaled Debye length, i.e. the ratio of the actual Debye length lD to the macroscopic length scale L. In many applications, e ≪ 1. This is the so-called quasi-neutral regime. When e ! 0 in (41), one has n ¼ 1, and the following quasi-neutral limiting equations arise (Brenier, 2000): rx  q ¼ 0,

(42)

@t q + rx  ðq  qÞ ¼ rx f,

(43)

which is the incompressible Euler equations. Since the Poisson equation (41) becomes degenerate when e ! 0, a direct discretization of the Euler–Poisson system performs poorly in the quasineutral regime. A key idea introduced by Crispel et al. (2005) is to

Asymptotic-Preserving Schemes Chapter

5 121

reformulate the system to a new one that remains uniformly elliptic. Notice that when taking the limit e ! 0, the electric potential f undergoes drastic changes from the Poisson equation (41) into Dx f ¼ r2x : ðqqÞ,

(44)

r2x

where denotes the Hessian and ‘:’ the contracted product of rank two tensors. (44) is obtained by taking the divergence of (43). A uniformly stable scheme should have a formulation that is consistent to (44) when e ! 0. To achieve this, one can take @ t on (39), rx  on (40) and @ tt on (41) to get @tt n + rx  @t q ¼ 0, qq  rx  @t q + r2x : + pI ¼ rx  ðnrx fÞ, n e2 Dx @tt f ¼ @tt n:

(45) (46) (47)

Eliminating rx  @ tq by combining (45) and (46) and using (47), one obtains hqq i (48) rx  ½ðn + e2 @tt Þrx f + r2x : + pI ¼ 0: n Note now Eq. (48) is uniformly elliptic and does not degenerate, and in fact approaches to (44) as e ! 0. Thus, one can expect the asymptotic stability with respect to e if a suitable time discretization is used. This approach has also been generalized to two-fluid model (Crispel et al., 2007), particle-in-cell method for Vlasov–Poisson system (Degond et al., 2010), Euler–Maxwell system (Degond et al., 2012), among other plasma models. For more details, see recent comprehensive reviews (Degond, 2013; Degond and Deluzet, 2016).

4.4

Low Mach Number Limit of Compressible Flows

Recently there has been increasing research activities in developing Mach number uniform fluid solvers. Consider the case of isentropic Navier–Stokes equations: @t r + rx  ðruÞ ¼ 0, @t ðruÞ + rx  ðru  uÞ +

1 1 rx p ¼ Dx u, e2 Re

(49) (50)

where r is the density, u is the velocity, p ¼ rg is the pressure, e is the Mach number and Re the Reynolds number. When e ≪ 1, one seeks for asymptotic expansions: r ¼ r(0) + e2r(2) + ⋯, u ¼ u(0) + e2u(2) + ⋯, and p ¼ p(0) + e2p(2) + ⋯ which then yield (Klainerman and Majda, 1981): rx  uð0Þ¼ 0,

 1 1 @t uð0Þ + uð0Þ  rx uð0Þ + ð0Þ rx pð2Þ ¼ ð0Þ Dx uð0Þ : r r Re

122 Handbook of Numerical Analysis

The standard explicit numerical method, when applied to the compressible equations (49) and (50), requires Dt ¼ O(eDx) for stability and Dx ¼ o(e) to reduce numerical dissipation (Dellacherie, 2010; Guillard and Viozat, 1999). This imposes tremendous computational cost in the low Mach number or incompressible regime. In developing a numerical scheme that is efficient for all Mach numbers, one needs to efficiently handle the fast moving acoustic waves that travel with speed O(1/e) such that one can use mesh size and time step independent of e. This is usually achieved by splitting the flux into fast moving (corresponding to the acoustic waves) and a slowly moving one. One such approach was introduced in Haack et al. (2012) [see a related method in Degond and Tang (2011) and its extension to the full Euler and Navier–Stokes systems (Cordier et al., 2012)], which takes the following splitting: 8 < @t r + arx  ðruÞ + ð1  aÞrx  ðruÞ ¼ 0,  pðrÞ  aðtÞr aðtÞ 1 : @t ðruÞ + rx  ðruuÞ + rx + 2 rx r ¼ Dx u, e2 e Re where a and a(t) are artificial parameters. By choosing a(t) well approximates p0 (r), the third term in the second equation is nonstiff and will be treated explicitly. The term rxr calls for implicit treatment, but it could be done easily due to the linearity, so only Poisson solvers are needed like in a projection method for incompressible Navier–Stokes equations (Chorin, 1968; Temam, 1969). The scheme is shock-capturing in the high Mach number regime and reduces to a projection method when e ! 0. This is a direction being rapidly developed. One can find other techniques such as splitting by Klein (Klein, 1995; Noelle et al., 2014), Lagrangeprojection scheme (Zakerzadeh, 2016), a modification of the Roe solver (Miczek et al., 2015) with applications to astrophysics problems, careful choice of numerical viscosity (Dimarco et al., 2016), the reference (or equilibrium) solution based IMEX scheme (Noelle et al., 2015), etc. A recent interesting study of stability of some well-known splittings for this problem was conducted in Zakerzadeh and Noelle (to appear).

4.5 Stochastic AP Schemes Our discussion so far has been retained exclusively to deterministic equations. In practical applications, kinetic and hyperbolic problems almost always contain parameters that are uncertain, due to modeling and/or measurement errors. Initiated by the work (Jin et al., 2015), there has been increasing interest recently in the development of AP schemes for quantifying uncertainties in kinetic equations. We take the following Goldstein–Taylor model as an example: 8 < @t u + @x v ¼ 0, (51) 1 1 : @t v + aðx, zÞ@x u ¼  v, e e

Asymptotic-Preserving Schemes Chapter

5 123

where a(x, z) is a random wave speed with z 2 Iz  d , a set of random variables equipped with probability density function p(z). These random variables characterize the random inputs in the system. In the diffusion limit e ! 0, one has v ¼ a(x, z)@ xu from the second equation above, which, upon substitution to the first equation, gives a heat equation with random diffusion coefficient: @t u ¼ @x ðaðx,zÞ@x uÞ:

(52)

To deal with the random parameters, a popular approach is the stochastic Galerkin method based on generalized polynomial chaos expansion (gPC-sG) (Xiu and Karniadakis, 2002), which has been successfully applied to many physical and engineering problems (Ghanem and Spanos, 1991; Le Maitre and Knio, 2010; Xiu, 2010). The gPC-sG is essentially a spectral method in the random domain with the expansion basis chosen as orthogonal polynomials with weight being the probability density p(z). Now to solve the system (51) under both uncertainty and diffusive scaling, a natural way would be to combine the gPC-sG with the deterministic AP scheme properly. According to the definition in Jin et al. (2015), a scheme is stochastic AP if a gPC-sG method for Eq. (51) becomes a gPC-sG approximation for the limiting equation (52) as e ! 0, with the gPC order (the highest degree of polynomials used to discretize z), Dt and Dx fixed. Under the gPC-sG approximation, the discrete system is a deterministic set of equations, thus often allows straightforward extension of the well-developed deterministic AP schemes. For recent development of uncertainty quantification for kinetic equations, see Jin et al. (2015, 2016), Jin and Liu (2016), Jin and Lu (2016), and Zhu and Jin (2016).

5

CONCLUSION

In this chapter, we have reviewed the basic design principles and several generic strategies of the construction of AP schemes for multiscale hyperbolic and kinetic equations. To handle multiple temporal or spatial scales, unlike a typical multiscale and multiphysical approach that requires the coupling of microscopic and macroscopic solvers, the AP schemes solve exclusively the microscopic equations. They allow the discretization parameters free of the small scale constraints, while capture the coarse scale structure when the small physical scale parameter approaches zero. This is usually achieved by some implicit treatment or reformulation of the original equations, guided by the underlying asymptotic limit. Although the classical Boltzmann equation was mainly used to illustrate the ideas, the techniques presented can be applied to a large class of kinetic and hyperbolic equations. Other asymptotic limits and AP schemes were discussed as well.

ACKNOWLEDGEMENTS Acknowledgements J.H.’s research was partially supported by a start-up grant from Purdue University and NSF-DMS-1620250. S.J.’s research was supported by NSF grants

124 Handbook of Numerical Analysis DMS-1522184 and DMS-1107291: RNMS KI-Net, by NSFC grant No. 91330203 and by the Office of the Vice Chancellor for Research and Graduate Education at the University of Wisconsin-Madison with funding from the Wisconsin Alumni Research Foundation. Q.L.’s research was partially supported by a start-up grant from University of WisconsinMadison and NSF-DMS 1619778.

REFERENCES Bardos, C., Golse, F., Levermore, D., 1991. Fluid dynamic limits of kinetic equations. I. Formal derivations. J. Stat. Phys. 63, 323–344. Bennoune, M., Lemou, M., Mieussens, L., 2008. Uniformly stable numerical schemes for the Boltzmann equation preserving the compressible Navier-Stokes asymptotics. J. Comput. Phys. 227, 3781–3803. Berthon, C., Moebs, G., Sarazin-Desbois, C., Turpault, R., 2016. An asymptotic-preserving scheme for systems of conservation laws with source terms on 2D unstructured meshes. Commun. Appl. Math. Comput. Sci. 11 (1), 55–77. ISSN 1559-3940. http://dx.doi.org/ 10.2140/camcos.2016.11.55. Bhatnagar, P.L., Gross, E.P., Krook, M., 1954. A model for collision processes in gases. I. Small amplitude processes in charged and neutral one-component systems. Phys. Rev. 94, 511–525. Bourgat, J.-F., Le Tallec, P., Perthame, B., Qiu, Y., 1994. Coupling Boltzmann and Euler equations without overlapping. In: Quarteroni, A., Periaux, J., Kuznetsov, Y.A., Widlund, O.B. (Eds.), Domain Decomposition Methods in Science and Engineering (Como, 1992). Contemp. Math, vol. 157. American Mathematical Society, Providence, RI, pp. 377–398. http://dx.doi. org/10.1090/conm/157/01439. Brenier, Y., 2000. Convergence of the Vlasov-Poisson system to the incompressible Euler equations. Commun. Part. Diff. Eq. 25 (3–4), 737–754. ISSN 0360-5302. http://dx.doi.org/ 10.1080/03605300008821529. Buet, C., Despres, B., Franck, E., 2012. Design of asymptotic preserving finite volume schemes for the hyperbolic heat equation on unstructured meshes. Numer. Math. 122 (2), 227–278. ISSN 0029-599X. http://dx.doi.org/10.1007/s00211-012-0457-9. Caflisch, R.E., Jin, S., Russo, G., 1997. Uniformly accurate schemes for hyperbolic systems with relaxation. SIAM J. Numer. Anal. 34, 246–281. Carrillo, J.A., Goudon, T., Lafitte, P., Vecil, F., 2008. Numerical schemes of diffusion asymptotics and moment closures for kinetic equations. J. Sci. Comput. 36 (1), 113–149. ISSN 08857474. http://dx.doi.org/10.1007/s10915-007-9181-5. Cercignani, C., 1988. The Boltzmann Equation and Its Applications. Springer-Verlag, New York. Cercignani, C., Gamba, I.M., Levermore, C.D., 1997. High field approximations to a BoltzmannPoisson system and boundary conditions in a semiconductor. Appl. Math. Lett. 10 (4), 111–117. ISSN 0893-9659. http://dx.doi.org/10.1016/S0893-9659(97)00069-4. Chalons, C., Girardin, M., Kokh, S., 2013. Large time step and asymptotic preserving numerical schemes for the gas dynamics equations with source terms. SIAM J. Sci. Comput. 35 (6), A2874–A2902. ISSN 1064-8275. http://dx.doi.org/10.1137/130908671. Chapman, S., Cowling, T.G., 1991. The Mathematical Theory of Non-Uniform Gases, third ed. Cambridge University Press, Cambridge. Chorin, A.J., 1968. Numerical solution of the Navier-Stokes equations. Math. Comp. 22, 745–762. ISSN 0025-5718. Cordier, F., Degond, P., Kumbaro, A., 2012. An asymptotic-preserving all-speed scheme for the Euler and Navier-Stokes equations. J. Comput. Phys. 231 (17), 5685–5704. ISSN 00219991. http://dx.doi.org/10.1016/j.jcp.2012.04.025.

Asymptotic-Preserving Schemes Chapter

5 125

Coron, F., Perthame, B., 1991. Numerical passage from kinetic to fluid equations. SIAM J. Numer. Anal. 28, 26–42. Crispel, P., Degond, P., Vignal, M.-H., 2005. An asymptotically stable discretization for the Euler-Poisson system in the quasi-neutral limit. C. R. Math. Acad. Sci. Paris 341 (5), 323–328. ISSN 1631-073X. http://dx.doi.org/10.1016/j.crma.2005.07.008. Crispel, P., Degond, P., Vignal, M.-H., 2007. An asymptotic preserving scheme for the two-fluid Euler-Poisson model in the quasineutral limit. J. Comput. Phys. 223 (1), 208–234. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2006.09.004. Crouseilles, N., Lemou, M., 2011. An asymptotic preserving scheme based on a micromacro decomposition for collisional Vlasov equations: diffusion and high-field scaling limits. Kinet. Relat. Models 4 (2), 441–477. ISSN 1937-5093. http://dx.doi.org/10.3934/ krm.2011.4.441. Degond, P., 2013. Asymptotic-preserving schemes for fluid models of plasmas. In: Numerical Models for Fusion, Panor. Synthe`ses, vol. 39/40. Soc. Math. France, Paris, pp. 1–90. Degond, P., Deluzet, F., 2016. Asymptotic-preserving methods and multiscale models for plasma physics. https://arxiv.org/abs/1603.08820, Preprint. Degond, P., Tang, M., 2011. All speed scheme for the low Mach number limit of the isentropic Euler equations. Commun. Comput. Phys. 10 (1), 1–31. ISSN 1815-2406. http://dx.doi.org/ 10.4208/cicp.210709.210610a. Degond, P., Deluzet, F., Navoret, L., Sun, A.-B., Vignal., M.-H., 2010. Asymptotic-preserving particle-in-cell method for the Vlasov-Poisson system near quasineutrality. J. Comput. Phys. 229 (16), 5630–5652. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2010.04.001. Degond, P., Deluzet, F., Savelief, D., 2012. Numerical approximation of the Euler-Maxwell model in the quasineutral limit. J. Comput. Phys. 231 (4), 1917–1946. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2011.11.011. Dellacherie, S., 2010. Analysis of Godunov type schemes applied to the compressible Euler system at low Mach number. J. Comput. Phys. 229 (4), 978–1016. ISSN 0021-9991. http:// dx.doi.org/10.1016/j.jcp.2009.09.044. Deshpande, S.M., 1986. Kinetic theory based new upwind methods for inviscid compressible flows. AIAA Paper 86-0275. Dimarco, G., Pareschi, L., 2011. Exponential Runge-Kutta methods for stiff kinetic equations. SIAM J. Numer. Anal. 49 (1), 2057–2077. Dimarco, G., Li, Q., Pareschi, L., Yan, B., 2015. Numerical methods for plasma physics in collisional regimes. J. Plasma Phys. 81 (1), 1–31. Dimarco, G., Loubere, R., Vignal, M.-H., 2016. Study of a new asymptotic-preserving scheme for the Euler system in the low Mach number limit. https://hal.archives-ouvertes.fr/hal-01297238, Preprint. Filbet, F., Jin, S., 2010. A class of asymptotic-preserving schemes for kinetic equations and related problems with stiff sources. J. Comput. Phys. 229, 7625–7648. Filbet, F., Hu, J., Jin, S., 2012. A numerical scheme for the quantum Boltzmann equation with stiff collision terms. ESAIM Math. Model. Numer. Anal. 46, 443–463. Gabetta, E., Pareschi, L., Toscani, G., 1997. Relaxation schemes for nonlinear kinetic equations. SIAM J. Numer. Anal. 34 (6), 2168–2194. Ghanem, R.G., Spanos, P.D., 1991. Stochastic Finite Elements: A Spectral Approach. SpringerVerlag, New York. Golse, F., Jin, S., Levermore, C.D., 1999. The convergence of numerical transfer schemes in diffusive regimes. I. Discrete-ordinate method. SIAM J. Numer. Anal. 36 (5), 1333–1369. ISSN 0036-1429. http://dx.doi.org/10.1137/S0036142997315986.

126 Handbook of Numerical Analysis Gosse, L., Toscani, G., 2004. Asymptotic-preserving & well-balanced schemes for radiative transfer and the Rosseland approximation. Numer. Math. 98 (2), 223–250. ISSN 0029-599X. http://dx.doi.org/10.1007/s00211-004-0533-x. Gosse, L., Vauchelet, N., 2016. Numerical high-field limits in two-stream kinetic models and 1D aggregation equations. SIAM J. Sci. Comput. 38 (1), A412–A434. ISSN 1064-8275. http://dx. doi.org/10.1137/151004653. Goudon, T., Nieto, J., Poupaud, F., Soler, J., 2005. Multidimensional high-field limit of the electrostatic Vlasov-Poisson-Fokker-Planck system. J. Differ. Equ. 213 (2), 418–442. ISSN 00220396. http://dx.doi.org/10.1016/j.jde.2004.09.008. Guillard, H., Viozat, C., 1999. On the behaviour of upwind schemes in the low Mach number limit. Comput. Fluids 28 (1), 63–86. ISSN 0045-7930. http://dx.doi.org/10.1016/S00457930(98)00017-6. Haack, J., Jin, S., Liu, J.-G., 2012. An all-speed asymptotic-preserving method for the isentropic Euler and Navier-Stokes equations. Commn. Comput. Phys. 12, 955–980. Hu, J., Wang, L., 2015. An asymptotic-preserving scheme for the semiconductor Boltzmann equation toward the energy-transport limit. J. Comput. Phys. 281, 806–824. Hu, J., Jin, S., Yan, B., 2012. A numerical scheme for the quantum Fokker-Planck-Landau equation efficient in the fluid regime. Commun. Comput. Phys. 12, 1541–1561. Hu, J., Jin, S., Wang, L., 2015a. An asymptotic-preserving scheme for the semiconductor Boltzmann equation with two-scale collisions: a splitting approach. Kinet. Relat. Models 8, 707–723. Hu, J., Li, Q., Pareschi, L., 2015b. Asymptotic-preserving exponential methods for the quantum Boltzmann equation with high-order accuracy. J. Sci. Comput. 62, 555–574. http://dx.doi. org/10.1007/s10915-014-9869-2. Jang, J., Li, F., Qiu, J.-M., Xiong, T., 2014. Analysis of asymptotic preserving DG-IMEX schemes for linear kinetic transport equations in a diffusive scaling. SIAM J. Numer. Anal. 52, 2048–2072. Jang, J., Li, F., Qiu, J.-M., Xiong, T., 2015. High order asymptotic preserving DG-IMEX schemes for discrete-velocity kinetic equations in a diffusive scaling. J. Comput. Phys. 281, 199–224. Jin, S., 1995. Runge-Kutta methods for hyperbolic conservation laws with stiff relaxation terms. J. Comput. Phys. 122, 51–67. Jin, S., 1999. Efficient asymptotic-preserving (AP) schemes for some multiscale kinetic equations. SIAM J. Sci. Comput. 21, 441–454. Jin, S., 2012. Asymptotic preserving (AP) schemes for multiscale kinetic and hyperbolic equations: a review. Riv. Mat. Univ. Parma 3, 177–216. Jin, S., Levermore, C.D., 1996. Numerical schemes for hyperbolic conservation laws with stiff relaxation terms. J. Comput. Phys. 126 (2), 449–467. ISSN 0021-9991. http://dx.doi.org/ 10.1006/jcph.1996.0149. Jin, S., Li, Q., 2013. A BGK-penalization-based asymptotic-preserving scheme for the multispecies Boltzmann equation. Numer. Methods Partial Differ. Equ. 29, 1056–1080. Jin, S., Liu, L., 2016. An asymptotic-preserving stochastic Galerkin method for the semiconductor Boltzmann equation with random inputs and diffusive scalings. Preprint. Jin, S., Lu, H., 2016. An asymptotic-preserving stochastic Galerkin method for radiative heat transfer equations with random inputs and diffusive scalings. Preprint. Jin, S., Shi, Y., 2009. A micro-macro decomposition-based asymptotic-preserving scheme for the multispecies Boltzmann equation. SIAM J. Sci. Comput. 31 (6), 4580–4606. ISSN 10648275. http://dx.doi.org/10.1137/090756077.

Asymptotic-Preserving Schemes Chapter

5 127

Jin, S., Wang, L., 2011. An asymptotic preserving scheme for the Vlasov-Poisson-Fokker-Planck system in the high field regime. Acta Math. Sci. Ser. B Engl. Ed. 31 (6), 2219–2232. ISSN 0252-9602. http://dx.doi.org/10.1016/S0252-9602(11)60395-0. Jin, S., Wang, L., 2013. Asymptotic-preserving numerical schemes for the semiconductor Boltzmann equation efficient in the high field regime. SIAM J. Sci. Comput. 35, B799–B819. Jin, S., Xin, Z.P., 1995. The relaxation schemes for systems of conservation laws in arbitrary space dimensions. Commun. Pure Appl. Math. 48, 235–276. Jin, S., Yan, B., 2011. A class of asymptotic-preserving schemes for the Fokker-Planck-Landau equation. J. Comput. Phys. 230, 6420–6437. Jin, S., Pareschi, L., Toscani, G., 1998. Diffusive relaxation schemes for multiscale discretevelocity kinetic equations. SIAM J. Numer. Anal. 35 (6), 2405–2439. ISSN 0036-1429. http://dx.doi.org/10.1137/S0036142997315962. (electronic). Jin, S., Pareschi, L., Toscani, G., 2000. Uniformly accurate diffusive relaxation schemes for multiscale transport equations. SIAM J. Numer. Anal. 38 (3), 913–936. ISSN 0036-1429. http://dx.doi.org/10.1137/S0036142998347978. (electronic). Jin, S., Xiu, D., Zhu, X., 2015. Asymptotic-preserving methods for hyperbolic and transport equations with random inputs and diffusive scalings. J. Comput. Phys. 289, 35–52. Jin, S., Liu, J.-G., Ma, Z., 2016. Uniform spectral convergence of the stochastic Galerkin method for the linear transport equations with random inputs in diffusive regime and a micro-macro decomposition based asymptotic preserving method. Preprint. Klainerman, S., Majda, A., 1981. Singular limits of quasilinear hyperbolic systems with large parameters and the incompressible limit of compressible fluids. Comm. Pure Appl. Math. 34 (4), 481–524. ISSN 0010-3640. http://dx.doi.org/10.1002/cpa.3160340405. Klar, A., 1998. An asymptotic-induced scheme for nonstationary transport equations in the diffusive limit. SIAM J. Numer. Anal. 35 (3), 1073–1094. ISSN 0036-1429. http://dx.doi.org/ 10.1137/S0036142996305558. (electronic). Klar, A., Schmeiser, C., 2001. Numerical passage from radiative transfer to nonlinear diffusion models. Math. Models Meth. Appl. Sci. 11 (5), 749–767. Klein, R., 1995. Semi-implicit extension of a Godunov-type scheme based on low Mach number asymptotics. I. One-dimensional flow. J. Comput. Phys. 121 (2), 213–237. ISSN 0021-9991. http://dx.doi.org/10.1016/S0021-9991(95)90034-9. Larsen, E.W., Morel, J.E., 1989. Asymptotic solutions of numerical transport problems in optically thick, diffusive regimes. II. J. Comput. Phys. 83 (1), 212–236. ISSN 0021-9991. http://dx.doi.org/10.1016/0021-9991(89)90229-5. Larsen, E.W., Morel, J.E., Miller Jr., W.F., 1987. Asymptotic solutions of numerical transport problems in optically thick, diffusive regimes. J. Comput. Phys. 69 (2), 283–324. ISSN 0021-9991. http://dx.doi.org/10.1016/0021-9991(87) 90170-7. Lemou, M., Mieussens, L., 2008. A new asymptotic preserving scheme based on micro-macro formulation for linear kinetic equations in the diffusion limit. SIAM J. Sci. Comput. 31, 334–368. Li, Q., Pareschi, L., 2014. Exponential Runge-Kutta for the inhomogeneous Boltzmann equations with high order of accuracy. J. Comput. Phys. 259, 402–420. Li, Q., Wang, L., 2016. Implicit asymptotic preserving method for linear transport equations. https://arxiv.org/abs/1602.00746, Preprint. Li, Q., Yang, X., 2014. Exponential Runge-Kutta methods for the multi-species Boltzmann equation. Commun. Comput. Phys. 15, 996–1011. Li, Q., Lu, J., Sun, W., 2015. Diffusion approximations and domain decomposition method of linear transport equations: asymptotics and numerics. J. Comput. Phys. 292, 141–167. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2015.03.014.

128 Handbook of Numerical Analysis Liu, J.-G., Mieussens, L., 2010. Analysis of an asymptotic preserving scheme for linear kinetic equations in the diffusion limit. SIAM J. Numer. Anal. 48 (4), 1474–1491. ISSN 0036-1429. http://dx.doi.org/10.1137/090772770. Liu, T.-P., Yu, S.-H., 2004. Boltzmann equation: micro-macro decompositions and positivity of shock profiles. Commun. Math. Phys. 246, 133–179. Liu, C., Xu, K., Sun, Q., Cai, Q., 2016. A unified gas-kinetic scheme for continuum and rarefied flow IV: full Boltzmann and model equations. J. Comput. Phys. 314, 305–340. Le Maitre, O.P., Knio, O.M., 2010. Spectral Methods for Uncertainty Quantification: With Applications to Computational Fluid Dynamics. Springer, Netherlands. Markowich, P.A., Ringhofer, C.A., Schmeiser, C., 1990. Semiconductor equations. SpringerVerlag, Viennax+248. http://dx.doi.org/10.1007/978-3-7091-6961-2. ISBN 3-211-82157-0. Miczek, F., Ropke, F.G., Edelmann, P.V., 2015. New numerical solver for flows at various Mach numbers. Astron. Astrophys. 578, A50. Mouhot, C., Pareschi, L., 2006. Fast algorithms for computing the Boltzmann collision operator. Math. Comp. 75, 1833–1852. Nieto, J., Poupaud, F., Soler, J., 2001. High-field limit for the Vlasov-Poisson-Fokker-Planck system. Arch. Ration. Mech. Anal. 158 (1), 29–59. ISSN 0003-9527. http://dx.doi.org/10.1007/ s002050100139. Noelle, S., Bispen, G., Arun, K.R., Lukacova-Medvidova, M., Munz, C.-D., 2014. A weakly asymptotic preserving low Mach number scheme for the Euler equations of gas dynamics. SIAM J. Sci. Comput. 36 (6), B989–B1024. ISSN 1064-8275. http://dx.doi.org/ 10.1137/120895627. Noelle, S., Klein, R., Schutz, J., Zakerzadeh, H., 2015. RS-IMEX schemes: derivation and asymptotic stability. IGPM Preprint, RWTH Aachen University. Pareschi, L., Russo, G., 2005. Implicit-explicit Runge-Kutta schemes and applications to hyperbolic systems with relaxation. J. Sci. Comput. 25, 129–155. Poupaud, F., 1991. Diffusion approximation of the linear semiconductor Boltzmann equation: analysis of boundary layers. Asymptotic Anal. 4 (4), 293–317. ISSN 0921-7134. Pullin, D.I., 1980. Direct simulation methods for compressible inviscid ideal-gas flow. J. Comput. Phys. 34, 231–244. Puppo, G., Pieraccini, S., 2007. Implicit-explicit schemes for BGK kinetic equations. J. Sci. Comput. 32, 1–28. Temam, R., 1969. Sur l’approximation de la solution des equations de Navier-Stokes par la methode des pas fractionnaires. II. Arch. Rational Mech. Anal. 33, 377–385. ISSN 00039527. Tiwari, S., Klar, A., 1998. An adaptive domain decomposition procedure for Boltzmann and Euler equations. J. Comput. Appl. Math. 90 (2), 223–237. ISSN 0377-0427. http://dx.doi.org/ 10.1016/S0377-0427(98)00027-2. Villani, C., 2002. A review of mathematical topics in collisional kinetic theory. In: Friedlander, S., Serre, D. (Eds.), Handbook of Mathematical Fluid Mechanics, vol. I. 71–305 North-Holland, Netherlands. Xiong, T., Jang, J., Li, F., Qiu, J.-M., 2015. High order asymptotic preserving nodal discontinuous Galerkin IMEX schemes for the BGK equation. J. Comput. Phys. 284, 70–94. Xiu, D., 2010. Numerical Methods for Stochastic Computations. Princeton University Press, New Jersey. Xiu, D., Karniadakis, G.E., 2002. The Wiener-Askey polynomial chaos for stochastic differential equations. SIAM J. Sci. Comput. 24, 619–644.

Asymptotic-Preserving Schemes Chapter

5 129

Yan, B., Jin, S., 2013. A successive penalty-based asymptotic-preserving scheme for kinetic equations. SIAM J. Sci. Comput. 35, A150–A172. Weinan, E., Engquist, B., 2003. The heterogeneous multiscale methods. Commun. Math. Sci. 1 (1), 87–132. ISSN 1539-6746. http://projecteuclid.org/euclid.cms/1118150402. Zakerzadeh, H., 2016. On the Mach-uniformity of the Lagrange-projection scheme. Math. Model Num. Anal. Zakerzadeh H. and Noelle S., A note on the stability of implicit-explicit flux splittings for stiff systems of hyperbolic conservation laws. J. Sci. Comput. to appear. Zhu, Y., Jin, S., 2016. The Vlasov-Poisson-Fokker-Planck system with uncertainty and a onedimensional asymptotic-preserving method. Preprint.

Chapter 6

Well-Balanced Schemes and Path-Conservative Numerical Methods s* M.J. Castro*, T. Morales de Luna† and C. Pare * †

Universidad de Ma´laga, Ma´laga, Spain Universidad de Co´rdoba, Co´rdoba, Spain

Chapter Outline 1 Introduction 2 Path-Conservative Numerical Schemes 3 Some Families of Path-Conservative Numerical Schemes 3.1 Godunov Method 3.2 Simple Riemann Solvers 3.3 Roe Methods 3.4 Functional Viscosity Matrix Methods 3.5 Other Path-Conservative Methods 4 High-Order Schemes Based on Reconstruction of States 5 Well-Balanced Schemes 5.1 Well-Balanced Property for SRSs

132 138

142 142 142 144 145 148 148 151 154

5.2 Well-Balanced HLL Scheme 5.3 Well-Balanced SRSs 5.4 Roe Method 5.5 Well-Balanced Functional Viscosity Matrix Methods 5.6 Generalized Hydrostatic Reconstruction 5.7 Well-Balanced Methods for a Subset of Stationary Solutions 5.8 High-Order Well-Balanced Schemes 6 Convergence and Choice of Paths Acknowledgements References

155 156 156

157 158

160 161 166 169 169

ABSTRACT In this chapter we describe a general methodology for developing high-order well-balanced schemes for hyperbolic system with nonconservative products and/or source terms. We briefly recall the Dal Maso–LeFloch–Murat theory to define weak solutions of nonconservative systems and how it has been used to establish the notion of path-conservative schemes. We show that, under this framework, it is possible to extend to the nonconservative case many well-known numerical schemes that are Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.10.002 © 2017 Elsevier B.V. All rights reserved.

131

132 Handbook of Numerical Analysis commonly used for system of conservation laws. Moreover, their extension to high order can be done as well. Next the well-balanced property of the proposed methods is analyzed with an illustrative 1d example. Finally, we point out the difficulties related to the right definition of weak solution and the design of numerical schemes converging to them. Keywords: Nonconservative hyperbolic systems, Balance laws, Path-conservative method, Well-balanced schemes AMS Classification Codes: 65M08, 65M20, 76M12, 76L05, 35L60

1 INTRODUCTION The goal of this chapter is to describe a general methodology for developing high-order well-balanced numerical schemes for hyperbolic systems with nonconservative products and/or source terms: wt + FðwÞx + BðwÞwx ¼ SðwÞsx

(1)

where the unknown w(x, t) takes values in an open convex set O of N ; F is a regular function from O to N ; B, a regular matrix function from O to MNN ðÞ; S, a function from O to N ; and s(x), a known function from  to . PDE systems of this form appear in many fluid models in different contexts: shallow water models, multiphase flow models, gas dynamic, etc. For instance, the shallow water system governing the flow of a shallow layer of inviscid homogeneous fluid through a straight channel with a constant rectangular cross-section is the particular case of (1) corresponding to the choices N ¼ 2, B ¼ 0, s ¼ H, 2 3     q 0 h : (2) w¼ , FðwÞ ¼ 4 q2 g 5, SðwÞ ¼ 2 gh q + h h 2 The variable x makes reference to the axis of the channel and t is time; q(x, t) and h(x, t) represent the mass-flow and the thickness, respectively; g, the gravity; and H(x), the depth measured from a fixed level of reference. The system of partial differential equations governing the one-dimensional flow of two superposed immiscible layers of shallow water fluids studied in Castro et al. (2001) is also a particular case of (1): it corresponds to the choices N ¼ 4, s ¼ H, 2 3 q1 2 3 2 3 0 h1 6 q21 g 2 7 6 + h 7 6q 7 6 gh 7 6h 2 1 7 17 6 17 1 7, SðwÞ ¼ 6 (3) w ¼ 6 7, FðwÞ ¼ 6 6 7, 6 q2 7 4 h2 5 4 5 0 6 7 4 q2 g 5 q2 gh2 2 + h2 h2 2 2

Path-Conservative Numerical Methods Chapter

2

0

0

0

0

6 133

3

6 7 6 0 0 gh1 0 7 6 7 BðwÞ ¼ 6 7, 6 0 0 0 07 4 5 grh2 0 0 0

(4)

with r¼

r1 : r2

Index 1 makes reference to the upper layer and index 2 to the lower one. The fluid is assumed to occupy a straight channel with constant rectangular cross-section and constant width. H(x) represents again the depth function. Each layer is assumed to have a constant density, ri, i ¼ 1, 2 (r1 < r2). The unknowns qi and hi represent, respectively, the mass-flow and the thickness of the ith layer. The main difficulty of systems of the form (1) both from the theoretical and the numerical points of view comes from the presence of nonconservative products (when B ¼ 6 0 or S ¼ 6 0 and s is discontinuous) that does not make sense in the distributional framework when the solution w develops discontinuities. Another difficulty is related to the numerical computation of stationary solutions: standard methods that solve correctly systems of conservation laws can fail in solving (1) when approaching equilibria or near to equilibria solutions. In the context of shallow water equations Bermu´dez and Va´zquezCendo´n introduced in Bermu´dez and Va´zquez (1994) the condition called C-property: a scheme is said to satisfy this condition if it solves correctly the steady-state solutions corresponding to water at rest. This idea of constructing numerical schemes that preserve some equilibria, which are called in general well-balanced schemes, has been studied by many authors. The design of numerical methods with good properties for problems of the form (1) or the particular cases corresponding to B ¼ 0 (systems of balance laws) is a very active front of research: see, for instance, Audusse et al. (2004), Berthon and Coquel (2007), Berthon et al. (2012), Bouchut (2004), Castro et al. (2007), Chaco´n Rebollo et al. (2003, 2004), De Vuyst (1994), Gosse (2000, 2001, 2002), Greenberg and Leroux (1996), Greenberg et al. (1997), LeVeque (1998), Luka´cˇova´-Medvid’ova´ et al. (2007), Noelle et al. (2006, 2007), Pelanti et al. (2008), Perthame and Simeoni (2001, 2003), Rhebergen et al. (2008), Russo and Khe (2009), Tang et al. (2004), Toumi (1992), Xing and Shu (2006), K€appeli and Mishra (2014), Desveaux et al. (2016a,b), Touma et al. (2016), etc. Let us introduce an easy example in order to illustrate the numerical difficulties related to the preservation of steady states:

134 Handbook of Numerical Analysis

(

ut + ux ¼ u,

(5)

uðx,0Þ ¼ u0 ðxÞ:

Notice that this linear scalar equation is the particular case of (1) corresponding to N ¼ 1, w ¼ u, F(w) ¼ w, B(w) ¼ 0, S(w) ¼ w, s(x) ¼ x. The smooth stationary solutions of (5) can be easily computed: uðxÞ ¼ Cex , C 2 :

(6)

We consider the following problem: design a numerical scheme that preserves all the stationary solutions. In Bermu´dez and Va´zquez (1994) it was shown that, in the context of the shallow water systems, in order to satisfy the C-property, an upwind discretization of the source term has to be considered. Therefore, it is natural to consider first the upwind scheme: uni + 1 ¼ uni +

Dt n ðu  uni Þ + Dtuni1 : Dx i1

(7)

If we apply this scheme to (5) with initial condition u0 ðxÞ ¼ ex ,

(8)

the errors are not zero and the convergence rate is 1: see Table 1. Therefore, an upwind discretization is not enough, in general, to obtain well-balanced methods. If, instead, we consider the numerical method: uni + 1 ¼ uni +

 Dt  Dx n e ui1  uni , Dx

(9)

the L1 relative errors are those shown in Table 2: the numerical method is thus well balanced. If (9) is rewritten as follows:

TABLE 1 Relative Errors in L1 Norm and Order of the Upwind Scheme (7) Applied to (5) in the Space Domain [25, 5] With the Initial Condition u(x, 0) 5 ex at Time T 5 10 as a Function of the Number of Cells N N

50

100

200

400

Error

7.972e1

4.475e1

2.275e1

1.135e1

Order



0.833

0.976

1.003

CFL 5 0.9.

Path-Conservative Numerical Methods Chapter

6 135

TABLE 2 Relative Errors in L1 Norm of the Godunov Scheme (9) Applied to (5) in the Space Domain [25, 5] With Initial Condition the Point Values of u(x, 0) 5 ex at Time T 5 10 as a Function of the Number of Cells N N

50

100

200

400

Error

5.374e16

6.642e15

1.306e14

4.596e15

CFL 5 0.9.

uni + 1

¼ uni

 Dx   e 1 n Dt  n n u  ui + Dt ui1 , + Dx i1 Dx

(10)

it can be seen that the numerical method is based again on a first-order upwind approximation of the source term. Nevertheless, besides the upwind treatment, the source term is multiplied by a factor involving the exponential function which is the key point to make the numerical method well balanced. The main goal of this chapter is to show the strategy pursued to obtain (9) and to extend it for general systems of the form (1). Let us illustrate why the well-balanced property is important in practice. Let us consider an initial condition which is a perturbation of a stationary solution: for instance, we consider u0 ðxÞ ¼ ex + 0:05w½0:5,0:5 ðxÞ,

(11)

where w[a, b] is the characteristic function of the interval [a, b]. The perturbation is expected to travel at speed 1 while exponentially growing due to the effect of the source term. Fig. 1 shows the perturbation, i.e., the difference between the solution and the underlying stationary solution, at time t ¼ 0.5 obtained with (7) and (9) with Dx ¼ 0.1. As it can be seen, the expected behaviour of the perturbation is only captured by the well-balanced method. If the mesh is refined so that the amplitude of the initial perturbation is greater than Dx, both methods give similar results: in Fig. 2 the results obtained with Dx ¼ 0.02. Therefore, the use of a well-balanced numerical method is mandatory when the simulations to be done involve small perturbations of a steady state whose amplitudes are of the order or bigger than the truncation error of the method. This is the case of a tsunami wave propagating at the ocean: its initial amplitude is small (although the lengthwave is huge) and it is not always possible to refine the mesh so that the truncation error of the method is lower than this amplitude. As it will be seen, the strategy to obtain well-balanced methods has a close relation with the difficulty related to the definition of the nonconservative products appearing in the system. There are several mathematical theories allowing to formalize the different possibilities to define the notion of weak solution for a nonconservative system: Volpert (1967), Cauret et al. (1989),

FIG. 1 Difference at times t ¼ 0 and t ¼ 0.5 between the numerical solution for (5) with initial condition (11) and the stationary solution u ¼ ex corresponding to the numerical method (9) (left) and (7) (right) with Dx ¼ 0.1 and CFL ¼ 0.5.

FIG. 2 Difference at times t ¼ 0 and t ¼ 0.5 between the numerical solution for (5) with initial condition (11) and the stationary solution u ¼ ex corresponding to the numerical method (9) (left) and (7) (right) with Dx ¼ 0.02 and CFL ¼ 0.5.

138 Handbook of Numerical Analysis

and Dal Maso et al. (1995). In Section 2 we briefly recall the latter and show its usefulness to state a general framework to design finite volume numerical methods for systems of the form (1). As it will be seen in Section 3, this framework makes it possible to extend to the nonconservative case many well-known numerical methods for systems of conservation laws in a natural way, as well as their extension to high order (Section 4). Next, in Section 5, we analyze the well-balanced property of the numerical methods and check that the discussion of the simple problem (5) is, in fact, quite natural. Finally, in Section 6 we address the difficulties related to the right definition of weak solution and the design of numerical methods converging to them.

2 PATH-CONSERVATIVE NUMERICAL SCHEMES Let us consider first-order quasi-linear PDE systems: Wt + AðWÞWx ¼ 0 x 2 , t > 0,

(12)

with initial condition Wðx, 0Þ ¼ W0 ðxÞ x 2 ,

(13)

in which the unknown W(x, t) takes values in an open convex set O of  , and W 2 O 7! AðWÞ 2 MNN ðÞ is a smooth locally bounded map. The system is supposed to be strictly hyperbolic. Any system (1) may be rewritten in the form (12) by considering s as an unknown and by adding the equation st ¼ 0. Then:   w W¼ , s N

and A(W) is the matrix whose block structure is as follows:

where J(w) is the Jacobian matrix of the flux function F. In order to design finite volume methods for systems of the form (12), we may proceed, as it is done for systems of conservation laws, by integrating the equation in an arbitrary space–time rectangle [a, b]  [t0, t1]: Z b Z t1 Z b Z b (14) Wðx, t1 Þ dx ¼ Wðx, t0 Þ dx  AðWðx, tÞÞWx ðx, tÞ dx dt: a

a

t0

a

The difficulty comes from the fact that the last integrand may be discontinuous and it is expected to be a measure involving Dirac’s deltas at the discontinuities. Under some hypotheses of regularity for A, the theory introduced by Dal Maso et al. (1995) allows to define the product A(W)Wx for functions W with bounded variation, provided a family of Lipschitz continuous paths F : [0, 1]  O  O ! O is prescribed, which must satisfy certain regularity and compatibility conditions. In particular

Path-Conservative Numerical Methods Chapter

Fð0; WL , WR Þ ¼ WL ,

6 139

Fð1; WL , WR Þ ¼ WR ,

(15)

and Fðs; W, WÞ ¼ W:

(16)

According to this theory, given a function W(x) with bounded variation, the product A(W)Wx is defined as a locally bounded measure, denoted by [A(W) Wx]F, which coincides with the distributional derivative in the special case of a conservative product, for which A(W) is the Jacobian matrix for some function F(W). The interested reader is addressed to Dal Maso et al. (1995) for a rigorous and complete presentation of this theory. In practice, the family of paths can be interpreted as a tool to give a sense to the last integral appearing in (14) for piecewise smooth functions W. More precisely, given a bounded variation function W : ½a, b ! , we define: Z b Z b AðWðxÞÞWx ðxÞ dx  AðWðxÞÞWx ðxÞ dx ¼ a

a

+

XZ l

0

1

@F AðFðs; Wl ,Wl+ ÞÞ ðs; Wl , @s

(17) Wl+ Þ ds:

In this definition, Wl and Wl+ represent, respectively, the limits of W to the left and right of its lth discontinuity (remember that the set of discontinuities of a bounded variation function is countable). Observe that, in (17), the family of paths has been used to determine the weight of the Dirac measures placed at the discontinuities of W. According to this definition of integral, a weak solution can be defined as a function satisfying Z b Z t1 Z b Z b (18) Wðx, t1 Þ dx ¼ Wðx,t0 Þ dx   AðWðx, tÞÞWx ðx,tÞ dx dt, a

a

t0

a

for every space–time rectangle [a, b]  [t0, t1]. Once the notion of integral of the nonconservative product has been stated and proceeding as in the conservative case, it is easy to check that, across a discontinuity, weak solutions have to satisfy the generalized Rankine– Hugoniot condition: Z 1 @F +  (19) AðFðs; W  ,W + ÞÞ ðs; W  , W + Þ ds, xðW  W Þ ¼ @s 0 where x is the speed of propagation of the discontinuity, and W and W+ are the left and right limits of the solution at the discontinuity. If A(W) is the Jacobian matrix for some function F(W), (19) reduces to the standard Rankine–Hugoniot condition: xðW +  W  Þ ¼ FðW + Þ  FðW  Þ, independently of F.

(20)

140 Handbook of Numerical Analysis

As it happens for systems of conservation laws, in order to have uniqueness of solution, an entropy condition has to be added to the notion of weak solution: let us assume that (12) is equipped with an entropy pair (, q), i.e., a convex function  : O !  and a function q : O !  such that rq(W)> ¼ V>A(W), where V :¼ r(W) are the so-called entropy variables. Then, entropy solutions of (12) should satisfy the entropy inequality ðWÞt + qðWÞx  0,

(21)

in the distribution sense. It is clear that the concept of weak solution strongly depends on the chosen family of paths, which is a priori arbitrary. The crucial question is thus how to choose the ‘good’ family of paths. The answer to this question is not easy, and it will be discussed in Section 6. Meanwhile, let us assume that the family of paths, and thus the definition of weak solution, has been chosen. In order to discretize the system, computing cells Ii ¼ [xi1/2, xi+1/2] are considered, whose size Dx is supposed to be constant for simplicity. Let us also suppose that xi + 1 ¼ iDx and we denote by xi ¼ (i  1/2)Dx the centre 2

of the cell Ii. Let Dt be the constant time step and define tn ¼ nDt. Let us denote by Win the approximation of the cell average of the weak solution at the cell Ii at time tn provided by the scheme. The initial cell values are thus given by: Z 1 xi + 1=2 W0 ðxÞ dx: Wi0 ¼ (22) Dx xi1=2 From (18), the cell averages of weak solutions satisfy the equality: 1 Dx

Z

1 Wðx, tn + 1 Þ dx ¼ Dx Ii

Z

Dt 1 Wðx,tn Þ dx  Dx Dt Ii

Z

t1 Z b

 AðWÞWx dx dt,

tn

(23)

Ii

Accordingly, we consider thus numerical methods of the form: Definition 1. Given a family of paths F, a numerical scheme is said to be F-conservative if it can be written under the form: Win + 1 ¼ Win 

 Dt  + Di1=2 + D i + 1=2 , Dx

(24)

where  n n   D i + 1=2 ¼ D Wi , Wi + 1 , D and D+ being two continuous functions from O2 to O satisfying D ðW, WÞ ¼ 0 8W 2 O,

(25)

Path-Conservative Numerical Methods Chapter

6 141

D ðWL , WR Þ + D + ðWL ,WR Þ Z 1 @F AðFðs; WL , WR ÞÞ ðs; WL , WR Þ ds, ¼ @s 0

(26)

and

for every set fWL , WR g  O. Observe that this definition is the discrete counterpart of (23) with [a, b] ¼ Ii and [t0, t1] ¼ [tn, tn+1]. Since a piecewise constant approximation of the solution is considered, the dashed integral only consists of two Dirac measures placed at the intercells. The masses of these two measures are then split into two terms D i+1/2, one contributing to the cell Ii and the other to the cell Ii+1. The notion of path-conservative is a generalization of that of conservative method for a system of conservation laws in the following sense: if A(W) is the Jacobian of a flux function F, then (26) reduces to D ðWL , WR Þ + D + ðWL , WR Þ ¼ FðWR Þ  FðWL Þ:

(27)

Therefore, we can define GðWL ,WR Þ ¼ D ðWL ,WR Þ + FðWL Þ,

(28)

GðWL , WR Þ ¼ FðWR Þ  D + ðWL , WR Þ:

(29)

or, equivalently,

Then, (25) leads to GðW,WÞ ¼ FðWÞ so that G is a numerical flux consistent with F, and using (28) and (29) in (24), it can be easily checked that the numerical method can be rewritten as the conservative method: Win + 1 ¼ Win + with

 Dt  Gi1=2  Gi + 1=2 , Dx

(30)

  Gi + 1=2 ¼ G Win , Win+ 1 :

Due to this, if the system (12) involves some conservation laws (as it happens with the mass equations in the one- or two-layer shallow water system) a pathconservative method will be conservative for these laws. The same happens if a linear combination of some of the equations gives a conservation law. Path-conservative schemes have been applied to many different problems, besides the shallow water or multilayer shallow water models. For instance, they have been applied to Saint Venant–Exner (Castro Dı´az et al., 2008), turbidity currents (Morales de Luna et al., 2009), Ripa model (Sa´nchez-Linares et al., 2016), two-modes shallow water system (Castro et al., 2014a),

142 Handbook of Numerical Analysis

Baer–Nunziato model (Dumbser et al., 2010), Pitman–Le model (Pelanti et al., 2008), Savage–Hutter models (Ferna´ndez-Nieto et al., 2008), Bingham shallow water system (Ferna´ndez-Nieto et al., 2014), blood flow (M€uller et al., 2013), two-phase flows (Munkejord et al., 2009), etc.

3 SOME FAMILIES OF PATH-CONSERVATIVE NUMERICAL SCHEMES 3.1 Godunov Method Once the family of paths has been chosen, let us denote by V (x/t;WL, WR) the self-similar solution of the Riemann problem: 8 Wt + AðWÞWx ¼ 0, > > < ( WL if x < 0, (31) > Wðx, 0Þ ¼ > : WR if x > 0: As it happens for systems of conservation laws, Godunov method consists in updating the approximation at the cells by averaging the solution of the Riemann problems associated to every intercell at the previous time step under a CFL-1/2 condition: Z xi x  x  1 i1=2 n Win + 1 ¼ ; Wi1 V , Win dx Dt Dx xi1=2 (32) Z xi + 1=2    x  xi + 1=2 ; Win , Win+ 1 dx : V + Dt xi Under some assumptions over the family of paths (see Mun˜oz-Ruiz and Pares, 2007), it can be shown that the method can be written in the form (24) with Z 1 @F  (33) AðFðs; WL , W0 ÞÞ ðs; WL , W0 Þds, DðWL , WR Þ ¼ @s 0 Z 1 @F (34) DðWL , WR Þ + ¼ AðFðs, W0+ , WR ÞÞ ðs; W0+ ,WR Þds, @s 0 where W0 ¼ lim Vðx; WL ,WR Þ: x!0

3.2 Simple Riemann Solvers Let F be a family of paths in O. Let us suppose that, for every pair of states WL and WR 2 O, a finite number m  1 of speeds x0 ¼ ∞ < x1 < ⋯ < xm < xm + 1 ¼ +∞,

(35)

Path-Conservative Numerical Methods Chapter

6 143

and m  1 intermediate states W0 ¼ WL , W1 , …, Wm1 , Wm ¼ WR ,

(36)

are chosen, so that, if WL ¼ WR ¼ W, then Wj ¼ W for 0  j  m. The func tion V :   O  O 7! O given by

V ðv,WL ,WR Þ ¼ Wj if xj < v < xj + 1 is said to be simple Riemann solver (SRS) for (12) if it satisfies Z 1 m1 X @F xj + 1 ðWj + 1  Wj Þ ¼ AðFðs; WL , WR ÞÞ ðs; WL , WR Þ ds: @s 0 j¼0

(37)

(38)

The idea now is to proceed as in the Godunov method (32) by replacing the exact Riemann solver V by the approximate one V . The corresponding numerical method can be written in the form (24) with: 8Z 1 @F > > > AðFðs; WL , WR ÞÞ ðs; WL , WR Þ ds if xm < 0, > > @s > 0 > < X xj + 1 ðWj + 1  Wj Þ if x1 < 0 < xm , D ðWL , WR Þ ¼ > xj + 1 > > > > > : 0 if x1 > 0: (39) 8 0 if xm < 0, > > > > > > X > < xj + 1 ðWj + 1  Wj Þ if x1 < 0 < xm , + D ðWL ,WR Þ ¼ x >0 j + 1 > > > >Z 1 > > @F > : AðFðs; WL ,WR ÞÞ ðs; WL ,WR Þ ds if x1 > 0: @s 0 (40) It can be easily checked that (25) and (26) are satisfied. In particular, the easiest example of SRS is obtained if m ¼ 2, that corresponds to the extension to nonconservative hyperbolic systems of the wellknown HLL solver introduced by Harten, Lax, and van Leer for systems of conservation laws in Harten et al. (1983). In this case, the approximate Riemann solution consists of two waves of speed x1 ¼ SL, x2 ¼ SR linking three constant states WL, W*, WR: 8 WL if v  SL , > > < (41) V HLL ðv; WL , WR Þ ¼ W* if SL  v  SR , > > : WR if v  SR : The consistency condition (38) reduces in this case to

144 Handbook of Numerical Analysis

Z SL ðW*  WL Þ + SR ðWR  W*Þ ¼ 0

1

AðFðs; WL ,WR ÞÞ

@F ðs; WL , WR Þ ds, @s

and allows us to determine the intermediate state: Z 1 @F SR WR  SL WL  AðFðs; WL , WR Þ ðs; WL , WR Þ ds @s 0 W* ¼ : SR  S L

(42)

Note that, if the system is conservative, the standard HLL solver is recovered regardless of the chosen family of paths. In Castro Dı´az et al. (2013a) and Sa´nchez-Linares et al. (2016), other SRS have been introduced for hyperbolic nonconservative PDE system arising in turbidity current or Ripa model, respectively.

3.3 Roe Methods Roe methods are based on the following extension of a Roe linearization to the nonconservative case introduced in Toumi (1992): Definition 2. Given a family of paths F, a function AF : O  O 7! MNN ðÞ is called a Roe linearization if it verifies the following properties: l l l

for each WL, WR 2 O, AF(WL, WR) has N distinct real eigenvalues, AF(W, W) ¼ A(W) for every W 2 O, for any WL, WR 2 O, Z 1 @F AF ðWL , WR Þ ðWR  WL Þ ¼ AðFðs; WL ,WR ÞÞ ðs; WL , WR Þ ds: @s 0

(43)

Once the linearization has been chosen, the corresponding Roe scheme can be written in the form (24) with DðWL , WR Þ ¼ A F ðWL , WR Þ ðWR  WL Þ, DðWL , WR Þ + ¼ AF+ ðWL , WR Þ ðWR  WL Þ, where, as usual, 1  A F ðWL ,WR Þ ¼ KF ðWL ,WR Þ LF ðWL , WR Þ KF ðWL , WR Þ

(44)

being L F (WL, WR) the diagonal matrix whose coefficients are the positive/ negative part of the eigenvalues li(WL, WR), i ¼ 1, …, N, of the Roe matrix, and KF(WL, WR) a N  N matrix whose columns are associated eigenvectors. The following identity holds: 1 A F ðWL , WR Þ ¼ ðAF ðWL ,WR Þ  jAF ðWL ,WR ÞjÞ, 2

(45)

Path-Conservative Numerical Methods Chapter

6 145

jAF ðWL ,WR Þj ¼ KF ðWL ,WR Þ jLF ðWL , WR Þj KF ðWL , WR Þ1 :

(46)

where

Here, jLF ðWL , WR Þj is the diagonal matrix whose coefficients are the absolute value of the eigenvalues of AF(WL, WR). Using this expression, the numerical method can be rewritten as follows:  Dt  n Ai1=2 ðWin  Wi1 Þ + Ai + 1=2 ðWin+ 1  Win Þ 2Dx  Dt  n  Þ  Ai + 1=2 ðWin+ 1  Win Þ : Ai1=2 ðWin  Wi1 2Dx

Win + 1 ¼ Win 

(47)

In this form, it is clear that the second term in the right-hand side is a centred approximation of A(W)Wx and the third term is the numerical viscosity. It can be shown that any numerical method based on a complete approximate Riemann solver, i.e., a Riemann solver with N waves, is equivalent to a Roe method. As it happens for systems of conservation laws, Roe methods can produce nonentropy weak solutions in sonic points. The standard entropy-fix techniques derived for systems conservation laws can be adapted to the nonconservative case: see Harten and Hyman (1983), for example.

3.4

Functional Viscosity Matrix Methods

Given a Roe matrix AF(WL, WR) the computation of its absolute value or its positive and negative parts requires the explicit knowledge of the eigenstructure of the matrix. When an easy analytic expression is not available, as it is the case for the multilayer shallow water system or other geophysical models, the eigenvalues and eigenvectors of the matrix have to be numerically calculated at every intercell and at every time step, what makes Roe method computationally expensive. The same difficulty arises in the Osher– Solomon solver. We present here some ideas introduced in Castro et al. (2010), Castro Dı´az and Ferna´ndez-Nieto (2012), and Castro et al. (2014b) to obtain numerical methods that overcome this difficulty. The idea is to replace (45) by: 1  A~F ðWL ,WR Þ ¼ ðAF ðWL , WR Þ  QF ðWL ,WR ÞÞ, 2

(48)

where QF(WL, WR) is an approximation of the absolute value of the intermediate matrix easy to compute. The expression of the corresponding numerical method is like (47) replacing the absolute value of the intermediate matrix by its approximation Qi+1/2 that plays the role of a viscosity matrix. A rough approximation is given by the local Lax–Friedrichs (or Rusanov) method, in which:

146 Handbook of Numerical Analysis

QF ðWL , WR Þ ¼ max ðjli ðWL , WR Þj, i ¼ 1, …,NÞI,

(49)

being I the identity matrix. Note that the definition of QF(WL, WR) only requires an estimation of the largest wave speed in absolute value. However, this approach gives excessive numerical diffusion for the waves corresponding to the lower eigenvalues. The strategy is then to consider viscosity matrices of the form QF ðWL , WR Þ ¼ f ðAF ðWL , WR ÞÞ,

(50)

where f :  7!  satisfies the following properties: l l l

f ðxÞ  0, 8x 2 , f(x) is easy to evaluate, the graph of f(x) is close to the graph of jxj.

Moreover, if f ð0Þ > 0 no entropy-fix techniques are required to avoid the appearance of nonentropy discontinuities at the numerical solutions. The stability of the scheme is strongly related to the definition of the function f(x). In particular, let l1(Wi, Wi+1) < ⋯ < lN(Wi, Wi+1) be the eigenvalues of AF(Wi, Wi+1) and assume that an usual CFL condition holds: Dt max jlj ðWi , Wi + 1 Þj ¼ n  1, Dx i, j

(51)

then the resulting scheme is L∞ -stable if f(x) verifies the following condition (Castro Dı´az and Ferna´ndez-Nieto, 2012): f ðxÞ  jxj, 8 x 2 ½l1 ðWi , Wi + 1 Þ,lN ðWi , Wi + 1 Þ, 8 i 2 ,

(52)

i.e., the graph of the function f(x) must be above the one corresponding to the absolute value function in the interval containing the eigenvalues. At the beginning of the 1980s, Harten et al. (1983) proposed to choose f as the linear polynomial p(x) that interpolates jxj at the smallest and largest eigenvalue, which results in a considerable improvement of the local Lax– Friedrichs method. This idea, which is on the basis of the HLL method, has been improved later by several authors (see Toro, 2013 for a review). To our knowledge, the paper by Degond et al. (1999) is the first attempt to construct a simple approximation of jAj by means of a polynomial that approximates jxj without interpolation of the absolute value function at the exact eigenvalues. This approach has been extended to a general framework in Castro Dı´az and Ferna´ndez-Nieto (2012), where the so-called PVM (polynomial viscosity matrix) methods are defined in terms of viscosity matrices based on general polynomial evaluations of a Roe matrix. The idea is to consider viscosity matrices of the form:

Path-Conservative Numerical Methods Chapter i + 1=2

QF ðWi , Wi + 1 Þ ¼ Pr

6 147

ðAF ðWi , Wi + 1 Þ,

i + 1=2 Pr ðxÞ

where is a polynomial of degree r. A number of well-known schemes can be interpreted as PVM methods: this is the case for Roe, Lax–Friedrichs, Rusanov, HLL (Harten et al., 1983), FORCE (Toro and Billett, 2000), MUSTA (Galica et al., 2006; Toro and Titarev, 2006), etc. (see Castro Dı´az and Ferna´ndez-Nieto, 2012 for details). The numerical scheme introduced in Degond et al. (1999) and the Krylov–Riemann solver recently introduced in Torrilhon (2012) can be viewed as particular cases of PVM schemes as well. As an example, Table 3 shows the polynomial corresponding to Lax–Friedrichs, HLL, and FORCE schemes. In Morales de Luna et al. (2014), the relation between SRS and PVM methods is analyzed. It has been shown that every PVM method can be interpreted as a SRS provided that it is based on a polynomial that interpolates the absolute value function at some points. Furthermore, the converse is true under some technical assumptions. Besides its theoretical interest, this relation provides a useful tool to investigate the properties of some well-known numerical methods that are particular cases of PVM methods, as the analysis of certain properties (like positivity preserving) is easier for SRS methods. Besides the interpretation of well-known numerical schemes as PVM, this framework allows for the development of new ones. For instance, in Ferna´ndez-Nieto et al. (2011) a numerical method based on a polynomial that interpolates three values (the largest and lowest eigenvalues and the maximum of the intermediate ones) has been derived. This numerical method gives excellent results for the two-layer shallow water model. Another interesting family of PVM schemes based on Chebyshev polynomials, which provide optimal uniform approximations to the absolute value function has been proposed in Castro et al. (2014b).

TABLE 3 Some Well-Known Solvers as PVM Schemes Scheme

Polynomial

Lax–Friedrichs

P0(x) ¼ a0

HLL

P1(x) ¼ a0 + a1x

FORCE

P2(x) ¼ a0 + a2x2

Coefficients a0 ¼

Dx Dt

i + 1=2 i + 1=2 j  l1 jlN j i + 1=2 i + 1=2 lN  l1 i + 1=2 i + 1=2 jl j  jl1 j a1 ¼ Ni + 1=2 i + 1=2  l1 lN

a0 ¼

a0 ¼

i + 1=2

lN

i + 1=2

jl1

Dx Dt , a2 ¼ 2Dt 2Dx

148 Handbook of Numerical Analysis

A natural extension of the PVM methods consists in considering rational functions to approach the absolute value, since these functions provide more accurate approximations in the uniform norm of this function. Specifically, in Castro et al. (2014b) two families of rational viscosity matrix (RVM) methods have been considered, based on the so-called Newman and Halley rational approximations of the absolute value function. Another interesting application of functional viscosity methods is the derivation of new flux-limiter type schemes similar to the WAF (weighted average flux) method introduced by Toro (1989). In Castro Dı´az et al. (2014) a natural extension of the original WAF method has been proposed based on a nonlinear combination of two PVM methods.

3.5 Other Path-Conservative Methods In Castro et al. (2013) the entropy conservative and entropy-stable methods introduced in Tadmor (1987) have been extended to nonconservative systems within the framework of path-conservative methods. Entropy-stable path-conservative methods satisfy a semidiscretized in time entropy inequality consistent with (21). The Osher–Solomon scheme (Osher and Solomon, 1982) has been extended to nonconservative system in Dumbser and Toro (2010, 2011). In this generalization, the path-dependent integrals are numerically approximated by means of a Gauss–Legendre quadrature formula which leads to a scheme much simpler than the original one (to the best of our knowledge Osher schemes with quadrature formula were first considered in Dubois (1987) in the framework of conservative systems). Recently, an alternative version of this solver has been presented, in which the absolute value matrices are approximated by means of appropriate functional evaluations of A(W) at the quadrature points (see Castro et al., 2016 for more details). Let us remark finally that the path-conservative methods introduced in this section may be extended to multidimensional problems of the form Wt +

d X

Ai ðWÞWxi , x ¼ ðx1 , …,xd Þ 2 D  d , t 2 ð0, TÞ,

(53)

i¼1

following the usual procedure: the domain is split into finite volume or cells with a polyhedral shape, and a 1d scheme is used at every edge to approach the solution of the 1d Riemann problems corresponding to the normal projection of the system.

4 HIGH-ORDER SCHEMES BASED ON RECONSTRUCTION OF STATES The goal of this section is to present the general expression of a high-order method for (12) based on the use of a first-order path-conservative numerical scheme and a reconstruction operator.

Path-Conservative Numerical Methods Chapter

6 149

Let us denote by W i ðtÞ the cell average of the solution W of (12) over the cell Ii at time t, Z 1 xi + 1=2 W i ðtÞ ¼ Wðx,tÞ dx: Dx xi1=2 The following equation can be easily obtained from (12): Z 1 xi + 1=2 0 Wi ¼   AðWðx, tÞÞWx ðx, tÞ dx: Dx xi1=2

(54)

Let us consider a first-order path-conservative numerical scheme (24) and a reconstruction operator of order s, i.e., an operator that associates to a given + sequence {Wi} two new sequences {W i+1/2}, {Wi+1/2} in such a way that, whenever Z 1 WðxÞ dx 8 i 2  Wi ¼ Dx Ii for some smooth function W, then Wi+ 1=2 ¼ Wðxi + 1=2 Þ + OðDxs Þ 8 i 2 :

(55)

In practice, the reconstructed states W i+1/2 are calculated as follows; given a sequence of cell averages {Wi} of values at the cells, an approximation function is calculated at every cell Ii using the values Wj at a stencil, Pi ðxÞ ¼ Pi ðx; Wil , …, Wi + r Þ, with l, r two natural numbers. The reconstructions W i+1/2 are then calculated by taking the limits of these functions at the intercells: + , lim Pi ðxÞ ¼ Wi1=2

+ x!xi1=2

lim Pi ðxÞ ¼ Wi+ 1=2 :

x!x i + 1=2

(56)

The functions Pi are usually calculated by means of interpolation or approximation techniques. This is the case for ENO, WENO, CWENO, or hyperbolic reconstructions (see Dumbser and K€aser, 2007; Dumbser et al., 2007, 2008a; Harten et al., 1997; Marquina, 1994; Shu, 1997; Shu and Osher, 1989, among others). According to Pares (2006), we consider the semidiscrete method: ! Z xi + 1=2 1 dPti +  t 0 ðxÞ dx , (57) Di1=2 + Di + 1=2 + Wi ¼  A½Pi ðxÞ dx Dx xi1=2 where   + D i + 1=2 ¼ D ðWi + 1=2 ðtÞ, Wi + 1=2 ðtÞÞ,

(58)

{W i+1/2(t)} represent the reconstructed states associated to {Wi(t)}, and Pti ðxÞ ¼ Pi ðx; Wil ðtÞ, …, Wi + r ðtÞÞ:

(59)

150 Handbook of Numerical Analysis

In (57) the approximation functions are used to approximate the regular part of the weak integral in (54) and the terms D i1/2 are used again to split the Dirac measures corresponding to the discontinuities at the intercells. Notice that (57)–(59) is a system of ordinary differential equations to be solved by using a high-order numerical solver with good properties, as the TVD Runge–Kutta schemes: see Gottlieb and Shu (1998) and Shu and Osher (1988). Observe that there is an important difference between the conservative and the nonconservative case: while in the conservative case the numerical scheme is independent of the functions Pti chosen at the cells (only the property (55) is important), this is not the case for nonconservative systems. As a consequence, while the numerical scheme has order s for conservative systems, in the case of the scheme (57) the order is a ¼ min ðs, s1 ,s2 Þ, where s1 and s2 are the order of accuracy of the reconstruction and its derivative inside the cell: Pi ðxÞ ¼ WðxÞ + OðDxs1 Þ 8 x 2 Ii , P0i ðxÞ ¼ W 0 ðxÞ + OðDxs2 Þ 8 x 2 Ii : For the usual reconstruction techniques one has s2 < s1 < s and the order of (57) is thus s2 for nonconservative systems and s for systems of conservation laws. Therefore, a loss of accuracy may be observed when a technique of reconstruction is applied to a nonconservative problem. This effect has been detected and numerically verified for WENO-Roe methods in Castro et al. (2006). In Noelle et al. (2006) a very interesting technique has been introduced to avoid the explicit computation of P0i ðxÞ so that the expected order of accuracy is increased to min ðs, s1 Þ. This technique is based on the use of the trapezoidal rule and Romberg extrapolation for the numerical approximation of the integrals in (57). In Castro et al. (2012) a high-order finite volume central scheme on staggered grids for general hyperbolic systems, including those not admitting a conservation form, has been introduced. The method is based on a path-conservative method on staggered cells and central Runge–Kutta time discretization. In Castro et al. (2014a) a second-order path-conservative central-upwind scheme for the two-mode shallow water system was proposed. ADER-FV and ADER-DG approaches proposed by Titarev and Toro (2005) and Dumbser and Munz (2005) are two other alternatives to construct high-order schemes. In their original formulations, both approaches use the governing PDE itself in its strong differential form to achieve high order of accuracy in time. This is done by means of the Cauchy–Kowalevski procedure that substitutes time derivatives with space derivatives via successive differentiation of the governing PDE with respect to space and time. This procedure may become very cumbersome for general nonlinear hyperbolic PDE systems. In Dumbser et al. (2008a,b) an entirely numerical approach was presented that

Path-Conservative Numerical Methods Chapter

6 151

replaces the Cauchy–Kowalevski procedure by a local weak formulation of the governing PDE in space–time. The extension to nonconservative systems has been considered in Dumbser et al. (2009). The high-order extension of entropy stable schemes presents some extra difficulties. The high-order extension for system of conservation laws has been discussed in Fjordholm et al. (2012). Those schemes, named TeCNO schemes, are based on the following ingredients: a high-order accurate entropy conservative flux, a suitable numerical diffusion term, and ENO reconstructions of the entropy variables. Its extension to nonconservative systems is a work in progress.

5

WELL-BALANCED SCHEMES

As it was said previously, when dealing with systems in the form (1), special care has to be taken when solving solutions that are close to a stationary solution. As it was mentioned in the introduction, the well-balanced property of the numerical method is crucial in these cases. In this section, first we state a precise definition of well-balanced method and next the well-balanced properties of the numerical methods introduced in the previous section are analyzed. Suppose that a PDE system of the form (12) has nontrivial stationary solutions and let W(x) be a regular one. Then A(W(x))Wx(x) ¼ 0 for all x, which means that 0 is an eigenvalue of A(W(x)) and Wx(x) is an associated eigenvector for every x. Therefore, x 7! W(x) can be interpreted as a parametrization of an integral curve of a linearly degenerate characteristic field whose corresponding eigenvalue takes the value 0 through the curve. Let us introduce the set G of all the integral curves g of a linearly degenerate field of A(W) such that the corresponding eigenvalue vanishes on G. Once this set has been defined, we can state the general definition of well-balanced method: Definition 3. A numerical scheme (24) is said to be well balanced if, given any pair of states WL and WR belonging to g 2 G one has D ðWL , WR Þ ¼ 0:

(60)

Observe that, if the numerical method is applied to the point values of a stationary solution {W(xi)}, every two neighbour values belong to the same integral curve defined by the stationary solution, and then Win ¼ Wðxi Þ, for every i. Let us assume that WL, WR are two states belonging to the same integral curve g 2 G. If (12) is a system of conservation law, i.e., if A(W) is the Jacobian of a flux function, then the function ( WL , for x < 0, (61) Wðx,tÞ ¼ WR , for x > 0, would be an admissible weak solution: a stationary contact discontinuity. In effect, the fact of belonging to the same integral curve is equivalent to the

152 Handbook of Numerical Analysis

preservation of the corresponding Riemann invariant. Although in the nonconservative case one can decide to choose a notion of weak solution according to which (61) is not an admissible weak solution, we want it to be a weak solution, as this will be the basis to construct well-balanced numerical methods. Therefore, the family of paths has to be chosen so that (61) satisfies the generalized Rankine–Hugoniot condition (19). To ensure this, it is enough to require to the family of paths the following property: (WB) Given two states WL and WR belonging to the same integral curve g 2 G of a linearly degenerate field, the path F( ;WL, WR) is a parametrization of the arc of g linking WL and WR. If the family of paths verifies (WB), the definition of well-balanced method can be reformulated as follows: Definition 4. A numerical scheme (24) is said to be well balanced for a curve g 2 G if the stationary contact discontinuities (61) linking two states WL and WR belonging to g are preserved. Let us return now to the particular case of (1) and, for the sake of simplicity, we shall assume B(w) ¼ 0 in (1), that is, we are in the case of a system of conservation laws with source term or balance law: wt + FðwÞx ¼ SðwÞsx :

(62)

Remember that the system can be rewritten in the form (12) with the choices: ð63Þ where J is the Jacobian of the flux F. Let us assume that the matrix J(w) has N real eigenvalues l1 ðwÞ < ⋯ < lN ðwÞ,

(64)

and associated eigenvectors rj(w), j ¼ 1, …, N. If these eigenvalues do not vanish, the corresponding system (12) is strictly hyperbolic: A(W) has N + 1 distinct real eigenvalues l1 ðwÞ,…, lN ðwÞ,0,

(65)

R1 ðwÞ,…, RN + 1 ðwÞ,

(66)

with associated eigenvectors

given by Ri ðwÞ ¼



ri ðwÞ 0

"

 , i ¼ 1, …, N;

RN + 1 ðwÞ ¼

JðwÞ1 SðwÞ 1

# :

(67)

Clearly, the (N + 1)-th field is linearly degenerate. The set G is composed in this case by the integral curves of the linearly degenerate field RN+1, i.e. the integral curves of the o.d.e. system

Path-Conservative Numerical Methods Chapter

dW ¼ RN + 1 ðWÞ, ds

6 153

(68)

or, equivalently, choosing s as the parameter: dw ¼ JðwÞ1 SðwÞ, ds

(69)

d FðwÞ ¼ SðwÞ, ds

(70)

what implies

which is a reparametrization of the equation satisfied by the stationary solutions d ds FðwÞ ¼ SðwÞ : dx dx

(71)

Once the problem has been reformulated, a family of paths satisfying (WB) has to be chosen. The following notation will be used:     wL wR WL ¼ , WR ¼ (72) sL sR for the states WL and WR, and

"

Fðs;WL , WR Þ ¼

Fw ðs;WL ,WR Þ Fs ðs; WL ,WR Þ

# ,

(73)

where Fw and Fs represent, respectively, the first N components and the last one of the path linking them. A possible choice can be defined as follows: l

Given a pair of states WL, WR, solve the corresponding Riemann problem with a solution that is composed by simple curves of the system of conservation laws wt + FðwÞx ¼ 0,

l

l

(74)

evolving in regions where s is constant, and a stationary contact discontinuity placed at x ¼ 0 related to the zero eigenvalue. Let us denote by + + W0 ¼ ½w 0 , sL  and W0 ¼ ½w0 , sR  the limits of the solution at the left and at the right of x ¼ 0. Consider the path composed by – The straight segment linking WL to W0 . – The arc of the integral curve g 2 G linking W0 to W0+ . – The straight segment linking W0+ to WR. Reparametrize the union of the three curves with a parameter s 2 [0, 1].

This family of paths satisfies (WB). Moreover, if w(x, t) is a weak solution of (74), then W ¼ [w, s]T, where s is constant, is an admissible solution of (62), as expected.

154 Handbook of Numerical Analysis

Remark 1. Given two states WL, WR that belong to the same integral curve g 2 G, the path linking them is a reparametrization of that curve. Therefore, by integrating (69) and (70), the following equality holds: wR  wL ¼ Z 1

J 1 ðFw ðs;WL , WR ÞÞSðFw ðs;WL , WR ÞÞ

0

Z

1

FðwR Þ  FðwL Þ 

SðFw ðs;WL ,WR ÞÞ

0

dFs ðs; WL , WR Þds, ds

dFs ðs; WL , WR Þds ¼ 0: ds

(75)

(76)

In this section, it will be assumed that the integrals in (75) and (76) can be exactly computed.

5.1 Well-Balanced Property for SRSs In view of Definition 4, the proof of the following result is trivial: Proposition 1. Any numerical method based on a SRS that is exact for stationary contact discontinuities is well balanced. In particular, Godunov method is well balanced. For this particular case, it can be easily checked from the construction of the family of paths that, dropping the s-component—which is trivial—the method writes as follows: wni + 1 ¼ wni +

 Dt  + Fðwi1=2 Þ  Fðw Þ i + 1=2 , Dx

(77)

where w i+1/2 are the limits at the right and at the left of x ¼ 0 of the solution of the Riemann problem corresponding to the intercell xi+1/2. The well-balanced method (9) considered in the introduction is nothing but the Godunov method associated to Eq. (5) obtained by following the ansatz described in this section. Let us now consider a SRS V ðv;WL , WR Þ for (62) consisting of m velocities (including 0) x0 ¼ ∞ < x1 < …xk1 < xk ¼ 0 < xk + 1 < xm < xm + 1 ¼ +∞, and m intermediate states wj for j ¼ 1, …, m such that 8" # wj > > > for xj < v < xj + 1 and j  k  1, > > > < sL V ðv,WL , WR Þ ¼ > " # > wj > > > > for xj < v < xj + 1 and j  k: : sR The consistency condition (38) writes now as follows:

(78)

(79)

Path-Conservative Numerical Methods Chapter m1 X

Z xj + 1 ðwj + 1  wj Þ ¼ FðwR Þ  FðwL Þ 

j¼0

0

1

SðFw Þ

dFs ds, ds

6 155

(80)

where the s-component has been dropped as it reduces to a trivial equality and the dependence of the paths on s, WL, WR has been also dropped for the sake of shortness. This scheme will be well-balanced provided that w1 ¼ ⋯ ¼ wk1 ¼ wL and wk ¼ ⋯ ¼ wm ¼ wR whenever the states WL and WR lay on a curve g 2 G.

5.2

Well-Balanced HLL Scheme

The HLL scheme (41) does not verify the well-balanced property in general. Nevertheless, it can be generalized in the following form 8 ½wL , sL T if v  SL , > > > >

> > < w L , sL T if SL  v  0, HLL (81) V ðv;WL ,WR Þ ¼

T > > s if 0  v  S , w , > R R R > > > : T ½wR , sR  if v  SR : where the states w L , and w R should be such that (38) is granted, i.e. Z 1 dFs ds: SL ðw L  wL Þ + SR ðwR  w R Þ ¼ FðwR Þ  FðwL Þ  SðFw Þ ds 0

(82)

To obtain a well-balanced scheme, one should have w L ¼ wL and w R ¼ wR whenever WL and WR belong to g 2 G. If this happens, taking into account (75), the following equality holds: Z 1 dFs (83) ds: J 1 ðFw ÞSðFw Þ w L  wL + wR  w R ¼ wR  wL  ds 0 Imposing (82) and (83) for any pair of states, some easy computations lead to the definitions: Z 1 SR dFs (84) ds, J 1 ðFw ÞSðFw Þ wL ¼ w  SR  S L 0 ds Z 1 SL dFs (85) wR ¼ w  ds, J 1 ðFw ÞSðFw Þ S R  SL 0 ds where  Z 1 dFs ds SR wR  SL wL  FðwR Þ  FðwL Þ  SðFw Þ ds 0 , w ¼ SR  S L

(86)

156 Handbook of Numerical Analysis

is the intermediate state of the HLL method (41). Therefore, this approximate Riemann solver can be understood as a modification of the standard one obtained by modifying the intermediate state to the left and to the right of the zero wave.

5.3 Well-Balanced SRSs The previous idea can be easily generalized to define well-balanced SRS: let us suppose that, for any pair of states WL, WR, m velocities x1 < x2 < ⋯ < xk1 < xk ¼ 0 < xk + 1 < xk + 2 < ⋯ < xm

(87)

and m  1 states v1 ,v2 , …, vk1 ,vk , vm1 2 N can be chosen so that k1 X

vj +

j¼1

Z

m1 X j¼k + 1

m1 X

1

vj ¼ wR  wL 

JðFw Þ1 SðFw Þ

0

Z

1

xj vj ¼ FðwR Þ  FðwL Þ 

j¼1

SðFw Þ

0

dFs ds, ds

dFs ds, ds

(88)

(89)

and vj ¼ 0 for j 6¼ k whenever WR and WL belong to g 2 G. Then, define the states wj 2 N for j ¼ 0, 1, …, m as follows: w0 ¼ wL , wj ¼ vj + wj1 for j ¼ 1,…, k  1,

(90)

wm ¼ wR , wj ¼ wj + 1  vj for j ¼ m  1, …,k:

(91)

The velocities xj and the states wj define a well-balanced SRS. In Castro Dı´az et al. (2013a) and Sa´nchez-Linares et al. (2016) a wellbalanced SRS has been applied to hyperpycnal and Ripa model, respectively. A similar approach has been used in Berthon and Chalons (2016) to obtain a well-balanced scheme that preserves all the stationary solutions of the 1d shallow water system.

5.4 Roe Method The generalized Roe property (43) reduces in this case to: 2 3 Z 1 dFs ds 7 SðFw Þ 6 FðwR Þ  FðwL Þ  AF ðWL , WR Þ ðWR  WL Þ ¼ 4 ds 5: 0 0

(92)

If J(wL, wR) is a Roe matrix for the flux function F, i.e., if it satisfies JðwR  wL Þ ¼ FðwR Þ  FðwL Þ,

(93)

Path-Conservative Numerical Methods Chapter

6 157

and we define 8
st should be an admissible weak solution of the nonconservative hyperbolic system. An easy computation shows that V has to solve sV 0 + AðVÞ V 0 ¼ RV 00 :

(119)

By integrating (119) from ∞ to ∞ and taking into account the boundary conditions, we obtain the jump condition Z ∞ AðVðxÞÞ V 0 ðxÞ dx ¼ sðW +  W  Þ: ∞

If this jump condition is compared with the generalized Rankine–Hugoniot condition (19), it is clear that the good choice for the path connecting the states W and W+ would be, after a reparametrization, the viscous profile.

168 Handbook of Numerical Analysis

Observe that, while for systems of conservation laws, the jump condition reduces to the standard Rankine–Hugoniot one regardless of the form of the diffusion term, now the jump condition depends explicitly on the viscous profile that, in turns, depend on the specific choice of the matrix R. This observation is the key point to understand the fact that many numerical methods fail in converging to the correct weak solutions: the limits of the numerical solutions satisfy a jump condition which is related to the numerical viscosity of the method and not to the physically relevant one. Of course, this phenomenon affects to any numerical method in which the small scale effects (the vanishing diffusion and/or dispersion) are not taken into account, regardless of whether it is path-conservative or not. For instance, even the Godunov method based on the right weak solutions of the Riemann problems fails, in general, to converge to the right solution: this is due to the numerical viscosity introduced in the averaging step. In order to overcome this difficulty, one could use viscosity-free methods based on Random Choice, as Glimm or front-tracking methods; or controlled viscosity methods based on the equivalent equation (see Beljadid et al., 2016; Karni, 1992); or use methods that control the entropy losses across discontinuities like nonlinear projection methods (see Berthon and Coquel, 2007); or methods based on kinetic relations (see Berthon et al., 2012; LeFloch and Mohammadian, 2008), etc. The interested reader is referred to LeFloch and Mishra (2014) and the references therein for a detailed discussion on this topic. Let us mention that, even in the case in which jump relations are explicitly given by the physics of the problem, the design of numerical methods converging to the correct weak solutions is still challenging: this is the case for the Kapila multiphase model that has been discretized in Abgrall and Kumar (2014) by a numerical method that is a hybridization of Roe and Glimm schemes. Unfortunately, many of these techniques are very difficult or very costly to apply to complex nonconservative systems as the two-layer shallow water model. Of course, some of these techniques can be used within the context of path-conservative methods. For instance, the entropy stable methods mentioned in Section 3.5 lead to a significant improvement of the convergence to the right weak solutions, when the numerical viscosity is adequately chosen: see Castro et al. (2008b). Let us conclude with some remarks: l

l

The difficulties of convergence to the right weak solutions is not always present. For instance, in systems of balance laws with continuous s there is no ambiguity in the definition of weak solution, and all the numerical methods discussed in Section 5 are expected to converge to them. The computation of viscous profiles may be a very difficult task. In that case, the family of straight segments is a sensible choice, as their

Path-Conservative Numerical Methods Chapter

l

6 169

corresponding jump conditions give a third-order approximation of the physically correct ones (see Castro Dı´az et al., 2013a). In many cases, the numerical results provided by different numerical methods are very close to each other, although all of them may be far from the right weak solutions. This fact is in good agreement with the results obtained in Chalmers and Lorin (2013) according to which the Hugoniot curve coincides up to third order (in the amplitude of the shock) when the matrix of the system and the viscosity matrix commute.

ACKNOWLEDGEMENTS We would like to thank to all the members of EDANYA group and their collaborators: the large body of work summarized here would not have been possible without the contribution of every one of them. This research has been partially supported by the Spanish Government and FEDER through Research projects MTM2015-70490-C2-1-R and MTM201570490-C2-2-R, Andalusian Government Research projects P11-FQM-8179 and P11RNM-7069.

REFERENCES Abgrall, R., De Santis, D., 2015. Linear and non-linear high order accurate residual distribution schemes for the discretization of the steady compressible Navier-Stokes equations. J. Comput. Phys. 283, 329–359. ISSN 0021-9991. http://dx.doi.org/10.1016/j. jcp.2014.11.031. http://www.sciencedirect.com/science/article/pii/S0021999114007931. Abgrall, R., Karni, S., 2010. A comment on the computation of non-conservative products. J. Comput. Phys. 229 (8), 2759–2763. ISSN 0021-9991. http://dx.doi.org/10.1016/j. jcp.2009.12.015. Abgrall, R., Kumar, H., 2014. Numerical approximation of a compressible multiphase system. Commun. Comput. Phys. 15 (5), 1237–1265. ISSN 1815-2406, 1991-7120. http://dx.doi. org/10.4208/cicp.110313.230913a. https://www.cambridge.org/core/journals/communications-incomputational-physics/article/numerical-approximation-of-a-compressible-multiphase-system/ C838C56FD10F93E016A38952366A934E. Abgrall, R., Santis, D., Ricchiuto, M., 2014. High-order preserving residual distribution schemes for advection-diffusion scalar problems on arbitrary grids. SIAM J. Sci. Comput. 36 (3), A955–A983. ISSN 1064-8275. http://dx.doi.org/10.1137/12090143X. Audusse, E., Bouchut, F., Bristeau, M.-O., Klein, R., Perthame, B., 2004. A fast and stable well-balanced scheme with hydrostatic reconstruction for shallow water flows. SIAM J. Sci. Comput. 25, 2050–2065. http://dx.doi.org/10.1137/S1064827503431090. Beljadid, A., LeFloch, P.G., Mishra, S., Pares, C., 2016. Schemes with well-controlled dissipation. Hyperbolic systems in nonconservative form. Commun. Comput. Phys. (to appear). Bermu´dez, A., Va´zquez, M.E., 1994. Upwind methods for hyperbolic conservation laws with source terms. Comput. Fluids 23 (8), 1049–1071. ISSN 0045-7930. http://dx.doi.org/ 10.1016/0045-7930(94)90004-3. Berthon, C., Chalons, C., 2016. A fully well-balanced, positive and entropy-satisfying Godunov-type method for the shallow-water equations. Math. Comput. 85 (299), 1281–1307. ISSN 0025-5718, 1088-6842. http://dx.doi.org/10.1090/mcom3045.

170 Handbook of Numerical Analysis Berthon, C., Coquel, F., 2007. Nonlinear projection methods for multi-entropies Navier-Stokes systems. Math. Comput. 76 (259), 1163–1194. ISSN 0025-5718. http://www.jstor.org/ stable/40234425. Berthon, C., Coquel, F., LeFloch, P.G., 2012. Why many theories of shock waves are necessary: kinetic relations for non-conservative systems. Proc. R. Soc. Edinburgh Sect. A 142, 1–37. Bouchut, F., 2004. Nonlinear stability of finite volume methods for hyperbolic conservation laws and well-balanced schemes for sources, Frontiers in Mathematics. Birkh€auser Verlag, Basel. ISBN 3-7643-6665-6, viii+135. Castro Dı´az, M.J., Ferna´ndez-Nieto, E., 2012. A class of computationally fast first order finite volume solvers: PVM methods. SIAM J. Sci. Comput. 34 (4), 2173–2196. ISSN 1064-8275, 1095-7197. http://dx.doi.org/10.1137/100795280. Castro Dı´az, M., Ferna´ndez-Nieto, E., Ferreiro, A., 2008. Sediment transport models in shallow water equations and numerical approach by high order finite volume methods. Comput. Fluids 37 (3), 299–316. ISSN 0045-7930. http://dx.doi.org/10.1016/j.compfluid.2007.07.017. Castro Dı´az, M.J., Ferna´ndez-Nieto, E.D., Morales de Luna, T., Narbona-Reina, G., Pares, C., 2013a. A HLLC scheme for nonconservative hyperbolic problems. Application to turbidity currents with sediment transport. ESAIM: Math. Model Num. 47 (1), 1–32. ISSN 0764583X, 1290-3841. http://dx.doi.org/10.1051/m2an/2012017. Castro Dı´az, M.J., Lo´pez-Garcı´a, J.A., Pares, C., 2013b. High order exactly well-balanced numerical methods for shallow water systems. J. Comput. Phys. 246, 242–264. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2013.03.033. Castro Dı´az, M.J., Ferna´ndez, E.D., Narbona-Reina, G., de la Asuncio´n, M., 2014. A second order PVM flux limiter method. Application to magnetohydrodynamics and shallow stratified flows. J. Comput. Phys. 262, 172–193. ISSN 0021-9991. http://dx.doi.org/10.1016/j. jcp.2013.12.059. http://www.sciencedirect.com/science/article/pii/S002199911400014X. Castro, M., Macı´as, J., Pares, C., 2001. A Q-scheme for a class of systems of coupled conservation laws with source term. Application to a two-layer 1-D shallow water system. ESAIM: Math. Model Num. 35 (1), 107–127. ISSN 0764-583X. Castro, M., Gallardo, J., Pares, C., 2006. High order finite volume schemes based on reconstruction of states for solving hyperbolic systems with nonconservative products. Applications to shallow-water systems. Math. Comput. 75 (255), 1103–1134. Castro, M.J., Chaco´n, T., Ferna´ndez, E.D., Pares, C., 2007. On well-balanced finite volume methods for non-conservative non-homogeneous hyperbolic systems. SIAM J. Sci. Comput. 29, 1093–1126. Castro, M., Ferna´ndez-Nieto, E., Ferreiro, A., Garcı´a-Rodrı´guez, J., Pares, C., 2008a. High order extensions of Roe schemes for two-dimensional nonconservative hyperbolic systems. J. Sci. Comput. 39 (1), 67–114. http://dx.doi.org/10.1007/s10915-008-9250-4. Castro, M.J., LeFloch, P.G., Mun˜oz-Ruiz, M.L., Pares, C., 2008b. Why many theories of shock waves are necessary: convergence error in formally path-consistent schemes. J. Comput. Phys. 227 (17), 8107–8129. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2008.05.012. http://www.sciencedirect.com/science/article/B6WHY-4SMNY18-1/2/a96e0bdf121ac346047 42fdc9165bd07. Castro, M.J., Lo´pez, J.A., Pares, C., 2008c. Well-balanced high order extensions of Godunov method for linear balance laws. SIAM J. Numer. Anal. 46, 1012–1039. Castro, M.J., Pardo, A., Pares, C., Toro, E.F., 2010. On some fast well-balanced first order solvers for nonconservative systems. Math. Comput. 79 (271), 1427–1472. ISSN 0025-5718. http:// dx.doi.org/10.1090/S0025-5718-09-02317-5.

Path-Conservative Numerical Methods Chapter

6 171

Castro, M.J., Pares, C., Puppo, G., Russo, G., 2012. Central schemes for nonconservative hyperbolic systems. SIAM J. Sci. Comput. 34 (5), 523–558. http://dx.doi.org/10.1137/110828873. Castro, M.J., Fjordholm, U.S., Mishra, S., Pares, C., 2013. Entropy conservative and entropy stable schemes for nonconservative hyperbolic systems. SIAM J. Numer. Anal. 51 (3), 1371–1391. Castro, M.J., Cheng, Y., Chertock, A., Kurganov, A., 2014a. Solving two-mode shallow water equations using finite volume methods. Commun. Comput. Phys. 15 (5), 1323–1354. http:// dx.doi.org/10.4208/cicp.180513.230514a. Castro, M.J., Gallardo, J.M., Marquina, A., 2014b. A class of incomplete Riemann solvers based on uniform rational approximations to the absolute value function. J. Sci. Comput. 60 (2), 363–389. Castro, M.J., Gallardo, J.M., Marquina, A., 2016. Approximate Osher-Solomon schemes for hyperbolic systems. Appl. Math. Comput. 272, Part 2, 347–368. ISSN 0096-3003. http://dx.doi.org/10.1016/j. amc.2015.06.104. http://www.sciencedirect.com/science/article/pii/S0096300315008851. Cauret, J.J., Colombeau, J.F., Le Roux, A.Y., 1989. Discontinuous generalized solutions of nonlinear nonconservative hyperbolic equations. J. Math. Anal. Appl. 139 (2), 552–573. ISSN 0022-247X. http://dx.doi.org/10.1016/0022-247X(89)90129-7. Chaco´n Rebollo, T., Domı´nguez Delgado, A., Ferna´ndez Nieto, E.D., 2003. A family of stable numerical solvers for the shallow water equations with source terms. Comput. Methods Appl. Mech. Eng. 192 (1–2), 203–225. ISSN 0045-7825. http://dx.doi.org/10.1016/S0045-7825(02) 00551-0. Chaco´n Rebollo, T., Domı´nguez Delgado, A., Ferna´ndez Nieto, E.D., 2004. Asymptotically balanced schemes for non-homogeneous hyperbolic systems. Application to the shallow water equations. C. R. Math. 338 (1), 85–90. ISSN 1631-073X. http://dx.doi.org/10.1016/j. crma.2003.11.008. Chalmers, N., Lorin, E., 2013. On the numerical approximation of one-dimensional nonconservative hyperbolic systems. J. Comput. Sci. 4 (1–2), 111–124. ISSN 1877-7503. Dal Maso, G., Lefloch, P.G., Murat, F., 1995. Definition and weak stability of nonconservative products. J. Math. Pures Appl. 74 (6), 483–548. ISSN 0021-7824. De Vuyst, F., 1994. Schemas nonconservatifs et schemas cinetiques pour la simulation numerique d’ecoulements hypersoniques non visqueux en desequilibre thermochimique. Text, These de Doctorat de l’Universite Paris VI. Degond, P., Peyrard, P.-F., Russo, G., Villedieu, P., 1999. Polynomial upwind schemes for hyperbolic systems. C. R. Acad. Sci. I-Math. 328 (6), 479–483. ISSN 0764-4442. http://dx.doi.org/ 10.1016/S0764-4442(99)80194-3. Desveaux, V., Zenk, M., Berthon, C., Klingenberg, C., 2016a. A well-balanced scheme to capture non-explicit steady states in the Euler equations with gravity. Int. J. Numer. Meth. Fluids 81 (2), 104–127. ISSN 1097-0363. http://dx.doi.org/10.1002/fld.4177. Desveaux, V., Zenk, M., Berthon, C., Klingenberg, C., 2016b. Well-balanced schemes to capture non-explicit steady states: Ripa model. Math. Comput. 85 (300), 1571–1602. ISSN 00255718, 1088-6842. http://dx.doi.org/10.1090/mcom/3069. http://www.ams.org/mcom/2016-85300/S0025-5718-2016-03069-0/. Dubois, F., 1987. Boundary conditions and the Osher scheme for the Euler equations of gas dynamic. Tech. Report, Internal report no. 170. Centre de Mathematiques Appliquees de  l’Ecole Polytechnique. Dumbser, M., K€aser, M., 2007. Arbitrary high order non-oscillatory finite volume schemes on unstructured meshes for linear hyperbolic systems. J. Comput. Phys. 221 (2), 693–723. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2006.06.043.

172 Handbook of Numerical Analysis Dumbser, M., Munz, C.-D., 2005. Building blocks for arbitrary high order discontinuous Galerkin schemes. J. Sci. Comput. 27 (1–3), 215–230. ISSN 0885-7474, 1573-7691. http://dx. doi.org/10.1007/s10915-005-9025-0. http://link.springer.com/article/10.1007/s10915-005-9025-0. Dumbser, M., Toro, E.F., 2010. A simple extension of the Osher Riemann solver to non-conservative hyperbolic systems. J. Sci. Comput. 48 (1–3), 70–88. ISSN 0885-7474, 1573-7691. http://dx.doi.org/10.1007/s10915-010-9400-3. Dumbser, M., Toro, E.F., 2011. On universal Osher-type schemes for general nonlinear hyperbolic conservation laws. Commun. Comput. Phys. 10 (3), 635–671. ISSN 1991-7120. http://dx.doi. org/10.4208/cicp.170610.021210a. http://journals.cambridge.org/article_S1815240600001729. Dumbser, M., K€aser, M., Titarev, V.A., Toro, E.F., 2007. Quadrature-free non-oscillatory finite volume schemes on unstructured meshes for nonlinear hyperbolic systems. J. Comput. Phys. 226 (1), 204–243. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2007.04.004. Dumbser, M., Balsara, D.S., Toro, E.F., Munz, C.-D., 2008a. A unified framework for the construction of one-step finite volume and discontinuous Galerkin schemes on unstructured meshes. J. Comput. Phys. 227 (18), 8209–8253. ISSN 0021-9991. http://dx.doi.org/10.1016/ j.jcp.2008.05.025. Dumbser, M., Enaux, C., Toro, E.F., 2008b. Finite volume schemes of very high order of accuracy for stiff hyperbolic balance laws. J. Comput. Phys. 227 (8), 3971–4001. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2007.12.005. Dumbser, M., Castro, M., Pares, C., Toro, E.F., 2009. ADER schemes on unstructured meshes for nonconservative hyperbolic systems: applications to geophysical flows. Comput. Fluids 38 (9), 1731–1748. ISSN 0045-7930. http://dx.doi.org/10.1016/j.compfluid.2009.03.008. Dumbser, M., Hidalgo, A., Castro Dı´az, M.J., Pares, C., Toro, E.F., 2010. FORCE schemes on unstructured meshes II: nonconservative hyperbolicsystems. Comput. Method Appl. M. 199 (9–12), 625–647. Ferna´ndez-Nieto, E.D., Bouchut, F., Bresch, D., Castro Dı´az, M.J., Mangeney, A., 2008. A new Savage-Hutter type model for submarine avalanches and generated tsunami. J. Comput. Phys. 227 (16), 7720–7754. ISSN 0021-9991. Ferna´ndez-Nieto, E.D., Castro, M.J., Pares, C., 2011. On an intermediate field capturing Riemann solver based on a parabolic viscosity matrix for the two-layer shallow water system. J. Sci. Comput. 48 (1–3), 117–140. Ferna´ndez-Nieto, E.D., Gallardo, J.M., Vigneaux, P., 2014. Efficient numerical schemes for viscoplastic avalanches. Part 1: The 1D case. J. Comput. Phys. 264 (1), 55–90. Fjordholm, U., Mishra, S., Tadmor, E., 2012. Arbitrarily high-order accurate entropy stable essentially nonoscillatory schemes for systems of conservation laws. SIAM J. Numer. Anal. 50 (2), 544–573. ISSN 0036-1429. http://dx.doi.org/10.1137/110836961. http://epubs.siam.org/doi/ abs/10.1137/110836961. Galica, G.N., Heuer, N., Rodrı´guez, R., Toro, E.F., 2006. MUSTA: A multi-stage numerical flux. Appl. Numer. Math. 56 (10), 1464–1479. ISSN 0168-9274. http://dx.doi.org/10.1016/j. apnum.2006.03.022. http://www.sciencedirect.com/science/article/pii/S0168927406000766. Goatin, P., LeFloch, P.G., 2004. The Riemann problem for a class of resonant hyperbolic systems of balance laws. Ann. Inst. H. Poincar Anal. Non Linaire 21 (6), 881–902. ISSN 0294-1449. http://dx.doi.org/10.1016/j.anihpc.2004.02.002. Gosse, L., 2000. A well-balanced flux-vector splitting scheme designed for hyperbolic systems of conservation laws with source terms. Comput. Math. Appl. 39 (9–10), 135–159. ISSN 08981221. http://dx.doi.org/10.1016/S0898-1221(00)00093-6. Gosse, L., 2001. A well-balanced scheme using non-conservative products designed for hyperbolic systems of conservation laws with source terms. Math. Models Methods Appl. Sci. 11 (2), 339–365. ISSN 0218-2025.

Path-Conservative Numerical Methods Chapter

6 173

Gosse, L., 2002. Localization effects and measure source terms in numerical schemes for balance laws. Math. Comput. 71 (238), 553–582 (electronic). ISSN 0025-5718. Gottlieb, S., Shu, C.-W., 1998. Total variation diminishing Runge-Kutta schemes. Math. Comp. Amer. Math. Soc. 67 (221), 73–85. ISSN 0025-5718, 1088-6842. http://dx.doi.org/10.1090/ S0025-5718-98-00913-2. Greenberg, J.M., Leroux, A.Y., 1996. A well-balanced scheme for the numerical processing of source terms in hyperbolic equations. SIAM J. Numer. Anal. 33 (1), 1–16. ISSN 0036-1429. Greenberg, J.M., LeRoux, A.Y., Baraille, R., Noussair, A., 1997. Analysis and approximation of conservation laws with source terms. SIAM J. Numer. Anal. 34 (5), 1980–2007. Harten, A., Hyman, J.M., 1983. Self adjusting grid methods for one-dimensional hyperbolic conservation laws. J. Comput. Phys. 50 (2), 235–269. ISSN 0021-9991. http://dx.doi.org/ 10.1016/0021-9991(83)90066-9. Harten, A., Lax, P., Leer, B., 1983. On upstream differencing and Godunov-type schemes for hyperbolic conservation laws. SIAM Rev. 25 (1), 35–61. ISSN 0036-1445. http://dx.doi. org/10.1137/1025002. http://epubs.siam.org/doi/abs/10.1137/1025002. Harten, A., Engquist, B., Osher, S., Chakravarthy, S.R., 1997. Uniformly high order accurate essentially non-oscillatory schemes, III. J. Comput. Phys. 131 (1), 3–47. ISSN 0021-9991. http://dx.doi.org/10.1006/jcph.1996.5632. K€appeli, R., Mishra, S., 2014. Well-balanced schemes for gravitationally stratified media. In: ASTRONUM 2014 proceedings. Karni, S., 1992. Viscous shock profiles and primitive formulations. SIAM J. Numer. Anal. 29 (6), 1592–1609. ISSN 0036-1429. http://dx.doi.org/10.1137/0729092. http://epubs.siam.org/doi/ abs/10.1137/0729092. LeFloch, P.G., 1989. Shock waves for nonlinear hyperbolic systems in nonconservative form. Institute for Mathematics and its Applications, Minneapolis (Preprint no. 593). LeFloch, P.G., Mishra, S., 2014. Numerical methods with controlled dissipation for small-scale dependent shocks. Acta Numer. 23, 743–816. ISSN 1474-0508. http://dx.doi.org/10.1017/ S0962492914000099. LeFloch, P.G., Mohammadian, M., 2008. Why many theories of shock waves are necessary: kinetic functions, equivalent equations, and fourth-order models. J. Comp. Phys 227, 4162–4189. LeVeque, R.J., 1998. Balancing source terms and flux gradients in high-resolution Godunov methods: the quasi-steady wave-propagation algorithm. J. Comput. Phys. 146 (1), 346–365. ISSN 0021-9991. Luka´cˇova´-Medvid’ova´, M., Noelle, S., Kraft, M., 2007. Well-balanced finite volume evolution Galerkin methods for the shallow water equations. J. Comput. Phys. 221 (1), 122–147. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2006.06.015. Marquina, A., 1994. Local piecewise hyperbolic reconstruction of numerical fluxes for nonlinear scalar conservation laws. SIAM J. Sci. Comput. 15 (4), 892–915. ISSN 1064-8275. http://dx. doi.org/10.1137/0915054. http://epubs.siam.org/doi/abs/10.1137/0915054. Morales de Luna, T., Castro Dı´az, M.J., Pares, C., Ferna´ndez Nieto, E.D., 2009. On a shallow water model for the simulation of turbidity currents. Commun. Comput. Phys. 6 (4), 848–882. Morales de Luna, T., Castro Dı´az, M.J., Pares, C., 2014. Relation between PVM schemes and simple Riemann solvers. Numer. Methods Partial Differ. Equ. 30 (4), 1315–1341. ISSN 10982426. http://dx.doi.org/10.1002/num.21871. Mun˜oz-Ruiz, M.L., Pares, C., 2007. Godunov method for nonconservative hyperbolic systems. ESAIM: Math. Model Num. 41 (1), 169–185. M€ uller, L.O., Pares, C., Toro, E.F., 2013. Well-balanced high-order numerical schemes for one-dimensional blood flow in vessels with varying mechanical properties. J. Comput. Phys. 242, 53–85. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2013.01.050.

174 Handbook of Numerical Analysis Munkejord, S., Evje, S., Flatten, T., 2009. A MUSTA scheme for a nonconservative two-fluid model. SIAM J. Sci. Comput. 31 (4), 2587–2622. ISSN 1064-8275. http://dx.doi.org/10.1137/080719273. Noelle, S., Pankratz, N., Puppo, G., Natvig, J.R., 2006. Well-balanced finite volume schemes of arbitrary order of accuracy for shallow water flows. J. Comput. Phys. 213 (2), 474–499. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2005.08.019. Noelle, S., Xing, Y., Shu, C.-W., 2007. High-order well-balanced finite volume WENO schemes for shallow water equation with moving water. J. Comput. Phys. 226 (1), 29–58. ISSN 00219991. http://dx.doi.org/10.1016/j.jcp.2007.03.031. Osher, S., Solomon, F., 1982. Upwind difference schemes for hyperbolic systems of conservation laws. Math. Comput. 38 (158), 339–374. ISSN 0025-5718, 1088-6842. http://dx.doi.org/ 10.1090/S0025-5718-1982-0645656-0. Pares, C., 2006. Numerical methods for nonconservative hyperbolic systems: a theoretical framework. SIAM J. Numer. Anal. 44 (1), 300–321 (electronic). ISSN 0036-1429. Pares, C., Castro, M., 2004. On the well-balance property of Roe’s method for nonconservative hyperbolic systems. Applications to shallow-water systems. ESAIM: Math. Model Num. 38 (5), 821–852. ISSN 0764-583X. Pelanti, M., Bouchut, F., Mangeney, A., 2008. A Roe-type scheme for two-phase shallow granular flows over variable topography. ESAIM: Math. Model Num. 42 (5), 851–885. ISSN 0764583X, 1290-3841. http://dx.doi.org/10.1051/m2an:2008029. Perthame, B., Simeoni, C., 2001. A kinetic scheme for the Saint-Venant system with a source term. Calcolo 38 (4), 201–231. ISSN 0008-0624, 1126-5434. http://dx.doi.org/10.1007/ s10092-001-8181-3. Perthame, B., Simeoni, C., 2003. Convergence of the upwind interface source method for hyperbolic conservation laws. In: Hou, T.Y., Tadmor, E. (Eds.), Hyperbolic Problems: Theory, Numerics, Applications. Springer, Berlin, Heidelberg, pp. 61–78. http://link.springer.com/ chapter/10.1007/978-3-642-55711-8_5. Rhebergen, S., Bokhove, O., van der Vegt, J.J.W., 2008. Discontinuous Galerkin finite element methods for hyperbolic nonconservative partial differential equations. J. Comput. Phys. 227 (3), 1887–1922. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2007.10.007. Ricchiuto, M., 2015. An explicit residual based approach for shallow water flows. J. Comput. Phys. 280, 306–344. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2014.09.027. http:// www.sciencedirect.com/science/article/pii/S0021999114006639. Ricchiuto, M., Abgrall, R., 2010. Explicit Runge-Kutta residual distribution schemes for time dependent problems: second order case. J. Comput. Phys. 229 (16), 5653–5691. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2010.04.002. http://www.sciencedirect.com/science/ article/pii/S0021999110001786. Ricchiuto, M., Bollermann, A., 2009. Stabilized residual distribution for shallow water simulations. J. Comput. Phys. 228 (4), 1071–1115. ISSN 0021-9991. http://dx.doi.org/10.1016/j. jcp.2008.10.020.http://www.sciencedirect.com/science/article/pii/S0021999108005391. Russo, G., Khe, A., 2009. High order well balanced schemes for systems of balance laws. In: Hyperbolic problems: Theory, Numerics and Applications, Proc. Sympos. Appl. Math., vol. 67. American Mathematical Society, Providence, RI, pp. 919–928. Sa´nchez-Linares, C., Morales de Luna, T., Castro Dı´az, M.J., 2016. A HLLC scheme for Ripa model. Appl. Math. Comput. 272, Part 2, 369–384. ISSN 0096-3003. http://dx.doi.org/10.1016/ j.amc.2015.05.137. http://www.sciencedirect.com/science/article/pii/S0096300315007687. Shu, C.-W., 1997. Essentially non-oscillatory and weighted essentially non-oscillatory schemes for hyperbolic conservation laws. Tech. Report.

Path-Conservative Numerical Methods Chapter

6 175

Shu, C.-W., Osher, S., 1988. Efficient implementation of essentially non-oscillatory shock-capturing schemes. J. Comput. Phys. 77 (2), 439–471. ISSN 0021-9991. http://dx.doi. org/10.1016/0021-9991(88)90177-5. Shu, C.-W., Osher, S., 1989. Efficient implementation of essentially non-oscillatory shock-capturing schemes, II. J. Comput. Phys. 83 (1), 32–78. ISSN 0021-9991. http://dx. doi.org/10.1016/0021-9991(89)90222-2. Tadmor, E., 1987. The numerical viscosity of entropy stable schemes for systems of conservation laws. I. Math. Comput. 49 (179), 91–103. ISSN 0025-5718, 1088-6842. http://dx.doi.org/ 10.1090/S0025-5718-1987-0890255-3. Tang, H., Tang, T., Xu, K., 2004. A gas-kinetic scheme for shallow-water equations with source terms. Z. Angew. Math. Phys. 55 (3), 365–382. ISSN 0044-2275, 1420-9039. http://dx.doi. org/10.1007/s00033-003-1119-7. Titarev, V.A., Toro, E.F., 2005. ADER schemes for three-dimensional non-linear hyperbolic systems. J. Comput. Phys. 204 (2), 715–736. ISSN 0021-9991. http://dx.doi.org/10.1016/j. jcp.2004.10.028. Toro, E.F., 1989. A weighted average flux method for hyperbolic conservation laws. Proc. R. Soc. London, Ser. A 423 (1865), 401–418. ISSN 1364-5021, 1471-2946. http://dx.doi.org/10.1098/ rspa.1989.0062. http://rspa.royalsocietypublishing.org/content/423/1865/401. Toro, E.F., 2013. Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction, third ed. Springer, Berlin, Heidelberg, ISBN 978-3-662-03490-3. Toro, E.F., Billett, S.J., 2000. Centred TVD schemes for hyperbolic conservation laws. IMA J. Numer. Anal. 20 (1), 47–79. ISSN 0272-4979, 1464-3642. http://dx.doi.org/10.1093/imanum/ 20.1.47. Toro, E.F., Titarev, V.A., 2006. MUSTA fluxes for systems of conservation laws. J. Comput. Phys. 216 (2), 403–429. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2005.12.012. Torrilhon, M., 2012. Krylov-Riemann solver for large hyperbolic systems of conservation laws. SIAM J. Sci. Comput. 34 (4), A2072–A2091. ISSN 1064-8275. http://dx.doi.org/ 10.1137/110840832. http://epubs.siam.org/doi/abs/10.1137/110840832. Touma, R., Koley, U., Kingenberg, C., 2016. Well-balanced unstaggered central schemes for the Euler equations with gravitation. SIAM J. Sci. Comput. 38 (5), B773–B807. Toumi, I., 1992. A weak formulation of Roe’s approximate Riemann solver. J. Comput. Phys. 102 (2), 360–373. ISSN 0021-9991. Volpert, A.I., 1967. Spaces BV and quasilinear equations. Mat. Sbornik 73 (115), 255–302. Xing, Y., Shu, C.-W., 2006. High order well-balanced finite volume WENO schemes and discontinuous Galerkin methods for a class of hyperbolic systems with source terms. J. Comput. Phys. 214 (2), 567–598. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2005.10.005.

Chapter 7

A Practical Guide to Deterministic Particle Methods A. Chertock North Carolina State University, Raleigh, NC, United States

Chapter Outline 1 Introduction 2 Description of the Particle Method 2.1 Particle Approximation of the Initial Data 2.2 Time Evolution of Particles 2.3 Particle Function Approximations 3 Remeshing for Particle Distortion

178 181 182 183 186 190

3.1 Particle Weights Redistribution 3.2 Particle Merger—A Local Redistribution Technique 4 Applications to Convection– Diffusion Equations 4.1 Particle Methods for Convection–Diffusion Equations Acknowledgements References

191 193 194

195 198 198

ABSTRACT The past several decades have seen significant development in the design and numerical analysis of particle methods for approximating solutions of PDEs. In these methods, a numerical solution is sought as a linear combination of Dirac delta-functions located at certain points. The locations and coefficients (weights) of the delta-functions are first chosen to accurately approximate the initial data and then are evolved in time according to the system of ODEs obtained from a weak formulation of the considered problem. The main advantage of the particle methods is their low numerical diffusion that allows them to capture a variety of nonlinear waves with a high resolution. Even though the most “natural” application of the particle methods is linear transport equations, over the years, the range of these methods has been extended for approximating solutions of convection–diffusion and dispersive equations and general nonlinear problems. In this chapter, we provide a mathematical introduction to deterministic particle methods and review different aspects of their practical implementation such as recovering an approximate solution from its particle distribution and an investigation of various particle redistribution algorithms.

Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.11.004 © 2017 Elsevier B.V. All rights reserved.

177

178 Handbook of Numerical Analysis

Keywords: Deterministic particle methods, Particle function approximations, Remising techniques, Linear transport equations, Convection–diffusion equation, Dispersion equations AMS Classification Codes: 35B65, 35C08, 35D30, 35L65, 65M25

1 INTRODUCTION In recent years, particle methods have become a useful tool for approximating solutions of PDEs and been successfully used to treat a broad class of problems arising in astrophysics, plasma physics, solid state physics, medical physics and fluid dynamics (see, e.g., Choquin and Huberson, 1989; Chorin and Marsden, 1993; Evans and Harlow, 1957; Harlow, 1956, 1964; Hermeline, 1989; Hockney and Eastwood, 2010; Leonard, 1980, 1985 and references therein). In these methods, the solution is sought as a linear combination of Dirac distributions whose positions and coefficients represent locations and weights of the particles, respectively. The solution is then found by following the time evolution of the locations and the weights of the particles according to a system of ODEs, obtained by considering a weak formulation of the problem. In order to recover point values of the computed solution at some time t > 0, the particle solution needs to be regularized, and hence the performance of the particle method depends on the quality of the regularization procedures, allowing the recovery of the approximate solution from its particle distribution. A commonly used regularization of a particle solution performed by taking a convolution with a so-called cut-off function, which plays the role of a smooth approximation to the d-function and after a proper scaling takes into account the tightness of the particle discretization. When a particle method is applied to problems with nonsmooth data, the reconstruction procedure becomes the most challenging part of the overall algorithm—it works perfectly fine for smooth functions, but may break down when applied to nonsmooth (discontinuous) solutions. Mesh-free particle methods have many advantages compared to Eulerian (finite-difference, finite-volume, finite-element, etc.) methods. The amount of numerical viscosity introduced by most nonoscillatory Eulerian discretizations of the convective terms may seriously degrade the accuracy of a computational method especially if a coarse grid is forced to be used. Lagrangian-type methods, on the other hand, can ameliorate most of the problems posed by the presence of numerical viscosity since particles provide a nondissipative approximation of the convection. Furthermore, in some scientific applications, such as kinetic theory, for instance, FD schemes cannot be applied to a realistic case, because of the dimensionality of the problem (Cohen and Robertson, 1971), while in particle schemes, the particles are concentrated in the relevant region of the phase space, optimizing the memory storage of the computer. As mesh-free, particle methods are also very flexible, and, therefore beneficial, when problems with very complicated geometries and/or moving boundaries are considered.

A Practical Guide to Deterministic Particle Methods Chapter

7 179

Particle methods have been used for a long time to give a numerical solution of purely convective problems, such as the incompressible Euler equation in fluid mechanics (Harlow, 1964; Leonard, 1980, 1985) or the Vlasov equation in plasma physics (Glassey, 1996). Over the years, the range of particle methods has been extended to treat other type of equations including convection–diffusion, dispersive and others, and we refer the reader to several books and survey monographs, where a large variety of particle-type methods are being reviewed (see, e.g., Cottet and Koumoutsakos, 2000; Li and Liu, 2004; Monaghan, 1988 and references therein). Particle method approximations of hyperbolic PDEs with oscillatory solutions were studied in Engquist and Hou (1989). A detailed description of particle methods with an emphasis on vortex methods and smooth particle hydrodynamics (SPH) and their applications can also be found in Cottet and Koumoutsakos (2000) and Monaghan (1985b). It is generally possible to divide the particle methods for convection– diffusion equations into two classes: stochastic and deterministic ones. The most widely used treatment of diffusion terms, the random vortex method, was developed in Chorin (1973). There, diffusion was introduced by adding a Wiener process to the motion of each vortex. Numerous works followed that pioneering paper and properties of the random vortex method have been extensively studied in the literature (for a comprehensive list we refer the reader to Puckett (1993) and Cottet and Koumoutsakos (2000)). Several deterministic methods have been explored for treating the diffusion terms in particle schemes. Among them is the so-called weighted particle method (Cottet and Mas-Gallic, 1983, 1990; Degond and Mas-Gallic, 1989; Mas-Gallic and Poupaud, 1988; Mas-Gallic and Raviart, 1986), in which the convective part of the equation is modelled by the convection of the particles, while the diffusion part of the equation is taken into account by changing the particle weights. Another example is the diffusion-velocity method, which is based on defining the convective field associated with the heat operator which then allowed the particles to convect in a standard way (Degond and Mustieles, 1990; Lacombe, 1999; Lacombe and Mas-Gallic, 1999; Lions and Mas-Gallic, 2001), and others (Cortez, 1997; Eldredge et al., 2002; Eldridge et al., 2002; Fishelov, 1990; Russo, 1990a,b, 1993). In this case, the PDE is rewritten as if it was an advection equation with a speed that depends on the solution and its derivatives. The solution is then obtained by implementing the particle method with the only difference being that the point values of the computed solution should be recovered from the particle distribution at every time step during the time integration (unlike linear advection problems, in which the solution is recovered only at the final time). The diffusion-velocity particle method has been also applied to linear and nonlinear dispersive equations as well as used for direct simulations of solitary waves interactions (see, e.g., Camassa et al., 2005; Chertock and Levy, 2001, 2002; Chertock et al., 2012a,b,c, 2015; Degasperis and Procesi, 1999; Degasperis et al., 2002; McLachlan and Marsland, 2007).

180 Handbook of Numerical Analysis

One must be aware, however, that the self-adaptivity of the particle positions to the local flow map comes at the expense of the regularity of the particle distribution: interparticle distances may change in time, and just as particles may cluster in the immediate region of the discontinuity they may spread too far from each other near nonsmooth fronts. This may lead not only to a poor resolution of the computed solution but also to an extremely low efficiency of the methods. The latter is related to the fact that the time step for the ODE solver used to evolve the particle system in time depends, in general, on the distance between the particles. The success of various particle methods relies thus not only upon accurate reconstruction procedures used to recover point values of the numerical solution from its particle distribution but also upon accurate and efficient redistribution algorithms, which will ensure that different regions in the computational domain are adequately resolved. A large variety of remeshing techniques were proposed in the literature over the last decades including both global interpolation-type methods (see, e.g., Beale and Majda, 1985; Bergdorf and Koumoutsakos, 2006, 2007; Bergdorf et al., 2005; Chatelain et al., 2007; Cottet and Koumoutsakos, 2000; Cottet and Magni, 2009; Cottet and Poncet, 2004; Cottet and Weynans, 2006; Cottet et al., 2009, 2014; Hald and del Prete, 1978; Hou, 1990; Koumoutsakos and Leonard, 1995; Lagaert et al., 2014; Magni and Cottet, 2012; Monaghan, 1985a; Nordmark, 1991; Ould-Salihi et al., 2000; Perlman, 1985; Ploumhans et al., 2002; Rasmussen et al., 2011; Strain, 1996; van Rees et al., 2011; Wee and Ghoniem, 2006) and local particle merger algorithms (see, e.g., Chertock et al., 2007; Lapenta, 2002; Teunissen and Ebert, 2014). It is also well known that particle methods encounter difficulties in the accurate treatment of boundary conditions, while their adaptivity is often associated with severe particle distortion that may introduce spurious scales. Recent research efforts that attempt to address these issues are outlined in Koumoutsakos (2005). There are many applications for which a hybridization of the Eulerian and Lagrangian approaches may be beneficial or even crucial for achieving high resolution of the computed solution since particle methods have their own applicability limitations if the considered problems involve additional terms besides linear convection (e.g. collision terms, diffusion, or dispersion, and/or nonlinear terms). Hybrid methods involve combination of mesh-based schemes and particle methods in an effort to utilize the specific advantages of each part of the hybrid method in the right place (see, e.g., Chertock and Kurganov, 2004, 2005, 2006; Chertock et al., 2006, 2008, 2010; Cottet, 1990, 2002; Cui et al., 2015; Harlow, 1964; Ould-Salihi et al., 2000). It should also be noted that since in many problems where some sharp interfaces are needed to be captured the use of particle methods may be critical for obtaining a high resolution of the computed solution due to the low dissipativeness nature of these methods (see also Enright et al., 2002, 2005; Hieber and Koumoutsakos, 2005; Krasny, 1986).

A Practical Guide to Deterministic Particle Methods Chapter

7 181

The purpose of this chapter is to provide a mathematical review of deterministic particle methods for advection equations as well as to discuss various aspects related to the practical implementation of these methods. The chapter is organized as follows: we start, in Section 2, with a description of deterministic particle methods in the context of linear transport equations and provide a review of major analytical results. We then discuss, in Section 3, various remeshing techniques that ensure consistent, efficient and accurate simulations by particle methods. We conclude, in Section 4, with particle approximations for derivative operators, which are presented in the context of convection–diffusion equations.

2

DESCRIPTION OF THE PARTICLE METHOD

In this section, we describe the derivation of the particle method using the example of linear transport equation, here written in the divergence form: ut + —x  ðauÞ + a0 u ¼ S,

x 2 d , t > 0,

(1)

and considered subject to initial data u0 ðxÞ :¼ uðx, 0Þ,

(2)

where, u is an unknown function of a time variable t and d-spatial variables x ¼ (x1, …, xd)T, the velocity vector a ¼ (a1(x, t), …, ad(x, t))T, the coefficient a0(x, t) and the source/sink term S(x, t) are given functions. As it was mentioned earlier, the main idea of the particle methods is to seek a solution of a PDE as a linear combination of Dirac distributions, uN ðx, tÞ ¼

N X

wi ðtÞ dðx  xi ðtÞÞ,

i¼1

for some set (xi(t), wi(t)) of points xi ðtÞ 2 d and coefficients wi ðtÞ 2  that are chosen at time t ¼ 0 to accurately approximate the initial data and then evolved in time according to the system of ODEs obtained from a weak formulation of the underlying PDE. Such solutions are called particle solutions and the d-functions in the above formula are called particles. The coefficients wi(t) are called particle weights, since they represent the amount of the physical quantity u, carried by the ith particle, which is located at xi(t) at time t, and N is the total number of particles. It should be emphasized that the introduced particles are mathematical objects rather than (physical) particles of a certain material. An important step in implementation of particle methods is the recovery of point values of the computed solution from its particle distribution. In what follow, we describe each one of the aforementioned steps, i.e., initialization, evolution and reconstruction.

182 Handbook of Numerical Analysis

2.1 Particle Approximation of the Initial Data The first step in the derivation of the particle method consists of approximating the initial data (2) by a linear combination of Dirac distributions: uN0 ðxÞ ¼

N X

wi ð0Þ dðx  xi ð0ÞÞ,

(3)

i¼1

where wi(0) are given coefficients and xi(0) are the initial locations of the d-functions. This can be done, for instance, in the sense of measures. Namely, for any test function f 2 C00 ðOÞ, the inner product (u0(), f()) should be approximated by Z u0 ðxÞfðxÞ dx  ðuN0 ð  Þ, fð  ÞÞ ¼

N X

wi ð0ÞfðxÞ:

(4)

i¼1

O

Based on (4), we observe that determining the initial weights, wi(0), is exactly equivalent to solving a standard numerical quadrature problem. One way of solving this problem is to first divide the computational domain O into a set N T S Oi ¼ O, Oi Ol ¼ ∅, 8i 6¼ l. Then of N nonoverlapping subdomains Oi: i¼1

the location of the ith particle, xi(0), is set at the centre of mass of Oi and the entire mass of u0 in Oi is “placed” into the ith particle so that its initial weight is Z wi ð0Þ :¼ u0 ðxÞ dx: (5) Oi

For instance, one can take wi ð0Þ ¼ jOi j u0 ðxi ð0ÞÞ, which will correspond to the midpoint rule for (5). In general, one can build a sequence of basis functions that will aid in solving the numerical quadrature problem given by (4) (see, e.g., Chertock et al., 2012b,c). One may also prove (see, e.g., Chertock et al., 2012b; Cottet and Koumoutsakos, 2000; Raviart, 1985) that uN0 converges weakly to u0 as N ! ∞, i.e., if max jOi j ! 0 as i

then for all f 2 C00 ðOÞ

N ! ∞,

Z ðuN0 ðxÞ  u0 ðxÞÞfðxÞ dx ¼ 0:

lim

N!∞ O

(6)

A Practical Guide to Deterministic Particle Methods Chapter

2.2

7 183

Time Evolution of Particles

As it was mentioned earlier, particle methods are obtained by considering a weak formulation of the underlying problem and therefore we start by defining a weak solution of (1) and (2). Following Raviart (1985), we denote by MðOÞ the space of measures defined on O  d , that is, the space dual to the space C00 ðOÞ of continuous functions O !  with compact support. A weak solution is then defined as follows. Definition 1. A function u 2 Mðd  ½0, TÞÞ is called a weak solution of the Cauchy problem (1) and (2) if ZT Z

Z u0 ðxÞ’ðx, 0Þ dx 

 d

uðx, tÞ½’t ðx, tÞ + aðx, tÞ  —’ðx, tÞ dx dt 0

d

ZT Z

(7)

ZT Z a0 ðx, tÞuðx, tÞ’ðx, tÞ dx dt ¼

+ 0



Sðx, tÞ’ðx, tÞ dx dt 0

d



d

holds for any test function ’ 2 C10 ðd  ½0, TÞÞ. Note that this definition makes sense if u0 2 Mðd Þ and S 2 Mðd  ½0, TÞÞ. Equipped with the definition of a weak solution, we now prove the following proposition, which holds in the homogeneous case of S  0. Proposition 1. Let ut + —x  ðauÞ + a0 ðx, tÞu ¼ 0,

(8)

be a homogeneous linear transport equation considered subject to the initial data (3), where wi(0) are given coefficients and xi(0) are the initial locations of the d-functions. Assume that a0 , a1 , …, ad 2 Cðd  ½0, TÞ. Then a weak solution weak solution of (8), (3) is given by uN ðx, tÞ ¼

N X

wi ðtÞ dðx  xi ðtÞÞ,

(9)

i¼1

where dxi ðtÞ ¼ aðxi ðtÞ, tÞ, dt dwi ðtÞ + a0 ðxi ðtÞ, tÞ wi ðtÞ ¼ 0, i ¼ 1, …, N: dt

(10)

Proof. Let ’ 2 C10 ðd  ½0, TÞÞ. Substituting (9) into the weak formulation (7) and changing the order of summation and integration yields:

184 Handbook of Numerical Analysis



N X

wi ð0Þ’ðxi ð0Þ, 0Þ 

T N Z X

i¼0

i¼0

+

0

T N Z X i¼0

wi ðtÞ½’t ðxi ðtÞ, tÞ + aðxi ðtÞ, tÞ  —’ðxi ðtÞ, tÞ dt

wi ðtÞa0 ðxi ðtÞ, tÞ’ðxi ðtÞ, tÞ dt ¼ 0:

0

(11) PN R T

dxi ðtÞ  —’ðxi ðtÞ, tÞ dt in the last equadt tion, use the fact that the time derivative of ’ along the curve xi ¼ xi(t) is

We now add and subtract

i¼0 0

wi ðtÞ

d’ðxi ðtÞ, tÞ dxi ðtÞ ¼ ’t ðxi ðtÞ, tÞ +  —’ðxi ðtÞ, tÞ, dt dt and rewrite Eq. (11) as follows: 

N X

T

wi ð0Þ’ðxi ð0Þ, 0Þ 

i¼0

+

N X i¼0

+

N Z X i¼0



ZT wi ðtÞ

wi ðtÞ

d’ðxi ðtÞ, tÞ dt dt

0

 dxi ðtÞ  aðxi ðtÞ, tÞ  —’ðxi ðtÞ, tÞ dt dt

(12)

0

T N Z X i¼0

wi ðtÞa0 ðxi ðtÞ, tÞ’ðxi ðtÞ, tÞ dt ¼ 0:

0

Integrating by parts the second term in the first row in (12) and rearranging other terms, we finally obtain N Z X

T

i¼0

wi ðtÞ

  dxi ðtÞ  uðxi ðtÞ, tÞ  —’ðxi ðtÞ, tÞ dt dt

0

+

T N Z  X dwi ðtÞ i¼0

dt

 + wi ðtÞa0 ðxi ðtÞ, tÞ ’ðxi ðtÞ, tÞ dt ¼ 0:

(13)

0

Since the functions xi(t) and wi(t) satisfy the system (10), the last equation holds for any ’ implying that uN defined by (9), (10) is a weak solution of (8), (3). This completes the proof. □ In the general case of S 6¼ 0, a particle solution of (1), (2) is obtained by solving the initial-value problem (1), (3), whose solution uN(x, t) is still given by (9), but the locations and weights of the particles satisfy a different system of ODEs (compare with the system (10)):

A Practical Guide to Deterministic Particle Methods Chapter

dxi ðtÞ ¼ aðxi ðtÞ, tÞ, dt dwi ðtÞ + a0 ðxi ðtÞ, tÞ wi ðtÞ ¼ bi ðtÞ, dt

7 185

(14)

where bi reflects the contribution of the source term S (see, e.g., Cohen and Perthame, 2000; Raviart, 1985). To evaluate bi, we consider a particle approximation of S, given by Sðx, tÞ  SN ðx, tÞ :¼

N X

bi ðtÞ dðx  xi ðtÞÞ,

i¼1

where

Z bi ðtÞ ¼

Sðx, tÞ dx  Sðxi ðtÞ, tÞ jOi ðtÞj:

(15)

Oi ðtÞ

Here, Oi(t) is the subdomain of O that includes the ith particle and should satisfy the following two properties for all t (not only at t ¼ 0): Z N \ [ Oi ðtÞ, Oi ðtÞ Ol ðtÞ ¼ ∅, 8i 6¼ l, wi ðtÞ  uðx, tÞ dx: O¼ i¼1

Oi ðtÞ

These requirements are hard to guarantee, but noticing that in order to use (15) only the size of Oi(t) is needed, one may apply the Liouville theorem (see, e.g., Arnold, 2006; Chorin and Marsden, 1993) to obtain the following ODE d jOi ðtÞj ¼ —x  aðxi ðtÞ, tÞ jOi ðtÞj, dt

(16)

which has to be solved together with the system (14) to complete the construction of the particle method. Remark 1. We note that in the case when the velocity vector field u is divergence-free, that is, when —x  a  0, the size of the ith subdomain does not change, that is, jOi(t)j  jOij 8t. Otherwise, jOi(t)j changes in time and the coefficients (weights) bi in (15) would depend on t even when the source S ¼ S(x) only. Remark 2. It should be observed that in practice, except in very special cases, the functions xi(t) and wi(t) have to be determined numerically. In fact, the ODE system (10) can be solved by means of a classical numerical method using one’s favourite ODE solver. The above discussion leads to the following algorithm for obtaining a particle solution of (1) and (2): l

Divide the computational domain O into a set of N nonoverlapping subdoN T S mains Oi: Oi ¼ O, Oi Ol ¼ ∅, 8i 6¼ l. i¼1

186 Handbook of Numerical Analysis

l

l

l

Replace the initial datum u0 in (2) by its particle approximation uN0 (3) for some set (xi(0), wi(0)) of points xi(0) in the computational domain O and weights wi(0) computed according to (5). If S  0 in the right-hand side of Eq. (1), consider the system (8), (3) and obtain its particle solution (9) by numerically integrating the system of ODEs (10). If S 6¼ 0, replace S(x, 0) with its particle approximation to compute the coefficients bi(0) according to (15) with t ¼ 0. Consider the system (1), (3) and obtain its particle solution (9) by numerically solving the system of ODEs (14)–(16).

Finally, the basic convergence result for particle methods is stated in the following theorem. Theorem 1. Consider Eq. (8) with the coefficients ai 2 L∞ ð0, T; W 1,∞ ðOÞÞ, i ¼ 1, …, d and a0 2 L∞ ðO  ð0, TÞÞ. Let the initial condition u0 2 C0(O) and its particle approximation is given by (3). Then, for all ’ 2 C00 ðOÞ Z lim ðuðx, tÞ  uN ðx, tÞÞ’ðxÞ dx ¼ 0 uniformly in t 2 ½0, T: N!∞

O

Theorem 1 guarantees that for sufficiently regular coefficients a, a0 and initial datum w0, the particle solution will converge to the exact one in the sense of measures. However, the above result is of little use when one is interested in obtaining point values of the computed solution. In this respect, it is more useful to associate the particle solution uN(, t) with a continuous function uNe ð , tÞ, which approximates the solution u(, t) in a more classical sense. In the next section we provide an example of how such an approximation can be constructed.

2.3 Particle Function Approximations The regularization of particle solution is usually performed by taking a convolution product with a mollification kernel (or, so-called, cut-off function), ze(x), that after a proper scaling takes into account the initial tightness of the particle discretization, namely, Z (17) uðx, tÞ  ue ðx, tÞ :¼ ðuð, tÞ ze ð  ÞÞðxÞ ¼ uðy, tÞze ðx  yÞ dy, where ze 2 C0 ðd Þ

T

L1 ðd Þ satisfies the following properties Z 1 x ze ðxÞ : ¼ d z zðxÞ dx ¼ 1, , e e

(18)

d

and e denotes a characteristic length of the kernel (see, e.g., Raviart, 1985). The particle approximation of the regularized solution is then defined as

A Practical Guide to Deterministic Particle Methods Chapter

uðx, tÞ  uNe ðx, tÞ :¼ ðuN ð , tÞ ze ð  ÞÞðxÞ ¼

N X

wi ðtÞze ðx  xi ðtÞÞ:

7 187

(19)

i¼1

It is clear from the above discussion that the approximation of the computed solution by formula (19) is one of the key ingredients of the particle method, and hence the performance of the method depends on the quality of this smoothing procedure. The error introduced by the quadrature (19) of the mollified approximation uNe for the function u can be divided into two parts: u  uNe ¼ ðu  u ze Þ + ðu  uN Þ ze :

(20)

The first term in Eq. (20) denotes the mollification error that can be controlled by appropriately selecting the kernel properties. The second term denotes the quadrature error due to the approximation of the integral in (17) on the particle location. The accuracy of the particle method will thus be related to the moments of z that are being conserved, and we say that the kernel is of order k when: 8Z > > zðxÞ dx ¼ 1, > > > > > > Zd > > < xa zðxÞ dx ¼ 0, for all multiindexes a such that 1 jaj k  1, (21) > d >  > Z > > > > > jxjk jzðxÞj dx < ∞: > > : d

Example 1 (Gaussian and generalized Gaussian). A (generalized) Gaussian can be considered as an example of a cut-off function and is obtained by taking 2l the inverse Fourier transform of the function ejxj , where l 2  and x 2 d : Z 2l zl ðxÞ ¼ Cl eixx ejxj dx: (22) d

Taking an appropriate normalizing coefficient Cl, one can ensure that the C∞ -functions zl, which rapidly decay at ∞, satisfy the conditions (21) with k ¼ 2l. Thus, these mollifiers are of order l. In particular, when l ¼ 1 we obtain the first-order Gaussian z1 ðxÞ ¼

1 pd=2

2

ejxj :

When l ¼ 2, (22) reduces to the second-order super-Gaussian, which in the one-dimensional (1D) case reads   1 3 2 z2 ðxÞ ¼ pffiffiffi  x2 ex : p 2

188 Handbook of Numerical Analysis

Example 2 (compactly supported mollifiers). The simplest example of a compactly supported 1D cut-off function is the quadratic B-spline: 83 1 > jxj ,  x2 , > > >4 2 > <  2 1 3 zðxÞ ¼ 1 3 >  jxj ,

jxj , > > 2 2 2 2 > > : 0, otherwise: For this cut-off function k ¼ 2, and thus it is only first-order accurate. An advantage of compactly supported cut-off functions is that it is easy to implement the summation in (19) in a very efficient way, which is one of the crucial points in practical implementation of particle methods. Higher order compactly supported kernels can be obtained by ensuring that more moments are conserved and can be found in, e.g., Cottet and Koumoutsakos (2000), Monaghan (1985a) and Magni and Cottet (2012). There is an extensive discussion in the literature on the selection of a cut-off function and its relation to the overall accuracy of particle methods (Beale and Majda, 1982a,b, 1985; Chorin, 1973; Cottet and Koumoutsakos, 2000; Hald, 1979, 1991; Puckett, 1993 and see also Anderson and Greengard, 1985; Cohen and Perthame, 2000; Degond and Mas-Gallic, 1989; Degond and Mustieles, 1990; Hald, 1987; Koumoutsakos, 2005; Mas-Gallic and Raviart, 1986; Monaghan, 1985a,b; Nordmark, 1991; Perlman, 1985; Raviart, 1985). Obviously, the accuracy of the particle method will depend both on the choice of cut-off function (18) and on its width e as it is given by the following theorem (Raviart, 1985) (note that similar error estimates can also be obtained for compactly supported cut-off functions, see, e.g., Evans, 1998; Raviart, 1985). Theorem 2. Let (21) are satisfied for some integer k 1. Assume that both z and the coefficients in (1) are sufficiently smooth, more precisely: z 2 W m,∞ d T d m,1 ð Þ W ð Þ for some integer m > d and a1 , …, ad , a0 + —  a 2 L∞ ð0, T;W l,∞ ðd ÞÞ, where l ¼ max ðk, mÞ. Then, if the initial datum is also smooth (u0 2 W l, p ðd Þ), then there exists a positive constant C ¼ C(T), such that for any t 2 [0, T],

 m h k N (23) k u0 km, p, d , k u  ue kLp ðd Þ C e k u0 kk,p, d + e where h > 0 is the size of nonoverlapping d-dimensional cubes covering d .

2.3.1 Accuracy The two terms in the error estimate (23) may be balanced by choosing an appropriate size of e. Intuitively, it is clear that if the smoothing parameter e is too small in comparison to the minimal distance between particles, the approximate

A Practical Guide to Deterministic Particle Methods Chapter

7 189

solution defined by (19) will vanish away from the e-neighbourhood of the particles and is thus irrelevant. On the other hand, large values of e will generate unacceptable smoothing errors. Theoretically e is chosen so that the smoothing error and the pffiffiffi discretization error are of the same order and it is common to take e h (see, e.g., Chertock and Kurganov, 2006, 2009; Hald, 1987; Raviart, 1985). It should be noted, however, that it is not clear what the optimal proportionality constant is. That strongly depends on both the smoothness of the flow and the cut-off function and its value at the origin. It has been also observed in various numerical experiments that the overall accuracy of the particle method can deteriorate over long-time integrations, see, e.g., the discussion in Beale and Majda (1985), Hald (1987), Hald and del Prete (1978), Nordmark (1991), Koumoutsakos (2005), Perlman (1985) and in references therein.

2.3.2 Smooth vs Discontinuous Solutions The procedure for point values recovery described above provides an optimal order of accuracy when the captured solution is sufficiently smooth. However, when a and/or u in (1) are discontinuous, approximation (19) may be inaccurate and even unacceptable, as it has been demonstrated in Chertock and Kurganov (2006), Chertock et al. (2006) and Chertock and Kurganov (2004). In order to overcome this difficulty, the convolution procedure (19) can be, for instance, modified by taking kernels of locally varying width, whose size was selected in a point-wise manner depending on the distance between the particles (Bergdorf et al., 2005; Chertock and Kurganov, 2006; Cottet et al., 2000; Hou, 1990). Another approach for recovering point values of the computed solution from its particle distribution is based on interpreting the particle data as integrals of the approximated solution over some nonoverlapping domains around the particles (see, e.g., Chertock and Kurganov, 2004; Chertock et al., 2006). Then, the averaged values of the numerical solution can be obtained dividing the weights wi(t) by the volumes of the corresponding domains. We also refer the reader to Cottet and Magni (2009), where total variation diminishing (TVD) reconstruction formulae for discontinuous solutions were proposed for particle methods in the context of nonlinear conservation laws. 2.3.3 Efficiency Besides the accuracy of particle methods, the computational speed is also important. The most time-consuming aspect in particle simulations is accurately evaluating the long-range interactions of particles that appear in the summation formula (19). The direct method of computing values of the cut-off function requires OðN 2 Þ flops, where N is the total number of particles. There is a number of fast summation algorithms known to reduce the computational cost of the particle method to OðN log NÞ. Example of such

190 Handbook of Numerical Analysis

methods include particle-mesh techniques that account for particles in close proximity in terms of grid spacing (see, e.g., Hockney and Eastwood, 2010 and references therein). There are also mesh-free fast summation techniques that are based on the concept of multipole end Taylor expansions (see, e.g., Anderson, 1992; Barnes and Hut, 1986; Carrier et al., 1988; Greengard and Rokhlin, 1988; Lindsay and Krasny, 2001). These methods employ clustering of particles and use expansions of the potentials around the cluster centres with a limited number of terms to calculate their far-field influence onto other particles. These techniques rely on tree data structures to achieve computational efficiency. The tree allows a spatial grouping of the particles, and the interactions of well-separated particles is computed using their centre of mass or multipole and Taylor expansions.

3 REMESHING FOR PARTICLE DISTORTION As evidenced by the foregoing discussion, the time evolution of particle positions is dictated by the gradients of the flow field and, as the result, interparticle distances constantly change. This self-adaptation of particles to the local flow map comes at the expense of the regularity of their distribution since particles may either spread away from each other or cluster in the regions of the large velocity gradients or near discontinuities even if the velocity function a is a smooth function of its arguments. This becomes a critical issue in preserving the accuracy of particle methods and their efficient implementation. While the lack of particles in certain areas may result in deterioration of the accuracy of the method and poor resolution of the computed solution (appearance of artificial vacuum areas), local particle accumulations may lead to an extremely low efficiency of the method making it almost impractical. The latter is related to the fact that the time step of numerical ODE solvers for (10) (or (14)) depends on the distance between the particles as the stability condition imposes that no characteristic curves or their trajectories should intersect in finite time. The latter leads to a time-step constraint of the type Dt C k —a k1 ∞ ,

(24)

where C depends on the specific numerical solver used. As the result, the success of various particle methods relies not only upon accurate reconstruction procedures used to recover numerical solution from its particle distribution but also upon accurate and efficient particle redistribution algorithms, which will ensure that different regions in the computational domain are adequately resolved. The redistribution of particles is in general performed through interpolation formulae and consists of (occasional) reinitialization (remeshing) of particle locations onto a new regularized set of particles and recalculating the particle weights on these new locations. The resulting problem of extracting

A Practical Guide to Deterministic Particle Methods Chapter

7 191

information on a regular grid from a set of scattered points has a long history, and we refer the reader to an extensive list of redistribution algorithms, which are based on various techniques ranging from global rezoning using fixed, one-sided and variable size kernels (see, e.g., Beale and Majda, 1985; Cottet and Koumoutsakos, 2000; Cottet and Poncet, 2004; Hald and del Prete, 1978; Hou, 1990; Monaghan, 1985a; Nordmark, 1991; Perlman, 1985; Ploumhans et al., 2002; Strain, 1996) and particle-mesh methods (see, e.g., Bergdorf and Koumoutsakos, 2006, 2007; Chatelain et al., 2007; Cottet and Koumoutsakos, 2000; Cottet and Magni, 2009; Cottet and Poncet, 2004; Cottet and Weynans, 2006; Cottet et al., 2009, 2014; Koumoutsakos and Leonard, 1995; Lagaert et al., 2014; Magni and Cottet, 2012; Ould-Salihi et al., 2000; Ploumhans et al., 2002; Rasmussen et al., 2011; van Rees et al., 2011; Wee and Ghoniem, 2006) to multilevel adaptive particle methods (see, e.g., Bergdorf et al., 2005; Koumoutsakos, 2005 and references therein).

3.1

Particle Weights Redistribution

For completeness of the presentation, we provide here several examples that illustrate basic, yet commonly used, global and local remeshing ideas. To this end, we denote by fxi gNi¼1 and fx j gJj¼1 , respectively, the old (distorted) and the new (regular) set of particles, and we denote by wi and w j the corresponding particle weights at the old and new locations at certain time t. For the sake of simplicity, we also assume that the new particles, x j ðtÞ, lie at the centres of the J T S nonoverlapping cells, fCj gJi¼1 , Cj ¼ O, Cj Cl ¼ ∅, 8j 6¼ l, of size h that j¼1

cover the computational domain O.

3.1.1 Convolution One of the simplest and natural ways of computing new particle weights w j is to reinitialize particle approximation (19) at the new nodes by just replacing x by x j ðtÞ in the formula, that is,

uNe ðx j ðtÞ, tÞ ¼

N X



wi ðtÞze ðx j ðtÞ  xi ðtÞÞ, j ¼ 1, …, J,

(25)

i¼1

see, e.g., Beale and Majda, 1985; Chertock and Kurganov, 2006; Chertock and Levy, 2001, 2002; Cottet and Koumoutsakos, 2000; Hou, 1990; Monaghan, 1985a; Nordmark, 1991. Using the relation Z (26) w j ðtÞ ¼ uðx,tÞ dx, Cj

192 Handbook of Numerical Analysis

the new weights can be recomputed by, say, the midpoint rule as w j ðt Þ ¼ huNe ðx j ðtÞ, tÞ, 8j ¼ 1, …, J, and then the particle method is restarted.

3.1.2 Interpolation Another widespread redistribution procedure is based on a classical interpolation rule: ! N X jx j ðtÞ  xi ðtÞj , j ¼ 1, …, J, (27) wi ðtÞ F w j ðtÞ ¼ h i¼1 where F is an interpolation kernel whose properties determine the type and the quality of the redistribution procedure and is typically designed to conserve a certain number of moments of the particle distribution (see, e.g., Chertock and Kurganov, 2006, 2009; Chertock et al., 2007; Cottet and Koumoutsakos, 2000; Hockney and Eastwood, 2010; Monaghan, 1985a; Peskin, 2002; Schoenberg, 1973). This technique (unlike the previously described convolution approach) is in particularly appealing in applications, where, conservation of total amount of u may be crucial for designing a good numerical method. In the context of redistribution of particles, the conservation requirement can be stated as J N X X w j ðtÞ ¼ wi ðtÞ: j¼1

(28)

i¼1

There are many choices for F(r) that ensure (28) and we consult here (Peskin, 2002) to bring two particular examples: a first order: 8  pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 1 > > 5  2r  7 + 12r  4r2 , > > >

> > 8 > > : 0,

if jrj < 1, if 1 < jrj < 2, otherwise

and a second-order kernel: 8 fðrÞ, > > > > > > 1 7 7 21 3 > > > r 3  r 2 + r +  fðr  1Þ, < 6 8 12 16 2 FðrÞ ¼ > 1 3 23 9 1 > > >  r3 + r 2  r + + fðr  2Þ, > > 12 4 12 8 2 > > > : 0,

jrj < 1, 1 < jrj < 2, 2 < jrj < 3, otherwise,

A Practical Guide to Deterministic Particle Methods Chapter

7 193

with fðrÞ ¼

1 3 11 2 11 61 r  r  r+ 12 56 42 112 qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 1 + 3ð112r 6 + 336r 5 + 500r 4  1560r 3  748r 2 + 1584r + 243Þ: 336

Remark 3. Both the convolution and redistribution techniques described above are global (all particle locations and weights are changed) and are not limited to uniform auxiliary grids and allow to obtain point values of the computed particle approximation at any prescribed set of points. These methods would, in general, work perfectly fine in smooth regions, yet may smear out discontinuities that may appear in the solution or develop oscillations near nonsmooth fronts. Remark 4. The time scale on which remeshing is done is mostly empirical. It is clearly correlated to the strain rate (velocity gradient) of the flow and constrained by (24). A simple rule that proved to be efficient in various calculations is to remesh every few time steps or even at the end of every time step. It should be observed, however, that if a redistribution procedure is applied too often, the overall resolution of the computed solution may deteriorate. Therefore, one has to come up with an (ad hoc) strategy on when to redistribute particles, for instance, one may apply the redistribution procedure either when the smallest/largest distance between the particles becomes smaller/ larger than a prescribed critical value. Additional strategies can be found in, e.g., Nordmark (1991), Beale and Majda (1985), Cottet and Koumoutsakos (2000), Chertock and Kurganov (2009), Chertock et al. (2007), Chertock and Kurganov (2006), Chertock and Levy (2002), Chertock and Levy (2001), Magni and Cottet (2012), Cottet and Magni (2009) and references therein.

3.2

Particle Merger—A Local Redistribution Technique

The major drawback of the aforementioned global redistribution techniques is numerical diffusion brought to the particle method every time the locations of the particles are changed and the weights are recalculated. This may be unavoidable in the case of spreading particles, but when the particles cluster, another redistribution technique—merger of clustering particles—may be used to improve the efficiency of the particle method (see, e.g., Chertock et al., 2007; Lapenta, 2002; Teunissen and Ebert, 2014). Particle merger techniques seem also to work perfectly well for the models with point mass concentrations and strong singularity formations (d-functions along the surface as well as at separate points) as it was demonstrated in Chertock et al. (2007), where a sticky particle method was introduced in the context of the Euler equations of pressureless gas dynamics (Brenier and Grenier, 1998; Zeldovich, 1970).

194 Handbook of Numerical Analysis

The simplest particle merger algorithm can be described as follows (Chertock et al., 2007). When at a certain time t, the distance jxi(t)  xj(t)j is smaller than a prescribed (ad hoc) parameter for some i and j, then the ith and jth particles are merged into a new particle located, say, at the centre of mass of the replaced particles, i.e., wi ðtÞxi ðtÞ + wj ðtÞxj ðtÞ wi ðtÞ + wj ðtÞ



x¼ and carrying the weight

w ¼ wi ðtÞ + wj ðtÞ:

The cell occupied by the new particle is then set to be the union of Oi(t) and Oj(t):

j O j ¼ jOi ðtÞj + jOj ðtÞj: It should be noted that this particle merging procedure also serves as an excellent discontinuities detector—as long as the number of particles stays equal to the initial number of particles, the solution can be assumed continuous, but after the merger occurs, we assume that a discontinuity has been already formed. Moreover, by keeping a record of the location of particle, one may track the discontinuity location as well. Obviously, in large time simulations, the overall accuracy of the method may decrease due to particle mergers, since the overall number of particles decreases in time. In such a case, one would need to periodically add new particles into the smooth parts of the solution.

4 APPLICATIONS TO CONVECTION–DIFFUSION EQUATIONS Even though the most natural application of the particle methods is pure transport equations, over the years, the range of these methods has been extended. Many practical problems involve additional terms, besides convection (e.g. collision terms or diffusion), and hence, a demand for particle methods, which are capable to treat diffusion, dispersion and general nonlinear terms was created. As a consequence, the original particle method has been modified in a number of different ways, and several approaches have been suggested for approximating derivatives as the latter became a key aspect in the development of particle methods. The most widely used treatment of diffusion terms, the random vortex method, was introduced in Chorin (1973). In this method, the diffusion is treated by adding a Wiener process to the motion of each particle. This way the diffusion only affects the position of particles, xi(t), while the particle weights, wi(t), remain constant in time. Numerous works followed this pioneering

A Practical Guide to Deterministic Particle Methods Chapter

7 195

paper (see, e.g., Anderson and Greengard, 1985; Beale and Majda, 1982a,b, 1985; Goodman, 1987; Gustafson and Sethian, 1991; Hald, 1979, 1991; Leonard, 1985; Long, 1988; Nordmark, 1991). Properties of the random vortex method have been also extensively studied in the literature. For a comprehensive list we refer to Cottet and Koumoutsakos (2000) and Puckett (1993). Deterministic particle approximations of the derivative operators can be constructed, for instance, through the integral approximations. This can be easily achieved by taking the derivatives in Eq. (19) as convolution and derivative operators commute in unbounded or periodic domains. These approximations can be cast in a conservative formulation and have been implemented in various versions of particle methods (like, e.g., SPH Monaghan, 1985b, 1988). An alternative formulation involves the development of integral operators that are equivalent to differential operators. We review here both approaches in the context of convection–diffusion while leaving the discussion of other particle approximations out of the scope of this paper.

4.1

Particle Methods for Convection–Diffusion Equations

We consider the following convection–diffusion equation: ut + —x  ðauÞ ¼ nDu, n > 0,

(29)

which is studied subject to the initial condition (2) and explore two deterministic methods for treating the diffusion terms in particle schemes.

4.1.1 Weighted Particle Method In the so-called weighted particle method proposed in Degond and Mas-Gallic (1989) (see also Cottet and Mas-Gallic, 1983; Mas-Gallic and Raviart, 1986), the convective part of the equation is modelled by the convection of particles, while the diffusion part is taken into account by changing the weights of the particles. This deterministic particle method is then based on the following integro-differential approximation of the convection–diffusion equation (29): ust + —x  ðaus Þ ¼ nDs us , where 1 D u :¼ 2 s

(30)

Z s ðx  yÞðuðyÞ  uðxÞÞ dy,

s s



(31)

d

and the function s ðxÞ ¼

1 x  , sd s

where  2 L1 ðd Þ is an even function, that is, (x) ¼ (x) for all x 2 d .

196 Handbook of Numerical Analysis

The main idea of the weighted particle method is to apply the particle method to Eq. (30) (instead of the original equation (29)) and to treat the modified viscosity nDsus as a source term. Substituting the particle expansion (9) into a weak formulation of (31) leads to the following system of ODEs for the particle locations and their weights: dxi ðtÞ ¼ aðxi ðtÞ, tÞ, dt dwi ðtÞ ¼ bi ðtÞ, i ¼ 1, …, N, dt where bi ðtÞ ¼

N nX s ðxi ðtÞ  xj ðtÞÞ wj ðtÞjOi ðtÞj  wi ðtÞjOj ðtÞj , 2 s j¼1

and jOj(t)j is still given by (16). Convergence properties of the weighted particle method have been investigated in Degond and Mas-Gallic (1989), where the convergence of the solution of problem (30) towards the solution of (29) has been proven and the stability and convergence results for the weighted particle method in L∞ have been established. Remark 5. The weighted particle method has been applied to first-order systems in Degond and Niclot (1989), Mas-Gallic (1987) and Mas-Gallic and Poupaud (1988) and to the systems of gas dynamics in Gingold and Monaghan (1987). Remark 6. Starting from this formulation, a general deterministic integral representation for derivatives of arbitrary order was presented in Eldridge et al. (2002). Remark 7. A different technique in which particle methods were used for approximating solutions of the heat equation and related models (such as the Fokker-Planck equation, a Boltzmann-like equation—the Kac equation and Navier–Stokes equations) was introduced in Russo (1990a,b). In these works, the diffusion of the particles was described as a deterministic process in terms of a mean motion with a speed equal to the osmotic velocity associated with the diffusion process. In a following work (Russo, 1993), the method was shown to be successful for approximating solutions to the 2D Navier–Stokes equation in an unbounded domain. In this setup, the particles were convected according to the velocity field while their weights evolved according to the diffusion term in the vorticity formulation of the Navier–Stokes equations. We also refer to Fishelov (1990) where a different way to discretize viscous terms of the Navier–Stokes equations was suggested. The idea was to approximate the Laplacian of the vorticity by the explicit differentiation of the cut-off function. Another approach (see, for example, Cortez, 1997; Eldredge et al., 2002; Eldridge et al., 2002) is based on discretization of an integro-differential equation in which an integral operator approximates the diffusion operator.

A Practical Guide to Deterministic Particle Methods Chapter

7 197

4.1.2 Diffusion-Velocity Particle Method Another deterministic approach for approximating solutions of the parabolic equations with particle methods was introduced in Degond and Mustieles (1990). Their so-called diffusion-velocity method is based on defining the convective field associated with the heat operator which then allowed the particles to convect in a standard way. To this end, Eq. (29) is rewritten as a purely transport equation: ut + —x  ðap uÞ ¼ 0,

where

ap ¼ a  n

—x u : u

(32)

Here, ap depends on u and —xu, therefore, it cannot be considered as a given function. Moreover, since the product of d-functions is not well defined, the standard particle method has to be modified. This can be done by defining a “smoothed” velocity az ðuÞ ¼ a  n

u —x ze , u ze

(33)

where ze is a cut-off function defined in (18). Eq. (32) is then replaced by the following transport equation ut + —x ðaz ðuÞuÞ ¼ 0,

(34)

which is called the diffusion-velocity transport equation. The resulting diffusion-velocity particle method is obtained by considering a particle approximation as a distribution of the form (19), where xi(t) and wi(t) are the solutions to 8 N X > > > wj —x ze ðxi ðtÞ  xj ðtÞÞ > > >

 dx j¼1 > i > < , ¼ az uNe ðxi ðtÞ, tÞ ¼ aðxi ðtÞ, tÞ  n N X dt i ¼ 1, …, N: wj ze ðxi ðtÞ  xj ðtÞÞ > > > > j¼1 > > > > dw ðtÞ i : ¼ 0, dt (35) Notice that in this method, the computed solution uNe should be recovered from its particle distributions at every time step during the time integration (35) (unlike for linear transport equations, where the solution is recovered only at the final time). The convergence properties of the diffusion-velocity particle method were investigated, e.g., in Lacombe (1999) and Lacombe and Mas-Gallic (1999), where short-time existence and uniqueness of solutions for the resulting diffusion-velocity transport equation were proved. Convergence results for a porous-media equation were also obtained in Lions and Mas-Gallic (2001).

198 Handbook of Numerical Analysis

ACKNOWLEDGEMENTS This work was supported in part by the NSF Grant DMS-1521051. The author thanks A. Kurganov for the constructive discussions.

REFERENCES Anderson, C.R., 1992. An implementation of the fast multipole method without multipoles. SIAM J. Sci. Stat. Comput. 13 (4), 923–947. Anderson, C., Greengard, C., 1985. On vortex methods. SIAM J. Numer. Anal. 22 (3), 413–440. Arnold, V.I., 2006. Ordinary Differential Equations (Universitext) (R. Cooke, Trans.). Springer-Verlag, Berlin (Original work published 1992). Barnes, J., Hut, P., 1986. A hierarchical O(N log N) force-calculation algorithm. Nature 324 (6096), 446–449. Beale, J.T., Majda, A., 1982a. Vortex methods. I. Convergence in three dimensions. Math. Comput. 39 (159), 1–27. Beale, J.T., Majda, A., 1982b. Vortex methods. II. Higher order accuracy in two and three dimensions. Math. Comput. 39 (159), 29–52. Beale, J.T., Majda, A., 1985. High order accurate vortex methods with explicit velocity kernels. J. Comput. Phys. 58, 188–208. Bergdorf, M., Koumoutsakos, P., 2006. A Lagrangian particle-wavelet method. Multiscale Model. Simul. 5 (3), 980–995. Bergdorf, M., Koumoutsakos, P., 2007. Multiresolution Particle Methods, Complex Effects in Large Eddy Simulations, Lect. Notes Comput. Sci. Eng., vol. 56. Springer, Berlin, pp. 49–61. Bergdorf, M., Cottet, G.-H., Koumoutsakos, P., 2005. Multilevel adaptive particle methods for convection-diffusion equations. Multiscale Model. Simul. 4 (1), 328–357. Brenier, Y., Grenier, E., 1998. Sticky particles and scalar conservation laws. SIAM J. Numer. Anal. 35, 2317–2328. Camassa, R., Huang, J., Lee, L., 2005. On a completely integrable numerical scheme for a nonlinear shallow-water wave equation. J. Nonlinear Math. Phys. 12 (Suppl. 1), 146–162. Carrier, J., Greengard, L., Rokhlin, V., 1988. A fast adaptive multipole algorithm for particle simulations. SIAM J. Sci. Stat. Comput. 9 (4), 669–686. Chatelain, P., Cottet, G.-H., Koumoutsakos, P., 2007. Particle mesh hydrodynamics for astrophysics simulations. Int. J. Mod. Phys. C 18 (4), 610–618. Chertock, A., Kurganov, A., 2004. On a hybrid finite-volume particle method. M2AN Math. Model. Numer. Anal 38, 1071–1091. Chertock, A., Kurganov, A., 2005. Conservative locally moving mesh method for multifluid flows. In: Benkhaldoun, F., Ouazar, D., Raghay, S. (Eds.), Finite Volumes for Complex Applications IV. Hermes Science, London, pp. 273–284. Chertock, A., Kurganov, A., 2006. On a practical implementation of particle methods. Appl. Numer. Math. 56, 1418–1431. Chertock, A., Kurganov, A., 2009. Computing multivalued solutions of pressureless gas dynamics by deterministic particle methods. Commun. Comput. Phys. 5, 565–581. Chertock, A., Levy, D., 2001. Particle methods for dispersive equations. J. Comput. Phys. 171 (2), 708–730. Chertock, A., Levy, D., 2002. A particle method for the KdV equation. J. Sci. Comput. 17, 491–499.

A Practical Guide to Deterministic Particle Methods Chapter

7 199

Chertock, A., Kurganov, A., Petrova, G., 2006. Finite-volume-particle methods for models of transport of pollutant in shallow water. J. Sci. Comput. 27, 189–199. Chertock, A., Kurganov, A., Rykov, Y., 2007. A new sticky particle method for pressureless gas dynamics. SIAM J. Numer. Anal. 45, 2408–2441. Chertock, A., Kashdan, E., Kurganov, A., 2008. Propagation of diffusing pollutant by a hybrid Eulerian-Lagrangian method. In: Hyperbolic Problems: Theory, Numerics, Applications. Springer, Berlin, pp. 371–379. Chertock, A., Doering, C.R., Kashdan, E., Kurganov, A., 2010. A fast explicit operator splitting method for passive scalar advection. J. Sci. Comput. 45, 200–214. Chertock, A., Du Toit, P., Marsden, J.E., 2012a. Integration of the EPDiff equation by particle methods. ESAIM Math. Model. Numer. Anal. 46 (3), 515–534. Chertock, A., Liu, J.-G., Pendleton, T., 2012b. Convergence analysis of the particle method for the Camassa-Holm equation. In: Ciarlet, P.G., Li, T.T. (Eds.), Proceedings of the 13th International Conference on Hyperbolic Problems: Theory, Numerics and Applications, Contemporary Applied Mathematics, pp. 356–373. Chertock, A., Liu, J.-G., Pendleton, T., 2012c. Convergence of a particle method and global weak solutions of a family of evolutionary PDEs. SIAM J. Numer. Anal. 50 (1), 1–21. Chertock, A., Liu, J.-G., Pendleton, T., 2015. Elastic collisions among peakon solutions for the Camassa-Holm equation. Appl. Numer. Math. 93, 30–46. Choquin, J.P., Huberson, S., 1989. Particle simulation of viscous flow. Comput. Fluids 17 (2), 397–410. Chorin, A.J., 1973. Numerical study of slightly viscous flow. J. Fluid Mech. 57 (4), 785–796. Chorin, A.J., Marsden, J.E., 1993. A Mathematical Introduction to Fluid Mechanics, third ed. Texts in Applied Mathematics, vol. 4. Springer-Verlag, New York, NY. Cohen, A., Perthame, B., 2000. Optimal approximations of transport equations by particle and pseudoparticle methods. SIAM J. Math. Anal. 32 (3), 616–636. Cohen, M.H., Robertson, A., 1971. Wave propagation in the early stages of aggregation of cellular slime molds. J. Theor. Biol. 31, 101–118. Cortez, R., 1997. Convergence of high-order deterministic particle methods for the convection-diffusion equation. Commun. Pure Appl. Math. 50 (12), 1235–1260. Cottet, G.-H., 1990. A particle-grid superposition method for the Navier-Stokes equations. J. Comput. Phys. 89 (2), 301–318. Cottet, G.-H., 2002. A particle model for fluid-structure interaction. C. R. Math. Acad. Sci. Paris 335 (10), 833–838. Cottet, G.-H., Koumoutsakos, P.D., 2000. Vortex Methods. Cambridge University Press, Cambridge. Cottet, G.-H., Magni, A., 2009. TVD remeshing formulas for particle methods. C. R. Math. Acad. Sci. Paris 347 (23–24), 1367–1372. Cottet, G.-H., Mas-Gallic, S., 1983. A particle method to solve transport-diffusion equations, Part 1: the linear case. Tech. Report 115. Ecole Polytechnique, Palaiseau, France. Cottet, G.-H., Mas-Gallic, S., 1990. A particle method to solve the Navier-Stokes system. Numer. Math. 57 (8), 805–827. Cottet, G.-H., Poncet, P., 2004. Advances in direct numerical simulations of 3D wall-bounded flows by vortex-in-cell methods. J. Comput. Phys. 193 (1), 136–158. Cottet, G.-H., Weynans, L., 2006. Particle methods revisited: a class of high order finite-difference methods. C. R. Math. Acad. Sci. Paris 343 (1), 51–56. Cottet, G.-H., Koumoutsakos, P., Salihi, M.L.O., 2000. Vortex methods with spatially varying cores. J. Comput. Phys. 162 (1), 164–185.

200 Handbook of Numerical Analysis Cottet, G.-H., Balarac, G., Coquerelle, M., 2009. Subgrid Particle Resolution for the Turbulent Transport of a Passive Scalar. Springer, Berlin, Heidelberg. 779–782. Cottet, G.-H., Etancelin, J.-M., Perignon, F., Picard, C., 2014. High order semi-Lagrangian particle methods for transport equations: numerical analysis and implementation issues. ESAIM Math. Model. Numer. Anal. 48 (4), 1029–1060. Cui, S., Kurganov, A., Medovikov, A., 2015. Particle methods for PDEs arising in financial modeling. Appl. Numer. Math. 93, 123–139. Degasperis, A., Procesi, M., 1999. Asymptotic Integrability, Symmetry and Perturbation Theory (Rome, 1998). World Scientific Publishing, River Edge, NJ, pp. 23–37. Degasperis, A., Holm, D.D., Hone, A.N.W., 2002. A new integrable equation with peakon solutions. Theor. Math. Phys. 133, 1463–1474. Degond, P., Mas-Gallic, S., 1989. The weighted particle method for convection-diffusion equations. Part 1 and Part 2. Math. Comput. 53, 485–525. Degond, P., Mustieles, F.J., 1990. A deterministic approximation of diffusion equations using particles. SIAM J. Sci. Stat. Comput. 11 (2), 293–310. Degond, P., Niclot, B., 1989. Numerical analysis of the weighted particle method applied to the semiconductor Boltzmann equation. Numer. Math. 55 (5), 599–618. Eldredge, J.D., Colonius, T., Leonard, A., 2002. A vortex particle method for two-dimensional compressible flow. J. Comput. Phys. 179 (2), 371–399. Eldridge, J.D., Leonard, A., Colonious, T., 2002. A general deterministic treatment of derivatives in particle methods. J. Comput. Phys. 180 (2), 686–709. Engquist, B., Hou, T.Y., 1989. Particle method approximation of oscillatory solutions to hyperbolic differential equations. SIAM J. Numer. Anal. 26 (2), 289–319. Enright, D., Fedkiw, R., Ferziger, J., Mitchell, I., 2002. A hybrid particle level set method for improved interface capturing. J. Comput. Phys. 183 (1), 83–116. Enright, D., Losasso, F., Fedkiw, R., 2005. A fast and accurate semi-Lagrangian particle level set method. Comput. Struct. 83 (6–7), 479–490. Evans, L.C., 1998. Partial Differential Equations, Graduate Studies in Mathematics. vol. 19. American Mathematical Society, Providence, RI. Evans, M.W., Harlow, F.H., 1957. The particle-in-cell method for hydrodynamic calculations. Tech. Report LA-2139. Los Alamos Scientific Laboratory. Fishelov, D., 1990. A new vortex scheme for viscous flows. J. Comput. Phys. 86, 211–224. Gingold, R.J., Monaghan, J.J., 1987. Shock simulation by the particle method SPH. J. Comput. Phys. 37, 374–389. Glassey, R.T., 1996. The Cauchy Problem in Kinetic Theory. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA. Goodman, J., 1987. Convergence of the random vortex method. Commun. Pure Appl. Math. 40 (2), 189–220. Greengard, L., Rokhlin, V., 1988. The Rapid Evaluation of Potential Fields in Three Dimensions, Vortex methods (Los Angeles, CA, 1987), Lecture Notes in Mathematics, vol. 1360. Springer, Berlin, pp. 121–141. Gustafson, K., Sethian, J., 1991. Vortex Methods and Vortex Motion. SIAM, Philadelphia, PA. Hald, O.H., 1979. Convergence of vortex methods for Euler’s equations. II. SIAM J. Numer. Anal. 16 (5), 726–755. Hald, O.H., 1987. Convergence of vortex methods for Euler’s equations. III. SIAM J. Numer. Anal. 24 (3), 538–582. Hald, O.H., 1991. Convergence of Vortex Methods, Vortex Methods and Vortex Motion. SIAM, Philadelphia, PA. 33–58.

A Practical Guide to Deterministic Particle Methods Chapter

7 201

Hald, O., del Prete, V.M., 1978. Convergence of vortex methods for Euler’s equations. Math. Comput. 32 (143), 791–809. Harlow, F.H., 1956. A machine calculation method for hydrodynamic problems. Tech. Report LAMS-1956. Los Alamos Scientific Laboratory. Harlow, F.H., 1964. The particle-in-cell computing method for fluid dynamics. In: Alder, B., Fernbach, S., Rotenberg, M. (Eds.), Methods in Computational Physics, vol. 3. Academic Press, New York, NY, pp. 319–343. Hermeline, F., 1989. A deterministic particle method for transport diffusion equations: application to the Fokker–Planck equation. J. Comput. Phys 82 (1), 122–146. Hieber, S.E., Koumoutsakos, P., 2005. A Lagrangian particle level set method. J. Comput. Phys. 210 (1), 342–367. Hockney, R.W., Eastwood, J.W., 2010. Computer Simulation Using Particles. CRC Press, Boca Raton, FL. Hou, T.Y., 1990. Convergence of a variable blob vortex method for the Euler and Navier-Stokes equations. SIAM J. Numer. Anal. 27 (6), 1387–1404. Koumoutsakos, P., 2005. Multiscale flow simulations using particles. Annu. Rev. Fluid Mech. 37, 457–487. Koumoutsakos, P., Leonard, A., 1995. High-resolution simulations of the flow around an impulsively started cylinder using vortex methods. J. Fluid Mech. 296, 1–38. Krasny, R., 1986. A study of singularity formation in a vortex sheet by the point-vortex approximation. J. Fluid Mech. 167, 65–93. Lacombe, G., 1999. Analyse d’une equation de vitesse de diffusion. C. R. Acad. Sci. Paris Ser. I Math. 329 (5), 383–386. Lacombe, G., Mas-Gallic, S., 1999. Presentation and analysis of a diffusion-velocity method. In: ESAIM Proc., Flows and Related Numerical Methods (Toulouse, 1998), vol. 7. Society for Industrial and Applied Mathematics, Paris, pp. 225–233 (electronic). Lagaert, J.-B., Balarac, G., Cottet, G.-H., 2014. Hybrid spectral-particle method for the turbulent transport of a passive scalar. J. Comput. Phys. 260, 127–142. Lapenta, G., 2002. Particle rezoning for multidimensional kinetic particle-in-cell simulations. J. Comput. Phys. 181, 317–337. Leonard, A., 1980. Vortex methods for flow simulation. J. Comput. Phys. 37 (3), 289–335. Leonard, A., 1985. Computing three-dimensional incompressible flows with vortex elements. Ann. Rev. Fluid Mech. 17, 289–335. Li, S., Liu, W.K., 2004. Meshfree Particle Methods. Springer-Verlag, Berlin. Lindsay, K., Krasny, R., 2001. A particle method and adaptive treecode for vortex sheet motion in three-dimensional flow. J. Comput. Phys. 172 (2), 879–907. Lions, P.-L., Mas-Gallic, S., 2001. Une methode particulaire deterministe pour des equations diffusives non lineaires. C. R. Acad. Sci. Paris Ser. I Math. 332 (4), 369–376. Long, D.-G., 1988. Convergence of the random vortex method in two dimensions. J. Am. Math. Soc. 1 (4), 779–804. Magni, A., Cottet, G.-H., 2012. Accurate, non-oscillatory, remeshing schemes for particle methods. J. Comput. Phys. 231 (1), 152–172. Mas-Gallic, S., 1987. A deterministic particle method for the linearized Boltzmann equation. Transp. Theory Stat. Phys. 16, 855–887. Mas-Gallic, S., Poupaud, F., 1988. Approximation of the transport equation by a weighted particle method. Transp. Theory Stat. Phys. 17, 311–345. Mas-Gallic, S., Raviart, P.-A., 1986. Particle approximation of convection-diffusion equations. International Report 86013. Universite Pierre et Marie Curie.

202 Handbook of Numerical Analysis McLachlan, R., Marsland, S., 2007. N-particle dynamics of the Euler equations for planar diffeomorphisms. Dyn. Syst. 22 (3), 269–290. Monaghan, J.J., 1985a. Extrapolating B-splines for interpolation. J. Comput. Phys. 60 (2), 253–262. Monaghan, J.J., 1985b. Particle methods for hydrodynamics. Comput. Phys. Rep. 3 (2), 71–124. Monaghan, J.J., 1988. An introduction to SPH. Comput. Phys. Commun. 48 (1), 89–96. Nordmark, H., 1991. Rezoning for higher order vortex methods. J. Comput. Phys. 97, 366–397. Ould-Salihi, M.L., Cottet, G.-H., Hamraoui, M.E., 2000. Blending finite-difference and vortex methods for incompressible flow computations. SIAM J. Sci. Comput. 22 (5), 1655–1674. (electronic). Perlman, M., 1985. On the accuracy of vortex methods. J. Comput. Phys. 59 (2), 200–223. Peskin, C.S., 2002. The immersed boundary method. Acta Numer. 11, 479–517. Ploumhans, P., Winckelmans, G.S., Salmon, J.K., Leonard, A., Warren, M.S., 2002. Vortex methods for direct numerical simulation of three-dimensional bluff body flows: application to the sphere at Re ¼ 300, 500, and 1000. J. Comput. Phys. 178 (2), 427–463. Puckett, E.G., 1993. Vortex methods—an introduction survey of selected research topics. In: Gunzburger, M.D., Nicolaides, R.A. (Eds.), Incompressible Computational Fluid Dynamics—Trends and Advances. Cambridge University Press, Cambridge, pp. 335–407. Rasmussen, J.T., Cottet, G.-H., Walther, J.H., 2011. A multiresolution remeshed Vortex-In-Cell algorithm using patches. J. Comput. Phys. 230 (17), 6742–6755. Raviart, P.-A., 1985. An Analysis of Particle Methods, Numerical Methods in Fluid Dynamics (Como, 1983), Lecture Notes in Mathematics, vol. 1127. Springer, Berlin, pp. 243–324. Russo, G., 1990a. Deterministic diffusion of particles. Commun. Pure Appl. Math. 43, 697–733. Russo, G., 1990b. A particle method for collisional kinetic equations. I. Basic theory and one-dimensional results. J. Comput. Phys. 87, 270–300. Russo, G., 1993. A deterministic vortex method for the Navier-Stokes equations. J. Comput. Phys. 108, 87–95. Schoenberg, I.J., 1973. Cardinal spline interpolation. In: Conference Board of the Mathematical Sciences Regional Conference Series in Applied Mathematics, No. 12. Society for Industrial and Applied Mathematics, Philadelphia, PA. Strain, J., 1996. 2D vortex methods and singular quadrature rules. J. Comput. Phys. 124 (1), 131–145. Teunissen, J., Ebert, U., 2014. Controlling the weights of simulation particles: adaptive particle management using k-d trees. J. Comput. Phys. 259, 318–330. van Rees, W.M., Leonard, A., Pullin, D.I., Koumoutsakos, P., 2011. A comparison of vortex and pseudo-spectral methods for the simulation of periodic vortical flows at high Reynolds numbers. J. Comput. Phys. 230 (8), 2794–2805. Wee, D., Ghoniem, A.F., 2006. Modified interpolation kernels for treating diffusion and remeshing in vortex methods. J. Comput. Phys. 213 (1), 239–263. Zeldovich, Y.B., 1970. Gravitational instability: an approximate theory for large density perturbations. Astron. Astrophys. 5, 84–89.

Chapter 8

On the Behaviour of Upwind Schemes in the Low Mach Number Limit: A Review H. Guillard and B. Nkonga Universit e C^ ote d’Azur, Inria, CNRS, LJAD, France

Chapter Outline 1 Introduction 2 The Multiple Low Mach Number Limits of the Compressible Euler Equations 2.1 Incompressible Limit 2.2 Acoustic Limit 2.3 Acoustic–Incompressible Interactions 2.4 Finite Volume Schemes 2.5 The Diagnosis 2.6 The Remedies

204

205 205 207 208 213 215 217

3 Numerical Illustrations 3.1 Order 1: Quadrangular Cartesian Grids 3.2 Order 1: Vertex-Centred Triangular Meshes 3.3 Order 1: Cell-Centred Triangular Meshes 3.4 Order 2: Vertex-Centred Triangular Meshes 4 Conclusion References

221 221 223 224 226 228 228

ABSTRACT This work is devoted to a review of different modifications proposed to enable compressible flow solvers to compute accurately flows near the incompressible limit. First the reasons of the failure of upwind solvers to obtain accurate solutions in the low Mach number regime are explained. Then different correction methods proposed in the literature are reviewed and discussed. This work concludes by some numerical experiments to illustrate the behaviour of the different methods. Keywords: Low Mach number flows, Upwind schemes, Finite volume methods MSC2010 Classification Codes: 76B03, 76G25, 76M12, 65M08

Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.09.002 © 2017 Elsevier B.V. All rights reserved.

203

204 Handbook of Numerical Analysis

1 INTRODUCTION Computational fluid dynamics (CFD) is now-a-days a mature discipline with a wide range of applications ranging from traditional hydro- or aerodynamics to biological flows, environmental studies or even pedestrian flows (Helbing, 1992) or social network modelling. CFD thus has to deal with a huge set of different types of flows that can be characterized by nondimensionless quantities like the Froude, Ekmann, Strouhal, Reynolds, etc., numbers expressing the relative importance of the forces acting on a fluid element. In this collection of dimensionless numbers, one of these, the Mach number plays a particular role from the point of view of numerical methods. For low Mach number flows close to the incompressible limit, staggered grids or mixed finite element methods are a common choice and the pressure gradient is usually computed in a centred and implicit way. On the other side of the Mach number range, the important points are the use of the conservative form of the equations, a preference for explicit schemes and a rare recourse to staggered arrangement of the variables. Of course, the design of a numerical method that would be equally valid and efficient on the whole range of Mach number is a kind of Graal for CFD researchers and numerous attempts in this direction have been reported. Some of these works extend to the compressible regime the numerical methods used for the computation of incompressible flows. Examples of these type of methods to cite but a few are Bijl and Wesseling (1998) or Zienkiewicz et al. (1990) and Munz et al. (2003). A large number of works, also approach the computation of low Mach number flows from the point of view of time discretization and proposed pressure correction methods (Degond and Tang, 2011; Gallouet et al., 2008; van der Heul et al., 2003), the origin of these can be traced back to the ICE method of Harlow and Amsden in the 1970s (Harlow and Amsden, 1971). From the compressible side, since incompressible flows are a particular case of compressible ones, one can argue that in principle, a compressible flow solver should be able to compute these flows. Unfortunately, there are experimental evidences showing that on a fixed mesh, the solutions of the compressible flow discretized equations are not an accurate approximation of the solutions of the incompressible model. One of the first documented article concerned with this problem is a paper by Volpe in 1993 who in a very lucid way made the observation that compressible flow solvers fail to compute near incompressible flows and ask: “why ?” This question has generated an important literature and we will not try to give here an exhaustive report of it. It appears that the answer is deeply linked to the complex behaviour of the compressible models in the low Mach number regime. The crucial point to understand is that in general the strong limit solution of the compressible Euler (or Navier–Stokes) model is not described by the corresponding incompressible equations. Once, this point has been cleared, the answer to the question by Volpe is relatively easy and consequently the design of compressible flow solvers able to compute low Mach number flows can be undertaken. In this paper, we have selected three basic strategies that have been proposed along the years to enhance the capabilities

On the Behaviour of Upwind Schemes Chapter

8 205

of shock capturing techniques to compute low Mach flows as these three types of techniques are representative of the main works in this area. The plan of this work is as follows. In Section 2, we recall some results on the behaviour of the solutions of the Euler equations in the low Mach number limit. This section will show that this behaviour cannot be identified to a simple strong convergence towards the solutions of the incompressible flow system. In Section 3, we will use these results to understand why compressible flow solvers do not deliver accurate approximations of the solutions of the incompressible models, and we will describe some remedies proposed in the literature to correct the deficiencies of the usual upwind schemes. The last section will contain some numerical experiments illustrating the behaviour of these different methods.

2 THE MULTIPLE LOW MACH NUMBER LIMITS OF THE COMPRESSIBLE EULER EQUATIONS 2.1

Incompressible Limit

We begin in this section to recall how to derive in a formal way the incompressible system as a singular limit of the compressible Euler equations. As we will see in the following sections, this simple analysis is incomplete and does not consider the multiple scale character of the Euler system. The compressible Euler system writes @ r + div ru ¼ 0 @t

(1a)

@ ru + div ru  u + rp ¼ 0 @t

(1b)

@ p + u  rp + ra2 div u ¼ 0 @t

(1c)

where r is the fluid density, u the velocity and p the pressure while pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi a ¼ @p=@rjs is the sound velocity. Let us introduce the following normalization variables:  r¼

r , r



u ¼

u , u



p ¼

p r ða Þ

, 2



x ¼

x , d



t ¼

tu d

(2)

where a* is a reference speed of sound and d* is an arbitrary length scale. We remark that the normalization of the pressure follows directly from the definition of the speed of sound. We then obtain the system of nondimensionalized equations: @t r + div ru ¼ 0 @t ru + div ru  u +

1 rp ¼ 0 e2

@t p + u  rp + ra2 div u + ¼ 0

(3a) (3b) (3c)

206 Handbook of Numerical Analysis

where e ¼ u*/a* is the reference Mach number. We now look for solutions of the system (3) in the form of asymptotic expansion in power of the Mach number:  



















 ðr , u, p Þ ¼ ðr 0 , u 0 , p 0 Þ + eðr 1 , u 1, p 1 Þ + e2 ðr 2 , u 2 , p 2 Þ + ⋯

(4)

Introducing these expressions in Eq. (3) and collecting the terms with equal power of e we obtain (we have dropped the  for convenience): 1. Order 1/e2 rp0 ¼ 0

(5)

rp1 ¼ 0

(6)

@ r + div ðr0 u0 Þ ¼ 0 @t 0

(7a)

@ r u0 + div ðr0 u0  u0 Þ + rp2 ¼ 0 @t 0

(7b)

@ p0 + u0  rp0 + r0 a20 div u0 ¼ 0 @t

(7c)

2. Order 1/e

3. Order 1

The order 1/e2 and 1/e equations imply that the pressure is constant in space up to fluctuations of order e2. Thus we may write: pðx, tÞ ¼ p0 ðtÞ + e2 p2 ðx, tÞ In the presence of open boundaries, the thermodynamic pressure p0 will be imposed and be equal to the exterior pressure. For the sake of simplicity, we assume that the exterior pressure do not change with time and thus the thermodynamic pressure p0 will be a constant in space and time: dPext dp0 ¼ ¼0 dt dt and we will have pðx,tÞ ¼ p0 + e2 p2 ðx, tÞ

p0 ¼ cte

(8)

thus Eq. (7c) implies that the order 0 velocity is divergence free. Note that in the context of nonbarotropic flow, it is the pressure (or energy equation) that implies the incompressible constraint. Some authors (e.g. Klein, 1995) have emphasized this point to stress that incompressible flows can support nonconstant densities. Introducing the divergence constraint into the continuity Eq. (7a), we see that this implies that the material derivative of the density

On the Behaviour of Upwind Schemes Chapter

8 207

is zero. Here for simplicity, we assume that all particle paths come from regions with the same density and conclude that: r0 ¼ Cte The order 1 system thus reduces to incompressible constant density Euler system:  r0

r0 ¼ Cte

(9a) 

@ u0 + div ðu0  u0 Þ + rp2 ¼ 0 @t div ðu0 Þ ¼ 0

2.2

(9b) (9c)

Acoustic Limit

As already mentioned the previous analysis is incomplete. Actually, a fundamental assumption is hidden in the choice of the reference scalings (2). By choosing t ¼ d =u we have implicitely assumed that the reference time of interest is associated with phenomena moving at the material velocity u . However, another choice is possible and one can instead consider the alternate time scale: t ¼ d =a where emphasis is put on phenomena occurring at the speed of sound. The ratio of these two time scales is precisely the Mach number. Using the new dimensionless time a*t/d, one obtains instead of (3) the new nondimensional system: 8 1 > > @t r + div ru ¼ 0 (10a) > > e > > > < 1 1 (10b) @t ru + div ru  u + 2 rp ¼ 0 > e e > > > > > 1 > : @t p + u  rp + ra2 div u ¼ 0 (10c) e The analysis of this system can proceed as the analysis of (3). Introducing the asymptotic expansion in power of the Mach number (4) we will get as previously at order 1/e2 rp0 ¼ 0 but the order 1/e equations now give 8 @t r0 ¼ 0 > < @t r0 u0 + rp1 ¼ 0 > : @t p0 ¼ 0

(11)

(12a) (12b) (12c)

208 Handbook of Numerical Analysis

therefore for this time scale, the order 0 pressure is a constant (in time and space) and the density is constant in time. For simplicity, we will assume that the density at t ¼ 0 is constant in space (note that acoustic can be defined for a space varying background density: this assumption is therefore not mandatory but largely simplifies the analysis). In order to close the system, we have to consider the order 1 pressure equation that gives: @t p1 + a20 div r0 u0 ¼ 0

(13)

where a0pisffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi the constant in space and time background speed of sound (i.e a0 ¼ @p=@rjs ðr0 , p0 Þ). Eqs. (12b) and (13) constitute a closed system of equations that in the sequel, we will called the acoustic system. Actually, taking the divergence of (12b) and using (13), we obtain the wave equation @tt p1  a20 5 p1 ¼ 0

(14)

a second-order hyperbolic equation that describes the propagation of linear waves with speed a0

2.3 Acoustic–Incompressible Interactions The two limits that we have just established represent two very different systems from a mathematical point of view: the incompressible system is elliptic in nature (and this why this limit is called a singular limit: the mathematical nature of the system changes from hyperbolic to elliptic) while the acoustic one is hyperbolic and describes the propagation of waves of velocity a0. The problem we face now is to determine which of the two low Mach limits, the incompressible, or the acoustic one is relevant. The answer is that both limits are relevant: Our common experience shows us that we do not have incompressible phenomena or acoustic ones but that we have at the same time incompressible and acoustic phenomena. In the physical world, the two limits coexist and superpose. For instance, the computation of the aerodynamical parameters (drag, lift, etc.) of a slow moving body, say the reader’s car for instance,a can be done with great accuracy with an incompressible system of equations. But at the same time, this moving object is accompanied by sound emission and transmission.b The question is therefore to describe the superposition of the two phenomena and their interactions (if any). This is not a simple question and the answer depends on many factors: the physical model can be the Euler system of some dissipative system (Navier– Stokes equations), the state law may be isentropic or not, the boundary conditions and the domain that can be bounded, periodic or unbounded play also a crucial importance in the results as well as the nature of the initial data that

a

Specially if the reader respects the legal speed limits. Specially if the reader does not respect the legal decibel limits.

b

On the Behaviour of Upwind Schemes Chapter

8 209

can be closed to an incompressible solution or not. From a mathematical point of view, this question has be examined in many works including but not restricted to Klainerman and Majda (1982), Ukai (1986), Schochet (1988), Lions (1993), Schochet (1994), Grenier (1997), Gallagher (1998) and Lions and Masmoudi (1998). Chapter 2 of Majda (2012) is a good introduction to these questions. The article of Schochet (2005) and the whole volume of Abgrall and Guillard (2005) are devoted to the analysis of several mathematical and numerical problems related to low Mach number flows while a review of the mathematical questions related to the convergence towards the incompressible limit can be found in Alazard (2008). In this article to simplify the problem while retaining its most salient feature, we consider the periodic case where the spatial domain O ¼ d , where d is the two- or three-dimensional torus and we assume that the flow is barotropic, that is, there exists a direct relation between pressure and density p ¼ p(r). The case of nonbarotropic flows is more complex and the establishment of general results much more technical. For an overview of the mathematical problems encountered in the nonbarotropic case, we refer to Metivier and Schochet (2001), Metivier and Schochet (2001) and again to Alazard (2008). For the sake of simplicity, we will in addition assume that the flow is isothermal: p ¼ ra2 with a ¼ constant. This assumption is by no means essential, and all the results established in this section are equally valid for barotropic flows. However, this assumption largely simplifies the algebra and makes clearer the essence of the results. With these assumptions, the nondimensional system that we want to analyze writes 8 @r > > < + div m ¼ 0 @t (15) > > : @m + div ðu  mÞ + 1 rr ¼ 0 @t e2 where we have here chosen to scale the time variable by the slow time scale d*/u*. We remark that in the incompressible limit, pressure fluctuations are of order e2 (see Eq. (8)) p ¼ p0 + Oðe2 Þ while in the acoustic limit, pressure fluctuations are an order of magnitude larger: p ¼ p0 + OðeÞ but in the two case, the order 0 pressure is constant, this justifies the following change of variables: r ¼ 1 + ec

210 Handbook of Numerical Analysis

where p0 ¼ 1 with an appropriate scaling of the pressure. Thanks to this change of variable, system (15) becomes: 8 @ e 1 > e > > (16a)

1 >@me > (16b) : + div ðm  mÞ + rce ¼ OðeÞ @t e since u ¼ m + OðeÞ. Let us denote ve ¼ (ce, me)t the vector of the dependent variables, we also introduce the notations:   div m v ¼ rc while Qðv, vÞ is a quadratic operator defined by   0 Qðv, vÞ ¼ mm and the system (16) can be written: @ve 1 + Qðve , ve Þ + ve ¼ OðeÞ @t e to which is associated the initial data:  t ve ðt ¼ 0Þ ¼ ce0 , me0 on O

(17)

(18)

An important remark is that the operator  is a linear skew symmetric operator with constant coefficients, thus we have for any j: ¼ (j1, …, jd) Z   jd @xj ve  @xj ve ¼ 0 where @xj : ¼ @xj11,…, ,…, xd O

for all sufficiently smooth ve. This is the mathematical translation of the fact that the acoustic operator does not create or dissipate energy but only transport it across the domain. Thus despite the factor 1/e that appears in (17) in front of this operator, the Hs(O) energy estimates obtained by taking Z   @xj ve  @xj ½equation ð17Þ O

do not depend on e. This has been used in Klainerman and Majda (1981, 1982) (see also Kreiss et al., 1991 and Chapter 2 of Majda, 2012) to establish the existence of uniformly bounded in C([0, T], Hs(O)) solutions of (17) on a time T independent of e by using classical iteration techniques relying on Friedrich inequalities for hyperbolic symmetric systems.

On the Behaviour of Upwind Schemes Chapter

8 211

However, for general initial data, this is not sufficient to obtain a limit on ve when e ! 0. The basic reason is that we have no uniform bound on the time derivative @ tve since Eq. (17) precisely says that the time derivative is of order 1/e. An important exception concerns the case where the initial data are “wellprepared”: Assume that the initial conditions can be written ve ðt ¼ 0Þ ¼ v0 + eve1 where v0 and ve1 are bounded in Hs(O) and where v0 2 Ker, then the e term will balance with the 1/e factor in front of the operator ve , giving a bound independent of e on the time derivative of ve. This allows to establish the convergence of the solution of (17) to the solution of the incompressible system with initial data v0. For rigorous results concerning the case of well-prepared initial data, one can see Klainerman and Majda (1981), Klainerman and Majda (1982), Majda (2012), Schochet (1988) as well as the interesting works of Kreiss and his coworkers on the “bounded derivative” principle (Browning and Kreiss, 1982; Gustafsson, 1908; Kreiss, 1980; Kreiss et al., 1991). However, in the case of general initial data, where the time derivative at t ¼ 0 is genuinely of order 1/e, one has to use a different strategy. Such a strategy has been introduced in Schochet (1994) and then used with different variations in other works (Gallagher, 1998; Grenier, 1997; Lions and Masmoudi, 1998). The key idea behind this strategy is that in the presence of ill-prepared data, the acoustic operator  will be responsible of the generation of fast oscillatory waves on time scales of order e. It is therefore necessary to “filter” these components of the solution in order to bound the time derivative. This is done as follows: Let us introduce the group LðtÞ ¼ expðtÞ

(19)

of the solutions of the acoustic equation. In other words vðt, xÞ ¼ LðtÞv0 ðxÞ

if

@v + v ¼ 0 @t

with vðt ¼ 0, xÞ ¼ v0 ðxÞ

Now consider the “filtered variable” we defined by we ¼ Lðt=eÞve

(20)

From the definition of L, we deduce that @we  e @ve ¼ w + Lðt=eÞ @t @t e and then with (17) that we satisfies: @we + Lðt=eÞQðLðt=eÞwe , Lðt=eÞwe Þ ¼ OðeÞ @t

(21)

with initial data ve(t ¼ 0) as Lð0Þ is the identity. In contrast with Eq. (17), (21) does not contain any unbounded 1/e term. Indeed using again that  is a skew-symmetric linear operator with constant coefficient, L is an isometry:

212 Handbook of Numerical Analysis

k LðtÞvkHs ¼k vkHs and thus (21) shows that the time derivative of we is uniformly bounded independently of e. We can then establish that we converge to a function w solution of the system @w + Qðw, wÞ ¼ 0 @t

(22)

where Qðw, wÞ is an averaged operator defined as the limit of Lðt=eÞQðLðt=eÞw, Lðt=eÞwÞ The original variable v can then be obtained by “un-filtering” back the solution of the filtered equations and we have for all e sufficiently small ve ¼ Lðt=eÞw + oð1Þ

(23)

The system (22) describe completely the behaviour of the solution for sufficiently small Mach number. To obtain an explicit description of the solution, we can reformulate this system by splitting its solution w into a slow part ws and a fast one wf defined as ws ¼ Pw

wf ¼ ðI  PÞw

where P is the L2 projection into the kernel of , that is, for any w ¼ (f, u)t, we have  t Pw ¼ f, udiv where f is the spatial mean of f while udiv ¼ Pu ¼ u rD1ru is the L2 projection of the velocity on the space of divergence-free vector fields. Applying the projection P to (22) we get @ws + PQðws , ws Þ + PQðws , wf Þ + PQðwf , ws Þ + PQðwf , wf Þ ¼ 0 @t

(24)

the first line of this system simply gives that the pressure fluctuation cs is zero. To establish the equation on the velocity, we will use that PQðwf , ws Þ ¼ PQðws , wf Þ ¼ 0. The quadratic term involving the fast variable Qðwf , ws Þ can be shown to be written as a gradient (see Schochet, 1994 or Grenier, 1997) then it also disappears under the action of the projection P and the second line reduces to the Leray formulation of incompressible system: @udiv + Pr  ðudiv  udiv Þ ¼ 0 @t

(25)

Finally, using that L is the identity on the kernel of , we have from (23)   0 + Lðt=eÞwf + oð1Þ (26) ve ¼ udiv where udiv solves the incompressible equation.

On the Behaviour of Upwind Schemes Chapter

8 213

Let us summarize the results of this section. In the low Mach number limit, the solution can be written as the sum (26) of a slow part ws(x, t) where the velocity is divergence-free plus a fast component wf(x, t, t/e) that depends on the fast time t/e. Moreover, the slow part is solution of the incompressible equations:  r0

divðws Þ ¼ 0

(27a) 

@ udiv + div ðudiv  udiv Þ + rp ¼ 0 @t

(27b)

In general, udiv(x, t) is only a weak limit of the solutions except for well prepared initial data close to the kernel of . This special class of initial data is characterized by:  cðx, 0Þ ¼ er2 ðx, 0Þ (28) uðx, 0Þ ¼ u01 ðx, 0Þ + eu2 ðx, 0Þ with divu01 ¼ 0 Going back to the original variables (p, u) in dimensional units, we see that this implies that the initial data are such that:  pðx, 0Þ ¼ r a2 ðConstant + e2 p2 ðx, 0ÞÞ (29) uðx, 0Þ ¼ a ð0 + eu1 ðx,0Þ + e2 u2 ðx, 0ÞÞ with divu1 ¼ 0 where p2(x, 0), u1(x, 0), u2(x, 0) are smooth, regular functions.

2.4

Finite Volume Schemes

We consider in this section the application of standard compressible flow solvers to the computation of steady or unsteady solutions of the Euler equations of gas dynamics in the low Mach limit. More precisely, given a fixed mesh, we want to understand the behaviour of finite volume schemes when the reference Mach number (for instance the inflow Mach number for an aerodynamical computation) goes to zero, and in particular why this particular type of approximation fails to compute the incompressible limit. In order to simplify the presentation and to point out the difference with the continuous case, we again restrict ourselves to the isothermal case. Now, let O be a 2D or 3D flow domain that for simplicity, we consider polygonal and let Th be a tessellation of this domain in nonoverlapping control volumes Ci, i 2{1, …, nh}. The present analysis does not assume any particular properties of the mesh Th. As is quite common with compressible solvers, the approximation, which we are dealing with, localizes the degrees of freedom (density, pressure and velocity) in a colocated manner at the centre of the cell Ci. Note that in contrast, incompressible flow solvers use very often staggered grids and that if colocalized grids are used for the computations of incompressible flows, some specific procedures have to be used to overcome the inf-sup criterion. We will come back to this point later. We use the notations of Guillard and Viozat (1999): The set of neighbours of cell

214 Handbook of Numerical Analysis

i is denoted by VðiÞ. The area (volume in 3-D) of cell i is jCij. The symbol il denotes an edge (face) between cell i and cell l whose length (surface) is dil. The vector n il denotes the unit normal vector to edge il oriented from i to l. For any variable f, we define the jump operator Dilf as Dil f ¼ fi  fl

(30)

and we adopt the specific notation DilU to denote the normal component of the velocity jump at the interface between two cells, denoted by Dil U ¼ ðu i  u l Þ:n il

(31)

Finally, the notation fil will denote some average (here for simplicity the Roe average) of the variable f between fi and fl. With these notations, the application of a first-order upwind finite volume method yields the following set of semidiscrete equations:   X d ri + jCi j dil Fðvi , vl , n il Þ ¼ 0 dt mi l2VðiÞ

where Fðvi ,vl ,n il Þ is the numerical flux. It is customary to express the numerical flux as a sum of a centred part and a numerical dissipation: 1 jAil j Dil v Fðvi , vl , n il Þ ¼ ðFðvi Þ  n il + Fðvl Þ  n il Þ  2 2 where Ail is some approximation of the Jacobian matrix @FðvÞ  n il =@v. From the hyperbolicity of the system, this matrix can be diagonalized and the numerical flux can be written as: 1 1 Fðvi , vl , n il Þ ¼ ðFðvi Þ  n il + Fðvl Þ  n il Þ  Ril jLil jR1 il Dil v 2 2

(32)

where Ril is the matrix composed of the right eigenvectors and Lil, the diagonal matrix formed by the corresponding eigenvalues. In the present case for instance, the application of Roe scheme results in: Fðv8 i , vl , n il Þ Uil > > ðrl u l :n il + ri u i :n il Þ + a Dil r + ril Dil U > > a >     1< Uil2 ¼ Dil U n il ðr u :n u + r u :n u + r n Þ + 2a Uil Dil r + ril a + 2> > > l l il l i i il i l il a > > : +jUil jðril Dil V + VDil rÞn?il where in this expression, a* is the constant speed of sound and the terms proportional to a jump Dil represent a numerical dissipation.

On the Behaviour of Upwind Schemes Chapter

2.5

8 215

The Diagnosis

The analysis of this scheme will be done using exactly the same strategy than in the continuous case. First we normalize the variables using the reference quantities given in (2). As in the continuous case, the reference Mach number e ¼ u*/a* appears explicitly in the equations and we obtained the following set of scaled semidiscrete equations Mass conservation d 1X dil rl ðu l  n il Þ jCi j ri + dt 2 l2VðiÞ 1 X eX + dil Dil r + dil ril Uil Dil U ¼ 0 2e l2VðiÞ 2 l2VðiÞ

(33a)

Momentum conservation d 1X 1 X jCi j ri u i + dil rl ðu l  n il Þu l + 2 dil rl n il dt 2 l2VðiÞ 2e l2VðiÞ  1X 1 X eX + ðdil Uil Dil rÞn il + ðril Dil UÞn il + r U2 Dil U n il e l2VðiÞ 2e l2VðiÞ 2 l2VðiÞ il il 1X + dil jUil jðril Dil V + Vil Dil rÞn?il ¼ 0 2 l2VðiÞ (33b) then we again proceed as in the continuous case and perform the change of variablecr ¼ 1 + ec to obtain: 1Xd  X dil  d il jCi j ci + u l :n il + Dil c ¼ OðeÞ cl ðu l  n il Þ + Uil Dil U + 2 dt e l2VðiÞ 2 l2VðiÞ (34a)

X dil  d jCi j u i + ðu l  n il Þu l + cil ðDil UÞn il + 2Uil Dil c + jUil jðDil VÞn?il 2 dt l2VðiÞ 1 X dil  + cl n il + Dil Un il ¼ OðeÞ e l2VðiÞ 2

(34b)

c

This requires, however, to prove that the 0-order pressure is constant, we assume this result here and refer to Guillard and Viozat (1999) for the proof.

216 Handbook of Numerical Analysis

This change of variable “symmetrize” the system and as in the continuous case, we can write the previous equations in a compact form similar to (17): @veh 1 + Qh ðveh , veh Þ + h veh ¼ OðeÞ @t e

(35)

where as in the continuous case, the discrete acoustic operator h defined by:   1 X Dil c + u l :n il dil ½h vh i ¼ (36) cl n il + Dil Un il 2jCi j l2VðiÞ is a linear constant coefficient operator. The terms u l :n il and cl n il obviously represent approximations of div u and rc. However, in contrast with the continuous case where the acoustic operator is defined by   div u v ¼ rc the discrete acoustic operator contains also artificial viscosity terms Dilc and Dil Un il that are approximation of some second-order dissipative terms with diffusion coefficient proportional to the mesh size. In view of the results of Section 2, the origin of these terms is clear. The low Mach behaviour of the continuous Euler equations contains two potential limits: the incompressible one and the acoustic one. But the pressure fluctuations associated to the acoustic limit are an order of magnitude larger than the ones associated with the incompressible limit (see Section 2.2). Consequently, these terms appear as the dominant ones in the artificial viscosity of upwind schemes. Indeed, if one interpret Fðvi , vl , n il Þ the numerical flux at the interface between two cells as the flux coming from the solution of a Riemann problem between the states vi, vl, it has been shown in Guillard and Murrone (2004) that the interface state is actually the solution of a linear acoustic problem defined by the background state. From a practical point of view, the immediate consequence is that on a fixed mesh, the discrete solutions of compressible upwind solvers cannot converge to a reasonable approximation of the incompressible solution. Instead the discrete solutions will converge to the nonzero solution of some Stokes like problem defined by:

To see that, subtract u0i 

X l2V

½h vh  ¼ 0 dil n il ¼ 0 to the first line of (36) and ci 

X l2V

(37) dil n il ¼ 0

to the second line, it is seen that the system (37) can be written as X

ðDil c  Dil UÞdil ¼ 0

(38a)

l2VðiÞ

X

l2VðiÞ

ðDil c  Dil UÞdil n il ¼ 0

(38b)

On the Behaviour of Upwind Schemes Chapter

8 217

This can be considered as a linear system of 3  nh equations (nh being the number of cells), for the ne/2 unknowns Dilc DilU where ne is the number of edges.d In general, this system have nonzero solutions implying that the discrete solution will contain nonconstant c corresponding to pressure fluctuations of order e, while the pressure fluctuations associated with incompressible phenomena are of order e2. The analysis performed here for the barotropic equations extends easily to the complete Euler system with the same results. From now on, we consider again the full complete Euler system since this system is the one used in practical applications.

2.6

The Remedies

With this analysis at hand, one can propose different cures to recover a proper convergence towards the incompressible limit. The common point of these approaches will be to modify the artificial viscosity to suppress the unwanted acoustic fluctuations.

2.6.1 Preconditioned Dissipation: The Roe–Turkel Scheme This strategy is the oldest and was inspired from the preconditioned approach introduced in Turkel (1993, 1999), Turkel et al. (1994, 1997) and Choi and Merkle (1993) to overcome the convergence problems encountered by compressible solvers in the computation of steady states in the low Mach limit. In these approaches the standard scheme X d dil Fðvi , vl , n il Þ ¼ 0 jCi j vi + dt l2VðiÞ is modified by the introduction of a preconditioning matrix P multiplying the time derivative X d dil Fðvi , vl , n il Þ ¼ 0 P1 jCi j vi + dt l2VðiÞ the matrix P being chosen such that the eigenvalues of P@FðvÞ  n=@v are well balanced and bounded when e ! 0 in order to accelerate the convergence properties towards steady state of the time advancing scheme. The construction of such matrices has been studied in several works. Turkel (1993) presents an overview of the different possibilities, while the preconditioner proposed in Weiss and Smith (1995) is extremely popular in applications. The basic idea of the preconditioned dissipation schemes is to use the good properties of the preconditioning matrices to modify the artificial viscosity matrices in order to recover the convergence towards the incompressible d

The precise number of equations and unknowns have actually to take into account the boundary conditions.

218 Handbook of Numerical Analysis

solution that is destroyed by upwind schemes. In the preconditioned dissipation schemes, the numerical flux is thus changed into: !

Fðqi , ql , n!il Þ ¼

!

F ðqi Þ + F ðql Þ 1  n il + Pðqil Þ1 j Pðqil ÞAðqil Þ j Dil q 2 2

(39)

where P(qil) is a preconditioning matrix constructed on each edges. With respect to the original Roe scheme, only the dissipative terms are altered and therefore the numerical scheme remains a consistent approximation of the time dependent compressible Euler equations. The term Roe–Turkel scheme was coined to designate this particular type of low Mach scheme. In Guillard and Viozat (1999), an asymptotic analysis of why this approach allows to obtain a correct scaling of the pressure fluctuation with the square of the Mach number was presented. Actually, this scheme modifies in a very important way the dissipation matrix. In a Mach number expansion, the dominant term of the dissipation matrix becomes instead of (36) l

Continuity equation X

Dil c dil pffiffiffiffiffi ¼ 0 Yil l2VðiÞ l

Momentum equation X l2VðiÞ

 dil

 ðUn + 2uÞil pffiffiffiffiffi Dil c ¼ 0 cl n il + Yil

(40)

(41)

where Y is an interface quantity positive and of order 1. Comparing the case of the preconditioned dissipation with the one of the original upwind scheme, we note that there is an important difference in the structure of the dissipation terms. In the original Roe scheme, the 1/e equations link the pressure jumps with the normal velocity jumps. A consequence is that the order e pressure c cannot be constant. On the other hand, for the preconditioned dissipation, the equations involve only the pressure jumps and force c to be a constant. It must also be noted that the preconditioned dissipation schemes realize the convergence towards incompressible solution by augmenting the numerical dissipation on the pressure. On the opposite, the next low Mach scheme to be described try to attain this goal by reducing the numerical viscosity.

2.6.2 The All-Speed Scheme This approach has been introduced in a series of works (Li and Gu, 2008, 2013; Li et al., 2009) and stems from the observation that AUSM+ schemes used for large eddy simulation have good low dissipation properties for low Mach flows (Mary and Sagaut, 2002). While in the Roe–Turkel scheme, both the eigenvalues and the eigenvectors of the numerical dissipation are

On the Behaviour of Upwind Schemes Chapter

8 219

modified, this technique proposes to change only the eigenvalues. Thus the expression of the numerical flux becomes: 1 1 Fðvi , vl , n il Þ ¼ ðFðvi Þ  n il + Fðvl Þ  n il Þ  Ril jLAil jR1 il Dil v 2 2

(42)

where the u  n il a eigenvalues of Lil are modified into u  n il f ðeÞa with f(e) a smoothly varying function that goes to zero and 1 with e. This scheme reveals itself extremely oscillatory and then it was proposed to modify the centred part of the flux using a momentum interpolation method as in Rhie and Chow (1983) and Mary and Sagaut (2002). In Li and Gu (2008), the fact that the Roe–Turkel scheme of Section 2.6.1 does not satisfy a divergence-free constraint at Mach ¼ 0 was also presented as an argument to prefer the approach (42) since in this latter approach, the discrete velocity exactly verifies at e ¼ 0 X dil u l :n il ¼ 0 (43) l2VðiÞ

This argument has to be used with some caution. Actually and as recalled earlier, compressible flow solvers of the type studied here use a colocated arrangement of the variables and therefore this will be also the case for the limit scheme obtained at Mach ¼ 0. But from finite element theory applied to incompressible flows, we know that the choice of the pressure and velocity approximation spaces cannot be arbitrary and have to satisfy the inf-sup criterion to yield an unique solution. We also know that colocalized arrangement of variable does not satisfy the inf-sup criterion and therefore that these approximations suffer from the presence of spurious pressure modes. To overcome this difficulty, approximations of incompressible models use therefore mixed finite element spaces or staggered grids. Another way to overcome this difficulty is to use a stabilized finite element formulation as introduced in Hughes et al. (1986). In this approach, to stabilize the Galerkin formulation of the Stokes (or Darcy) problem that yield a discrete problem of the form:    ch 0 rh  ¼F Dh vh rh stabilization matrices are added to the diagonal giving a discrete problem with the structure:    rh  ch Mh ¼F Dh vh rh and it is shown in Hughes et al. (1986) that a proper choice of the stabilization matrices preserves the convergence rate of the approximation. We observe that the Roe–Turkel scheme precisely adds in the discrete mass conservation equation a similar stabilization term proportional to the pressure jumps while

220 Handbook of Numerical Analysis

this term is absent from (42). The momentum interpolation technique used in Li and Gu (2008), Li et al. (2009) and Li and Gu (2013) is another way to reintroduce this stabilization term to avoid the appearance of spurious pressure modes. We do not elaborate on the subject anymore but emphasize that there are sound theoretical reasons to actually prefer a scheme that does not enforce the discrete divergence-free constraint (43) over those where this constraint is respected. The numerical experiments section will give a clear illustration of this point.

2.6.3 Rieper Fix This technique introduced in Rieper (2011) represents a further step in attempts to simplify the preconditioned dissipation technique. In this last method, both the eigenvectors and the eigenvalues of the dissipation matrix are modified. In the All-Mach scheme (Li and Gu, 2008, 2013; Li et al., 2009), the modification concerns only the eigenvalues.e Here, the coefficient of the dissipation matrix is directly modified. The analysis conducting to the Rieper fix comes from the observation in Thornber et al. (2008a) that the unphysical entropy production of upwind schemes at low Mach numbers is related to the jumps of the normal velocity component at the cell interfaces. Then in Thornber et al. (2008b) an improved reconstruction method of MUSCL type was presented to minimize these jumps to achieve high accuracy at low Mach number. The same idea in a quite extreme manner was also used in Dellacherie et al. (2010) where the normal velocity jumps DilU were set exactly to zero in the artificial viscosity matrix, leading to a centring of the pressure gradient in the momentum equation. In Rieper (2011), the same idea is exploited in a smoothest way. Going back to the expression of the dominant term (36) of upwind schemes:   1 X Dil c + u l :n il dil ½h vh i ¼ (44) cl n il + Dil Un il 2jCi j l2VðiÞ

the numerical dissipation in the momentum equation associated to the DilU term in the second line is interpreted as preventing the pressure variable c to be constant. Rieper (2011) thus proposes to change this term into: Dil U ! min ðe, 1ÞDil U. At the dominant term in an expansion in Mach number the dissipation term will thus be:   1 X Dil c + u l :n il dil ½h vh i ¼ (45) cl n il 2jCi j l2VðiÞ

and the presence of nonconstant pressure c will be suppressed. Later on, this idea was pursue in Oswald et al. (2016) by reducing also the jump in the transverse velocity in an attempt to use as little numerical viscosity as possible e

In principle, however, in practice, use of momentum interpolation techniques is required.

On the Behaviour of Upwind Schemes Chapter

8 221

while preserving the stability. However, we remark from (45) that if the firstorder pressure c is a constant then the scheme will verify the divergence-free constraint (43) and according to the discussion in the previous section, the presence of spurious pressure fluctuations cannot be ruled out a priori. In Rieper (2011), arguments are presented to show that the scheme avoids the presence of checkerboard pressure modes. These argument, however, are only valid for regular cartesian meshes, and it is not sure that they can be applied for other type of meshes. Actually, in the following numerical experiment section, we will exhibit a situation where the Rieper fix produces pressure fluctuation of the wrong order while the results obtained with the classical standard Roe scheme are perfectly consistent with the incompressible limit.

3

NUMERICAL ILLUSTRATIONS

We use as numerical test the simple case of the computation at a low Mach number of the flow around a cylinder of radius r0. This test case is useful since an analytical reference solution of the incompressible solution is known. The flow O domain is an annulus [r0, r1]  [0, 2p]. Here, we have used r0 ¼ 0.5 and r1 ¼ 5. The initial data are uniform and set equal to r0 ¼ 1, u0 ¼ ðu0 , 0Þt , p0 ¼ 1

pffiffiffi with u0 ¼ gM where g ¼ 1.4 is the adiabatic index and M* is the mach number at infinity set here equal to 0.1. The exact solution at infinity is uniform pffiffiffi r∞ ¼ 1, u0 ¼ ð gM , 0Þt , p∞ ¼ 1 In all the computation presented here, the boundary conditions are implemented by considering a layer of ghost cells whose value is set to the exact solution at infinity. The computations are time-advanced until a steady state characterized by a residual of 107 is reached. The time advancing scheme is an implicit linearized method using Jacobian matrices corresponding to each of the four studied numerical flux (Roe, Roe–Turkel, All-Speed, Rieper). As noted in Birken and Meister (2005) (see also Dellacherie, 2010) the Roe–Turkel scheme suffers from a severe stability restriction Dt ¼ OðMa2 Þ that forbids the use of time explicit integration for this method. The other three schemes are stable under the standard CFL stability criterion Dt ¼ OðMaÞ and in principle explicit schemes can be used with these schemes although explicit time advancing becomes more and more costly as the Mach number is decreased.

3.1

Order 1: Quadrangular Cartesian Grids

The first set of numerical experiments is done using a polar quadrangular grid with a resolution of 50 (radius) by 150 (angle). A first-order accurate scheme is used.

222 Handbook of Numerical Analysis Contour Var: Pressure fluctuations

4.0

Contour Var: Pressure fluctuations

4.0

Max: 0.01350 Min: —0.01730

2.0

Y-axis

Y-axis

2.0

0.0

0.0

–2.0

–2.0

–4.0

–4.0 –4

–2

0 X-axis

2

4

–4

Contour Var: Pressure fluctuations

4.0

–2

0 X-axis

2

4

0 X-axis

2

4

Contour Var: Pressure fluctuations

4.0

Max: 0.007786 Min: —0.02019

2.0

Max: 0.008425 Min: —0.01984

2.0

Y-axis

Y-axis

Max: 0.007633 Min: —0.01797

0.0

0.0

–2.0

–2.0

–4.0

–4.0 –4

–2

0 X-axis

2

4

–4

–2

FIG. 1 Pressure fluctuations. Top left: Roe scheme. Top right: Roe–Turkel scheme. Bottom left: Rieper fix. Bottom right: all-speed scheme.

Fig. 1 displays the pressure fluctuations defined as dp ¼ (p  p0)/p0. 20 isocontours between  0.007 and 0.007 (0:007 ¼ gM2 =2) are displayed. As expected, the Roe scheme gives results quite far from the incompressible solution while the three modified low Mach schemes present a good agreement with the incompressible solution. The Roe–Turkel (Guillard and Viozat, 1999) and Rieper fix (Rieper, 2011) are extremely close to each others. The All-Speed scheme (Li and Gu, 2008) presents some small oscillations near the inflow boundary but is also very close to the other two low Mach modified schemes. For this last scheme, we have used the momentum interpolation method (the equation (8) and (9) of Li and Gu, 2008) with a value c2 ¼ 0.05, slightly larger than the recommended value of 0.04 in an attempt to reduce the possible apparition of spurious pressure modes (see the discussion in Section 2.6.2).

On the Behaviour of Upwind Schemes Chapter

3.2

8 223

Order 1: Vertex-Centred Triangular Meshes

In our next set of experiments, we construct a triangular mesh by cutting each quadrangle of the previous mesh in two by the diagonal in an alternate way (the so-called English flag mesh). Then around each node of the triangulation, a dual control volume is constructed by means of the barycentres of the triangles and the median of the edge. The number of degrees of freedom of this mesh is thus equal to the number of nodes of the triangulation and thus almost equal to the number of degrees of freedom of the previous quadrangular mesh (the difference is due to the boundary condition). However, in contrast to the previous quadrangle mesh, the number of neighbours of one node is not constant and is alternatively equal to 4 or 8. This kind is mesh is thus a good test to judge of the capability of the scheme to support or suppress spurious pressure modes (Fig. 2). Contour Var: Pressure fluctuations

4.0

Contour Var: Pressure fluctuations

4.0

Max: 0.01302 Min: —0.01415

2.0

Y-axis

Y-axis

2.0

0.0

0.0

–2.0

–2.0

–4.0

–4.0 –4

–2

Contour Var: Pressure fluctuations

4.0

0 X-axis

2

4

–4

–2

Contour Var: Pressure fluctuations

4.0

Max: 0.007547 Min: —0.01732

2.0

0 X-axis

2

4

0 X-axis

2

4

Max: 0.008198 Min: —0.01651

2.0

Y-axis

Y-axis

Max: 0.007523 Min: —0.01718

0.0

0.0

–2.0

–2.0

–4.0

–4.0 –4

–2

0 X-axis

2

4

–4

–2

FIG. 2 Pressure fluctuations. Top left: Roe scheme. Top right: Roe–Turkel scheme. Bottom left: Rieper fix. Bottom right: all-speed scheme.

224 Handbook of Numerical Analysis

On this kind of meshes, large differences between the schemes appear. The solution obtained with the classical Roe scheme is clearly deteriorated with respect to the one obtained on the quadrangular mesh. The Roe–Turkel does not seem to be much sensible to the mesh and give a result almost identical to the one obtained on a quadrangular much. The solutions obtained with the All-Speed scheme and Rieper fix are closed together and are clearly worse than on the quadrangular mesh. Moreover, oscillations appear in the results. The method of Rieper (2011) seems to have a better control of these oscillations but does not seem to escape totally to the presence of spurious pressure modes. As explained in Section 2.6.2, the origin of these oscillations can be traced back to the fact that these methods verify the discrete divergence-free constraint (43) while the Roe–Turkel scheme does not. The respect of this constraint is clearly not an advantage on the present mesh.

3.3 Order 1: Cell-Centred Triangular Meshes These experiments use the same triangle mesh as in the previous section but the discretization employs the cell-centred approach where the finite volume cells are the triangle themselves. Fig. 3 shows that the results are surprisingly good even for the classical Roe. At first glance, this seems to be in contradiction with the analysis of Section 2.5. This point has been noted for the first time in Rieper and Bader (2009) where is was shown that the classical Roe scheme do converge to the incompressible limit on triangular cell-centred meshes. Rieper and Bader (2009) present an analysis of this behaviour on special 2D triangular grids. Later on, Guillard (2009) extends this results on general triangulation in 2D or 3D. To understand this unexpected behaviour, let us go back to the expression (38) that gives the behaviour at the dominant order of the discrete solution X ðDil c  Dil UÞdil ¼ 0 (46a) l2VðiÞ

X

l2VðiÞ

ðDil c  Dil UÞdil n il ¼ 0

(46b)

For each cell, this expression is a system of d + 1 equations where d is the space dimension (d scalar equations for the momentum + 1 for the pressure). In Section 2.5, we conclude that in general this equation has nonzero solutions and that these nonzero solutions were responsible of the apparition of pressure fluctuations of order OðeÞ. However, in the special case of cell-centred simplicial meshes, considering xil ¼ (Dilc DilU) as the unknowns of (46), we remark that the number of unknowns is also equal

On the Behaviour of Upwind Schemes Chapter

4.0

4.0 –



2.0

Y-axis

2.0

Y-axis

8 225

0.0

0.0

–2.0

–2.0

–4.0

–4.0 –4

–2

0 X-axis

2

–4

4

–2

0 X-axis

2

4

–2

0 X-axis

2

4

4.0 –

Y-axis

2.0

0.0

–2.0

–4.0 –4

FIG. 3 Pressure fluctuations. Top left: Roe scheme. Top right: Roe–Turkel scheme. Bottom right: all-speed scheme.

to d + 1 since by definition a simplex has exactly d + 1 neighbours. Thus (46) can be viewed as a square linear system for the xil. It can be proved (Guillard, 2009) that the determinant of the corresponding matrix is nonzero. From this results, it can be deduced that the only possible solution of (46) is constant pressure fields and velocities satisfying a divergence-free constraint. Thus, in contrast with the other type of meshes, the solutions computed by Roe schemes on cell vertex triangular grid converge to the incompressible limit and upwind schemes in this context are particularly efficient to enforce a discrete divergence-free constraint with no spurious pressure modes. It can be seen in Fig. 3 that this property seems to be preserved by the Roe– Turkel and All-Speed schemes. This is, however, not the case for Rieper fix.

226 Handbook of Numerical Analysis

The computations done with this scheme lead to numerical blow-up (negative densities appear). It is easy to understand why. Rieper fix replaces the expression (36) of the large operator by:   1 X Dil c + u l :n il dil ½h vh i ¼ (47) cl n il 2jCi j l2VðiÞ

looking at the kernel of this operator, we can write it in the form (46) as: X X

ðDil c  Dil UÞdil ¼ 0

(48a)

ðDil c  Dil UÞdil n il ¼ Dil Udil n il

(48b)

l2VðiÞ

l2VðiÞ

this shows, for the same reasons proving that (46) has only zero solutions, that (48) has nonzero solutions. On cell-centred triangular meshes, the Rieper fix thus does not reduces pressure fluctuations but on the opposite, create them.

3.4 Order 2: Vertex-Centred Triangular Meshes We conclude this experimental section by some results on second-order schemes that at the present time are the standard of compressible solvers. The largest differences between the schemes appear on the vertex-centred triangular meshes already used in Section 3.2. The conditions are exactly the same than for the order 1 computations. For all the schemes, the same MUSCL procedure using a minmod limiter and a multislope reconstruction is applied. Fig. 4 displays 15 isocontours of pressure fluctuations comprised between 0.007. In addition, this figure is also superposed pseudocolour plots of the fluctuations of entropy comprised between 105 (i.e. white colour if < 105) and 103 (magenta if > 103). The Roe scheme as well as the Roe– Turkel schemes converge to a steady state. The production of entropy by the Roe scheme is important and affect all the downwind part of the cylinder and the wake. This unphysical production of entropy is greatly reduced by the Roe–Turkel scheme and as shown in Fig. 5 the solution presents a very good agreement with the incompressible solution. As regards the other two low Mach schemes, it has not been possible to obtain a steady state. The All-Speed and Rieper schemes exhibit an unsteady behaviour characterized by pseudo von Karman alleys. In addition, some oscillations in the pressure profile are noticeable that again seem to be better controlled by the Rieper scheme. The numerical viscosities that are greatly reduced by these two schemes do not seem to be sufficient to obtain a steady solution in this case.

4.0

4.0 –



2.0

Y-axis

Y-axis

2.0

0.0

0.0

–2.0

–2.0

–4.0

–4.0 –4

–2

0 X-axis

2

4

–4

0 X-axis

2

4

–2

0 X-axis

2

4

4.0

4.0 –



2.0

Y-axis

2.0 Y-axis

–2

0.0

0.0

–2.0

–2.0

–4.0

–4.0 –4

–2

0 X-axis

2

–4

4

FIG. 4 Pressure (isocontour) and entropy (colour). Top left: Roe scheme. Top Right: Roe–Turkel scheme. Bottom left: Rieper fix. Bottom right: all-speed scheme.

1.5 1.0

Y-axis

0.5 0.0 –0.5 –1.0 –1.5

–1.5

–1.0

–0.5

0.0

0.5

1.0

1.5

X-axis

FIG. 5 Pressure fluctuation isolines: Comparison of the incompressible potential solution (red, dotted line) with the numerical solution (blue) obtained by the order 2 Roe–Turkel scheme.

228 Handbook of Numerical Analysis

4 CONCLUSION Low Mach number flows appear in a wide variety of situations and the design of appropriate discretizations motivates an important activity. A first type of approaches used for this purpose starts from numerical methods originally designed for the approximation of incompressible flows. In this work, we have considered the opposite point of view and have examined how to adapt upwind compressible flow solvers to compute solutions close to the incompressible limit. A large number of experimental evidences show that upwind schemes are unable to compute accurately these flows. We have seen that this failure of compressible flows solvers is deeply connected to the fact that the incompressible limit of the compressible system is not the only possible one. The acoustic limit coexits with the incompressible part of the solution. Moreover, the pressure fluctuations associated to the acoustic limit, dominate by one order of magnitude the pressure variation due to incompressible effects. The consequence is then that the numerical viscosity of upwind scheme is mainly due to acoustic effects and not to incompressible ones. To overcome this difficulty, several different strategies have been proposed in the past. We have selected three of them as representative examples of the different proposed approaches. The rationale behind these approaches has been explained, and we have presented numerical experiments on a simple test case to compare them. The results show that the performance of the different method is highly dependent on the type of mesh used. Overall the preconditioned dissipation (Roe–Turkel) (Guillard and Viozat, 1999) is the less sensible to the type of meshes. The other two methods (Li and Gu, 2008; Rieper, 2011) have good performance on cartesian grids but presents oscillatory results on triangular vertex-centred grids. On the “pathological” case of cell-centred triangular meshes, the low Mach methods preserve the accuracy of the classical Roe scheme except the method of Rieper (2011) that creates huge oscillation leading to numerical divergence of the computations. Of course, it would be comfortable to identify a “best” method among the studied ones. This is unfortunately not the case and all the methods have their weaknesses. The preconditioned dissipation (Guillard and Viozat, 1999) method must be used with time implicit schemes. The All-Speed (Li and Gu, 2008) and Rieper (2011) methods enjoy a standard CFL stability constraint but give oscillatory results that can prevent the convergence to steady state. It must be emphasized that the test-case studied here is a simple inviscid one. Care must be taken before extrapolating the conclusions of this chapter for DNS or LES simulations where the reduction of numerical viscosity is an important issue.

REFERENCES Abgrall, R., Guillard, H., 2005. Special issue on low Mach number flows conference. ESAIM: M2AN 39 (3), 437–621. http://dx.doi.org/10.1051/m2an:2005018. Alazard, T., 2008. A minicourse on the low Mach number limit. Discrete Contin. Dyn. Syst. Ser. S 1 (3), 365–404.

On the Behaviour of Upwind Schemes Chapter

8 229

Bijl, H., Wesseling, P., 1998. A unified method for computing incompressible and compressible flows in boundary fitted coordinate. J. Comput. Phys. 141, 153–173. Birken, P., Meister, A., 2005. Stability of preconditioned finite volume schemes at low Mach numbers. BIT Numer. Math. 45 (3), 463–480. Browning, G., Kreiss, H.O., 1982. Problems with different time scales for non-linear partial differential equations. SIAM J. Appl. Math. 42, 704–718. Choi, Y.H., Merkle, C.L., 1993. The application of preconditioning in viscous flows. J. Comput. Phys. 105, 207–223. Degond, P., Tang, M., 2011. All speed method for the Euler equation in the low Mach number limit. Commun. Comput. Phys. 10, 1–31. Dellacherie, S., 2010. Analysis of Godunov type schemes applied to the compressible Euler system at low Mach number. J. Comput. Phys. 229 (4), 978–1016. ISSN 0021-9991. http://dx.doi.org/10.1016/j. jcp.2009.09.044. http://www.sciencedirect.com/science/article/pii/S0021999109005361. Dellacherie, S., Omnes, P., Rieper, F., 2010. The influence of cell geometry on the Godunov scheme applied to the linear wave equation. J. Comput. Phys. 229 (14), 5315–5338. Gallagher, I., 1998. Asymptotic of the solutions of hyperbolic equations with a skew-symmetric perturbation. J. Diff. Equat. 150 (2), 363–384. ISSN 0022-0396. http://dx.doi.org/10.1006/ jdeq.1998.3487. http://www.sciencedirect.com/science/article/pii/S0022039698934878. Gallouet, T., Gastaldo, L., Herbin, R., Latche, J.C., 2008, 3. An unconditionally stable pressure correction scheme for the compressible barotropic Navier-Stokes equations. ESAIM: Math. Model. Numer. Anal. 42 (2), 303–331. http://eudml.org/doc/250414. Grenier, E., 1997. Oscillatory perturbations of the Navier-Stokes equations. J. Math. Pures. Appl. 76, 477–498. Guillard, H., 2009. On the behavior of upwind schemes in the low Mach number limit. IV: P0 approximation on triangular and tetrahedral cells. Comput. Fluids 38 (10), 1969–1972. ISSN 0045-7930. http://dx.doi.org/10.1016/j.compfluid.2009.06.003. http://www.sciencedirect. com/science/article/pii/S0045793009000838. Guillard, H., Murrone, A., 2004. On the behavior of upwind schemes in the low Mach number limit: II. Godunov type schemes. Comput. Fluids 33 (4), 655–675. Guillard, H., Viozat, C., 1999. On the behavior of upwind schemes in the low Mach number limit. Comput. Fluids 28, 63–96. Gustafsson, B., 1908. Asymptotic expansions for hyperbolic problems with different time scales. SIAM J. Numer. Anal. 17, 623–634. Harlow, F.H., Amsden, A.A., 1971. A numerical fluid dynamics calculation method for all flow speeds. J. Comput. Phys. 8 (2), 197–213. ISSN 0021-9991. http://dx.doi.org/10.1016/00219991(71)90002-7. http://www.sciencedirect.com/science/article/pii/0021999171900027. Helbing, D., 1992. A fluid-dynamic model for the movement of pedestrians. Complex Syst. 6, 391–415. Hughes, T.J.R., Franca, L.P., Balestra, M., 1986. A new finite element formulation for computational fluid dynamics: V. Circumventing the Babusˇka-Brezzi condition: a stable Petrov-Galerkin formulation of the stokes problem accommodating equal-order interpolations. Comput. Methods Appl. Mech. Eng. 59 (1), 85–99. ISSN 0045-7825. http://dx.doi.org/10.1016/0045-7825(86)90025-3. http://www.sciencedirect.com/science/article/pii/0045782586900253. Klainerman, S., Majda, A., 1981. Singular limits of quasilinear hyperbolic systems with large parameters and the incompressible limit of compressible fluids. Commun. Pure Appl. Math. 34 (4), 481–524. ISSN 1097-0312. http://dx.doi.org/10.1002/cpa. 3160340405. Klainerman, S., Majda, A., 1982. Compressible and incompressible fluids. Commun. Pure Appl. Math. 35, 629–653.

230 Handbook of Numerical Analysis Klein, R., 1995. Semi-implicit extension of a Godunov-type scheme based on low Mach number asymptotics I: one-dimensional flow. J. Comput. Phys. 121, 213–237. Kreiss, H.O., 1980. Problems with different time scales for partial differential equations. Commun. Pure Appl. Math. 33, 399–440. Kreiss, H.O., Lorenz, J., Naughton, M.J., 1991. Convergence of solutions of the compressible to the solutions of the incompressible Navier-Stokes equations. Adv. Appl. Math. 12, 187–214. Li, X.S., Gu, C.W., 2008. An all-speed Roe-type scheme and its asymptotic analysis of low Mach number behaviour. J. Comput. Phys. 227 (10), 5144–5159. ISSN 0021-9991. http://dx.doi.org/ 10.1016/j.jcp.2008.01.037. http://www.sciencedirect.com/science/article/pii/S0021999108000697. Li, X.S., Gu, C.W., 2013. Mechanism of Roe-type schemes for all-speed flows and its application. Comput. Fluids 86, 56–70. ISSN 0045-7930. http://dx.doi.org/10.1016/j.compfluid.2013.07.004. http://www.sciencedirect.com/science/article/pii/S0045793013002752. Li, X.S., Gu, C.W., Xu, J.Z., 2009. Development of Roe-type scheme for all-speed flows based on preconditioning method. Comput. Fluids 38 (4), 810–817. ISSN 0045-7930. http://dx.doi.org/10.1016/j.compfluid.2008.08.002. http://www.sciencedirect.com/science/ article/pii/S0045793008001928. Lions, J.L., 1993. Limite incompressible et acoustique pour les fluides visqueux, compressibles et isentropiques. CRAS 317, 1197–1220. Serie I. Lions, P.L., Masmoudi, N., 1998. Incompressible limit for a viscous compressible fluid. J. Math. Pures Appl. 77 (6), 585–627. ISSN 0021-7824. http://dx.doi.org/10.1016/S0021-7824(98) 80139-6. http://www.sciencedirect.com/science/article/pii/S0021782498801396. Majda, A., 2012. Compressible Fluid Flow and Systems of Conservation Laws in Several Space Variables. Applied Mathematical Sciences, Springer, New York, NY. https://books.google. fr/books?id¼U4zfBwAAQBAJ. ISBN 9781461211167. Mary, I., Sagaut, P., 2002. Large Eddy simulation of flow around an airfoil near stall. AIAA J. 40 (6), 1139–1145. Metivier, G., Schochet, S., 2001. The incompressible limit of the non-isentropic Euler equations. Arch. Ration. Mech. Anal. 158 (1), 61–90. ISSN 1432-0673. http://dx.doi.org/10.1007/ PL00004241. Metivier, G., Schochet, S., 2001. Limite incompressible des equations d’Euler non-isentropiques. http://www.maths.univ-rennes1.fr/metivier/preprints.html. Seminaire equations aux derivees partielles de l’ecole Polytechnique, to be found at. Munz, C.D., Roller, S., Klein, R., Geratz, K.J., 2003. The extension of incompressible flow solvers to the weakly compressible regime. Comput. Fluids 32 (2), 173–196. ISSN 00457930. http://dx.doi.org/10.1016/S0045-7930(02)00010-5. http://www.sciencedirect.com/science/ article/pii/S0045793002000105. Oswald, K., Siegmund, A., Birken, P., Hannemann, V., Meister, A., 2016. L2Roe: a low dissipation version of Roe’s approximate Riemann solver for low Mach numbers. Int. J. Numer. Methods Fluids 81 (2), 71–86. ISSN 1097-0363. http://dx.doi.org/10.1002/fld.4175. Fld.4175. Rhie, C.M., Chow, W.L., 1983. Numerical study of the turbulent flow past an airfoil with trailing edge separation. AIAA J. 21, 1525–1532. Rieper, F., 2011. A low-Mach number fix for Roe’s approximate Riemann solver. J. Comput. Phys. 230 (13), 5263–5287. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2011.03.025. http://www.sciencedirect.com/science/article/pii/S0021999111001689. Rieper, F., Bader, G., 2009. The influence of cell geometry on the accuracy of upwind schemes in the low Mach number regime. J. Comput. Phys. 228 (8), 2918–2933. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2009.01.002. http://www.sciencedirect.com/ science/article/pii/S0021999109000096.

On the Behaviour of Upwind Schemes Chapter

8 231

Schochet, S., 1988. Asymptotics for symmetric hyperbolic systems with a large parameter. J. Diff. Equat. 75, 1–27. Schochet, S., 1994. Fast singular limits of hyperbolic PDEs. J. Diff. Equat. 114, 476–512. Schochet, S., 2005. The mathematical theory of low Mach number flows. ESAIM: M2AN 39 (3), 441–458. http://dx.doi.org/10.1051/m2an:2005017. Thornber, B., Drikakis, D., Williams, R.J.R., Youngs, D., 2008a. On entropy generation and dissipation of kinetic energy in high-resolution shock-capturing schemes. J. Comput. Phys. 227, 4853–4872. Thornber, B., Mosedale, A., Drikakis, D., Youngs, D., Williams, R.J.R., 2008b. An improved reconstruction method for compressible flows with low Mach number features. J. Comput. Phys. 227 (10), 4873–4894. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2008.01.036. http://www.sciencedirect.com/science/article/pii/S0021999108000429. Turkel, E., 1993. Review of preconditioning methods for fluid dynamics. Appl. Numer. Math. 12, 257–284. Turkel, E., 1999. Preconditional techniques in computational fluid dynamics. Annu. Rev. Fluid Mech. 31, 385. Turkel, E., Fiterman, A., van Leer, B., 1994. Preconditioning and the limit of the compressible to the incompressible flow equations for finite difference schemes. In: Caughey, D.A., Hafez, M.M. (Eds.), Frontiers of Computational Fluid Dynamics. John Wiley and Sons, Chichester, pp. 215–234. Turkel, E., Radespiel, R., Kroll, N., 1997. Assessment of preconditioning methods for multidimensional aerodynamics. Comput. Fluids 26, 613–634. Ukai, S., 1986. The incompressible limit and the initial layer of the compressible Euler equations. J. Math. Kyoto Univ. 26, 323–331. van der Heul, D.R., Vuik, C., Wesseling, P., 2003. A conservative pressure-correction method for flow at all speeds. Comput. Fluids 32 (8), 1113–1132. ISSN 0045-7930. http://dx.doi.org/10.1016/ S0045-7930(02)00086-5. http://www.sciencedirect.com/science/article/pii/S0045793002000865. Volpe, G., 1993. Performance of compressible flow codes at low Mach number. AIAA J. 31, 49–56. Weiss, J.M., Smith, W.A., 1995. Preconditioning applied to variable and constant density flows. AIAA J. 33 (11), 2050–2057. Zienkiewicz, O.C., Szmelter, J., Perraire, J., 1990. Compressible and incompressible flows: an algorithm for all seasons. Comput. Methods Appl. Mech. Eng. 78 (1), 105–121.

Chapter 9

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems P. Houston School of Mathematical Sciences, University of Nottingham, Nottingham, United Kingdom

Chapter Outline 1 Introduction 2 Error Representation for Linear Problems 2.1 Abstract Framework 2.2 Stabilized FEMs for the Linear Transport Equation 3 A Posteriori Error Estimation 4 Nonlinear Hyperbolic Conservation Laws 5 Practical Implementation and Adaptive Mesh Refinement 5.1 Numerical Approximation of the Dual Problem

234 235 236 240 243 247 251

5.2 Adaptive Mesh Refinement 5.3 Bibliographical Comments 6 Applications 6.1 Inviscid Flow Around a BAC3-11 Airfoil 6.2 Criticality Problems 6.3 Bifurcation Problems 7 Concluding Remarks and Outlook Acknowledgements References

252 253 254 254 255 255 256 258 258

251

ABSTRACT In this chapter we present an overview of a posteriori error estimation and adaptive mesh design for hyperbolic/nearly hyperbolic problems. In particular, we discuss the question of error estimation for general target functionals of the solution; typical examples include the outflow flux, local average and pointwise value, as well as the lift and drag coefficients of a body immersed in an inviscid fluid. By employing a duality argument weighted Type I and unweighted Type II bounds may be established. Here, the relative advantages of these two approaches are discussed in detail, together with the construction of appropriate dual problems that ensure optimality of the resulting bounds. The exploitation of general adaptive refinement strategies based on employing isotropic and anisotropic h- and hp-refinement will be discussed. Applications of this general theory to eigenvalue problems and bifurcation problems will also be presented.

Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.10.003 © 2017 Elsevier B.V. All rights reserved.

233

234 Handbook of Numerical Analysis

Keywords: Hyperbolic conservation laws, Adjoint methods, Adaptivity AMS Classification Code: 65N30

1 INTRODUCTION Partial differential equations (PDEs) of hyperbolic/nearly hyperbolica type are of fundamental importance in many areas of applied mathematics and engineering, particularly for applications arising in fluid dynamics and electromagnetics. Typically, solutions to these types of equations exhibit localized phenomena, such as propagating discontinuities and sharp transition layers, and their reliable numerical approximation represents a challenging computational task. Indeed, in order to resolve such localized features in an accurate and efficient manner it is essential to use adaptively refined computational meshes whose construction is governed by sharp a posteriori error bounds. In the case of hyperbolic/nearly hyperbolic PDEs, such estimates should reflect the inherent mechanisms of error propagation present within the underlying PDE model (cf. Houston and S€ uli, 1998; Houston et al., 1999). These considerations are particularly important when local quantities, referred to as output or target functionals, of the analytical solution are to be computed with high accuracy. Examples include point values, local averages or flux integrals of the solution; in the context of aerodynamic flow simulations, it is crucial that certain force coefficients, such as the drag, lift and moment on a body immersed within a fluid, are reliably and efficiently computed. The purpose of this chapter is to provide an overview of some recent advances in the field of a posteriori error estimation and adaptive mesh design for hyperbolic/nearly hyperbolic PDEs in the goal-oriented setting, i.e., where the aim of the computation is to approximate a given target functional of the solution. The general approach is based on exploiting a duality argument analogous to that employed for the derivation of a priori error bounds for finite element methods (FEMs). This idea was originally pioneered by C. Johnson and his collaborators (cf. Johnson, 1990; Johnson and Hansbo, 1992; Johnson and Szepessy, 1995); for an excellent review, we refer to Eriksson et al. (1995) and the references cited therein. In this original work, the key focus was the derivation of computable bounds on a given norm of the error stemming from the FEM approximation of the underlying PDE of interest. By exploiting a duality approach, Galerkin orthogonality, and strong stability results for the underlying dual problem, so-called unweighted or Type II (cf. Houston and S€ uli, 2001) a posteriori error bounds were derived (cf. also S€ uli and Houston, 1997). The use of strong stability results may have a profound effect on both the sharpness of the resulting a posteriori error bound, a

The terminology ‘nearly hyperbolic’ refers to a hyperbolic PDE which includes a small/vanishing elliptic/parabolic term.

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 235

as well as the optimality of the underlying mesh generated by subsequent adaptive refinement. With this in mind, Rannacher and his collaborators (cf. Bangerth and Rannacher, 2003; Becker and Rannacher, 2001, and the references cited therein) proposed an alternative minimalistic approach, whereby the dual solution is retained within the a posteriori error bound; such estimates are referred to as weighted or Type I bounds. Thereby, the resulting a posteriori error estimate involves the product of element-residuals of the computed solution with local weights that incorporate information regarding the dual solution. These weights represent the sensitivity of the relevant error quantity with respect to variations of the local mesh size. On the basis of such weighted bounds, highly economical computational meshes may be designed that are specifically tailored to the approximation of the given target functional of interest. This general approach is referred to as the Dual-WeightedResidual (DWR) error estimation technique. Of course, in this latter setting, the dual problem must be numerically approximated; we point out that the amount of computational effort devoted to this task directly affects the reliability of the resulting weighted bound. In this chapter we review the general DWR error estimation technique for both linear and nonlinear PDE problems. In particular, we highlight specific issues concerning the application of this approach to hyperbolic/nearly hyperbolic PDEs. Indeed, the formulation of both the dual problem, together with a consistent reformulation of the underlying target functional of interest, will be discussed in detail, particularly in the case when stabilization has been employed within the underlying numerical scheme. The structure of this chapter is as follows. In Section 2 we first outline the key steps involved in deriving a suitable error representation formula for a given target functional; here, particular attention will be devoted to stabilized FEMs. On the basis of this general mathematical framework, in Section 3 we consider the derivation of both Type I and Type II a posteriori error bounds. Moreover, we discuss the relative advantages and disadvantages of each approach. Section 4 is devoted to the generalization of this approach to nonlinear problems and/or nonlinear target functionals. The practical implementation of weighted Type I bounds is discussed in Section 5. In Section 6 we present some computational examples to highlight the flexibility and efficiency of the DWR approach. Finally, in Section 7 we provide some concluding remarks and outline potential areas for future developments.

2

ERROR REPRESENTATION FOR LINEAR PROBLEMS

In this section we outline the general framework involved in deriving an error representation formula for a given target/output functional J() of interest; for a comprehensive account, we refer to Bangerth and Rannacher (2003) and the review articles, Becker and Rannacher (2001), Eriksson et al. (1995), Giles uli (2002), for example. and S€ uli (2002) and Houston and S€

236 Handbook of Numerical Analysis

2.1 Abstract Framework In order to describe the fundamental ingredients in the simplest possible terms, we focus on the following linear problem. Given O is a bounded Lipschitz domain in d , d  1, with boundary @O, we write H to denote a Hilbert space of functions defined on O. Further, we let L : H ! H be a linear operator on H with domain DðLÞ  V  H and range RðLÞ ¼ H; in our case a system of first-order hyperbolic partial differential operators. Let, further, B denote a linear operator defined on H. With this notation, we seek u 2 V such that Lu ¼ f in O,

Bðu  gÞ ¼ 0 on @O,

(1)

where f and g are given problem data, which are assumed to be sufficiently smooth to ensure the well-posedness of (1). To proceed, we assume, for example, that H ¼ L2 ðOÞ is the set of all real-valued square-integrable functions defined on O with inner product (, )O. Furthermore, writing (,  )@O to denote the L2(@O) inner product on the boundary @O of the computational domain O, we write the weak formulation of (1) in the following abstract form: find u 2 V such that Aðu, vÞ ¼ ‘ðvÞ

8v 2 V,

(2)

where we assume that the bilinear form Að , Þ : V  V !  and linear functional lðÞ : V !  may be defined, respectively, by Aðw,vÞ ¼ ðLw, vÞO + ðBw, C vÞ@O ,

‘ðvÞ ¼ ðf ,vÞO + ðBg,C vÞ@O :

Here, C denotes a linear operator defined on H with adjoint given by C ; see below for details. As in Larson and Barth (2000) the boundary conditions are weakly imposed in the variational formulation (2) in order to allow both the weak solution u and the test function v to belong to V. Note that in the context of hyperbolic PDEs, this is an essential ingredient in the forthcoming analysis. We now seek to approximate the weak formulation (2) based on employing a Galerkin method. To this end, we consider a sequence of finitedimensional linear subspaces fV h g of V parametrized by h; for example, in the context of FEMs, we may select V h to be a finite element space consisting of piecewise polynomial functions of degree p defined on a partition T h of the domain O into elements k 2 T h of size h. With this notation, we seek uh 2 V h such that Ah ðuh ,vh Þ ¼ ‘h ðvh Þ

8vh 2 V h ,

(3)

where Ah ð , Þ : V  V !  and lh ð Þ : V !  are a suitably chosen bilinear form and linear functional, respectively, which define an appropriate discretization scheme. For simplicity of presentation, in the proceeding analysis, we assume that Ah ð , Þ and ‘h() may be written in the following manner: Ah ð , Þ ¼ Að, Þ + S A ð , Þ,

‘h ð  Þ ¼ ‘ðÞ + S ‘ ð  Þ,

(4)

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 237

where S A ð , Þ : V  V !  is a bilinear form and S ‘ ð Þ : V !  is a linear functional whose definition will be discretization dependent. For example, S A ð ,  Þ and S ‘ ðÞ may represent numerical stabilization included within the discrete scheme (3), e.g., in the form of streamline diffusion, cf. below, or artificial dissipation. Throughout this section we assume that the discretization (3) is consistent in the sense that the analytical solution u 2 V to (2) satisfies the following identity: Ah ðu, vÞ ¼ ‘h ðvÞ

8v 2 V:

(5)

In view of the definition of Ah ð , Þ and ‘h(), cf. (4), we note that the forms S A ð ,  Þ and S ‘ ð Þ must satisfy the following consistency condition S A ðu, vÞ ¼ S ‘ ðvÞ

8v 2 V:

(6)

On the basis of (5), we deduce the following Galerkin orthogonality property: Ah ðu, vh Þ  Ah ðuh ,vh Þ ¼ Ah ðu  uh ,vh Þ ¼ 0

8vh 2 V h ;

(7)

this represents a key ingredient in the error analysis of Galerkin-based methods. In order to derive an error representation formula for the given target functional J(), we write Jh() to denote a discrete consistent reformulation of J() in the sense that, given the analytical solution u 2 V to (2), we have that Jh(u)  J(u). The idea of introducing a consistent reformulation of J() dates back to the work undertaken in Babusˇka and Miller (1984a,b) for the calculation of displacements and stresses in structural mechanics. In this series of articles, the authors refer to this technique as the extraction method; for related work, see Giles et al. (1997), for example. We point out that the consistent reformulation of J() is often critical to ensure that optimal rates of convergence for the numerical approximation Jh(uh) to J(u) are attainable. This topic is closely related to the notion of adjoint consistency (see below) (cf. Arnold et al., 2001; Hartmann, 2007; Hartmann and Leicht, 2015; Lu, 2005; Lu and Darmofal, 2006; Oliver and Darmofal, 2009). The key step involved in determining an error representation for the difference between J(u) and Jh(uh) is the introduction of a suitable dual or adjoint problem. To this end, proceeding as in Houston et al. (2000a), we pursue the analysis based on employing two potential candidates; the relative advantages and disadvantages of each approach will be discussed in detail below. Firstly, we consider the formal adjoint problem based on the weak formulation (2): find zð1Þ 2 DðL Þ such that Aðv, zð1Þ Þ ¼ Jh ðvÞ

8v 2 DðL Þ,

(8)

where L is the adjoint operator of L, with domain DðL Þ  H ¼ L2 ðOÞ. Equivalently, following Hartmann (2007), cf. also Giles and Pierce (1997), we assume that Jh() may be written in the following form

238 Handbook of Numerical Analysis

Jh ðuÞ ¼ ðjO , uÞO + ðj@O , CuÞ@O ,

(9)

where jO 2 L (O) and j@O 2 L (@O). Then assuming that the target functional Jh() is compatible with the primal problem, i.e., 2

2

ðLu, zð1Þ ÞO + ðBu, C zð1Þ Þ@O ¼ ðu, L zð1Þ ÞO + ðCu, B zð1Þ Þ@O ,

(10)

where B is the adjoint operator of B, the dual problem (8) in strong form is L zð1Þ ¼ jO in O,

B zð1Þ ¼ j@O on @O;

(11)

i.e., z(1) is the solution of the formal adjoint equation related to (1). An alternative approach is to define the dual problem based on directly employing the bilinear form Ah ð , Þ used to define the Galerkin approximation, cf. (3), to the original primal PDE problem (1). More precisely, we seek zð2Þ 2 DðL Þ such that Ah ðv,zð2Þ Þ ¼ Jh ðvÞ

8v 2 DðL Þ:

(12)

Before we proceed, let us first introduce the following definition (cf. Lu, 2005; Oliver and Darmofal, 2009). Definition 1. The discretization (3) and the functional Jh() are adjoint consistent if the solution z(1) of the adjoint problem (8), cf. also (11), satisfies Ah ðv,zð1Þ Þ ¼ Jh ðvÞ

8v 2 DðL Þ;

in which case z(1)  z(2) (provided that (12) has a unique solution z(2)). The formulation is asymptotically adjoint consistent if: ! lim

dimV h !∞

sup vh 2V h :kvh kV h ¼1

jAh ðvh ,zð1Þ Þ  Jh ðvh Þj ¼ 0,

where k kV h denotes a suitably chosen norm defined on V h . Given that any adjoint consistent method is also asymptotically adjoint consistent, in the following we refer to a given discretization and functional as being asymptotically adjoint consistent only when it is not adjoint consistent as well. In general, depending on the choice of the bilinear form Ah and the definition of the linear functional Jh(), the solution to the two dual problems (8) and (12) may differ. Indeed, given that (12) is derived on the basis of the discretization scheme employed for the numerical approximation of the primal problem (1), (12) may depend on the discretization parameters of the underlying scheme (cf. Houston et al., 2000a). However, in the latter setting, we still expect the underlying dual problem to be asymptotically adjoint consistent; in the following section, we shall investigate these concepts in detail for the FEM approximation of the linear transport equation. Given the definition of the dual problems (8) and (12) we now give the following general result.

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 239

Theorem 1. The dual problems (8) and (12) give rise to the following error representation formulae, respectively: JðuÞ  Jh ðuh Þ ¼ ‘ðoð1Þ Þ  Aðuh ,oð1Þ Þ  S ‘ ðzh Þ + S A ðuh ,zh Þ,

(13)

JðuÞ  Jh ðuh Þ ¼ ‘h ðo Þ  Ah ðuh ,o Þ,

(14)

ð2Þ

ð2Þ

where o(1) ¼ z(1)  zh and o(2) ¼ z(2)  zh for all zh 2 V h . Proof. To prove (13), we exploit the consistency and linearity of Jh(), together with the Galerkin orthogonality property (7) and (6); thereby, we get JðuÞ  Jh ðuh Þ ¼ Jh ðuÞ  Jh ðuh Þ ¼ Jh ðu  uh Þ ¼ Aðu  uh , zð1Þ Þ ¼ Aðu  uh , zð1Þ Þ  Ah ðu  uh , zh Þ ¼ Aðu  uh , zð1Þ  zh Þ  S A ðu  uh , zh Þ ¼ ‘ðzð1Þ  zh Þ  Aðuh ,zð1Þ  zh Þ  S ‘ ðzh Þ + S A ðuh ,zh Þ for all zh 2 V h , as required. The proof of (14), based on exploiting the dual problem (12), is completely analogous; for brevity the details are omitted. □ The above error representation formulae may be expressed in terms of the internal residual Rh(uh), defined on O, by Rh ðuh Þ ¼ f  Luh ; this measures the extent to which the numerical solution uh fails to satisfy the differential equation. Since uh satisfies the boundary conditions only approximately, we define the boundary residual rh(uh) on @O by rh ðuh Þ ¼ Bðg  uh Þ: Thereby, we immediately deduce the following corollary. Corollary 1. Under the foregoing assumptions, for all zh 2 V h , the following error representation formulae hold: JðuÞ  Jh ðuh Þ ¼ ðrh ðuh Þ, C oð1Þ Þ@O + ðRh ðuh Þ, oð1Þ ÞO  S ‘ ðzh Þ + S A ðuh ,zh Þ, (15) 

JðuÞ  Jh ðuh Þ ¼ ðrh ðuh Þ, C oð2Þ Þ@O + ðRh ðuh Þ, oð2Þ ÞO + S ‘ ðoð2Þ Þ  S A ðuh ,oð2Þ Þ: (16) From the error representation formulae derived in Theorem 1, cf. also Corollary 1, we immediately observe that when the underlying choice of Ah ð ,  Þ and Jh() are not adjoint consistent, and hence the solution to the dual problems (8) and (12) are not identical, then the derivation of an upper bound on the error in the computed target functional J() based on the exploitation of the formal adjoint problem (8) may be suboptimal due to the presence of the terms S ‘ ðzh Þ and S A ðuh ,zh Þ in (13), cf. also (15). Indeed, while the first two terms in (13) depend on the so-called weighting term involving the difference between z(1) and zh, these latter two terms only depend on zh; in contrast, when the dual problem (12) is employed, then all the terms present in the resulting error representation formula (14),

240 Handbook of Numerical Analysis

cf. also (16), involve the weight z(2)  zh. To explore this issue further, in the following section we consider the discretization of the linear transport equation.

2.2 Stabilized FEMs for the Linear Transport Equation In this section we apply the general theory developed in Section 2.1 to the finite element discretization of the scalar linear hyperbolic transport problem based on employing a stabilized Galerkin FEM. To this end, consider the problem: find u such that Lu  b ru + cu ¼ f in O,

 b  nðu  gÞ ¼ 0

on @ O,

(17)

where O is a bounded Lipschitz domain in d , d  1, with boundary @O, c 2 L∞ ðOÞ, f 2 L2(O), and b :¼ ðb1 , b2 , …, bd Þ> 2 ½W 1, ∞ ðOÞ d . Furthermore, the inflow and outflow boundaries of the domain O are denoted, respectively, by @ O ¼ fx 2 @O : bðxÞ nðxÞ < 0g, @ + O ¼ fx 2 @O : bðxÞ nðxÞ  0g, where n denotes the unit outward normal to the boundary @O. Here it will be assumed that there exists g > 0 such that c(x)  ½rb(x)  g  (cf. Houston and S€ uli, 1998, for example). The for all x 2 O uli, 2002; S€ weak formulation of (17) is to find u 2 HðL, OÞ ¼ fv 2 L2 ðOÞ : Lv 2 L2 ðOÞg such that Aðu, vÞ ¼ ‘ðvÞ

8v 2 HðL,OÞ,

where Z

Z Aðw, vÞ ¼

O

Lwv dx 

Z

@ O

b  n wv ds,

‘ðvÞ ¼

Z O

fv dx 

@ O

b n gv ds:

In this setting, defining Bv ¼ b  nv, B v ¼ 0 Cv ¼ 0 Bv ¼ 0,

C v ¼ v on @ O,

B v ¼ v Cv ¼ b  nv C v ¼ 0 on @ + O,

the formal adjoint equation is given by L zð1Þ  r ðbzð1Þ Þ + czð1Þ ¼ jO in O, zð1Þ ¼ j@O on @ + O,

(18)

cf. Hartmann and Houston (2010) and Hartmann (2007) for details. Thereby, examples of relevant target functionals include the outflow normal flux (jO  0 and j@O 2 L2(@ +O)), the mean value of the solution (jO 2 L2(O) and j@O  0), or the point value of the solution (jO 2 L2(O) is selected so that J(u) represents a mollification of the d-distribution and j@O  0, cf. Hartmann and Houston, 2010, Houston and S€ uli, 2002). We note that in this setting, the choice of the operators B, C, B , and C is not necessarily unique

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 241

(cf. Hartmann, 2007); indeed, here we may simply select C ¼ I , where I denotes the identity operator, cf. below. To discretize (17), we write T h to denote a shape-regular subdivision of the computational domain O into disjoint open simplices k such that  ¼ [k2T k  and denote by hk the diameter of k 2 T h ; i.e., hk :¼ diam(k). O h Writing p  1 to denote the polynomial degree, we introduce the following finite element space Vh,CGp ðT h Þ ¼ fu 2 CðOÞ : ujk 2 P p ðkÞ, k 2 T h g, where P p ðkÞ denotes the space of polynomials of total degree p on k. With this notation, we introduce the following stabilized FEM, based on weakly enforcing the boundary condition on @ O: find uh 2 Vh,CGp ðT h Þ such that ASD ðuh ,vh Þ ¼ ‘SD ðvh Þ 8vh 2 Vh,CGp ðT h Þ:

(19)

Here, the bilinear form ASD : Vh,CGp ðT h Þ  Vh,CGp ðT h Þ !  is given by Z Z ^ dx  ASD ðw, vÞ ¼ Lwðv + dLvÞ b n wv ds, O

@ O

(20)

and the linear functional ‘SD : Vh,CGp ðT h Þ !  is defined by Z Z ^ dx  ‘SD ðvÞ ¼ f ðv + dLvÞ b n gv ds: O

@ O

^ is given by Lw ^ ¼ b rw + c^w, where, for example, c^ ¼ 0 for The operator L the streamline-diffusion method, c^ ¼ c for the least-squares stabilized FEM, and c^ ¼ r b  c for the negative adjoint stabilized scheme (Douglas–Wang stabilization). Finally, d is a nonnegative function contained in L∞ ðOÞ referred to as the stabilization parameter; on the basis of the a priori error analysis undertaken in Houston et al. (2000b), djk ¼ Cdhk/p, k 2 T h , where Cd > 0 is a user-defined constant, cf. also Johnson et Ral. (1984), for the ^ dx and h-versionR setting. Thereby, we note that S A ðw, vÞ ¼ O d Lw Lv ^ S ‘ ðvÞ ¼ O d f Lv dx: Given the stabilized FEM defined by (19), following Section 2.1, we may introduce the alternative dual problem: find zð2Þ 2 HðL, OÞ such that ASD ðv, zð2Þ Þ ¼ Jh ðvÞ

8v 2 HðL,OÞ:

(21)

In this case the strong form of the adjoint problem (21) is given by ^ ð2Þ Þ ¼ jO in O, L ðzð2Þ + dLz ð2Þ ^ ^ ð2Þ ¼ j@O dLz ¼ 0 on @ O, zð2Þ + dLz

on @ + O:

(22)

In this setting we observe that the two dual problems (18) and (22) are fundamentally different. Indeed, while the formal adjoint problem given by (18) is a firstorder hyperbolic problem, the dual problem (22) stemming from the streamlinediffusion bilinear form ASD ð , Þ, cf. (20), is a second-order partial differential

242 Handbook of Numerical Analysis

operator with nonnegative characteristic form (cf. Houston and S€uli, 2002; Houston et al., 2000a). However, we note that (22) is asymptotically adjoint consistent, cf. Definition 1, in the sense that as the discretization parameters are refined, the stabilization terms vanish. Equipped with (18) and (22), together with Theorem 1, we deduce the following result. Theorem 2. The dual problems (18) and (22) give rise to the following error representation formulae, respectively, for all zh 2 Vh,CGp ðT h Þ: Z Z Z ð1Þ ð1Þ ^ h dx, (23) rh ðuh Þo ds + Rh ðuh Þo dx  Rh ðuh Þ dLz JðuÞ  Jh ðuh Þ¼ @ O

O

Z JðuÞ  Jh ðuh Þ¼

@ O

O

Z rh ðuh Þoð2Þ ds +

Z O

Rh ðuh Þoð2Þ dx +

O

^ ð2Þ dx: Rh ðuh Þ dLo

On the basis of Theorem 2, cf. also Theorem 1, a posteriori error indicators may be derived. To this end, the corresponding error representation formula must first be localized to each element k in the computational mesh T h . This seemingly harmless transition can be detrimental in the sense that the asymptotic rate of convergence of any a posteriori error bound based on localization of the error representation formulae (13) or (23) may be suboptimal, leading to significant overestimation, and when employed within an adaptive refinement strategy, the design of uneconomical meshes. The presence of such adverse effects in the resulting a posteriori error bounds is closely related to global superconvergence phenomena in the terms constituting (13) or (23), which may be destroyed in the course of localization. We end this section by showing that the persistence of superconvergence under localization in the terms of the error representation formula is closely related to the choice of the dual problem. To this end, we recall the following result (cf. Houston uli, 2002, Theorem 2). and S€ Theorem 3. Let u and uh denote the solutions of (17) and (19), respectively. Given that u 2 Hs+1(O) for some s, 0 s p, the dual solution z(1) satisfying (18) is sufficiently regular; assuming d ¼ Cdh, Cd > 0 constant, we have that Z    ð1Þ  rh ðuh Þo ds Ch2s + 3=2 jujHs + 1 ðOÞ jzð1Þ jHs + 1 ð@ OÞ ,  @ O

Z     Rh ðuh Þoð1Þ dx Ch2s + 1 juj s + 1 ,jzð1Þ j s + 1 , H ðOÞ H ðOÞ   O Z      ^ h dx C h2s + 1 jzð1Þ j s + 1 + h2 jzð1Þ j 1  Rh ðuh Þ dLz H ðOÞ H ðOÞ jujHs + 1 ðOÞ ,   O

where C is a constant independent of the mesh function h. Analogously, assuming that the solution z(2) of the dual problem (22) is sufficiently regular, we deduce that

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 243

Z    ð2Þ  rh ðuh Þo ds Ch2s + 3=2 jujHs + 1 ðOÞ jzð2Þ jHs + 1 ð@ OÞ ,  @ O Z  Z      ^ ð2Þ dx Ch2s + 1 juj s + 1 jzð2Þ j s + 1 :  Rh ðuh Þoð2Þ dx +  Rh ðuh Þ dLo H ðOÞ H ðOÞ     O

O

Thereby, Theorem 3 indicates that under suitable smoothness assumptions for both the primal and dual solutions u and z(1), respectively, the error in the computed target functional Jh() is of size Oðh2 Þ, when the standard adjoint problem is employed, irrespective of the degree p of the approximating polynomial used in the finite element space Vh,CGp ðT h Þ. In contrast, employing the error representation formula based on the stabilization-dependent dual problem (22) we deduce that jJh(u)  Jh(uh)j Ch2s+1, for 0 s p, provided that z(2) 2 Hs+1(O). Indeed, the numerical experiments presented in Houston et al. (2000a) clearly highlight the computational advantages of deriving an error representation formula based on employing a dual problem defined by the underlying discretization scheme.

3

A POSTERIORI ERROR ESTIMATION

On the basis of the general mathematical framework developed in Section 2.1 we now focus on the issue of deriving computable a posteriori bounds on the error in the underlying computed target functional. Before we proceed, let us first recall the classification of Type I and Type II a posteriori error bounds introduced in Houston and S€ uli (2001). Type I a posteriori error bounds, also referred to as weighted a posteriori error bounds (cf. Rannacher, 1998, for example), involve the multiplication of the residual terms, and any stabilization terms, by the difference between the dual solution and its projection, interpolant, or quasi interpolant onto V h . On the other hand, Type II a posteriori bounds are in the spirit of the error estimates derived by Eriksson et al. (1995) and do not depend explicitly on the dual solution. These latter error estimates are derived from Type I a posteriori bounds by employing standard results from approximation theory, together with well-posedness results for the dual problem. The resulting Type II error bounds involve only certain norms of the residuals and stabilization terms, the discretization parameters, interpolation constants and the stability factor of the dual problem. To this end, returning to the abstract setting outlined in Section 2.1 we recall the boundary value problem: find u such that Lu ¼ f in O, Bðu  gÞ ¼ 0 on @O. Here, we assume that the numerical scheme defined by (3) may be written in the following simplified manner: find uh 2 V h such that ðLuh , vh ÞO + ðBuh , vh Þ@O ¼ ðf , vh ÞO + ðBg,vh Þ@O

8vh 2 V h ;

(24)

i.e., we assume that S ‘ ð Þ  0, S A ð , Þ  0, and C  I . We stress that these assumptions, and the forthcoming conditions are purely for presentational

244 Handbook of Numerical Analysis

simplicity; indeed, the underlying theory is applicable to a far more general setting. Assuming, adjoint consistency of the discretization (24) and the functional (9) so that the dual problems (8) and (12) are equivalent, on the basis of the general result given in Theorem 1, cf. Corollary 1, we immediately deduce the following error representation formula: JðuÞ  Jh ðuh Þ ¼ ðrh ðuh Þ,oÞ@O + ðRh ðuh Þ,oÞO ,

(25)

where o ¼ z  zh for all zh 2 V h . Here, the superscript on z and o has been neglected since, under the assumption of adjoint consistency, z(1)  z(2)(¼ z). Assuming V h consists of functions defined over a given partition T h of the domain O into elements k 2 T h of size h, we rewrite (25) in the following elementwise manner X  X JðuÞ  Jh ðuh Þ ¼ ðrh ðuh Þ, oÞ@k\@O + ðRh ðuh Þ,oÞk  k : (26) k2T h

k2T h

We begin by first considering a Type I a posteriori error bound; it is a straightforward consequence of the error representation formula (26). Lemma 1. Under the assumptions of Theorem 1 the following Type I a posteriori error bound holds: X jk j: jJðuÞ  Jh ðuh Þj

(27) k2T h

Proof. The result follows from (26) by application of the triangle inequality. □ To derive a Type II bound, we suppose that fW s gs0 is a scale of Hilbert spaces, with associated norms kks, such that W 0 ¼ H and W s2 is continuously embedded into W s1 whenever s2  s1. For example, when H ¼ L2 ðOÞ, W s might be the Sobolev space H s ðOÞ  L2 ðOÞ of index s > 0. Furthermore, we assume that there exist zh 2 V h and a positive constant Cint such that, for z 2 W s , k hs ðz  zh ÞkL2 ðOÞ + k hðs1=2Þ ðz  zh ÞkL2 ð@OÞ Cint k zkW s :

(28)

For FEMs, this hypothesis is easily fulfilled by choosing W s as a Hilbertian Sobolev space of index s and referring to standard approximation properties of piecewise polynomial functions in Sobolev spaces, with zh taken as the projection, interpolant or quasi-interpolant of z from V h . Additionally, we assume that z 2 W s and that there exists a positive constant Cstab such that k zkW s Cstab :

(29)

Equipped with (28) and (29), we deduce the following Type II a posteriori bound. Lemma 2. Under the assumptions of Theorem 1, assuming (28) and (29) hold for some s > 0, the following Type II a posteriori error bound holds

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

  jJðuÞ  Jh ðuh Þj Cint Cstab k hs1=2 rh ðuh ÞkL2 ð@OÞ + k hs Rh ðuh ÞkL2 ðOÞ :

9 245

(30)

Before we proceed, let us first reflect on the generic Type I and Type II a posteriori bounds derived in Lemmas 1 and 2, respectively. Firstly, we note that the Type I bound (27) involves the inner product of the internal and boundary residual terms Rh(uh) and rh(uh), respectively, with a weighting factor involving the difference between the dual solution z and its projection zh onto the finite-dimensional space V h . In this way, the right-hand side of (27) is not strictly computable since z is unknown. Therefore, the implementation of (27) within an adaptive mesh refinement strategy necessitates the computation of an approximation to z; this topic will be considered in Section 5. Alternatively, assuming numerical values for Cint and Cstab may be established, the right-hand side of (30) is fully computable once the primal approximation uh has been determined. In this sense, one may immediately favour the unweighted bound given in Lemma 2 rather than the weighted one stated in Lemma 1. However, a few remarks are in order: firstly, we note that s must be chosen very carefully; on the one hand, we wish to maximize the value of s in order to ensure the asymptotic optimality of the Type II a posteriori error bound, in the sense that as the finite-dimensional space V h is enriched, the right-hand side of (30) should decay to zero at the same rate as the error in the computed target functional. In view of (29), this requires knowledge of the regularity of the dual solution, which is typically unknown. Note also that, unlike elliptic partial differential operators, first-order hyperbolic PDEs do not possess any inherent smoothing properties in isotropic Sobolev spaces. Secondly, even when s is available, theoretical estimates of the size of the resulting stability constant Cstab, often referred to as a stability factor in the literature (cf. Bangerth and Rannacher, 2003; Becker and Rannacher, 2001; Eriksson et al., 1995, for example), are often very pessimistic, leading to excessive overestimation. Computational estimation of Cstab involves the solution of the dual problem; this can be undertaken for the specific functional at hand, or for a large set of typical data—a task that is computationally much more demanding than solving a single dual problem for a Type I error bound. However, once a library of representative stability constants is available (Estep et al., 2002), they do not need to be recomputed; also, storing representative stability constants is clearly less memory-intensive than storing the dual solution, particularly for three-dimensional problems. Having said this, the storage of the dual solution, for use in a Type I error bound, may pay off if the resulting computational mesh is more economical than the one that stems from a Type II a posteriori error bound. It is this final point which is of paramount importance in practical applications: aside from the relative size of Cstab, and indeed the choice of s, assuming the latter are identical for a range of functionals of interest, the right-hand side of the Type II bound (30) is independent of the choice of J(). Thereby,

246 Handbook of Numerical Analysis

when the right-hand side of (30) is employed within an adaptive mesh refinement algorithm, the resulting sequence of meshes will be identical, irrespective of the selection of the functional of interest. This clearly implies that the resulting adaptively enriched discrete spaces V h will not be optimized for the target functional at hand. On the other hand, the weights present within the Type I bound provide very accurate information regarding the sensitivity of the error in the target functional to changes in the interior and boundary residual terms: this information is of vital importance to ensure that error control is achieved while employing the minimal number of degrees of freedom within V h . One further point to note is that the elimination of the weights in the Type II error bound may also be highly detrimental when considering the discretization of first-order hyperbolic problems since it is well known that the residual, evaluated elementwise, only controls a portion of the error, referred to as the cell error; however, it provides no information regarding the dominant transported part of the error (cf. Houston and S€uli, 1998; Houston et al., 1999 for details). To highlight the key differences between the weighted Type I and unweighted Type II a posteriori error bounds, we consider the application of this general theory to the discontinuous Galerkin (DG) finite element approximation of the scalar transport equation (17) with O ¼ (0, 1)2, b ¼ (y, x)>, c ¼ 0, g ¼ 0 on x ¼ 1 and on y ¼ 0, we set g ¼ 1 if 1/4 < x < 3/4 and g ¼ 0 otherwise. Here, we suppose that the functional of interest is the 2 outflow normal flux along x ¼ 0, where we select j@O ¼ e100(y3/10) . The adaptive meshes generated based on employing both Type I and Type II error indicators (cf. Hartmann and Houston, 2002a for details) are shown in Fig. 1. Here we observe that the mesh generated based on employing the weighted

FIG. 1 Linear advection. (A) Mesh constructed using a Type I error indicator with 18633 DoFs (jJ(u)  J(uh)j ¼ 7.817  1010); (B) mesh constructed using a Type II error indicator with 21765 DoFs (jJ(u)  J(uh)j ¼ 1.360  107).

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 247

Type I indicator is only refined in the vicinity of the discontinuity present in the analytical solution u which directly influences the target functional of interest; this information is available from the weighting terms present in the Type I bound involving the dual solution. On the other hand, in the absence of such localized sensitivities, the unweighted Type II estimator leads to mesh refinement of all sharp features present in the primal solution. Thereby, the resulting adaptively refined mesh, designed based on employing the latter a posteriori error indicator, is uneconomical in the sense that, on the final mesh, we observe that the Type I error indicator leads to over two orders of magnitude reduction in the error in J() when roughly the same number of degrees of freedom are employed in comparison to the corresponding quantity computed with the Type II indicator. While the example presented here is relatively simple, it highlights a key practical observation: retention of the weighting terms involving the dual solution and its projection onto V h is essential to ensure economical mesh design for a given target functional of interest. Moreover, depending on the quality of the computed approximation to the dual problem, highly efficient predictions concerning the approximation error in the computed target functional of interest may be established. This topic has been extensively studied within the literature; for further details and applications, we refer to Bangerth and Rannacher (2003), Becker and Rannacher (2001), Hartmann and Houston (2002a,b, 2006), Hartmann et al. (2011), Hartmann and Houston (2010) and the references cited therein.

4

NONLINEAR HYPERBOLIC CONSERVATION LAWS

In this section we consider the generalization of the theory developed in Section 2 to nonlinear hyperbolic conservation laws and the estimation of nonlinear functionals J() of the solution. To this end, consider the following nonlinear PDE problem: find u 2 V such that F u ¼ 0 in O,

Bu ¼ 0 on @O,

(31)

where V is some appropriately chosen space. Here, we assume that both F and B are Frechet differentiable; for simplicity of presentation, we assume that inhomogeneous data are included in the definition of F and B. In the following, we write D0 ½u to denote the Frechet derivative of a nonlinear operator D evaluated at u 2 V. Writing V h to denote a finite-dimensional approximation space, we seek an approximation to (31) in the following form: find uh 2 V h such that N h ðuh , vh Þ ¼ 0

8vh 2 V h ,

(32)

where N h ð , Þ : V  V !  is a given semilinear form. Again, we assume that (32) is consistent so that the following Galerkin orthogonality property holds:

248 Handbook of Numerical Analysis

N h ðu, vh Þ  N h ðuh , vh Þ ¼ 0

8vh 2 V h :

(33)

Writing J() to denote a nonlinear target functional and Jh() to be the consistent reformulation of J(), i.e., J(u) ¼ Jh(u), we assume that Jh() is of the form Z Z j@O ðCuÞ ds, Jh ðuÞ ¼ jO ðuÞ dx + O

@O

where jO() and j@O() may be nonlinear with derivatives j 0O and j 0@O , respectively, and C is a Frechet differentiable boundary operator on @O, cf. Hartmann (2007). The Frechet derivative of Jh(), evaluated at u, is defined by Z Z 0 0 j 0@O ½Cu C0 ½u w ds: Jh ½u ðwÞ ¼ j O ½u w dx + (34) O

@O

As in the linear setting, assuming that the compatibility condition holds ðF 0 ½u w, zð1Þ ÞO + ðB0 ½u w, ðC0 ½u Þ zð1Þ Þ@O ¼ ðw, ðF 0 ½u Þ zð1Þ Þ + ðC0 ½u w, ðB0 ½u Þ zð1Þ Þ@O ,

where ðF 0 ½u Þ , ðB0 ½u Þ and ðC0 ½u Þ denote the adjoint operators of F 0 ½u , B0 ½u and C0 ½u , respectively, the formal adjoint problem associated to (31), (34) is given by ðF 0 ½u Þ zð1Þ ¼ j 0O ½u in O,

ðB0 ½u Þ zð1Þ ¼ j 0@O ½Cu on @O:

(35)

On the basis of the work undertaken in Section 2, we seek to derive a representation formula for the error in the computed target functional of interest based on employing the semilinear form N h ð ,  Þ employed in the definition of the Galerkin method (32), rather than exploiting (35) directly. To this end, we write Jh ð ;Þ to denote the mean value linearization of Jh() defined by Z 1  J h ðu,uh ;u  uh Þ ¼ Jh ðuÞ  Jh ðuh Þ ¼ Jh0 ½yu + ð1  yÞuh ðu  uh Þ dy: (36) 0

Analogously, we write Mðu, uh ; ,  Þ to denote the mean-value linearization of the semilinear form N h ð , Þ given by Z Mðu,uh ; u  uh ,vÞ ¼ N h ðu, vÞ  N h ðuh , vÞ ¼ 0

1

N 0h ½yu + ð1  yÞuh ðu  uh , vÞ dy (37)

0

for all v in V. Here, N h ½w ð ,vÞ denotes the Frechet derivative of u ! N h ðu, vÞ, for v 2 V fixed, at some w in V. We remark that the linearization defined in (37) 0 is only a formal definition, in the sense that N h ½w ð ,vÞ may not, in general, 0 exist. Instead, a suitable approximation to N h ½w ð ,vÞ in the direction u  uh must be determined, for example, by computing appropriate finite difference quotients of N h ð , vÞ, cf. Hartmann and Houston (2002a).

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 249

For the purposes of the proceeding analysis, we assume that the linearization performed in (37) is well defined. Under this hypothesis, we introduce the following dual problem: find zð2Þ 2 V such that Mðu, uh ; w, zð2Þ Þ ¼ Jh ðu, uh ; wÞ

8 w 2 V:

(38)

We assume that (38) possesses a unique solution. The validity of this assumption depends on the well-posedness of the primal problem (31) and the choice of the underlying target functional. Section 2.2 provides notable examples for the linear transport equation and typical linear functionals satisfying the compatibility condition (10); indeed, for adjoint-consistent discretizations and target functionals, well-posedness of the formal adjoint equation automatically follows from the well-posedness of the primal problem. Care must be taken when the adjoint consistency condition, cf. Definition 1, is violated; again Section 2.2 provides such an example of a well-posed dual problem which is asymptotically adjoint-consistent, cf. Houston et al. (2000a) for further details. The issue of well-posedness of the dual problem (38) in the nonlinear setting is rather more delicate, particularly for first-order hyperbolic conservation laws. To investigate this issue further, we recall the following example taken from Hartmann and Houston (2002a). Example. Consider the one-dimensional scalar hyperbolic equation ut ðx,tÞ + ðf ðuðx,tÞÞÞx ¼ 0,  ∞ < x < ∞, 0 < t T,

(39)

uðx,0Þ ¼ u0 ðxÞ,  ∞ < x < ∞,

(40)

with strictly convex flux function f, i.e., f 00 > 0. We assume that (39), (40) is discretized based on employing the standard Galerkin FEM consisting of continuous piecewise polynomials in both space and time, cf. S€uli (1998). Furthermore, we suppose that the functional ofRinterest represents ∞ the (weighted) mean flow in space; i.e., JðwÞ ¼ ∞ wjO dx, where 2 jO 2 L ð∞, ∞Þ is a given weight function. The formal adjoint problem is given by: find z(1) such that ð1Þ zð1Þ t  aðx, tÞzx ¼ 0,  ∞ < x < ∞, 0 t < T,

zð1Þ ðx, TÞ ¼ cðxÞ,  ∞ < x < ∞,

(41)

R1 0 where aðx, tÞ ¼ 0 f ðð1  yÞu + yuh Þ dy: Although the dual problem (41) is linear, this is a nonstandard hyperbolic problem since the velocity field a may be discontinuous. Thereby, in this case the classical theory of well-posedness for linear hyperbolic equations does not apply. However, assuming that a 2 L∞ ð  ð0, TÞÞ and satisfies a one-sided Lipschitz condition, Tadmor (1991) has shown that (41) is a meaningful problem. For the verification that a satisfies the desired hypotheses when f 00 > 0, see S€uli (1998). For related work on the linearization of conservation laws and the well-posedness of linear hyperbolic problems with discontinuous data, we refer to Bouchut and James (1998), Godlewski et al. (1999) and Ulbrich (2001).

250 Handbook of Numerical Analysis

In general well-posedness results of the dual problem (38) are not available for systems of nonlinear hyperbolic conservation laws. Indeed, we can only hypothesize that when the primal problem (31) is well-posed, then the computation of a physically correct approximation, cf. (32), will yield a uniquely solvable dual problem. In the absence of such analytical results, we must rely solely on numerical simulation to confirm the validity of this hypothesis. With this in mind, for the proceeding error analysis, we must therefore assume that the dual problem (38) is well-posed. Under this assumption, we have the following general result. Theorem 4. Let u and uh denote the solutions of (31) and (32), respectively, and suppose that the dual problem (38) is well-posed. Then, the following error representation formula holds: JðuÞ  Jh ðuh Þ ¼ N h ðuh , zð2Þ  zh Þ  N h ðuh ,oð2Þ Þ for all zh 2 V h :

(42)

Proof. Selecting w ¼ u  uh in (38), recalling the linearization performed in (36) and the Galerkin orthogonality property (33), we deduce that, for all zh 2 V h , JðuÞ  Jh ðuh Þ ¼ Jh ðu,uh ; u  uh Þ ¼ Mðu, uh ; u  uh , zð2Þ Þ ¼ Mðu, uh ; u  uh , zð2Þ  zh Þ ¼ N h ðuh , zð2Þ  zh Þ: □ On the basis of the error representation formula (42) derived in Theorem 4 Type I and Type II a posteriori error bounds may be derived (cf. Hartmann and Houston, 2002a,b, 2006, for example). Given the practical advantages of the former weighted error indicators, cf. Section 3, we only derive the following Type I bound. To this end, assuming again that V h consists of functions defined over a given partition T h of the domain O into elements k 2 T h of size h, we immediately deduce the following result. Corollary 2. Under the assumptions of Theorem 4, assuming that the error the following elerepresentation formula given inP(42) may be written inP mentwise form JðuÞ  Jh ðuh Þ ¼ k2T h  N h ðuh ,oð2Þ Þjk  k2T h k , then the following Type I a posteriori error bound holds: JðuÞ  Jh ðuh Þ

X k2T h

jk j:

(43)

Remark 1. We point out that an alternative error representation formula is also proposed in Bangerth and Rannacher (2003) and Becker and Rannacher (2001), for example, based on employing a trapezium rule which leads to terms involving the product of both primal and dual residual terms with dual and primal weights, respectively.

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 251

5 PRACTICAL IMPLEMENTATION AND ADAPTIVE MESH REFINEMENT In this section we discuss the implementation of weighted Type I a posteriori error bounds within an automatic adaptive refinement algorithm.

5.1

Numerical Approximation of the Dual Problem

The key requirement needed to compute the error representation formula, cf. (14) and (42) and the resulting Type I weighted bounds (27) and (43), respectively, is a suitable approximation to the underlying dual problem, cf. (12) and (38), respectively. In the nonlinear setting, we note that the error representation formula and the resulting Type I a posteriori error bound both depend on the unknown analytical solution u of the original primal problem; this dependence on u stems from the mean value linearization of N h ð ,vÞ, v 2 V fixed and Jh() performed in (37) and (36), respectively. Hence, for linear PDE problems and linear target functionals J(), this dependence on u does not arise. In practice, for nonlinear problems and/or nonlinear target functionals, the linearization leading to Mðu,uh ; , Þ and Jh ðu,uh ; Þ is performed about the numerical solution uh; i.e., Mðu,uh ; , Þ is approximated by Mðuh ,uh ; , Þ in (37) and Jh ðu,uh ; Þ is approximated by Jh ðuh ,uh ; Þ in (36) (cf. Bangerth and Rannacher, 2003; Becker and Rannacher, 2001; Hartmann and Houston, 2002a,b; Rannacher, 1998). Secondly, the dual solution must be numerically approximated; here, there are essentially two further sources of error introduced into the computation of the error representation formula and Type I bound. First, the Frechet derivative of u ! N h ðu,vÞ, for v fixed, may not exist, and thereby must be replaced ^ 0h ½w ð ,vÞ, where w denotes by a suitable approximation; we denote this by N the state about which the linearization is performed. Thereby, the approximate dual problem is to find ^ z 2 V such that ^ 0h ½uh ðv,^ z Þ ¼ Jh ðuh ,uh ; vÞ 8v 2 V; N

(44)

for simplicity we have neglected the superscript (2) on ^z . We recall from the previous section that there were open questions concerning the well-posedness of the dual problem (38). In practice, we are concerned about the wellposedness of the approximate dual problem (44). Indeed, given that (44) serves only as an approximation to the true dual problem (38), further approximations may be made in the definition of (44) to ensure that the resulting system of PDEs possesses a unique solution. Once a suitable approximate dual problem has been defined, its analytical solution ^ z must be computed numerically. Writing ^z h^ to denote this approximation, we first note that ^ z h^ should not be calculated using the same approximation space V h employed for the primal problem, otherwise the resulting error representation formula will be identically zero. In the finite element

252 Handbook of Numerical Analysis

(and finite volume) setting, there are essentially three approaches employed for computing the numerical approximation ^ z h^ of ^z : 1. Keep the degree p of the approximating polynomial used to compute uh fixed, and compute ^ z h^ on a sequence of dual finite element meshes T^ h^ which, in general, differ from the primal meshes T h . 2. Compute ^ z h^ using piecewise polynomials of higher degree p^ than the degree p employed for the numerical approximation of the primal problem, while keeping the underlying mesh T h fixed. 3. A variant of this second approach is to compute the approximate dual problem using the same discrete space employed for the numerical approximation of the primal problem, and subsequently exploit patchwise recovery/reconstruction techniques to improve the accuracy of ^z h^ (cf. Bangerth and Rannacher, 2003; Barth and Larson, 2002; Becker and Rannacher, 2001). An alternative approach pursued in Houston and S€uli (2001) is to design finite element spaces for the numerical approximation of the dual problem based on employing a Type II bound to estimate the approximation error in the computed dual solution within an hp-adaptive refinement algorithm. The choice concerning how the (approximate) dual problem (44) is discretized, and thereby the computational cost of the overall adaptation process, is dependent on how much confidence the user wishes to place on the resulting computed error representation formula and Type I bound. On the one hand, if the user is purely interested in generating sequences of economical meshes which are specifically tailored for the target functional of interest, then the third approach outlined above is typically sufficient (cf. Bangerth and Rannacher, 2003; Barth and Larson, 2002; Becker and Rannacher, 2001). However, computational experience indicates that this approach leads to a deterioration in the quality of the resulting approximate error representation formula. In our own work we tend to favour the second approach: this generally leads to highly efficient error estimation, without excessive computational overhead. Indeed, we point out that if the mesh refinement parameters are chosen in such a manner that the number of degrees of freedom employed in the dual finite element space is roughly the same as the number of degrees of freedom in the new primal finite element space V h after an adaptive refinement has been undertaken, then the cost of computing the dual solution will be roughly equivalent to the cost of a single Newton step in the computation of uh on the newly designed adaptive mesh.

5.2 Adaptive Mesh Refinement Once an approximate error representation formula has been computed, on the basis of the numerical approximation to the dual problem (44), the

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 253

elementwise error indicators present in the resulting Type I a posteriori error bound may be employed within an adaptive refinement strategy. Here, the first step is to choose a suitable marking strategy, such as equidistribution, fixed fraction, D€ orfler marking, optimized mesh criterion, and so on, cf. Houston and S€ uli (2002), for example. Once an element has been marked for refinement, a decision must be made regarding how to enrich the discrete space V h . In the finite element setting, this may involve employing isotropic/ anisotropic mesh subdivision (h-refinement) and/or isotropic/anisotropic polynomial enrichment (p-refinement). Within the DWR framework isotopic h-refinement has been extensively studied, see the review articles Bangerth and Rannacher (2003), Becker and uli (2002), Houston and S€uli (2002) and the Rannacher (2001), Giles and S€ references cited therein; in the context of the numerical approximation of nonlinear hyperbolic/nearly hyperbolic conservation laws, we refer to Barth and Larson (2002), Fidkowski and Darmofal (2007a,b), Hartmann and Houston (2002a,b, 2006), Hartmann et al. (2011), Larson and Barth (2000), for example. Moreover, anisotropic h-refinement has been studied in the series of articles Georgoulis et al. (2007), Leicht and Hartmann (2010), Venditti and Darmofal (2003), for example; for related work based on anisotropic mesh regeneration, we refer to Micheletti and Perotto (2008) and Porta et al. (2012). Finally, we mention the series of articles: Giani and Houston (2010), Harriman et al. (2003), Houston and S€uli (2001), Leicht and Hartmann (2011) and Georgoulis et al. (2009), Giani and Houston (2012), Giani and Houston (2010), which have studied both isotropic and anisotropic hp-refinement, respectively.

5.3

Bibliographical Comments

Throughout this chapter we have focused solely on Galerkin-based methods for which the Galerkin orthogonality property (7) or (33) holds. The treatment of non-Galerkin methods is based on the idea of adjoint correction of the target functional of interest, cf. Giles and S€ uli (2002); here, the reformulation of the target functional J() includes the residual terms weighted with zh, where zh comes from some appropriate discrete space V h . In this way an error representation formula of the form given in Theorem 1, cf. also Theorem 4, may be derived which includes residual terms multiplied by weighting terms involving the difference between the dual solution and its projection. Taking this one step further, when a higher-order scheme is employed for the numerical approximation of the dual problem, cf. strategy 2 in Section 5.1, the error representation formula may be added to the computed value Jh(uh) of the target functional to provide an improved estimate of J(u), cf. Hartmann and Houston (2006); in this case reliable estimation of the error in this improved value is no longer available.

254 Handbook of Numerical Analysis

While FEMs naturally fit into the general framework reviewed in this chapter, we stress that finite volume methods have also been studied (cf. Barth and Larson, 2002; S€ uli, 1998; Venditti and Darmofal, 2002, 2003, for example). In particular, the analysis presented in Barth and Larson (2002) and S€ uli (1998) is based on rewriting the underlying discrete scheme as a Petrov–Galerkin method. Finally, we note that here we have focussed on the estimation of a single target functional of interest; in practice there may be a series of target functionals Ji(), i ¼ 1, …, N, N  1, of the solution which must be accurately computed. In this case duality may again be employed to avoid the requirement to solve N dual problems; indeed, when N is large, this may be computationally very expensive. In Hartmann (2008) and Hartmann and Houston (2003) a general strategy is proposed which requires the numerical approximation of only two dual problems, irrespective of the size of N, cf. also Hartmann et al. (2011). More precisely, the key idea consider the error in the combined target functional Jc(), where Jc ðuÞ ¼ is Pto N i¼1 wi Ji ðuÞ and wi ¼ sgn(Ji(u)  Ji(uh))/jJi(uh)j, i ¼ 1, …,N; note that each Ji() may also be replaced by a consistent reformulation, cf. above. The error in the computed value Jc(uh) may be estimated based on the general DWR framework developed in Sections 2 and 4. In order to determine the error in the ith functional Ji(), i ¼ 1, …, N, and thereby sgn(Ji(u)  Ji(uh)) needed in the definition of Jc(), an additional dual problem, also referred to as the error equation, must be solved, which involves the original (linearized) primal PDE problem subject to a forcing function which involves the residual(s) of the underlying discrete scheme; see Hartmann (2008) and Hartmann and Houston (2003) for details.

6 APPLICATIONS In this section we briefly present some further numerical experiments to highlight the practical performance of the DWR technique.

6.1 Inviscid Flow Around a BAC3-11 Airfoil As a further example to demonstrate the practical advantages of employing weighted Type I bounds in comparison with Type II a posteriori error estimators, here we consider a Mach 1.2 inviscid flow around the BAC3-11 airfoil at an angle of attack of 5 degree. Following Hartmann and Houston (2002b) we select the functional of interest to be the value of the pressure at the leading edge. In Fig. 2 we present the meshes generated based on employing both Type I and Type II a posteriori error indicators. As for the case of the linear advection example presented in Section 3, we again observe that the Type I indicator only refines regions in the computational domain which directly influence the value of the target functional, thereby leading to highly economical mesh design.

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter A

9 255

B 1

1

0.5

0.5

0

0

−0.5

−0.5

−1

−0.5

0

0.5

1

−1

−0.5

0

0.5

1

FIG. 2 Supersonic BAC3-11 flow. (A) Mesh constructed using a Type I error indicator with 28848 DoFs (jJ(u)  J(uh)j ¼ 3.042  103); (B) mesh constructed using a Type II error indicator with 219504 DoFs (jJ(u)  J(uh)j ¼ 3.542  102) (see Hartmann and Houston, 2002b).

6.2

Criticality Problems

The general DWR framework naturally extends to the estimation of (critical) eigenvalues of a given PDE problem; for details, we refer to Cliffe et al. (2010a), Heuveline and Rannacher (2001), Heuveline and Rannacher (2003) and Hall et al. (2016). In this section we consider the numerical approximation of the so-called keff-eigenvalue problem associated with the neutron transport equation, cf. Hall et al. (2016). To this end, we consider a model of the KNK (Kompakte Natriumgek€ uhlte Kernreaktoranlage) Compact Sodium Nuclear Reactor Plant in Germany. The spatial domain consists of a tessellation of 169 regular hexagons split into 18 regions with 8 distinct materials; here, the energy spectrum is discretized into four energy groups. The performance of an h- and hp-adaptive refinement algorithm is presented in Fig. 3. Here, we clearly observe exponential convergence of the error in the computed value of keff when hp-refinement is employed. Moreover, hprefinement is more efficient than h-refinement in the sense that the computed error on the final hp-mesh is over an order of magnitude smaller than the corresponding quantity computed with h-refinement, for a fixed number of degrees of freedom.

6.3

Bifurcation Problems

The extension of the DWR framework to bifurcation problems has been undertaken in the series of articles (Cliffe et al., 2010b, 2011, 2012, 2014). As an example we present a test case from Cliffe et al. (2014), cf. also Cliffe et al. (2012), where the aim of the computation is to accurately predict

256 Handbook of Numerical Analysis

|keff − keff,h|

A

B

10−1

h-refinement hp-refinement

10−2

10−3

10−4 10

20

30

40

50

60

(DoFs)1/4

FIG. 3 KNK fast reactor. (A) Comparison between h- and hp-adaptive refinement; (B) final hp-spatial mesh distribution (see Hall et al., 2016).

A

102

h–Refinement hp–Refinement

101

|Rec − Rech|

100

B Eles 3840 6498 7512 9576 10101 10788

10−1 10−2 10−3 10−4

DoFs 203520 352452 464998 622801 784038 952091

Rech 662.66203 708.96275 716.36055 721.02371 721.05195 721.05247

|Rec − Rech | 58.390 12.090 4.692 2.881E−02 5.710E−04 5.477E−05

200 400 600 800 1000 1200 1400 1600 1800 DoFs1/2

FIG. 4 3D flow through a pipe with a stenotic region. (A) Comparison between h- and hp-adaptive refinement; (B) Rech employing hp-refinement (see Cliffe et al., 2014).

the critical Reynolds number Rec at which a bifurcation occurs for the steady incompressible Navier–Stokes equations. To this end, we consider the flow through a cylindrical pipe with a stenotic region. Here, a highly accurate value of the computed critical value Rec, denoted by Rech , may be attained, cf. Fig. 4. Moreover, hp-refinement leads to significant accuracy gains when compared with the value of Rech evaluated based on employing h-refinement only.

7 CONCLUDING REMARKS AND OUTLOOK In this chapter we have presented an overview of the general DWR technique for deriving a posteriori bounds on the error in a given target functional of interest; in particular, here our focus has been on the numerical approximation of hyperbolic/nearly hyperbolic conservation laws, though the approach is applicable to a much wider variety of PDE models. We emphasize that in addition to estimating the error in a given target functional of interest, this

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 257

general framework naturally extends to the case of efficiently estimating the error in a given (critical) eigenvalue (cf. Cliffe et al., 2010a; Hall et al., 2016; Heuveline and Rannacher, 2001, 2003) as well as the prediction of critical parameters in bifurcation problems (cf. Cliffe et al., 2010b, 2011, 2012, 2014). Moreover a posteriori control and adaptive selection of different PDE models has been studied, for example, in Braack and Ern (2003), Perotto and Veneziani (2014) and Micheletti et al. (2013). Time-dependent problems can naturally be treated within the same framework (cf. Bangerth and Rannacher, 2003; Becker and Rannacher, 2001; Besier and Rannacher, 2012; Hoffman, 2004). However, this is a computationally challenging task since for nonlinear problems and/or nonlinear target functionals, the primal problem must first be solved forward in time and stored at either all time levels, or at certain check-pointed ones, so that it may be used as data for the corresponding backwards in time dual problem. The success of the DWR technique cannot be over-stated; it has been successfully applied to a wide variety of PDEs, discretization schemes and target functionals, including eigenvalue and bifurcation problems. However, what is perhaps still quite unsatisfactory in this general methodology is the approximation of the dual problem. On the one hand we wish to estimate the error in a given quantity of interest of the primal problem, which we assume we cannot solve analytically; but the resulting so-called Type I or weighted a posteriori error bound then includes the solution to another PDE problem, namely the dual problem, which we also cannot determine by analytical means. Practical experience indicates that for a wide variety of PDE problems and quantities of interest, the dual problem can be approximated sufficiently accurately to yield near perfect, i.e., close to 1, effectivity indices based on employing the approximate error representation formula. Indeed, this is certainly the case for steady-state PDE problems which are either linear or include some dissipation. For nonlinear first-order hyperbolic/nearly hyperbolic conservation laws the presence of shocks in the underlying solution can lead to significant linearization errors which may lead to a deterioration in the computed error representation formula (cf. Hartmann and Houston, 2002a,b, for example); in the time-dependent setting, such effects may be further amplified. That said, it should be pointed out that while the quality of the resulting error representation formula may be poor, computational experience suggests that the resulting Type I bounds still lead to highly economical mesh design for a given target functional. However, when dealing with nonlinear systems of PDEs, as noted in Section 4, there are issues related to the well-posedness of the dual problem. In particular, such classes of PDE systems may exhibit local instability, while maintaining global stability for the primal problem; for example, at the onset of turbulence in the Navier–Stokes equations. In such a situation, the solution to the resulting linearized dual problem may become unbounded. As a final comment, we note that while we have assumed throughout that the underlying target functional of interest J() is Frechet

258 Handbook of Numerical Analysis

differentiable, the extension to non-Frechet differentiable functionals may be undertaken based on employing a finite difference approximation to Jh0 ½u ð Þ (cf. Cliffe et al., 2015).

ACKNOWLEDGEMENTS The author would like to express his sincere gratitude to Tim Barth, Joe Collis, Andrew Cliffe, Edward Hall, Ralf Hartmann, Rolf Rannacher, and Endre S€ uli for helpful discussions on the subject of this chapter.

REFERENCES Arnold, D.N., Brezzi, F., Cockburn, B., Marini, L.D., 2001. Unified analysis of discontinuous Galerkin methods for elliptic problems. SIAM J. Numer. Anal. 39, 1749–1779. Babusˇka, I., Miller, A., 1984a. The post-processing approach in the finite element method—Part 1: Calculation of displacements, stresses and other higher derivatives of the displacements. Int. J. Numer. Meth. Eng. 20, 1085–1109. Babusˇka, I., Miller, A., 1984b. The post-processing approach in the finite element method—Part 2: The calculation of stress intensity factors. Int. J. Numer. Meth. Eng. 20, 1111–1129. Bangerth, W., Rannacher, R., 2003. Adaptive Finite Element Methods for Differential Equations. Birkh€auser Verlag, Basel. Barth, T.J., Larson, M.G., 2002. A-posteriori error estimation for higher order Godunov finite volume methods on unstructured meshes. In: Herbin, D., Kr€oner, R. (Eds.), Finite Volumes for Complex Applications III. Hermes Science Pub., London, pp. 41–63 Becker, R., Rannacher, R., 2001. An optimal control approach to a-posteriori error estimation in finite element methods. In: Iserles, A. (Ed.), Acta Numerica. Cambridge University Press, Cambridge, pp. 1–102. Besier, M., Rannacher, R., 2012. Goal-oriented spacetime adaptivity in the finite element Galerkin method for the computation of nonstationary incompressible flow. Int. J. Numer. Meth. Fluids. 70 (9), 1139–1166. ISSN 1097-0363. http://dx.doi.org/10.1002/fld.2735. Bouchut, F., James, F., 1998. One-dimensional transport equations with discontinuous coefficients. Nonlinear Anal. 32, 891–933. Braack, M., Ern, A., 2003. A posteriori control of modelling errors and discretization errors. SIAM J. Multiscale Model. Simul. 1 (2), 221–238. Cliffe, K.A., Hall, E.J.C., Houston, P., 2010a. Adaptive discontinuous Galerkin methods for eigenvalue problems arising in incompressible fluid flows. SIAM J. Sci. Comput. 31, 4607–4632. Cliffe, K.A., Hall, E.J.C., Houston, P., Phipps, E.T., Salinger, A.G., 2010b. Adaptivity and a posteriori error control for bifurcation problems I: the Bratu problem. Commun. Comput. Phys. 8, 845–865. Cliffe, K.A., Hall, E.J.C., Houston, P., Phipps, E.T., Salinger, A.G., 2011. Adaptivity and a posteriori error control for bifurcation problems II: incompressible fluid flow in open systems with Z2 symmetry. J. Sci. Comput. 47, 389–418. Cliffe, K.A., Hall, E.J.C., Houston, P., Phipps, E.T., Salinger, A.G., 2012. Adaptivity and a posteriori error control for bifurcation problems III: incompressible fluid flow in open systems with O(2) symmetry. J. Sci. Comput. 52, 153–179. Cliffe, K.A., Hall, E., Houston, P., 2014. hp-Adaptive discontinuous Galerkin methods for bifurcation phenomena in open flows. Comput. Math. Appl. 67 (4), 796–806.

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 259

Cliffe, K.A., Collis, J., Houston, P., 2015. Goal-oriented a posteriori error estimation for the travel time functional in porous media flows. SIAM J. Sci. Comput. 37 (2), B127–B152. Eriksson, K., Estep, D., Hansbo, P., Johnson, C., 1995. Introduction to adaptive methods for differential equations. In: Iserles, A. (Ed.), Acta Numerica. Cambridge University Press, Cambridge, pp. 105–158. Estep, D., Larson, M.G., Williams, R., 2002. Estimating the error of numerical solutions of systems of reaction-diffusion equations, Memoirs of the American Mathematical Society, Number 696, American Mathematical Society. Fidkowski, K.J., Darmofal, D.L., 2007a. An adaptive simplex cut-cell method for discontinuous Galerkin discritizations of the Navier-Stokes equations. In: 18th AIAA CFD Conference, Miami, AIAA-2007-3941. Fidkowski, K.J., Darmofal, D.L., 2007b. A triangular cut-cell adaptive method for high-order discretizations of the compressible Navier-Stokes equations. J. Comput. Phys. 225, 1653–1672. Georgoulis, E.H., Hall, E., Houston, P., 2007. Discontinuous Galerkin methods for advectiondiffusion-reaction problems on anisotropically refined meshes. SIAM J. Sci. Comput. 30 (1), 246–271. Georgoulis, E.H., Hall, E., Houston, P., 2009. Discontinuous Galerkin methods on hp-anisotropic meshes II: a posteriori error analysis and adaptivity. Appl. Numer. Math. 59 (9), 2179–2194. Giani, S., Houston, P., 2010. High-order hp-adaptive discontinuous Galerkin finite element methods for compressible fluid flows. In: Kroll, N., Bieler, H., Deconinck, H., Couallier, V., van der Ven, H., Sorensen, K. (Eds.), ADIGMA-A European Initiative on the Development of Adaptive Higher-Order Variational Methods for Aerospace Applications, Notes on Numerical Fluid Mechanics and Multidisciplinary Design, vol. 113. Springer, Berlin, pp. 399–411. Giani, S., Houston, P., 2012. Anisotropic hp-adaptive discontinuous Galerkin finite element methods for compressible fluid flows. Int. J. Numer. Anal. Model. 9 (4), 928–949. Giles, M.B., Pierce, N.A., 1997. Adjoint equations in CFD: duality, boundary conditions and solution behaviour. AIAA-97-1850. Giles, M., S€ uli, E., 2002. Adjoint methods for PDEs: a posteriori error analysis and postprocessing by duality. In: Iserles, A. (Ed.), Acta Numerica. Cambridge University Press, Cambridge, pp. 145–236. Giles, M., Larson, M.G., Levenstam, J.M., S€uli, E., 1997. Adaptive error control for finite element approximations of the lift and drag coefficients in viscous flow. Tech. Report NA97/06. Oxford University Computing Laboratory. Godlewski, E., Olazabal, M., Raviart, P.-A., 1999. On the linearization of systems of conservation laws for fluids at a material contact discontinuity. J. Math. Pure Appl. 17, 1013–1042. Hall, E.J.C., Houston, P., Murphy, S., 2016. hp-Adaptive discontinuous Galerkin methods for neutron transport criticality problems. (submitted for publication). Harriman, K., Houston, P., Senior, B., S€uli, E., 2003. hp-Version discontinuous Galerkin methods with interior penalty for partial differential equations with nonnegative characteristic form. In: Shu, C.-W., Tang, T., Cheng, S.-Y. (Eds.), Recent Advances in Scientific Computing and Partial Differential Equations, Contemporary Mathematics, vol. 330. AMS, Providence, RI, pp. 89–119. Hartmann, R., 2007. Adjoint consistency analysis of discontinuous Galerkin discretizations. SIAM J. Numer. Anal. 45 (6), 2671–2696. Hartmann, R., 2008. Multitarget error estimation and adaptivity in aerodynamic flow simulations. SIAM J. Sci. Comput. 31 (1), 708–731. http://dx.doi.org/10.1137/070710962. Hartmann, R., Houston, P., 2002a. Adaptive discontinuous Galerkin finite element methods for nonlinear hyperbolic conservation laws. SIAM J. Sci. Comput. 24, 979–1004.

260 Handbook of Numerical Analysis Hartmann, R., Houston, P., 2002b. Adaptive discontinuous Galerkin finite element methods for the compressible Euler equations. J. Comput. Phys. 183 (2), 508–532. Hartmann, R., Houston, P., 2003. Goal-oriented a posteriori error estimation for multiple target functionals. In: Hou, T.Y., Tadmor, E. (Eds.), Hyperbolic Problems: Theory, Numerics, Applications. Springer, Berlin, pp. 579–588. Hartmann, R., Houston, P., 2006. Symmetric interior penalty DG methods for the compressible Navier-Stokes equations II: goal-oriented a posteriori error estimation. Int. J. Numer. Anal. Model. 3 (2), 141–162. Hartmann, R., Houston, P., 2010. Error estimation and adaptive mesh refinement for aerodynamic flows. In: Deconinck, H. (Ed.), VKI LS 2010-01: 36th CFD/ADIGMA Course on hp-Adaptive and hp-Multigrid Methods, Oct. 26–30, 2009. Von Karman Institute for Fluid Dynamics, Belgium. Hartmann, R., Leicht, T., 2015. Generalized adjoint consistent treatment of wall boundary conditions for compressible flows. J. Comput. Phys. 300, 754–778. Hartmann, R., Held, J., Leicht, T., 2011. Adjoint-based error estimation and adaptive mesh refinement for the RANS and k-o turbulence model equations. J. Comput. Phys. 230 (11), 4268–4284. Heuveline, V., Rannacher, R., 2001. A posteriori error control for finite element approximations of elliptic eigenvalue problems. Adv. Comput. Math. 15, 107–138. Heuveline, V., Rannacher, R., 2003. Adaptive FEM for eigenvalue problems. In: Numerical Mathematics and Advanced Applications, Springer, Berlin, pp. 713–722. Hoffman, J., 2004. On duality-based a posteriori error estimation in various norms and linear functionals for large eddy simulation. SIAM J. Sci. Comput. 26 (1), 178–195. Houston, P., S€ uli, E., 1998. Local mesh design for numerical solution of hyperbolic problems. In: Baines, M.J. (Ed.), Numerical Methods for Fluid Dynamics VI, ICFD, Oxford, pp. 17–30. Houston, P., S€ uli, E., 2001. hp-Adaptive discontinuous Galerkin finite element methods for hyperbolic problems. SIAM J. Sci. Comput. 23, 1225–1251. Houston, P., S€ uli, E., 2002. Adaptive finite element approximation of hyperbolic problems. In: Barth, T., Deconinck, H. (Eds.), Error Estimation and Adaptive Discretization Methods in Computational Fluid Dynamics, Lect. Notes Comput. Sci. Eng., vol. 25. Springer, Berlin, pp. 269–344. Houston, P., Mackenzie, J.A., S€uli, E., Warnecke, G., 1999. A posteriori error analysis for numerical approximations of Friedrichs systems. Numer. Math. 82, 433–470. Houston, P., Rannacher, R., S€uli, E., 2000a. A posteriori error analysis for stabilised finite element approximations of transport problems. Comput. Methods Appl. Mech. Eng. 190 (11–12), 1483–1508. Houston, P., Schwab, C., S€uli, E., 2000b. Stabilized hp-finite element methods for first-order hyperbolic problems. SIAM J. Numer. Anal. 37 (5), 1618–1643. ISSN 1095-7170. Johnson, C., 1990. Adaptive finite element methods for diffusion and convection problems. Comput. Methods Appl. Mech. Eng. 82, 301–322. Johnson, C., Hansbo, P., 1992. Adaptive finite element methods in computational mechanics. Comput. Methods Appl. Mech. Eng. 101, 143–181. Johnson, C., Szepessy, A., 1995. Adaptive finite element methods for conservation laws. Commun. Pure Appl. Math. 48, 199–243. Johnson, C., N€avert, U., Pitk€aranta, J., 1984. Finite element methods for linear hyperbolic problems. Comput. Methods Appl. Mech. Eng. 45 (1–3), 285–312. ISSN 0045-7825. MR 86a:65103. Larson, M.G., Barth, T.J., 2000. A posteriori error estimation for adaptive discontinuous Galerkin approximations of hyperbolic systems. In: Cockburn, B., Karniadakis, G., Shu, C.-W. (Eds.),

Adjoint Error Estimation and Adaptivity for Hyperbolic Problems Chapter

9 261

Discontinuous Galerkin Methods: Theory, Computation and Applications, Lect. Notes Comput. Sci. Engrg. vol. 11. Springer-Verlag, Berlin, pp. 363–368. Leicht, T., Hartmann, R., 2010. Error estimation and anisotropic mesh refinement for 3d laminar aerodynamic flow simulations. J. Comput. Phys. 229 (19), 7344–7360. http://dx.doi.org/ 10.1016/j.jcp.2010.06.019. Leicht, T., Hartmann, R., 2011. Error estimation and hp-adaptive mesh refinement for discontinuous Galerkin methods. In: Wang, Z.J. (Ed.), Adaptive High-Order Methods in Computational Fluid Dynamics, Advances in Computational Fluid Dynamics. vol. 2. World Science Books, Singapore, pp. 67–94. http://www.worldscibooks.com/mathematics/7792.html. Lu, J., 2005. An a Posteriori Error Control Framework for Adaptive Precision Optimization Using Discontinuous Galerkin Finite Element Method (Ph.D. thesis). M.I.T. Lu, J., Darmofal, D.L., 2006. Dual-consistency analysis and error estimation for discontinuous Galerkin discretization: application to first-order conservation laws. IMA J. Numer. Anal. (submitted for publication). Micheletti, S., Perotto, S., 2008. Output functional control for nonlinear equations driven by anisotropic mesh adaption. The Navier-Stokes equations. SIAM J. Sci. Comput. 30 (6), 2817–2854. Micheletti, S., Perotto, S., David, F., 2013. Model adaptation enriched with an anisotropic mesh spacing for nonlinear equations: application to environmental and CFD problems. Numer. Math. Theory Meth. Appl. 6 (3), 447–478. Oliver, T.A., Darmofal, D.L., 2009. Analysis of dual-consistency for discontinuous Galerkin discretizations of source terms. SIAM J. Numer. Anal. 47 (5), 3507–3525. Perotto, S., Veneziani, A., 2014. Coupled model and grid adaptivity in hierarchical reduction of elliptic problems. J. Sci. Comput. 60 (3), 505–536. Porta, G., Perotto, S., Ballio, F., 2012. Anisotropic mesh adaptation driven by a recovery based error estimator for shallow water flow modeling. Int. J. Numer. Methods Fluids 70 (3), 269–299. Rannacher, R., 1998. Adaptive finite element methods. In: Bulgak, H., Zenger, C. (Eds.), Proc. NATO-Summer School on Error Control and Adaptivity in Scientific Computing. Kluwer Academic Publishers, pp. 247–278. S€ uli, E., 1998. A posteriori error analysis and adaptivity for finite element approximations of hyperbolic problems. In: Kr€oner, D., Ohlberger, M., Rhode, C. (Eds.), An Introduction to Recent Developments in Theory and Numerics for Conservation Laws, Lecture Notes in Comput. Sciences and Eng., vol. 5. Springer, Berlin, pp. 123–194. S€ uli, E., Houston, P., 1997. Finite element methods for hyperbolic problems: a posteriori error analysis and adaptivity. In: Duff, I., Watson, G.A. (Eds.), State of the Art in Numerical Analysis. Oxford University Press, Oxford, pp. 441–471. Tadmor, E., 1991. Local error estimates for discontinuous solutions of nonlinear hyperbolic equations. SIAM J. Numer. Anal. 28, 891–906. Ulbrich, S., 2001. Optimal Control of Nonlinear Hyperbolic Conservation Laws with Source Terms (Habilitation Thesis). Faculty for Mathematics, Munich Technical University, Germany. Venditti, D.A., Darmofal, D.L., 2002. Grid adaptation for functional outputs: application to two-dimensional inviscid flows. J. Comput. Phys. 176, 40–69. Venditti, D.A., Darmofal, D.L., 2003. Anisotropic grid adaptation for functional outputs: application to two-dimensional viscous flows. J. Comput. Phys. 187, 22–46.

Chapter 10

Unstructured Mesh Generation and Adaptation A. Loseille INRIA Saclay-Ile de France, France

Chapter Outline 1 Introduction 1.1 Outline 2 An Introduction to Unstructured Mesh Generation 2.1 Surface Mesh Generation 2.2 Volume Mesh Generation 3 Metric-Based Mesh Adaptation 3.1 Metric Tensors in Mesh Adaptation 3.2 Techniques for Enhancing Robustness and Performance 3.3 Metric-Based Error Estimates 3.4 Controlling the Interpolation Error 3.5 Geometric Estimate for Surfaces 3.6 Boundary Layers Metric

264 266 266 266 267 269 271

272 274 276 277 278

4 Algorithms for Generating Anisotropic Meshes 4.1 Insertion and Collapse 4.2 Optimizations and Enhancement for Unsteady Simulations 5 Adaptive Algorithm and Numerical Illustrations 5.1 Adaptive Loop 5.2 A Wing-Body Configuration 5.3 Transonic Flow Around a M6 Wing 5.4 Direct Sonic Boom Simulation 5.5 Boundary Layer Shock Interaction 5.6 Double Mach Reflection and Blast Prediction 6 Conclusion References

280 280

282 283 284 285 286 288 290 294 296 297

ABSTRACT We first describe the well-established unstructured mesh generation methods as involved in the computational pipeline, from geometry definition to surface and volume mesh generation. These components are always a preliminary and required step to any numerical computations. From an historical point of view, the generation of fully unstructured mesh generation in 3D has been a real challenge so as to the design of robust and accurate second-order schemes on such unstructured meshes. If the issue of generating Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.10.004 © 2017 Elsevier B.V. All rights reserved.

263

264 Handbook of Numerical Analysis volume meshes for geometries of any complexity is now mostly solved, the emergence of robust numerical schemes on unstructured meshes has paved the way to adaptivity. Indeed, unstructured meshes in contrast with structured or block-structured grids have the necessary flexibility to control the discretization both in size and orientation. In the second part, we review the main components to perform adaptative computations: (i) anisotropic mesh prescription via a metric field tensor, (ii) anisotropic error estimates and (iii) anisotropic mesh generation. For each component, we focus on a particularly simple method to implement. In particular, we describe a simple but robust strategy for generating anisotropic meshes. Each adaptation entity, i.e., surface, volume or boundary layers, relies on a specific metric tensor field. The metric-based surface estimate is then used to control the deviation to the surface and to adapt the surface mesh. The volume estimate aims at controlling the interpolation error of a specific field of the flow. Several 3D examples issued from steady and unsteady simulations from systems of hyperbolic laws are presented. In particular, we show that despite the simplicity of the introduced adaptive meshing scheme a high level of anisotropy can be reached. This includes the direct prediction of the sonic boom of an aircraft by computing the flow from the cruise altitude to the ground, the interaction between shock waves and boundary layer or the prediction of complex unsteady phenomena in 3D. Keywords: Unstructured mesh generation, Anisotropic mesh adaptation, Metric-based error estimates, Surface approximation, Euler equations, Navier–Stokes equations, Local remeshing, Sonic boom prediction, Blast, Boundary layer/shock interaction AMS Classification Codes: 65D05, 65L50, 65N15, 65N50

1 INTRODUCTION For flows involved in aerospace, naval, train and automotive industries or more generally in computational fluids dynamics (CFD), the numerical prediction of a physical phenomenon follows the computational pipeline of Fig. 1. From a continuous description of the geometry, a surface and a volume mesh are generated, see Fig. 2. This mesh is used as a discrete support to solve a set partial differential equations (PDEs) by using any typical second-order accurate numerical schemes (Abgrall, 2001; Courne`de et al., 2006; Johnson et al., 1985; Shu and Osher, 1988). When unstructured meshes are used, the meshing and computation steps have reached a great level of maturity and automaticity, allowing to quickly modify the design and run a new simulation, even for highly complex geometries (Aubry and L€ ohner, 2009; Aubry et al., 2015; George et al., 1990; Laug, 2010; L€ ohner and Parikh, 1988; Marcum, 1996,

Geometry: CAD

Mesh generation

FIG. 1 Computational pipeline.

Computation

Visualization/ analysis

Unstructured Mesh Generation and Adaptation Chapter

Geometry

Surface mesh

10 265

Volume mesh

Computation and Analysis/Visualization FIG. 2 Illustration of the computational pipeline on the Bloodhound© supersonic car.

2001; Mavriplis, 1995). During the mesh generation process, the sizing of the elements (Aubry et al., 2016) is either based on a user a priori knowledge of the flow or is induced by the geometry. To take into account the whole flow features evaluated at the computation step while keeping automaticity, mesh adaptivity is required. Indeed, we observe that the solutions of nonlinear system of PDEs like the Euler of Navier–Stokes equations have complex features and multiscale phenomena: shocks waves, boundary layers, turbulence, etc. When dealing with complex geometries, all these features are present in the flow field and interact with each other. It is then hardly impossible to design a tailored mesh to capture all these phenomena. To capture accurately them automatically, we typically use specific mesh adaptation procedures. We can distinguish: (i) isotropic and structured grids for turbulent flows, (ii) anisotropic meshes for shock capturing with an anisotropic ratio of the order of O(1:100–1000) and (iii) highly stretched quasi-structured meshes with a ratio of O(1:104–106) for boundary layers. Many numerical examples have proved that the performance of a numerical scheme is bounded by the quality and the features of the discretization. For instance, we prefer anisotropic meshes to capture accurately shocks (Loseille et al., 2007) while we use Cartesian grids at a turbulent regime to allow high-order capturing of vortices. In the vicinity of bodies, quasi-structured grids are employed to capture the boundary layer in viscous simulations (Aubry and L€ ohner, 2009; Marcum, 1996). If all these methods have now reached a good level of maturity, they are generally studied on their own. Consequently it seems difficult to handle together all the optimal meshes for all these phenomena. In this chapter, we will focus on one simple solution to generate all these kinds of meshes within a common framework. In this framework, the requirements on the mesh (for sizes, shapes and orientations) are expressed in term of a field of metric tensors and dedicated quality functions. We will consider metric fields issued from interpolation error, surface

266 Handbook of Numerical Analysis

geometric approximation and boundary layer model. These fields are then used as a continuous support to drive the adaptation. From a practical point of view, simple anisotropic local operators as edge collapse, point insertion, edge swapping and point smoothing are recursively used to modify and improve the mesh. Note that each operator is monitored by a quality function to ensure that a quality mesh is outputted. This requirement is important to ensure the stability and enhance the performance of the flow solver.

1.1 Outline The chapter is decomposed as follows. In Section 2, we describe the main steps involved in generating a first mesh for complex geometries in an unstructured context. In Section 3, we recall the main concepts of metric-based mesh adaptation. We then define various metric field expressions used for surface, volume, boundary layer and error control. In Section 4, we describe the algorithms used to generate an anisotropic mesh with respect to a prescribed metric. In Section 5, we briefly comment the adaptive loop, and we illustrate the previous concepts on both steady and unsteady simulations.

2 AN INTRODUCTION TO UNSTRUCTURED MESH GENERATION We quickly describe and illustrate on simple examples the basic principles underlying the generation of unstructured meshes for complex geometries. For a complete description, we refer to the following monographs (Frey and George, 2008; George and Borouchaki, 1998; Lo, 2015; L€ohner, 2001).

2.1 Surface Mesh Generation In industrial applications, the definition of the computational domain (or of a design) is provided by a continuous description composed by a collection of patches using a CAD (computer aided design) system. If several continuous representation of a patch exist via an implicit equation or a solid model, we focus on the boundary representation (BREP). In this description, the topology and the geometry are defined conjointly. For the topological part, a hierarchical description is used from top-level topological objects to lower-level objects, we have model ! bodies ! faces ! loops ! edges ! nodes Each entity of upper level is described by a list of entities of lower level. This is represented in Fig. 3 for an Onera M6 model, where a face, a loop and corresponding edges are depicted. Note that most of the time, only the topology of a face is provided, the topology between all the faces (patches) need to be recovered. This piece of information is needed to have a watertight valid surface mesh on output for the whole computational domain. This step makes

Unstructured Mesh Generation and Adaptation Chapter

10 267

Edge Face Loop

FIG. 3 Topology hierarchy (face, loop, edge) of the continuous representation of model using the Boundary REPresentation (BREP).

the surface mesh generation of equal difficulty as volume mesh generation and have been shown to be not trivial (Alleaume, 2009). For node, edge and face, a geometry representation is also associated to the entity. For node, it is generally the position in space, while for edge and face a parametric representation is used. It consists in defining a mapping from a bounded domain of 2 onto 3 such that (x, y, z) ¼ s(u, v), where (u, v) are the parameters. Generally, s is a NURBS function (non-uniform rational B-spline) as it is a common tool in geometry modelling and CAD systems (Piegl and Tiller, 1997). From a conceptual point of view, meshing a parametric surface consists in meshing a 2D domain in the parametric space. however, surface mesh generation is not as naive as it seems, as several issues are faced to get a valid surface mesh: l

l

l

l

The mapping function is not bijective, i.e., an infinite number of parameters values may have the same value in 3 ; A valid mesh in the parametric space may be invalid when mapped to 3D as s is not necessary monotone; Having a uniform mesh in 3 requires to have a highly anisotropic adapted mesh in 2 due to the length distortion imposed by s; The typical CAD queries (normal, tangent planes, principal curvatures) are based on the derivatives of s may have undefined behaviours especially near the boundaries of the parametric space.

We illustrate this on the mesh of torus composed of two edges and one face, see Fig. 4. We notice that if the mesh in 3 is perfectly uniform, it is not the case in the parametric space. For further readings, the aforementioned issues of CAD parameterizations and their consequences for adaptivity are discussed in Park et al. (2016). Robust meshing of NURBS surface is studied in Aubry et al. (2015) and implementation details are provided in Laug (2010).

2.2

Volume Mesh Generation

Once the generation of the surface mesh is completed, a volume mesh is generated to fill the domain with a tetrahedra. The surface mesh then becomes an input but also a constraint as all the input triangles have to match a face of the

268 Handbook of Numerical Analysis

FIG. 4 From left to right, CAD of a torus with two edges and one face, 2D mesh in the parametric space and mapped uniform surface mesh.

tetrahedral mesh. Two different approaches have emerged and have proved to be robust to the complexity of the geometry: the frontal and the Delaunay methods. The frontal approach is the easiest to understand in its principles. The process starts from the surface mesh that defines an initial front (a set of faces). From this front, a set of optimal points are created such that for each face of the front, an optimally shaped element would be created. This set of points is then checked and filtered to avoid collision and overlapping of faces. A reduced set of points is then inserted one point at a time and the front is updated. The same procedure is repeated until the whole domain is filled. The pros of this approach is that the shape of elements can be controlled and different kinds of meshes can be obtained by modifying the optimal point procedure: Cartesian core, iso-tetrahedra, etc., see L€ohner (2001) for more details. If meshes of very high quality are obtained when starting from isotropic surface meshes, the critical steps are in the closure of the front. Indeed, there is no guarantee that the procedure will end up with an empty front. This weakness tends to increase when anisotropic triangles are present in the initial surface mesh. We refer to L€ ohner (2014) for an updated description of the frontal approach. The second approach is the constrained Delaunay. It starts from an initial simple mesh of a box surrounding the surface mesh (composed of six tetrahedra). We then have the following steps: (i) Insert the points of the surface mesh in the current mesh; (ii) Recover the boundary corresponding to the initial surface mesh (list of edges and faces); (iii) Fill the interior of the domain by inserting internal points; (iv) Optimize the mesh with the smoothing of points and the swap of edges and faces.

Unstructured Mesh Generation and Adaptation Chapter

P

P

10 269

P

FIG. 5 Illustration of the incremental Delaunay insertion of a point in a mesh.

FIG. 6 Constrained Delaunay method. From left toright, initial surface mesh, volume mesh after insertion of the surface points, volume mesh after boundary recovery and final mesh by removing element connected to the initial mesh of the surrounding box.

Contrary to the frontal approach, a valid 3D mesh is always kept through the entire process. This is due to the insertion procedure based on a iterative process, see Fig. 5. Once step (i) is completed, some faces or edges of the initial mesh may not be present in the current mesh, a boundary recovery is used. It is generally used in enforcing these entities by applying successively or randomly standard optimization operators as the swap of edges and faces (George and Borouchaki, 2003). In addition, some theoretical and constructive proofs exist to show that this procedure can succeed to generate a mesh, see George et al. (2003) and Si (2015). The most critical step is the second one. however, if we accept to modify the initial surface mesh, this procedure can always succeed to output a volume mesh with a (slightly) modified surface mesh. Consequently, this approach is more robust than the frontal approach. The procedure is illustrated in Fig. 6. Note that a lot of hybrid approaches are a combination of both. The frontal creation of points can be used with Delaunay insertion, or the closure of the front can used a complete constrained Delaunay approach. For the two core methods, a simple example comparing both approaches is depicted in Fig. 7.

3

METRIC-BASED MESH ADAPTATION

If unstructured meshes have been employed primarily to handle complex geometries, their great flexibility allows us to consider anisotropic mesh adaptation. The intent of adaptivity is then to optimize the ratio between the level

270 Handbook of Numerical Analysis

FIG. 7 Cuts in a volume mesh filled with the frontal method (top left) and Delaunay insertion (bottom left), 2D square domain filled with frontal (top right) and Delaunay (top bottom).

Sonic boom

Vorticity in wake

FIG. 8 Examples of phenomena with strong anisotropic features concentrated in small regions of the domain: shock waves (left) and vorticity (right).

of accuracy and the CPU time to run a simulation. The expected gain is mostly motivated by the physical features of the flow, especially for systems of hyperbolic laws where the solutions have strong anisotropic components. It is then clear that using uniform meshes is not optimal (for the distribution of the degrees of freedom) to reach a given level of accuracy. Two examples of flows with anisotropic features are given in Fig. 8 with a supersonic flow and the vorticity behind a business jet. To perform anisotropic mesh adaptation, we have to define the following: (i) a directional error estimate, (ii) a way to prescribe the desired sizes and orientations (iii) and finally a set of mesh modification operators to generate anisotropic meshes. In this section, we introduce the metric-based approach where continuous and discrete tensor fields are used to handle (i)–(iii). The key idea is to generate a uniform mesh, a unit mesh, with respect to a Riemannian metric space. More precisely, the geometric quantities as length, volume, angle, quality, etc. are then evaluated in this space instead of using the standard Euclidean space.

Unstructured Mesh Generation and Adaptation Chapter

3.1

10 271

Metric Tensors in Mesh Adaptation

A metric tensor field of O is a Riemannian metric space denoted by ðMðxÞÞx2O , where MðxÞ is a 3  3 symmetric positive definite matrix. Taking this field at each vertex xi of a mesh H of O defines the discrete field Mi ¼ Mðxi Þ. If N denotes the number of vertices of H, the linear discrete metric field is denoted by ðMi Þi¼1…N . As MðxÞ and Mi are symmetric definite positive, they can be diagonalized in an orthonormal frame, such that MðxÞ ¼ t RðxÞLðxÞRðxÞ and Mi ¼ t Ri Li Ri , where L(x) and Li are diagonal matrices composed of strictly positive eigenvalues l(x) and li and R and Ri orthonormal matrices verifying t Ri ¼ ðRi Þ1 . Setting hi ¼ l2 i allows to define the sizes prescribed by Mi along the principal directions given by Ri . Note that the set of points verifying the implicit equation t x Mi x ¼ 1 defines a unique ellipsoid. This ellipsoid is called the unit-ball of Mi and is used to represent geometrically Mi . The two fundamental operations in a mesh generator are the computation of length and volume. The length of an edge e ¼ [xi, xj] and the volume of an element K are continuously evaluated in ðMðxÞÞx2O by: Z 1 pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi Z pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi t ‘M ðeÞ ¼ det ðMðxÞÞ dx e Mðxi + t eÞ e dt and jKjM ¼ 0

K

From a discrete point view, the metric field needs to be interpolated (Frey and George, 2008) to compute approximate length and volume. For the volume, we consider a linear interpolation of ðMi Þ1…N and the following edge length approximation is used vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi !ffi u 4 X u pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi r  1 1 (1) Mi jKj and ‘M ðeÞ  t e Mi e , jKjM  t det 4 i¼1 r ln ðrÞ where jKj the ffi Euclidean volume of K and r stands for the ratio ptffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi pisffiffiffiffiffiffiffiffiffiffiffiffiffiffi e Mi e= t e Mj e. The approximated length arises from considering a geometric approximation of the size variation along end-points of e: htj . 8t 2 ½0, 1 hðtÞ ¼ h1t i The task of the adaptive mesh generator is then to generate a unit mesh with respect to ðMðxÞÞx2O . A mesh is said to be unit when it is only composed of unit-volume elements and unit-length edges. Practically, these two requirements are combined in a quality function computed in the metric field. A mesh H is unit with respect to ðMðxÞÞx2O when each tetrahedron K 2 H defined by its list of edges (ei)i¼1…6 verifies   1 pffiffiffi 8i 2 ½1, 6, ‘M ðei Þ 2 pffiffiffi , 2 and QM ðKÞ 2 ½a, 1 with a > 0, (2) 2

272 Handbook of Numerical Analysis

with: 2

jKj3 QM ðKÞ ¼ 1 6 M 2 ½0, 1: X 33 ‘2M ðei Þ 36

(3)

i¼1

A classical and admissible value of a is 0.8. This value arises from some dis3 cussions on the possible pffiffiffi of  with unit elements (Loseille and pffiffiffitessellation Alauzet, 2011a). The 2 and 1= 2 factors to control the length of edges are used to avoid to cycle during the remeshing step. If a long edge is split, the two new edges should not be considered too small, in order to avoid an infinite sequence of insertions and collapses. There exist a large set of adaptive mesh generators that uses a metric tensor as an input to generate anisotropic meshes. Let us cite Bamg (Hecht, 1998) and BL2D (Laug and Bourochaki, 2003) in 2D, Yams (Frey, 2001) for discrete surface mesh adaptation and EPIC (Michal and Krakos, 2011), Feflo.a (Loseille and L€ ohner, 2010), Forge3d (Coupez, 2011), Refine 1/2 (Jones et al., 2006), Gamanic3d (George, 2003), MadLib (Compe`re et al., 2010), MeshAdap (Li et al., 2005), Mmg3d (Dobrzynski and Frey, 2008), Mom3d (Tam et al., 2000), Tango (Bottasso, 2004), LibAdaptivity (Pain et al., 2001) and Pragmatic (Rokos et al., 2015) in 3D.

3.2 Techniques for Enhancing Robustness and Performance The metric field provided has a direct, albeit complex, impact on the quality of the resulting mesh. A smooth and well-graded metric field makes the generation of the anisotropic mesh generation easier and generally improves the final quality. We consider two techniques that tend to give a substantial positive impact on the quality of the resulting mesh: The anisotropic mesh gradation tends to smooth the metric field, while the Log-Euclidean interpolation allows to properly define metric tensors interpolation, thereby preserving the anisotropy even after a numerous number of interpolations.

3.2.1 Anisotropic Mesh Gradation The mesh gradation is a process that smoothes the initial metric field that is generally noisy as it is derived from discrete data. Gradation strategies for anisotropic meshes are available in Alauzet (2009) and Li et al. (2004). From a continuous point of view, the mesh gradation process consists in verifying the uniform continuity of the metric field: 8ðx, yÞ 2 O2 k MðyÞ  MðxÞ k C k x  yk2 , where C is a constant and k.k a matrix norm. This requirement is far more complex that imposing only the continuity of ðMðxÞÞx2O . From a practical point of view, this done that by ensuring that for all couples ðxi ,Mi Þ defined on H verify:

Unstructured Mesh Generation and Adaptation Chapter

10 273

8ðxi , yj Þ 2 H2 N ðk xi  yj k2 Þ Mi \ Mj ¼ Mj and N ðk xi  yj k2 Þ Mj \ Mi ¼ Mi ,

where N ð:Þ is a matrix function defining a growth factor and \ is the classical metric intersection based on simultaneous reduction (Frey and George, 2008). This standard algorithm has O(N2) complexity. Consequently, less CPU-intensive correction strategies need to be devised; we refer to Alauzet (2009) for some suggestions. Note that bounding the number of corrections to a fixed value is usually sufficient to correct the metric field near strongly anisotropic areas as the shocks. Two options are considered giving either an isotropic growth or an anisotropic growth: 0 1 1 ðdij Þ l1 A 2 ðdij Þ l2 N ðdij Þ Mi ¼ @ 3 ðdij Þ l3 with ðiÞ k ðdij Þ ¼ ð1 +

pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi t e M e log ðbÞÞ2 or ðaÞ  ðd Þ ¼ ð1 + l d log ðbÞÞ2 , ij i ij k ij k ij (4)

where dij ¼ kxj xik2, eij ¼xj xi and b the gradation parameter > 1. The isotropic growth is given by law (i) while the anisotropic by law (a). Note that (i) is identical for all directions, contrary to anisotropic law (a) that depends on each eigenvalue along its principal direction. In the sequel, we use the gradation to smooth the transition between the various metric fields: surface and volume, surface and boundary layers.

3.2.2 Log-Euclidean Framework and Applications After each point insertion or during the computation of edge-lengths, a metric field must be interpolated. Interpolation schemes based on the simultaneous reduction (Frey and George, 2008) lack several desirable theoretical properties. For instance, the unicity is not guaranteed. A framework introduced in Arsigny et al. (2006) proposes to work in the logarithm space as if one were in the Euclidean one. Consequently, a sequence of n metric tensors can be interpolated in any order while providing a unique metric. Given a sequence of points (xi)i¼1…k and their respective metrics Mi , then the interpolated metric in x verifying ! k k k X X X ai xi , with ai ¼ 1, is MðxÞ ¼ exp ai ln ðMi Þ : (5) x¼ i¼1

i¼1

i¼1

On the space of metric tensors, logarithm and exponential operators are acting on metric’s eigenvalues directly: ln ðMi Þ ¼ t Ri ln ðLi Þ Ri and exp ðMi Þ ¼ t Ri exp ðLi Þ Ri :

274 Handbook of Numerical Analysis

Numerical experiments confirm that using this framework during interpolation allow to preserve the anisotropy. Note that the evaluation of length given by (1) corresponds to the Log-Euclidean interpolation between the two metrics of the edge extremities.

3.3 Metric-Based Error Estimates From the previous concepts, metric-based error estimates are well suited for the generation of anisotropic meshes. We focus on this set of estimates in the sequel. We then describe in more details the case of the interpolation error as it is the easiest to implement.

3.3.1 A (Quick) Review of Metric-Based Estimates A first set of methods is based on the minimization of the interpolation error of one or several sensors depending on the CFD solution (Abgrall et al., 2014a; Alauzet and Loseille, 2010; Castro-Dı´az et al., 1997; Dompierre et al., 1997; Frey and Alauzet, 2005; huang, 2005; Loseille and L€ohner, 2010; Vasilevski and Lipnikov, 2005). Given a numerical solution Wh, a solution of higher regularity Rh(Wh) is recovered, so that the following interpolation error estimate (Chen et al., 2007; Loseille and Alauzet, 2011b) holds k Rh ðWh Þ  Ph Rh ðWh ÞkLp  N

2 3

Z O



det jHRh ðWh Þ j



p 2p + 3

2p + 3 3p

(6)

where HRh ðWh Þ is the hessian of the recovered solution and N an estimate of the desired number of nodes, and Ph the piecewise linear interpolate of a function. If anisotropic mesh prescription is naturally deduced in this context, interpolation-based methods do not take into account the PDE itself. however, in some simplified context and assumptions (elliptic PDE, specific recovery operator), we have k W  Wh k

1 k Rh ðWh Þ  Ph Rh ðWh Þ k with a > 1, 1a

so that good convergence to the exact solution may be observed (Loseille et al., 2007). Indeed, if Rh(Wh) is a better approximate of W in the following meaning: k W  Wh k 

1 k Rh ðWh Þ  Wh k where 0  a < 1, 1a

and if the reconstruction operator Rh has the property: Ph Rh ðWh Þ ¼ Wh , we can then bound the approximation error of the solution by the interpolation error of the reconstructed function Rh(Wh):

Unstructured Mesh Generation and Adaptation Chapter

k W  Wh k

10 275

1 k Rh ðWh Þ  Ph Rh ðWh Þ k : 1a

Note that from a practical point of view, Rh(Wh) is never recovered, only its first and second derivatives are estimated. Standard recovery techniques include least square, L2-projection, green formula or the Zienkiewicz–Zhu recovery operator. A numerical review of HR operators is given in Vallet et al. (2007). A second set of methods tends to couple adaptivity with the assessment of the numerical prediction of the flow. Goal-oriented optimal methods (Giles and Suli, 2002; Jones et al., 2006; Loseille et al., 2010; Power et al., 2006; Venditti and Darmofal, 2002) aims at minimizing the error committed on the evaluation of a scalar functional. A usual functional is the observation of the pressure field on an observation surface g:  Z  p  p∞ 2 , jjðWÞ  jh ðWh Þj with jðWÞ ¼ p∞ g where W and Wh are the solution and the numerical solution of the set of PDEs, respectively. They do take into account the features of the PDE, through the use of an adjoint state that gives the sensitivity of W to the observed functional j. In order to solve the goal-oriented mesh optimization problem, an a priori analysis depending on the numerical scheme is needed to restrict to the main asymptotic term of the local error, see Belme et al. (2012) for the Euler equations. If a super-convergence of jj(W)  jh(Wh)j may be observed in some cases (Giles, 1997; Giles and Pierce, 1999), goal-oriented optimal methods are specialized for a given output, and in particular do not provide a convergent solution field. Indeed, the convergence of kW  Whk is not predicted. In addition, if the observation of multiple functionals is possible (by means of multiple adjoint states), the optimality of the mesh and the convergence properties of the approximation error may be lost. In each case, the aforementioned adaptive strategies address specifically one goal. Consequently, it is still a challenge to find an adaptive framework that encompass all the desired requirements: anisotropic mesh prescription, asymptotic optimal order of convergence, assessment of the convergence of the numerical solution to the continuous one, control of multiple functionals of interest, etc. One current field of research is based on the design of a norm-oriented or multi-functionals mesh adaptation, which takes into account the PDE features, and produces an approximate solution field which does converge to the exact one. This is done by estimating a residual term PhW  Wh. This term naturally arises when the functional of interest is the norm k Ph W  Wh kL2 . The estimate is then used as a functional with the standard goal-oriented approach. To do so, it is necessary to derive some correctors that estimate the implicit error. This approach requires the knowledge of the

276 Handbook of Numerical Analysis

numerical method at hands along with an adjoint solver corresponding to set of equations being solved. Consequently, we can observed functional of interest that is the difference between the exact and the numerical solutions. In addition, multiple functionals of interest can be observed simultaneously. For instance, the norm-functional can be ðdragðWÞ  dragðWh ÞÞ2 + ðliftðWÞ  liftðWh ÞÞ2 : By linearizing the right-hand side (RHS), we see that the estimate (corrector) for the norm-functional depends only of PhW  Wh and produces a single left-hand-side for the goal-oriented estimation. More details on these approaches can be found in Bre`thes et al. (2015), hartmann (2008) and Loseille et al. (2015a).

3.4 Controlling the Interpolation Error Controlling the linear interpolation error of a given flow field allows to derive a very simple anisotropic metric-based estimate. Interpolation estimate is the first introduced in the pioneering work (Castro-Dı´az et al., 1997) by equi-distributing the interpolation error in L∞ norm. here, we prefer to control the Lp norm of the interpolation error. Such control allows to recover the order of convergence of the scheme for flows with shocks and to capture all the scales of the numerical solution (Loseille et al., 2007). Given a numerical solution Wh (density, pressure, Mach number, etc.), the point-wise metric tensor minimizing (6) is given by: 1

MLp ðWh Þ ¼ det ðjHR ðWh ÞjÞ2p + 3 jHR ðWh Þj,

(7)

where jHR(Wh)j is deduced from HR(Wh) by taking the absolute value of the eigenvalues of HR(Wh). In the sequel, the interpolation error is controlled in L2 norm exclusively, while the HR operator is based on the double L2 projection (Vallet et al., 2007). For the numerical examples, we will use the complexity to control the level of accuracy. The complexity is defined by R pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi CðMÞ ¼ O det ðMÞ. Imposing a complexity of N leads to the following scaling of the metric: 0 1 B MLp ðWh ,NÞ ¼ B @Z O

N

1 C C detðjHR ðWh ÞjÞ2p + 3 jHR ðWh Þj: (8) p+1 A

det ðjHR ðWh ÞjÞ2p + 3

For time-dependent problems, we use an extension of the multiscale approach (Alauzet and Olivier, 2011). The process may be summarized as follows. The whole time frame [0, tf] is split in nt subintervals: ½0, tf  ¼

nt \ i¼1

½ti ,ti + 1 , with t1 ¼ 0 and tnt ¼ tf :

Unstructured Mesh Generation and Adaptation Chapter

10 277

Then, the main idea consists in deriving nt meshes ðHi Þi¼1, nt that minimize the interpolation error on the solution u defined on O: nt Z ti + 1 Z X i Find ðHopt Þi¼1, nt ¼ min jW  Ph Wjp dO dt for all i 2 ½1,nt : (9) i¼1

ti

O

The solution of this problems gives a sequence of metric tensor fields ðMi Þi¼1,nt for each subinterval [ti, ti+1]. The continuous problem is then solved using a calculus of variations. From a practical point of view, on a time every Dt ¼ interval [ti, ti+1], the flow solver outputs a sequence of solutions  (ti+1  ti)/N. From this sequence, a maximal or mean hessian H i is recovered (Alauzet and Olivier, 2011) accounting for the error for the subwindow time  frame. Then, once all H i are recovered, a global normalization is applied for the whole time frame [0, tf] to derive ðMi Þi¼1, nt , see Fig. 26. A detailed review of metric-based estimates for steady and unsteady problems can be found in Alauzet and Loseille (2016).

3.5

Geometric Estimate for Surfaces

Controlling the deviation to a surface has been studied in previous works, see Aubry et al. (2011), Frey (2000) and Frey and Borouchaki (2003) for anisotropic remeshing. We recall that the surface remeshing is done by considering only discrete data, either inherited by the CAD or recovered directly from the discrete mesh. Prior to surface remeshing, normals and tangents are then assigned to each boundary point. We denote by ni the normal of the vertex xi. As in Frey (2000), a quadratic surface model is computed locally around a surface point xi. Starting from the topological neighbours of xi, the coordinates of each point are mapped onto the local orthonormal Frenet frame (ui, vi, ni) centred in xi. Vectors (ui, vi) lie in the orthogonal plane to ni. We denote by (uj, vj, sj) ¼ (txj.ui, txj.vi, txj.ni) the new coordinates of vertex xj. xi is set as the new origin so that (ui, vi, si) ¼ (0, 0, 0). The surface model consists in computing by a least squares approximation a quadratic surface: (10) sðu,vÞ ¼ au2 + bv2 + cuv, where ða, b, cÞ 2 3 : P The least squares problem gives the solution to min ða, b, cÞ j jsj  sðuj , vj Þj2 , where j is the set of neighbours of xi. Note that three neighbours’ points are necessary to recover the surface model. Finally, if the degree of xi is d and the linear system is 0 2 0 1 1 s1 v21 u1 v 1 0 1 u1 a B⋮ B⋮ C C ⋮ ⋮ C @ b A ¼ B C: AX ¼ B , B @ u2 @ sd A v2d ud v d A d c The least square formulation consists in solving tA A ¼ tA B. From this point, one may applied the surface metric given in Frey (2000). We propose here a

278 Handbook of Numerical Analysis

simplified version. We can first remark that the orthogonal distance from the plane n? i onto the surface is given by s(u, v) by definition. The trace of s(u, v) is a function that gives directly the distance to the surface. The 2D suron n? i face metric M2D ððu, vÞÞ is constant equal to e is easy S such that the length ‘M2D S to find starting from the diagonalization of the quadratic function (10). Geometrically, it consists in finding the maximal area metric included in the level-set e of the distance map. We assume that M2D S admits the following decomposition:   l1, S 0 2D t u S , vSÞ ð uS,  v S Þ, with ð u S , v S Þ 2 22 : MS ¼ ð 0 l2, S If we want to achieve the same error as the initial mesh, we compute e ¼ min j jsðuj , vj Þj among the neighbours of xi. The anisotropic 2D metric achieving an e error becomes 1 2D M2D S ðeÞ ¼ MS : e The final 3D surface metric in xi is 0 1 l1, S 0 B e C B Ct l2, S MS ðeÞ ¼ ðuS ,vS ,ni ÞB C ðu , v , n Þ, 0 A S S i @0 e 0 0 h2 max (  S ð1Þui + u  S ð2Þvi , uS ¼ u with v S ð1Þui +  v S ð2Þvi : vS ¼ 

(11)

The parameter hmax is initially chosen very large (e.g. 1/10 of the domain size). This normal size is corrected during various steps. A first anisotropic gradation using (4)(i) is applied on surface edges only. The surface metric is then intersected with any computation metrics as given by (7). These two steps set automatically a proper element size in the normal direction. Note different local surface estimates can be derived depending on the local information available, see Vlachos et al. (2001). During the mesh adaptation process, the previous procedure is not applied independently on each current mesh to be adapted. On the contrary, the surface metric is computed once on a fixed background mesh. This metric is then interpolated on each adapted mesh in the course of the iterative process. This tends to maintain a consistent gap with respect to the true geometry.

3.6 Boundary Layers Metric Boundary layers mesh generation has been devised to capture accurately the speed profile around a body during a viscous simulation. The width of the

Unstructured Mesh Generation and Adaptation Chapter

10 279

boundary layer depends on the local Reynolds number (L€ohner, 2001). So far, the generation of the boundary layer grids has been carried out by an extrusion of the initial surface along the normals to the surface or by local modification of the mesh (Marcum, 1996). Note that using the normals as sole information requires several enrichments to obtain a smooth layers transition on complex surfaces (Aubry and L€ ohner, 2009). In this chapter, we consider a simple approach that is naturally compatible with anisotropic adaptation procedures. The idea consists in representing the boundary layer mesh by a continuous metric field. The distance to the body is computed using classical algorithms of level-set methods (L€ ohner, 2001). This step can be done quickly and has generally a complexity of OðN ln ðNÞÞ where N is the number of points in the current mesh. (Furthermore, note that from a practical point of view, this function is evaluated only in the vicinity of the body.) To control the size in the tangential directions, a metric is recovered from the current surface mesh or a background mesh. It takes advantage of the Log-Euclidean framework. Starting from an elements (K)P2K of vertex P, the unique surface metric tensor MK (for which K is unit) is computed by solving the following 6  6 linear system: 8 2 < ‘MK ðe1 Þ ¼ 1 (12) ðSÞ … : 2 ‘MK ðe6 Þ ¼ 1: where (ei)i¼1, 6 are elements edges. (S) has a unique solution as long as the volume of K is not null. The logarithm of each metric is computed so that a classical Euclidean mean weighted by the elements’ area is done. Finally, the body point metric MP is mapped back using the exponential operator: 0X 1 jKj ln ðMK Þ BP2K C C: X MP ¼ exp B @ A jKj P2K

The final boundary layers metric is based for a continuous exponential law of the form h0 exp ðafð:ÞÞ, where h0 is the initial boundary layer size and a the growing factor. For a volume point xi, the boundary layers metric depends on the body point Pi for which the minimum distance is reached. The following operations conclude these steps: 1. Compute the local Frenet frame (ui, vi, rF(xi)) associated with rF(xi) 2. Set the size in the normal direction to hni ¼ h0 exp ða Fðxi ÞÞ, the sizes in the orthogonal plane to: hui ¼ ðt ui MPi ui Þ2 and hvi ¼ ðt vi MPi vi Þ2 , 3. The final metric is given by:

280 Handbook of Numerical Analysis

0 Mbl ðxi Þ ¼ t ðui ,vi ,rFðxi ÞÞ @

h2 ui

1 h2 vi

h2 ni

A ðui , vi , rFðxi ÞÞ:

(13)

The key idea is again to simplify the coupling by using only metric tensor fields. Indeed, taking all together the viscous and unviscous contributions simply consist in intersecting the corresponding metric tensor fields.

4 ALGORITHMS FOR GENERATING ANISOTROPIC MESHES This section describes the local operators used to adapt the mesh once one or several tensor fields are provided on input. We then describe additional operators used to optimize the mesh and to guarantee an optimal time step for unsteady simulations.

4.1 Insertion and Collapse To generate a unit mesh in a given metric field ðMi Þi¼1…N , two operations are recursively used: edge collapse and point insertion on edge. The starting point for the insertion of a new point on an edge e is the shell of e composed of all elements sharing this edge. Each element of the shell is then divided into two new elements. The new point is accepted if each new tetrahedron has a positive volume. When a point is inserted on an boundary edge, either a linear approximation of the surface is used or a query to the CAD. The newly inserted point is created at the mid-edge point in the metric. To compute it, we first evaluate the size of the current edge with respect to the two end-points ðA, MA Þ and ðB,MB Þ: pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ‘MA ¼ t AB MA AB and ‘MB ¼ t AB MB AB: If ‘MA equals ‘MB , the mid-edge point in the metric is the geometric 1 mid-point ðA + BÞ. When they differ, we need to solve the nonlinear problem 2 in t 2 [0, 1] arising for the length approximation of (1): Find t such that

1 rt  1 ‘M ¼ ‘MA with r ¼ B : ‘MA 2 log ðrÞ

(14)

We use a dichotomy approach to solve (14), the mid-point is then (1  t) A + t B. The edge collapse starts from the ball of the vertex to be deleted. Again, for the deletion of points inside the volume, the only possible rejection is the creation of a negative volume element. A special care is also required to avoid the creation of an element that already exists, see Fig. 9 (left and middle). The rejections are more complicated in the case of a surface point. We first avoid each collapse susceptible to modify the topology of the object.

Unstructured Mesh Generation and Adaptation Chapter

10 281

Merging A onto B A

B

A

B Volume case

Surface case

FIG. 9 Left and middle, volume and surface collapse of edge AB leading to the creation of an element that already exists. Right, example where an edge is recursively refined to get a unit-length without checking the length requirement in the edge’s orthogonal direction; the configuration may lead to edges acting as a barrier for future refinement.

This is simply done by assigning an order on each surface point types: corner, ridge (line) and inside surface. The collapse can also be rejected if the normal deviation between old and new normals becomes too large. Currently, if n denotes the normals to an old face, we allow the collapse if each new normal ni verifies t n ni > cos ðp=4Þ. Note that the control to the surface deviation is given by the surface metric and so it does not need to be handled directly in the collapse operation. With these operations, the core of the adaptive algorithm consists in scanning each edge of the current mesh and, depending on its length, creating a new point on the edge or collapsing the edge. An edge is declared too small or too large according to the bounds given in (2). Without any more considerations, such adaptive mesh generator is known to be not efficient and to require a lot of CPU consuming optimizations as point smoothing and edge swapping. This inefficiency is simply due to the locality of these operations. Comparing to an anisotropic Delaunay kernel (Dobrzynski and Frey, 2008), when an edge needs to be refined, the metric lengths along the orthogonal directions are controlled by the creation of the cavity. Consequently, in one shot, the area of refinement must be large. With the present approach, the size is controlled along one direction only (along the edge being scanned). Consequently, one can reach intractable configurations where the same initial edge is refined successively to get the desired size whereas the sizes in the other directions get worse. A typical configuration is depicted in Fig. 9 (right). A simple way to overcome this major drawback is to use the quality function (3) together with the unit-length check. This supplementary check can be done at no cost since a lot of information can be reused: the volume is already computed, as well as the length of the edges. By simply computing the quality function, we give to these operators the missing information on the orthogonal directions of the current scanned edge. For the collapse, to decide which vertex is deleted from the edge, the qualities of the two configurations are compared and the best one is kept. For an optimal performance, two parameters

282 Handbook of Numerical Analysis

are added in the rejection cases of insertion and collapse: a relative quality tolerance qr  1 and a global quality tolerance qa. Indeed, it seems particularly interesting not to try to implement a full descent direction by imposing the quality to increase on each operation. We prefer to allow the quality to decrease in order to get out of possible local minima. Consequently, a new configuration of elements is accepted if: new and Qnew qr Qini M  QM M < qa , new where Qini M is the worse element quality of the initial configuration and QM is the worse quality of the new configuration. This approach is similar to the simulated annealing global optimization technique (Kirkpatrick et al., 1983). Note that the current version does not fully implement the classical metropolis algorithm where the rejection is based on a random probability. To ensure the convergence of the algorithm, the relative tolerance qr is decreased down to 1 after each pass of insertions and collapses. At the end of the process, the absolute tolerance qa is set up to the current worse quality among all elements.

4.2 Optimizations and Enhancement for Unsteady Simulations In addition to the quality-driven insertion and collapse, we use standard anisotropic mesh optimization techniques such as edges and faces swaps and point smoothing in order to increase the level of anisotropy and the quality of the mesh. By improving the overall quality, they usually improve the stability of the flow solver as well. For unsteady simulations, we add an additional control parameter in order to ensure that an optimal time step is provided in the adaptive mesh. Swaps of edges and faces are standard mesh modifications operators, see Freitag and Ollivier-Gooch (1997) and Frey and George (2008). In the context of anisotropic remeshing, theses operators are simply monitored by anisotropic quality (3). Once the topological and geometrical validity of a swap is verified (positive volume and valid new configurations), it is actually performed only if the quality of the new configuration is strictly lower that the initial quality. We use an improvement factor qr ¼ 0.95 for all the numerical examples. The point smoothing is also a popular simple operator (Frey and George, 2008). It consists in computing a new optimal position of a vertex to improve the quality of the surrounding elements. The main difficulty is the computation of the optimal position. In our case, we want to optimize the length distribution as well. Consequently, for an edge PPi with metric MðPÞ and MðPi Þ, the optimal point position of P is approximated in a Riemannian way by computing: 8 pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi > ðPÞ ¼ PPi MðPÞPPi , ‘ > M >   < pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ‘M ðPÞ 1 y ¼ 1  log with ‘M ðPi Þ ¼ PPi MðPi ÞPPi , > ‘M ðPÞ  log ðrÞ log ðrÞ > > :r ¼ ‘M ðPÞ=‘M ðPi Þ:

Unstructured Mesh Generation and Adaptation Chapter

10 283

The formula arises from seeking the optimal size to get a unit-edge length along PPi: Z y ‘M ðPÞt1 ‘M ðPi Þt dt ¼ 1: 0

Then the optimal position for P from Pi is Popti ¼ P + y Pi P: This procedure is repeated with all the neighbouring vertices of P: ! nP 1a X Popti with a 2 ½0, 1 Popt ¼ aP + nP i¼1 If Popt generates positive volume elements and improves the final quality, P is moved to this new position. In case of rejection, a greater value of a is considered starting with a ¼ 0.2. Note that the metric of P is interpolated at the new position to evaluate the new quality. When a surface point is moved, it is also projected back to the surface and the surface deviation is check in a similar way as for the insertion and collapse operators. For unsteady simulations, the mesh adaptation becomes critical as the CPU time of the simulation depends on the quality of the worse element. Indeed, when an explicit time stepping is used, the minimal time step governs the speed of the simulation. Consequently, the minimal size (or height) generated during the remeshing process may impact drastically the CPU time. If the generated size if 0.01 of the minimal target, then the while CPU time will be multiplied by 100. To overcome this issue, we add an additional control to the quality based on the height of the tetrahedra. We start from the definition of the minimal height of a tetrahedron: 1 V (15) , h2 ¼ 3 Smax where h is the minimal height, V the volume and Smax the maximal area of the faces. For each provided metric, we consider then the regular tetrahedron of side h1, h2, h3, where (hi)i are the unit lengths along the eigenvectors of the metric. pffiffiffi 1 Then, assuming that the sizes may be in the range ½pffiffiffi hi , 2hi , see (2), we 2 can estimate the global minimal height htar using (15). A mesh modification is then rejected if the minimal height of the new set of tetrahedra is lower than htar and the minimal height of the initial set of elements. Numerical experiments have proven that this additional constraint does not have a negative impact on the level of anisotropy while preserving an optimal CPU time step.

5

ADAPTIVE ALGORITHM AND NUMERICAL ILLUSTRATIONS

The previous mesh adaptation strategy is used inside an adaptive loop that couples the error estimations, the mesh adaptation and the flow solver. In this

284 Handbook of Numerical Analysis

section, we give some additional details on the components that are not relative to the local remeshing. We then first validate the full adaptive approach on a supersonic wing-body configuration and a transonic Onera M6 wing. For each case, the adapted numerical solution is compared with experiments. Then, we consider the direct sonic boom prediction of a complex aircraft. The adaptive strategy is then applied to the prediction of boundary layer/shock interaction. Finally, we consider unsteady simulations with the double Mach reflection and a blast prediction.

5.1 Adaptive Loop The complete adaptive algorithm for steady simulations is composed of the following steps. 1. Compute the flow field (i.e. converge the flow solution on the current mesh); 2. Compute the metric estimates: surface, volume, boundary layers, etc. 3. Generate a unit mesh with respect to these metric fields; 4. Reproject the surface mesh onto the geometry using the CAD data or a fixed background mesh; 5. Interpolate the flow solution on the new adapted mesh; 6. Goto 1. For step 1, two flow solvers have been used in the numerical section. The ohner, 2001), works on unstructured grids with finite elefirst one, FEFLO (L€ ment discretization of space and edge-based data structures. The Galerkin edge-fluxes are replaced by numerically consistent fluxes, typically given by approximate Riemann solvers (van Leer, Roe, hLLC, etc.) with limited variables (van Leer, van Albada, etc.). The second flow solver is WOLF (Alauzet and Loseille, 2010), and it uses a mixed finite element/finite volume discretization with a MUSCL extrapolation. Both codes have been verified to be second-order accurate on smooth flows and second-order accurate for flows with shocks by using adaptivity (Loseille and L€ohner, 2010; Loseille et al., 2007). The flow solvers use an implicit LU-SGS scheme (Luo et al., 1998; Menier et al., 2015). FEFLO is used for simulations 4.4 and 4.5, WOLF for simulations 4.2, 4.3 and 4.6. For the unsteady simulations, an explicit time stepping based on Runge–Kutta schemes is used and the explicit control of the height of the tetrahedra of Section 4.2 is activated. For step 4, if the surface approximation e is small enough with respect to the minimal metric size controlling the interpolation error, the simple smoothing procedure usually succeeds to directly move the point onto the geometry. For more complex cases, with boundary layer or when the surface approximation is low, most advanced operators like the cavity-based operators (Loseille and Menier, 2013) are needed. For all the simulations, we use a 8-processors 64-bits MacPro with an IntelCore2 chipsets with a clock speed of 2.8 GHz with 32 Gb of RAM.

Unstructured Mesh Generation and Adaptation Chapter

10 285

The flow solver is multithreaded while the local remeshing is serial. The final metric field (multiscale, surface, boundary layer) is always smoothed by using isotropic gradation law (4)(i), with a parameter of 1.2. To evaluate the level of anisotropy, we use the anisotropic ratio and anisotropic quotients of an element. Both measures are uniquely defined by computing the metric solution of (12), and then by evaluating the following 1

quantities from its eigenvalues with hi ¼ li  2 : r¼

max i¼1, 3 hi h3i and qi ¼ min i¼1,3 hi h1 h2 h3

Anisotropic quotients measure the gain with respect to an isotropic mesh adaptation, in particular, they increase when two anisotropic directions exist. For all cases, the initial meshes are generated by using either a constrained Delaunay approach for simulations 4.2 and 4.3 and a frontal approach for simulations 4.4, 4.5 and 4.6. Note that only the material described in the previous sections are used. The interpolation error in L2 norm is used in addition to the surface metric, metric smoothing and boundary layer metric described in Section 3. The algorithm used to generate the meshes exactly fits the procedures given in Section 4.

5.2

A Wing-Body Configuration

The first example is a supersonic flows around the 4th wing-body configuration described in Hunton et al. (1973). The planform of the model and the corresponding CAD are depicted in Fig. 10. The inflow is at Mach 1.68 with a lift of 0.15. We observe the pressure below the aircraft at a distance R ¼ 3.1 L where L is the reference length of the aircraft (here 17.52 cm). Experimental data are available at this distance, see Hunton et al. (1973). The adaptive process is based on metric (7) coupled with the surface metric (11) with e ¼ 0.001. The simulation is composed of three steps at the following complexity: 25,000, 50,000 and 75,000 with five subiterations at a fixed complexity yielding to a total of 15 iterations. We control the interpolation error of the Mach number in L2 norm. The final mesh is here composed of 283,625 vertices and 1,582,309 tetrahedra. The worst volume quality is 0.05 and the worst surface quality is 0.11 The average anisotropic ratio is 61 and the mean anisotropic quotient is 2711. 92% and 99.9% of the volume and surface edges, respectively, are unit. The total CPU time for this run is 61 mn. This case features three strong shocks that are well and early captured by the adaptive process, see Fig. 11 for comparisons with experiments.

286 Handbook of Numerical Analysis t/c = 0.05 c

r

t t/2

c/2

3.45 x

0.54 7.01 69°

8.21

80°

1.23

16.29 17.52

FIG. 10 Wing-body example: left, planform of the wing-body model. Right, CAD of the model equipped with a parabolic sting to emulate experiment apparatus.

0.03

ite.15: 183 K ite.10: 194 K ite.5: 106 K XP

0.02 0.01 0 −0.01 −0.02 −0.03

0

0.5

1

1.5

p  p∞ at R/L ¼ 3.6 for the p∞ final meshes for each fixed complexity. Right, closer view of the final anisotropic adaptive mesh near the observation line.

FIG. 11 Wing-body example: left, normalized pressure signature

5.3 Transonic Flow Around a M6 Wing We consider a flow around the Onera M6 wing. The initial surface mesh and the CAD are depicted in Fig. 12. The flow condition is Mach 0.8395 with an angle of attack of 3.06 degrees. The scope of the example is to validate the interaction between the surface metric controlled with e ¼ 0.001 and the Lp metric. For this simulation, the following sequence of complexities for (8) is chosen: 20,000, 40,000 and 80,000, with five steps at a fixed complexity. The L2 norm of the interpolation error of the Mach number is controlled. The final mesh is composed of 222,561 vertices and 1,247,227 tetrahedra with a mean anisotropic ratio of 43 and a mean anisotropic quotient of 1662. The total CPU time for this simulation is 42 mn, with 55% spent in the flow solver and 45% in the remeshing, interpolation and error estimate. For the final mesh, the worst quality is 0.11 for the volume and 0.25 for the surface. The strong shocks on the surface of the wing are depicted in Fig. 13. Cp extractions along two sections are given in Fig. 14. In Fig. 15, we observe the anisotropic volume meshes near the wake of the wing and near

Unstructured Mesh Generation and Adaptation Chapter

10 287

FIG. 12 M6 wing example: left, CAD of the geometry, right, a view of the initial surface mesh of the wing.

FIG. 13 M6 wing example: from left to right, anisotropic surface mesh, Mach iso-values, closer view near the second shock.

1.2 1 0.8 0.6 0.4 0.2 0 −0.2 −0.4 −0.6 −0.8

ite.15: 222 K XP

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

1.2 1 0.8 0.6 0.4 0.2 0 −0.2 −0.4 −0.6 −0.8

ite.15: 222 K XP

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

FIG. 14 M6 wing example: left and middle, comparisons between experimental values of Cp ¼ ðp  p∞ Þ=q∞ for the second and third upper sections of the wing. Right, closer view of the mesh near upper sections 2 and 3.

FIG. 15 M6 wing example: from left to right, anisotropic capturing of the wake and of the shock, closer view in the wake and closer view around the shock.

288 Handbook of Numerical Analysis

the shocks on the wing surface. Note that if the shock-dominated features of the flow are perfectly captured, we also capture smooth features as the wing tip vortex, see Fig. 16. The amplitude of the flow variables in the wake are two orders of magnitude lower than the magnitude in the shock.

5.4 Direct Sonic Boom Simulation We consider in this example the accurate prediction of the pressure signal below the SSBJ design provided by Dassault Aviation. The length of the aircraft is L ¼ 43 m while the distance of observation from the aircraft is denoted by R. The initial surface mesh is depicted in Fig. 17. The aircraft is put in a 10 km domain as depicted in Fig. 17 (right). The initial mesh was generated automatically by using an advancing-front technique (L€ ohner and Parikh, 1988). The size ratio in the initial mesh is hmin/hmax ¼ 1e9 and the volume of the elements ranges from 5.4e11 to 4.7e10. The flow condition is Mach number 1.6 with an angle of attack of 3 degrees. Our intent is to observed the pressure field for various R up to 9 km. This corresponds to a ratio R/L of about 243. According to the flow conditions, for R ¼ 9 km, the length of the propagation of the shock waves emitted by the SSBJ is actually around 15 km.

FIG. 16 M6 wing example: wing tip vortex 8 body-length behind the wing.

10 km

15 km

FIG. 17 SSBJ example: left, initial surface mesh of the SSBJ geometry, right, computational domain with the position of the aircraft in the domain.

Unstructured Mesh Generation and Adaptation Chapter

10 289

The interpolation error on the Mach number in L2 norm is controlled and the surface is controlled with (11) and e ¼ 0.001. The strategy employed here is based on 30 adaptations at the following complexities: 80,000, 160,000, 240,000, 400,000, 600,000 and 800,000. Each step is composed of five subiterations at a fixed complexity. The final mesh is composed of 3,299,367 vertices and 19,264,402 tetrahedra only (Fig. 18). The average anisotropic ratio is 1907 while the mean anisotropic quotient is 50,3334. All the scales involved in this simulation are depicted in Fig. 19. This example shows that a very high

FIG. 18 SSBJ example: left, cut in the final adapted mesh 10 m below the aircraft. Right, cut 10 m behind the aircraft showing how anisotropic tetrahedra are aligned with the Mach cones.

15 km

Zoom × 100

10 km

5 km

9 km Zoom × 10 Zoom × 100

40 m Zoom × 100 Anisotropic tetrahedron 1 cm 300 m

10 cm

FIG. 19 SSBJ example: example of the scales of anisotropic elements reached in this simulation. An typical anisotropic element in the path of the shock has sizes of the order of 300 m, 10 cm and 1 cm.

290 Handbook of Numerical Analysis

level of anisotropy is reached using unstructured mesh adaptation. Indeed, it is at least one order of magnitude higher than in the previous examples. Local refinement allows to keep a maximum accuracy and enables to generate quality anisotropic meshes. We mention that for each generated mesh, the worst element quality computed with (3) is always below 0.02 for the volume and below 0.05 for the surface while the percentage of unit elements is always greater than 90%. In addition, the flow solver still converges on such meshes leading to accurate pressure signatures for R/L  250. Anisotropic ratios and quotients for the whole sequence of meshes are reported in Table 1. They are increasing along the iterations. This shows that the accuracy across the shocks is increasing while the sizes in the anisotropic directions are decreasing at a lower rate. The fact that the anisotropic quotient is increasing simply shows that there exist two anisotropic directions. Note that using (7) avoid to prescribe a minimal size during the adaptation leading to even stronger anisotropy. This property is due to the sensitivity property of (7) given by the 1

local normalization term det ðjHR ðuh ÞjÞ2p + 3 . An example of the scales of the solution is given by the pressure extractions in Fig. 20 at R ¼ 5 km and R ¼ 9 km. Indeed, the normalized pressure signal at R ¼ 9 km is of order 8e4 while the magnitude is around 3e2 at R ¼ 43 m. Consequently, we can expect for the volume interpolation error to have a magnitude ratio of (102)3. It is then necessary to guarantee that the error estimate detects such small amplitudes even in the presence of large amplitudes (Fig. 21). This example demonstrates that using (7) complies with this requirement allowing to detect automatically all the scales of the solution, see Fig. 20. Several cuts in the symmetry plane are depicted in Fig. 22. At R ¼ 5 km, we still distinguish three separated shocks waves and at R ¼ 9 km only two shock waves are separated leading the classical N-wave signature. These features are even more emphasized on the pressure signatures in Fig. 20. The total CPU time is around 28 h 35 mn. 75% of the CPU time is spent in the flow solver and 35% in the remeshing, interpolation and error estimate. Note that accurate signatures at R ¼ 5 km are already obtained after 11 h of CPU (corresponding to the 20th iteration) as depicted in Fig. 20. We give in Table 1 the full sequence of CPU times. The first three steps provides an accurate signal for R/L < 20 and below.

5.5 Boundary Layer Shock Interaction We apply this strategy to study shock/boundary layer interaction. The test case is depicted in Fig. 23. The shock waves are generated by a double wedge wing at Mach 1.4 with an angle attack of 0 degree and a Reynolds number of 3.4 106. Only the plate is treated as a viscous body. We solve the set of the Reynolds-average Navier–Stokes equations with Baldwin–Lomax turbulence model. The final adapted mesh and the Mach number iso-values are depicted

TABLE 1 SSBJ Example: Properties of Each Final Adapted Mesh—Mean Anisotropic Ratio, Mean Anisotropic Quotient, Number of Vertices and Number of Tetrahedra for Each Complexity Iteration

Complexity

Ratio

Quotient

# Vertices

# Tet.

CPU time

5

80,000

200

10,964

432,454

2,254,826

1 h 10 mn

10

160,000

383

30,295

608,369

3,294,197

2 h 54 mn

15

240,000

698

81,129

1,104,910

6,243,462

6 h 9 mn

20

400,000

1089

177,295

1,757,865

10,125,724

11 h 15 mn

25

600,000

1575

340,938

2,572,814

14,967,820

18 h 47 mn

30

800,000

1907

503,334

3,299,367

19,264,402

28 h 35 mn

The last column gives the cumulative CPU time.

292 Handbook of Numerical Analysis 1.5

10

(p − p∞)/p∞ × 10−4

6 4 2 0 −2

ite.20: 1M7 ite.25: 2M5 ite.30: 3M3

ite.20: 1M7 ite.25: 2M5 ite.30: 3M3

1

(p − p∞)/p∞ × 10−3

8

−4 −6 −8 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 x R = 9 km

0.5

0 −0.5 −1 −1.5

0

1000

2000

3000 x R = 5 km

4000

5000

6000

FIG. 20 SSBJ example: left, pressure signature at R ¼ 9 km for the final meshes corresponding the last three complexities. Right, pressure signature at R ¼ 5 km. The legend reports the number of vertices of each mesh in million (iteration 20, 25 and 30). The pressure curves are deliberately shifted for visibility.

FIG. 21 SSBJ example: left, adapted surface mesh, the red square shows the position of the SSBJ. Right, Mach number iso-lines on the symmetry plane y ¼ 0.

in Fig. 23, closer views around the two shocks are depicted in Fig. 24. The final mesh is composed of 280,000 vertices and 1.3 millions tetrahedra and is obtained after 20 iterations with a complexity of 10,000. In this example, we control the interpolation error on the Mach number coupled with boundary layer metric (13). The initial mesh is used as the background mesh to compute (13) with parameters h0 ¼ 106 and a ¼ 1.2. As the boundary layer metric is intersected with the interpolation error based metric, the resulting complexity is naturally greater. The unstructured boundary layer mesh height is around 107 near the plate. The average anisotropic ratio is greater than 106 and the average ratio around 500. The worst surface element quality is 0.03 and 0.002 for the volume. For the final mesh, the minimal size in the unstructured layer is of the order of 107. As shown in Fig. 24 (bottom), we successfully capture the typical bubbles and recirculations at the intersection between the shocks and the boundary layer.

Unstructured Mesh Generation and Adaptation Chapter

10 293

FIG. 22 SSBJ example: from top to bottom, from left to right, cut in the final anisotropic mesh close to the aircraft, closer view of the mesh 5 km below the aircraft, closer view at 9 km below the aircraft, global view of the mesh.

FIG. 23 Shock/boundary layer interaction example: from left to right, computational domain and initial surface mesh.

FIG. 24 Shock/boundary layer interaction example: from left to right, Mach umber iso-values and final adapted surface mesh.

294 Handbook of Numerical Analysis

FIG. 25 Shock/boundary layer interaction example: stream lines of the velocity in two bubbles creating from the interaction shock and boundary layer.

This simulation leads to the following observations. Generating a semistructured boundary layer mesh extruded from the surface mesh gives only the require accuracy for the smaller layers. Indeed, the distance of the bottom of the shock from the viscous plate is around 103, whereas the initial height of the uniform boundary layer mesh was at 0.2. Consequently, the example emphasizes the difficulty of capturing these phenomena only with an a priori fixed quasi-structured boundary layer mesh. In addition, this approach is completely generic and robust and can handle complex geometries. however, if the shock/boundary layer interaction is automatically handled, the impact of having a fully unstructured mesh is not yet analyzed in term of solution accuracy and solver stability in the viscous area (Fig. 25). Consequently, it seems also interesting to derive a method to generate structured mesh for the smaller layers (at least) while preserving (upper) anisotropic refinements. Metric-orthogonal and metric-aligned anisotropic mesh adaptation are possible solutions to generate highly anisotropic meshes with quasi-structured elements (Loseille, 2014; Loseille et al., 2015b).

5.6 Double Mach Reflection and Blast Prediction The first unsteady case is double Mach reflection (Fig. 26). This simulation starts from a two-state initialization of a shock wave impacting a ramp. The density, speed and pressure for the right side is (5.71, 9.76, 0, 0, 116.5) and (1, 0, 0, 0, 1) for the left side, the shock wave propagates along the x-direction. The total physical time of the simulation is 0.18 s. For this simulation, the time frame [0, 0.18] is divided in 30 subtime windows with 5 fixed point iterations and 21 metric intersections for each subtime window. We control

10 295

Unstructured Mesh Generation and Adaptation Chapter Tini

Tend

ΔT

t

Δt Metric sampling

Fixed-point loop FIG. 26 Unsteady adaptation algorithm: a fixed mesh is generated for subtime window by sampling the solution at different time steps.

FIG. 27 Double Mach reflection at final time: final adapted surface mesh (top left), density iso-values (top right), cut in the volume mesh (bottom left) and closer view near the contact discontinuity and vortex shock interaction (bottom right).

296 Handbook of Numerical Analysis

FIG. 28 Top, the US capitol CAD (left) and initial surface mesh (right) with the initial blast location. Bottom, anisotropic surface mesh at t ¼ 0.025 s (left) and the density solution iso-values (right).

the L2 norm of the density interpolation error. The simulation CPU time is 8 h 55 min, 80% is spent in the flow solver and 20% mesh adaptation. The final mesh is composed of 235,095 vertices, 1,310,082 tetrahedra and 5864 boundary faces. The mesh at final time and density iso-values are depicted in Fig. 27. We can see that the contact discontinuity is impacting the ramp and that the generated vortices are pushing forward the initial front shock. If this phenomenon is usually observed in 2D simulation (Woodward and Colella, 1984), its observation on 3D geometry is more complex. Moreover, the thickness of the adaptation is due to the fixed point strategy as the mesh is adapted for all the times step belonging to a subtime frame. We then consider a blast propagation on a more complex geometry: the US Capitol. Applying successfully an anisotropic adaptive simulation on it is challenging as it features many complex details as many columns, cupola, etc. A classic load is considered, see Fig. 28. The final physical time is 0.1 s. The whole time frame has been divided into 20 time slots of 0.005 s. The flow solver outputs density field every 0.0005 s. The final anisotropic mesh for the time frame [0.05, 0.055] is depicted in Fig. 28. The interpolation error on the density is controlled in L2 norm in space and time. The mesh is composed of almost 200,000 vertices for a total CPU time of 8 h.

6 CONCLUSION The standard computational pipeline have been described for complex geometries and unstructured mesh generation from CAD to surface and volume mesh generation. For adaptivity, we have described the basic principles of

Unstructured Mesh Generation and Adaptation Chapter

10 297

anisotropic mesh adaptation based on metric tensor fields: concept of unit mesh, metric interpolation, metric smoothing, etc. A simple to implement but robust local remeshing strategy have been detailed. It allows to adapt different components of the flows. For each adaptation, we use a dedicated metric field issued from various estimates: surface curvatures, interpolation errors, distance to a body, etc. Numerical examples show the robustness of the method to (i) reduce solver diffusion and (ii) reach a high level of anisotropy that is hardly tractable with a structured approach or a global remeshing method. This chapter has covered only the basic processes that are required to reach a high level of anisotropy and recover a second-order accuracy in space when simulating flows with shocks. It is important to mention that each component is crucial to gain all the benefit of adaptivity. Any improvement in one component may improve the whole process. We refer to Park et al. (2016) for a detailed discussion on the current issues of unstructured mesh adaptation. Mesh generation and adaptation is still an active field of research and many topics are not discussed in this chapter. This concerns the generation of boundary layer grids (Aubry and L€ ohner, 2009; Bottasso and Detomi, 2002; Garimella and Shephard, 2000), the design of metric-aligned or metric-orthogonal grids (Loseille, 2014; Loseille et al., 2015b), the design of very high-order error estimates (Yano and Darmofal, 2012), the generation of high-order curved meshes (Abgrall et al., 2014b; Sahni et al., 2010; Toulorge et al., 2013; Xie et al., 2013) and parallel (adaptive) mesh generation (Alleaume et al., 2008; Coupez et al., 2000; Loseille et al., 2015c; Ovcharenko et al., 2013; Remacle et al., 2015).

REFERENCES Abgrall, R., 2001. Toward the ultimate conservative scheme: following the quest. J. Comput. Phys. 167 (2), 277–315. ISSN 0021-9991. http://dx.doi.org/10.1006/jcph.2000.6672. http:// www.sciencedirect.com/science/article/pii/S0021999100966725. Abgrall, R., Beaugendre, H., Dobrzynski, C., 2014a. An immersed boundary method using unstructured anisotropic mesh adaptation combined with level-sets and penalization techniques. J. Comput. Phys. 257, Pt. A, 83–101. ISSN 0021-9991. http://dx.doi.org/10.1016/ j.jcp.2013.08.052 .http://www.sciencedirect.com/science/article/pii/S0021999113005962. Abgrall, R., Dobrzynski, C., Froehly, A., 2014b. A method for computing curved meshes via the linear elasticity analogy, application to fluid dynamics problems. Int. J. Numer. Methods Fluids 76 (4), 246–266. ISSN 1097-0363. http://dx.doi.org/10.1002/fld.3932. Alauzet, F., 2009. Size gradation control of anisotropic meshes. Finite Elem. Anal. Des. 46 (1–2), 181–202. Alauzet, F., Loseille, A., 2010. High order sonic boom modeling by adaptive methods. J. Comput. Phys. 229, 561–593. Alauzet, F., Loseille, A., 2016. A decade of progress on anisotropic mesh adaptation for computational fluid dynamics. Comput. Aided Des. 72, 13–39(23rd International Meshing Roundtable Special Issue: Advances in Mesh Generation). ISSN 0010-4485. http://dx.doi.org/10.1016/j. cad.2015.09.005. http://www.sciencedirect.com/science/article/pii/S0010448515001517.

298 Handbook of Numerical Analysis Alauzet, F., Olivier, G., 2011. Extension of metric-based anisotropic mesh adaptation to time-dependent problems involving moving geometries. In: 49th AIAA Aerospace Sciences Meeting Including the New Horizons Forum and Aerospace Exposition. American Institute of Aeronautics and Astronautics, Orlando, FL, USA. Alleaume, A., 2009. Automatic non-manifold topology recovery and geometry noise removal. In: Clark, B.W. (Ed.), Proceedings of the 18th International Meshing Roundtable. Springer, Berlin, Heidelberg, pp. 267–279. Alleaume, A., Francez, L., Loriot, M., Maman, N., 2008. Automatic tetrahedral out-of-core meshing. In: Brewer, M.L., Marcum, D. (Eds.), Proceedings of the 16th International Meshing Roundtable. Springer, Berlin, Heidelberg, pp. 461–476. Arsigny, V., Fillard, P., Pennec, X., Ayache, N., 2006. Log-Euclidean metrics for fast and simple calculus on diffusion tensors. Magn. Reson. Med. 56 (2), 411–421. http://dx.doi.org/10.1002/mrm.20965. Aubry, R., L€ ohner, R., 2009. Generation of viscous grids at ridges and corners. Int. J. Numer. Methods Eng. 77 (9), 1247–1289. ISSN 1097-0207. http://dx.doi.org/10.1002/ nme.2446. Aubry, R., Houzeaux, G., Vzquez, M., 2011. A surface remeshing approach. Int. J. Numer. Methods Eng. 85 (12), 1475–1498. ISSN 1097-0207. http://dx.doi.org/10.1002/ nme.3028. Aubry, R., Dey, S., Mestreau, E.L., Karamete, B.K., Gayman, D., 2015. A robust conforming NURBS tessellation for industrial applications based on a mesh generation approach. Comput. Aided Des. 63, 26–38. ISSN 0010-4485. http://dx.doi.org/10.1016/j.cad.2014.12.009. http://www.sciencedirect.com/science/article/pii/S0010448515000032. Aubry, R., Dey, S., Karamete, K., Mestreau, E., 2016. Smooth anisotropic sources with application to three-dimensional surface mesh generation. Eng. Comput. 32 (2), 313–330. ISSN 1435-5663. http://dx.doi.org/10.1007/s00366-015-0420-3. Belme, A., Dervieux, A., Alauzet, F., 2012. Time accurate anisotropic goal-oriented mesh adaptation for unsteady flows. J. Comput. Phys. 231, 6323–6348. Bottasso, C.L., 2004. Anisotropic mesh adaption by metric-driven optimization. Int. J. Numer. Meth. Eng. 60, 597–639. Bottasso, C.L., Detomi, D., 2002. A procedure for tetrahedral boundary layer mesh generation. Eng. Comput. 18, 66–79. Bre`thes, G., Allain, O., Dervieux, A., 2015. A mesh-adaptative metric-based full multigrid for the Poisson problem. Int. J. Numer. Methods Fluids 79 (1), 30–53. ISSN 1097-0363. http:// dx.doi.org/10.1002/fld.4042. Castro-Dı´az, M.J., Hecht, F., Mohammadi, B., Pironneau, O., 1997. Anisotropic unstructured mesh adaptation for flow simulations. Int. J. Numer. Meth. Fluids 25, 475–491. Chen, L., Sun, P., Xu, J., 2007. Optimal anisotropic meshes for minimizing interpolation errors in Lp-norm. Math. Comput. 76 (257), 179–204. Compe`re, G., Remacle, J.-F., Jansson, J., Hoffman, J., 2010. A mesh adaptation framework for dealing with large deforming meshes. Int. J. Numer. Meth. Eng. 82, 843–867. Coupez, T., 2011. Metric construction by length distribution tensor and edge based error for anisotropic adaptive meshing. J. Comput. Phys. 230 (7), 2391–2405. ISSN 0021-9991. http://dx.doi.org/10.1016/j.jcp.2010.11.041. http://www.sciencedirect.com/science/article/ pii/S002199911000656X. Coupez, T., Digonnet, H., Ducloux, R., 2000. Parallel meshing and remeshing. Appl. Math. Model. 25 (2), 153–175. ISSN 0307-904X. http://dx.doi.org/10.1016/S0307-904X(00) 00045-7. Dynamic load balancing of mesh-based applications on parallel. http://www. sciencedirect.com/science/article/pii/S0307904X00000457. Courne`de, P.-H., Koobus, B., Dervieux, A., 2006. Positivity statements for a Mixed-Element-Volume scheme on fixed and moving grids. Eur. J. Comput. Mech. 15 (7–8), 767–798.

Unstructured Mesh Generation and Adaptation Chapter

10 299

Dobrzynski, C., Frey, P., 2008. Anisotropic Delaunay mesh adaptation for unsteady simulations. In: Proceedings of 17th International Meshing Rountable, Pittsburgh, PA, USA. Springer, Berlin, Heidelberg, pp. 177–194. Dompierre, J., Vallet, M.-G., Fortin, M., Bourgault, Y., Habashi, W.G., 1997. Anisotropic mesh adaptation: towards a solver and user independent CFD. In: AIAA 35th Aerospace Sciences Meeting and Exhibit, AIAA-1997-0861, Reno, NV, USA. Freitag, L.A., Ollivier-Gooch, C., 1997. Tetrahedral mesh improvement using swapping and smoothing. Int. J. Numer. Methods Eng. 40 (21), 3979–4002. ISSN 1097-0207. http://dx. doi.org/10.1002/(SICI)1097-0207(19971115)40:21h3979:: AID-NME251i3.0.CO;2-9. Frey, P., 2000. About surface remeshing. In: Proceedings of the 15th International Meshing Roundtable, New Orleans, LA, USA. Sandia National Laboratories, NM, USA, pp. 123–136. Frey, P., 2001. Yams, a fully automatic adaptive isotropic surface remeshing procedure. RT0252. INRIA. Frey, P., Alauzet, F., 2005. Anisotropic mesh adaptation for CFD computations. Comput. Methods Appl. Mech. Eng. 194 (48–49), 5068–5082. Frey, P., Borouchaki, H., 2003. Surface meshing using a geometric error estimate. Int. J. Numer. Meth. Eng. 58 (2), 227–245. Frey, P., George, P.-L., 2008. Mesh Generation. Application to Finite Elements, second ed. ISTE Ltd and John Wiley & Sons, London, UK. Garimella, R.V., Shephard, M.S., 2000. Boundary layer mesh generation for viscous flow simulations. Int. J. Numer. Meth. Fluids 49, 193–218. George, P.-L., 2003. Gamanic3d, adaptive anisotropic tetrahedral mesh generator. Technical Note. INRIA. George, P.-L., Borouchaki, H., 1998. Delaunay Triangulation and Meshing: Application to Finite Elements. Herme`s Science, Paris, Oxford. George, P.-L., Borouchaki, H., 2003. Back to edge flips in 3 dimensions. In: Proceedings of the 12th International Meshing Roundtable, Santa Fe, NM, USA, pp. 393–402. George, P.-L., Hecht, F., Saltel, E., 1990. Fully automatic mesh generator for 3D domains of any shape. IMPACT Comput. Sci. Eng. 2, 187–218. George, P.-L., Borouchaki, H., Saltel, E., 2003. ‘Ultimate’ robustness in meshing an arbitrary polyhedron. Int. J. Numer. Methods Eng. 58 (7), 1061–1089. ISSN 1097-0207. http://dx. doi.org/10.1002/nme.808. Giles, M.B., 1997. On adjoint equations for error analysis and optimal grid adaptation in CFD. Tech. Report NA-97/11. Oxford. Giles, M., Pierce, N., 1999. Improved lift and drag estimates using adjoint Euler equations. In: 14th Computational Fluid Dynamics Conference, Fluid Dynamics and Co-located Conferences, Norfolk, VA, USA. http://dx.doi.org/10.2514/6.1999-3293. Giles, M.B., Suli, E., 2002. Adjoint methods for PDEs: a posteriori error analysis and postprocessing by duality. In: Acta Numerica. Cambridge University Press, pp. 145–236. Hartmann, R., 2008. Multitarget error estimation and adaptivity in aerodynamic flow simulations. SIAM J. Sci. Comput. 31 (1), 708–731. http://dx.doi.org/10.1137/070710962. Hecht, F., 1998. BAMG: bidimensional anisotropic mesh generator INRIA, Rocquencourt, France. http://www-rocq.inria.fr/gamma/cdrom/www/bamg/eng.htm. Huang, W., 2005. Metric tensors for anisotropic mesh generation. J. Comput. Phys. 204, 633–665. Hunton, L.W., Hicks, R.M., Mendoza, J.P., 1973. Some effects of wing planform on sonic boom. Technical Note D-7160. NASA. Johnson, C., Navert, U., Pitkaranta, J., 1985. Finite element methods for linear hyperbolic problems. Math. Comput. 69, 25–39.

300 Handbook of Numerical Analysis Jones, W.T., Nielsen, E.J., Park, M.A., 2006. Validation of 3D adjoint based error estimation and mesh adaptation for sonic boom reduction. In: 44th AIAA Aerospace Sciences Meeting and Exhibit, AIAA-2006-1150, Reno, NV, USA. Kirkpatrick, S., Gelatt, C.D., Vecchi, M.P., 1983. Optimization by simulated annealing. Science 220 (4598), 671–680. Laug, P., 2010. Some aspects of parametric surface meshing. Finite Elem. Anal. Des. 46 (1–2), 216–226 (Mesh Generation–Applications and Adaptation). ISSN 0168-874X. http://dx.doi.org/10.1016/j. finel.2009. 06.015. http://www.sciencedirect.com/science/article/pii/S0168874X09000936. Laug, P., Bourochaki, H., 2003. BL2D-V2, mailleur bidimensionnel adaptatif. RR-0275. INRIA. Li, X., Remacle, J.-F., Chevaugeon, N., Shephard, M.S., 2004. Anisotropic mesh gradation control. In: Proceedings of the 13th International Meshing Roundtable, Williamsburg, VA, USA. Li, X.L., Shephard, M.S., Beall, M.W., 2005. 3D anisotropic mesh adaptation by mesh modification. Comput. Methods Appl. Mech. Eng. 194 (48–49), 4915–4950. Lo, D.S.H., 2015. Finite Element Mesh Generation. CRC Press, Boca Raton, FL. L€ohner, R., 2001. Applied CFD Techniques. Wiley, New York, NY. L€ohner, R., 2014. Recent advances in parallel advancing front grid generation. Arch. Comput. Meth. Eng. 21 (2), 127–140. ISSN 1886-1784. http://dx.doi.org/10.1007/ s11831-014-9098-8. L€ohner, R., Parikh, P., 1988. Three-dimensional grid generation by the advancing-front method. Int. J. Numer. Meth. Fluids 8 (8), 1135–1149. Loseille, A., 2014. Metric-orthogonal anisotropic mesh generation. Procedia Eng. 82, 403–415. ISSN 1877-7058. http://dx.doi.org/10.1016/j.proeng.2014.10.400. http://www.sciencedirect. com/science/article/pii/S1877705814016798. Loseille, A., Alauzet, F., 2011a. Continuous mesh framework. Part I: Well-posed continuous interpolation error. SIAM J. Numer. Anal. 49 (1), 38–60. Loseille, A., Alauzet, F., 2011a. Continuous mesh framework. Part II: Validations and applications. SIAM J. Numer. Anal. 49 (1), 61–86. Loseille, A., L€ ohner, R., 2010. Adaptive anisotropic simulations in aerodynamics. In: 48th AIAA Aerospace Sciences Meeting, AIAA Paper 2010-169, Orlando, FL, USA. Loseille, A., Menier, V., 2013. Serial and parallel mesh modification through a unique cavity-based primitive. In: Jiao, X., Weill, J.-C. (Eds.), Proceedings of the 22nd International Meshing Roundtable. Loseille, A., Dervieux, A., Frey, P., Alauzet, F., 2007. Achievement of global second-order mesh convergence for discontinuous flows with adapted unstructured meshes. In: 37th AIAA Fluid Dynamics Conference, AIAA Paper 2007-4186, Miami, FL, USA. Loseille, A., Dervieux, A., Alauzet, F., 2010. Fully anisotropic goal-oriented mesh adaptation for 3D steady Euler equations. J. Comput. Phys. 229, 2866–2897. Loseille, A., Dervieux, A., Alauzet, F., 2015a. Anisotropic norm-oriented mesh adaptation for compressible flows. In: 53rd AIAA Aerospace Sciences Meeting. American Institute of Aeronautics and Astronautics, Kissimmee, FL, USA. Loseille, A., Marcum, D.L., Alauzet, F., 2015b. Alignment and orthogonality in anisotropic metric-based mesh adaptation. In: 53rd AIAA Aerospace Sciences Meeting. American Institute of Aeronautics and Astronautics, Kissimmee, FL, USA. Loseille, A., Menier, V., Alauzet, F., 2015c. Parallel generation of large-size adapted meshes. Procedia Eng. 124, 57–69. ISSN 1877-7058. http://dx.doi.org/10.1016/j.proeng.2015.10.122. http://www.sciencedirect.com/science/article/pii/S1877705815032233. Luo, H., Baum, J.D., L€ohner, R., 1998. A fast, matrix-free implicit method for compressible flows on unstructured grids. J. Comput. Phys. 146, 664–690.

Unstructured Mesh Generation and Adaptation Chapter

10 301

Marcum, D.L., 1996. Adaptive unstructured grid generation for viscous flow applications. AIAA J. 34 (8), 2440–2443. Marcum, D.L., 2001. Efficient generation of high-quality unstructured surface and volume grids. Eng. Comput. 17, 211–233. Mavriplis, D.J., 1995. An advancing front Delaunay triangulation algorithm designed for robustness. J. Comput. Phys. 117, 90–101. Menier, V., Loseille, A., Alauzet, F., 2015. Multigrid strategies coupled with anisotropic mesh adaptation. In: 53rd AIAA Aerospace Sciences Meeting. American Institute of Aeronautics and Astronautics, Kissimmee, FL, USA. Michal, T., Krakos, J., 2011. Anisotropic mesh adaptation through edge primitive operations. In: 50th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition, Aerospace Sciences Meetings, Nashville, TN. Ovcharenko, A., Chitale, K., Sahni, O., Jansen, K.E., Shephard, M.S., 2013. Parallel adaptive boundary layer meshing for CFD analysis. In: Jiao, X., Weill, J.-C. (Eds.), Proceedings of the 21st International Meshing Roundtable. Springer, Berlin, Heidelberg, pp. 437–455. Pain, C.C., Umpleby, A.P., de Oliveira, C.R.E., Goddard, A.J.H., 2001. Tetrahedral mesh optimisation and adaptivity for steady-state and transient finite element calculations. Comput. Methods Appl. Mech. Eng. 190, 3771–3796. Park, M.A., Loseille, A., Krakos, J., Michal, T.R., Alonso, J.J., 2016. Unstructured grid adaptation: status, potential impacts, and recommended investments towards CFD 2030. In: 46th AIAA Fluid Dynamics Conference, AIAA AVIATION Forum, Washington, D.C. Piegl, L., Tiller, W., 1997. The NURBS Book, second ed. Springer-Verlag, Inc., New York, NY. ISBN 3-540-61545-8. Power, P.W., Pain, C.C., Piggott, M.D., Fang, F., Gorman, G.J., Umpleby, A.P., Goddard, A.J.H., 2006. Adjoint a posteriori error measures for anisotropic mesh optimization. Comput. Math. Appl. 52, 1213–1242. Remacle, J.-F., Bertrand, V., Geuzaine, C., 2015. A two-level multithreaded Delaunay kernel. Procedia Eng. 124, 6–17. ISSN 1877-7058. http://dx.doi.org/10.1016/j.proeng.2015.10.118. http://www.sciencedirect.com/science/article/pii/S1877705815032191. Rokos, G., Gorman, G.J., Jensen, K.E., Kelly, P.H.J., 2015. Thread parallelism for highly irregular computation in anisotropic mesh adaptation. In: Proceeding EASC ’15 Proceedings of the 3rd International Conference on Exascale Applications and Software, pp. 103–108. Sahni, O., Luo, X.J., Jansen, K.E., Shephard, M.S., 2010. Curved boundary layer meshing for adaptive viscous flow simulations. Finite Elem. Anal. Des. 46 (1–2), 132–139. ISSN 0168874X. http://dx.doi.org/10.1016/j.finel.2009.06. 016. Shu, C.W., Osher, S., 1988. Efficient implementation of essentially non-oscillatory shock-capturing schemes. J. Comput. Phys. 77, 439–471. Si, H., 2015. Tetgen, a Delaunay-based quality tetrahedral mesh generator. ACM Trans. Math. Softw. 41 (2), 11:1–11:36. ISSN 0098-3500. http://dx.doi.org/10.1145/2629697. Tam, A., Ait-Ali-Yahia, D., Robichaud, M.P., Moore, M., Kozel, V., Habashi, W.G., 2000. Anisotropic mesh adaptation for 3D flows on structured and unstructured grids. Comput. Methods Appl. Mech. Eng. 189, 1205–1230. Toulorge, T., Geuzaine, C., Remacle, J.-F., Lambrechts, J., 2013. Robust untangling of curvilinear meshes. J. Comput. Phys. 254, 8–26. ISSN 0021-9991. http://dx.doi.org/10.1016/j. jcp.2013.07.022. Vallet, M.-G., Manole, C.-M., Dompierre, J., Dufour, S., Guibault, F., 2007. Numerical comparison of some Hessian recovery techniques. Int. J. Numer. Meth. Eng. 72, 987–1007.

302 Handbook of Numerical Analysis Vasilevski, Y.V., Lipnikov, K.N., 2005. Error bounds for controllable adaptive algorithms based on a Hessian recovery. Comput. Math. Math. Phys. 45 (8), 1374–1384. Venditti, D.A., Darmofal, D.L., 2002. Grid adaptation for functional outputs: application to two-dimensional inviscid flows. J. Comput. Phys. 176 (1), 40–69. ISSN 0021-9991. http:// dx.doi.org/10.1006/jcph.2001.6967. Vlachos, A., Peters, J., Boyd, C., Mitchell, J.L., 2001. Curved PN triangles. In: I3D ’01 Proceedings of the 2001 Symposium on Interactive 3D Graphics. ACM, New York, NY, pp. 159–166. Woodward, P., Colella, P., 1984. The numerical simulation of two-dimensional fluid flow with strong shocks. J. Comput. Phys. 54 (1), 115–173. ISSN 0021-9991. http://dx.doi.org/10.1016/0021-9991 (84)90142-6. http://www.sciencedirect.com/science/article/pii/0021999184901426. Xie, Z.Q., Sevilla, R., Hassan, O., Morgan, K., 2013. The generation of arbitrary order curved meshes for 3D finite element analysis. Comput. Mech. 51 (3), 361–374. ISSN 0178-7675. http://dx.doi.org/10.1007/s00466-012-0736-4. Yano, M., Darmofal, D.L., 2012. An optimization-based framework for anisotropic simplex mesh adaptation. J. Comput. Phys. 231 (22), 7626–7649. ISSN 0021-9991. http://dx.doi.org/ 10.1016/j.jcp.2012.06.040.

Chapter 11

The Design of Steady State Schemes for Computational Aerodynamics F.D. Witherden*, A. Jameson* and D.W. Zingg† * †

Stanford University, Stanford, CA, United States University of Toronto Institute for Aerospace Studies, Toronto, ON, Canada

Chapter Outline 1 Introduction 2 Equations of Gas Dynamics and Spatial Discretizations 3 Time-Marching Methods 3.1 Model Problem for Stability Analysis of Convection Dominated Problems 3.2 Multistage Schemes for Steady State Problems

304 305 308

308 309

3.3 Implicit Schemes for Steady State Problems 3.4 Acceleration Methods 3.5 Multigrid Methods 3.6 RANS Equations 4 Newton–Krylov Methods 4.1 Background 4.2 Methodology 5 Conclusions References

312 318 323 327 332 332 335 344 345

ABSTRACT The majority of industrial computational fluid dynamics simulations are steady. Such simulations therefore require numerical methods which can rapidly converge a boundary value problem, typically either the Euler or Reynolds-averaged Navier–Stokes (RANS) equations. In this chapter we outline two major approaches: time-marching methods built on top of Runge–Kutta time-stepping schemes and Newton–Krylov methods. A range of techniques for accelerating convergence are presented including local time-stepping, enthalpy damping, residual averaging, multigrid methods and preconditioning. More recent hybrid approaches such as the Runge–Kutta symmetric Gauss–Seidel are also discussed. The effectiveness of these methodologies, within the context of several Euler and RANS test cases, is also evaluated. Keywords: Computational fluid dynamics, Gas dynamics, Finite volume methods, Newton–Krylov methods, Runge–Kutta methods AMS Classification Codes: 65M08, 65M12, 65F08, 65N22 Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.11.006 © 2017 Elsevier B.V. All rights reserved.

303

304 Handbook of Numerical Analysis

1 INTRODUCTION An important requirement for aeronautical applications of computational methods in aerodynamic design is the capability to predict the steady flow past a proposed configuration, so that key performance parameters such as the lift to drag ratio can be estimated. Even in manoeuvring flight the time scales of the motion are large compared with those of the flow, so the unsteady effects are secondary. Thus the aerodynamic design will normally be based on analysis of steady flow. In fact, no one would wish to be a passenger on an aircraft that could not sustain essentially steady flow. Unsteady flow due to buffet or wing flutter is not acceptable for normal operation, so the analysis of unsteady flow is required primarily for checking the structural integrity at the limits of the flight envelope, such as establishing that the minimum speed at which flutter can occur is greater than the maximum permissible speed in a dive. We shall consider systems with the general form dw (1) + RðwÞ ¼ 0 dt where R(w) is the residual resulting from the spatial discretization of the Euler and Navier–Stokes equations for compressible flow. One approach is to calculate the steady state solutions directly by an iterative method. In fact Newton’s method was successfully used (Giles and Drela, 1987) to solve the two-dimensional Euler equations. In three dimensions the bandwidth of the Jacobian matrix is generally too large for direct inversion to be feasible, so the common practice is to use an iterative method to solve the linear system. In Newton–Krylov methods the subiterations are performed by a Krylov method such as GMRES. Newton methods have the disadvantage that they may not necessarily converge if the initial guess is not close enough to the solution. The alternative approach is to use a time-marching method to advance the unsteady equation (1) to a steady state. Since the transient solution is immaterial, the time integration method may be modified by a variety of acceleration procedures to maximize the rate of convergence to a steady state, without maintaining any pretence of time accuracy. In the early days of CFD, it was commonly assumed that in order to obtain fast convergence to a steady state, it would be necessary to use an implicit scheme which allowed large time steps. Any implicit scheme, however, such as the backward Euler scheme wn + 1 ¼ wn  DtRðwn + 1 Þ

(2)

with the superscript n denoting the time levels, requires the solution of a large number of coupled nonlinear equations which have the same complexity as the steady state problem RðwÞ ¼ 0:

(3)

The Design of Steady State Schemes Chapter

11 305

Accordingly a fast steady state solver can provide an essential building block for an implicit scheme to solve the unsteady equations. In fact this is the basis of dual time-stepping procedures (Jameson, 1991) for time accurate calculations using implicit schemes, which have proved very successful in practice (Jameson, 2015). There is actually a close connection between direct iteration and time-marching methods. Denoting the change wn+1  wn by Dw, and setting @R Dw + OððDwÞ2 Þ @w the backward Euler scheme (2) may be linearized as   @R Dw + DtRðwn Þ ¼ 0 I + Dt @w Rðwn + 1 Þ ¼ Rðwn Þ +

and the Newton iteration is recovered in the limit Dt ! ∞. Accordingly it is a common practice with Newton methods to use the linearized backward Euler scheme in the early steps of the calculation. It may be noted, moreover, that an effective way to analyze classical relaxation methods for elliptic problems is to regards them as approximations to an artificial unsteady problem where each iterations represents a step in pseudo-time. In this article we shall consider both time-marching and direct iterative schemes. Section 2 gives a brief review of the equations of gas dynamics and appropriate upwind biased spatial discretization schemes. Section 3 reviews steady state solvers based on pseudo-time-marching methods, while Section 4 reviews direct iterative methods such as Newton–Krylov procedures. Finally, Section 5 presents some conclusions and an overall assessment of the advantages and disadvantages of the various approaches.

2 EQUATIONS OF GAS DYNAMICS AND SPATIAL DISCRETIZATIONS We shall consider steady state solvers for the Euler and Navier–Stokes equations for compressible flows. Let xi, ui, r, p, E and H denote the Cartesian coordinates, velocity, density, pressure, energy and enthalpy. The Euler equations for an inviscid gas are thus @w @ f ðwÞ ¼ 0 + @t @xi i where the state and flux vectors are 2 3 2 3 1 1 6 u1 7 6 u1 7 6 7 6 7 7 6 7 w ¼ r6 6 u2 7, f i ¼ rui 6 u2 7 + 4 u3 5 4 u3 5 E H

(4) 3 0 6 di1 7 6 7 7 p6 6 di2 7 4 di3 5 0 2

306 Handbook of Numerical Analysis

Also,

  u2 , p ¼ ðg  1Þr E  2

p c2 u2 H¼E+ ¼ + r g1 2

where u is the speed, and c is the speed of sound u2 ¼ u2i , c2 ¼

gp r

Let mi and e denote the momentum components and total energy, mi ¼ rui , e ¼ rE ¼

p m2 + i g  1 2r

Then w and f can be expressed as 2 3 2 3 r r 6 m1 7 6 m1 7 6 7 6 7 7 6 7 w¼6 6 m2 7, f i ¼ ui 6 m2 7 + 4 m3 5 4 m3 5 e e

3 0 6 di1 7 6 7 7 p6 6 di2 7 4 di3 5 ui 2

(5)

Finite volume schemes directly approximate the integral form of the equations. The flux needs to be calculated across the interface between each pair of cells. Denoting the face normal and area by ni and S, the flux is fS where f ¼ ni f i This can be expressed in terms of the conservative variables w as 2 3 2 3 r 0 6m 7 6 n1 7 6 17 6 7 6 7 7 f ¼ un 6 m2 7 + p6 6 n2 7 6 7 4 n3 5 4 m3 5 un e

(6)

where un is the normal velocity un ¼ ni ui ¼ Also

ni mi r

  m2 p ¼ ðg  1Þ e  i 2r

In smooth regions of the flow the equations can also be written in quasilinear form as @w @w + Ai ¼0 @t @xi

The Design of Steady State Schemes Chapter

11 307

where Ai are the Jacobian matrices @f i , @w ! The composite Jacobian matrix at a face with normal vector n is Ai ¼

@f @w All the entries in fi and f are homogenous of degree 1 in the conservative variables w. It follows that fi and f satisfy the identities A ¼ A i ni ¼

f i ¼ Ai w, f ¼ Aw The wave speeds normal to the interface are given by the eigenvalues of A: un + c, un  c, un, un and un. In upwind discretizations the numerical flux across each interface is calculated from the left and right states wL and wR on either side of the interface, with an upwind bias depending on the wave speeds. Examples include the Roe flux (Roe, 1981), the Rusanov flux (Rusanov, 1961), HCUSP (Jameson, 1995b), AUSM (Liou and Steffen, 1993) and HLLC (Toro et al., 1994). First-order accurate schemes take wL and wR as the cell average values of the cell on either side of the interface. In second-order accurate schemes wL and wR are reconstructed from the values in a stencil of neighbouring cells by reconstruction methods such as MUSCL (van Leer, 1974) and SLIP (Jameson, 1995a), subject to limiters to prevent oscillations in the vicinity of discontinuities. The construction of upwind biased fluxes generally depends on splitting the Jacobian matrix A as 1 A ¼ ðA + + A Þ 2  where A have positive and negative eigenvalues. For example if A is decomposed as V LV1 where the columns of V are the eigenvectors of A, and L is a diagonal matrix containing the eigenvalues, one may split L into L containing and positive and negative eigenvalues, and define A ¼ VL V 1 and also the absolute Jacobian matrix jAj ¼ VðL +  L ÞV 1 ¼ VjLjV 1 In the Navier–Stokes equations for viscous compressible flow Eq. (5) is augmented by the addition of viscous fluxes to the momentum and energy equations. In the momentum equations the viscous stresses area   @ui @uj @uk + ldij + sij ¼ m @xj @xi @xk where m and l are the coefficients of viscosity and bulk viscosity. Typically 2 l ¼  m. The additional fluxes in the energy equation are 3

308 Handbook of Numerical Analysis

sjk uk + k

@T @xj

where k is the coefficient of heat conduction and T is the temperature. It is the usual practice to discretize the viscous terms with central differences. Flows at high Reynolds numbers generally become turbulent, and one may then resort to solving the Reynolds-averaged (RANS) and Favre-averaged (FANS) equations for mean values of the flow quantities. Residual terms arising from the difference between the average of a product and the product of averages are then represented by turbulence models. In aerodynamic simulations the most popular turbulence models are the Spalart–Allmaras and Menter SST models. For a review of turbulence models the reader is referred to the book by Wilcox (1998). In turbulent flow simulations convergence to a steady state is generally impeded both by the presence of stiff source terms in the turbulence models, and the need to introduce meshes with a very fine mesh spacing in the normal direction in the vicinity of the wall. It is the usual practice to place the first mesh point adjacent to the wall at a distance of y+  u*y/n ¼ 1 where u* is the friction velocity at the wall, y is the distance to the wall, and n is the kinematic viscosity of the fluid. This leads to mesh cells with a very high aspect ratio. In the following sections it will be assumed that the spatial discretization is accomplished by a second-order accurate upwind biased scheme along these lines or the Jameson–Schmidt–Turkel (JST) scheme (Jameson et al., 1981). It may be noted that higher order reconstruction schemes such as WENO (Liu et al., 1994) may fail to converge to a completely steady state because they are prone to develop limit cycles in which the reconstruction stencils flip between different choices.

3 TIME-MARCHING METHODS 3.1 Model Problem for Stability Analysis of Convection Dominated Problems The following model problem provides a useful tool for the stability analysis of time integration methods for convection dominated problems. Consider a semi-discretization of the linear advection equation @u @u +a ¼0 @t @x

(7)

on a uniform grid with mesh interval Dx. Using central differences, aug@3u mented by an artificial diffusive term  Dx3 3 , this can be written as @x Dt

dvj l ¼ ðvj + 1  vj1 Þ  lmðvj + 2  4vj + 1 + 6vj  4vj1 + vj2 Þ, dt 2

where Dt is the assumed time step, and l is the CFL number

(8)

The Design of Steady State Schemes Chapter

l¼a

Dt : Dx

11 309

(9)

For a Fourier mode vj ¼ v^ðtÞeioxj ,

(10)

this reduces to Dt

d^ v ¼ z^ v, dt

(11)

where z is the Fourier symbol of the space discretization. With x ¼ oDx,   zðxÞ ¼ l i sin x + 4mð1  cos xÞ2 : (12) For stability of the fully discrete scheme, the locus of z, as x is varied, should be inside the stability region of the time integration method. The permissible CFL number thus depends on the stability interval along the imaginary axis as well as the negative real axis. Fig. 1 shows the stability region of the standard fourth order RK4 scheme. It also shows the locus of the Fourier symbol for a CFL number of 2.8, m ¼ 1/32.

3.2

Multistage Schemes for Steady State Problems

The next section focuses on explicit time-stepping schemes tailored for steady state problems. For these one can use simplified multistage schemes designed purely to maximize the stability region with out regard to time accuracy. As a starting point we may use the low storage m stage scheme 4 3 2 1



0 −1 −2 −3 −4 –8

–6

–4

–2

0

ℜ FIG. 1 Stability region for the standard four-stage RK scheme. Black line—Locus of Fourier symbol for linear advection with CFL number 2.4.

310 Handbook of Numerical Analysis

wð0Þ ¼ wn

  wð1Þ ¼ wð0Þ  a1 DtR wð0Þ   wð2Þ ¼ wð0Þ  a2 DtR wð1Þ

(13)

… wðmÞ ¼ wð0Þ  DtRðwðm1Þ Þ wn+1 ¼ wðmÞ

(14)

The simplest choice is 1 1 (15) a1 ¼ , a 2 ¼ , …, m m1 which gives mth-order accuracy for linear problems. It has been shown by Kinnmark (1984) how to chose the coefficients to maximize the stability interval along the imaginary axis, which should yield the largest possible time step for a pure convection problem. With a diffusive or upwind-biased scheme the time-stepping scheme should also have a stability region which contains a substantial interval of the negative real axis. To achieve this it pays to treat the convective and dissipative terms in a distinct fashion. Accordingly the residual is split as RðwÞ ¼ QðwÞ + DðwÞ, where Q(w) is the convective part and D(w) the dissipative part. Denote the time level nDt by a superscript n. Then the multistage time-stepping scheme is formulated as wð0Þ ¼ wn …

  wðkÞ ¼ wn  ak Dt Qðk1Þ + Dðk1Þ

(16)

… n+1

w

¼ wðmÞ ,

where the superscript k denotes the kth stage, am ¼ 1, and Qð0Þ ¼ Qðwn Þ, Dð0Þ ¼ Dðwn Þ …   QðkÞ ¼ Q wðkÞ   DðkÞ ¼ bk D wðkÞ + ð1  bk ÞDðk1Þ : The coefficients ak are chosen to maximize the stability interval along the imaginary axis, and the coefficients bk are chosen to increase the stability interval along the negative real axis.

The Design of Steady State Schemes Chapter

11 311

These schemes fall within the framework of additive Runge–Kutta schemes, and they have much larger stability regions (Jameson, 1985). Two schemes which have been found to be particularly effective are tabulated below. The first is a four-stage scheme with two evaluations of dissipation. Its coefficients are 1 a1 ¼ , 3 4 a2 ¼ , 15 5 a3 ¼ , 9 a4 ¼ 1,

b1 ¼ 1, 1 b2 ¼ , 2

(17)

b3 ¼ 0, b4 ¼ 0:

The second is a five-stage scheme with three evaluations of dissipation. Its coefficients are 1 a1 ¼ , 4 1 a2 ¼ , 6 3 a3 ¼ , 8 1 a4 ¼ , 2 a5 ¼ 1,

b1 ¼ 1, b2 ¼ 0, (18)

b3 ¼ 0:56, b4 ¼ 0, b5 ¼ 0:44:

Figs. 2 and 3 display the stability regions for the 4-2 and 5-3 schemes defined by Eqs. (17) and (18). 4 3 2 1 ℑ

0 −1 −2 −3 −4 −8

−6

−4 ℜ

−2

0

FIG. 2 Stability region for the 4-2 scheme (Eq. (17)). Black line—Locus of Fourier symbol for linear advection with CFL number 2.4.

312 Handbook of Numerical Analysis

4 3 2 1



0 −1 −2 −3 −4 −8

−6

−4 ℜ

−2

0

FIG. 3 Stability region for the 5-3 scheme (Eq. (18)). Black line—Locus of Fourier symbol for linear advection with CFL number 3.5.

The expansion of the stability region is apparent compared with the standard RK4 scheme as shown in Fig. 1. They also show the locus of the Fourier symbol for the model problem discussed in Section 3.1. Typically calculations are performed on meshes with widely varying cell sizes, and the convergence to steady state can be significantly accelerated by using a variable local time step Dt corresponding to a fixed CFL number.

3.3 Implicit Schemes for Steady State Problems A prototype implicit scheme suitable for steady state problems can be @w at t + EDt as a linear combination of R(wn) formulated by estimating @t and R(wn+1). The resulting equation    (19) wn + 1 ¼ wn  Dt ð1  EÞRðwn Þ + ER wn + 1 , represents the first-order accurate backward Euler scheme if E ¼ 1, and the 1 second-order accurate trapezoidal rule if E ¼ . In the two-dimensional case 2 RðwÞ ¼ Dx fðwÞ + Dy gðwÞ,

(20)

@ @ f and g. @x @y The implicit equation (19) can most readily be solved via linearization or by resorting to an iterative method. Defining the correction vector where Dxf and Dyg denote the discrete approximations to

dw ¼ wn + 1  wn ,

The Design of Steady State Schemes Chapter

11 313

Eq. (19) can be linearized by approximating the local fluxes as f ðwn + 1 Þ  f ðwn Þ + Adw,

gðwn + 1 Þ  gðwn Þ + Bdw,

@f @g and B ¼ are the Jacobian matrices, and the neglected @w @w 2 terms are O(k dw k ). This leads to a linearized implicit scheme which has the local form  (21) I + EDtðDx A + Dy BÞ dw + DtRðwÞ ¼ 0: where A ¼

@R . @w If one sets E ¼ 1 and lets Dt ! ∞ this reduces to the Newton iteration for the steady state problem (20), which has been successfully used in two-dimensional calculations (Giles et al., 1985; Venkatakrishnan, 1988). In the three-dimensional case with, say, an N  N  N mesh, the bandwidth of the matrix that must be inverted is of order N2. Direct inversion requires a number of operations proportional to the number of unknowns multiplied by the square of the bandwidth, resulting in a complexity of the order of N7. This is prohibitive, and forces recourse to either an approximate factorization method or an iterative solution method. The main possibilities for approximate factorization are the alternating direction and LU decomposition methods. The alternating direction method, which may be traced back to the work of Gourlay and Mitchell (1966), was given an elegant formulation for nonlinear problems by Beam and Warming (1976). In a two-dimensional case equation (21) is replaced by Here we can recognize DxA + DyB as

ðI + EDtDx AÞðI + EDtDy BÞdw + DtRðwÞ ¼ 0,

(22)

where Dx and Dy are difference operators approximating @/@x and @/@y, and A and B are the Jacobian matrices. This may be solved in two steps: ðI + EDtDx AÞdw ¼ DtRðwÞ ðI + EDtDy BÞdw ¼ dw : Each step requires block tridiagonal matrix inversions and may be performed in O(N2) operations on an N  N mesh. The algorithm is amenable to vectorization by simultaneous solution of the tridiagonal system of equations along parallel coordinate lines. The method has been refined to a high level of efficiency by Pulliam and Steger (1985), and Yee (1985) has extended it to incorporate a TVD scheme. Its main disadvantage is that its extension to three dimensions is inherently unstable according to a von Neumann analysis. The idea of the LU decomposition method (Jameson and Turkel, 1981) is to replace the operator in Eq. (13) by the product of lower and upper block triangular factors L and U, LUdw + DtRðwÞ ¼ 0:

(23)

314 Handbook of Numerical Analysis

Two factors are used independent of the number of dimensions, and the inversion of each can be accomplished by inversion of its diagonal blocks. The method can be conveniently illustrated by considering a one-dimensional example. Let the Jacobian matrix A ¼ @f/@w be split as A ¼ A + + A , +

(24)



where the eigenvalues of A and A are positive and negative, respectively. Then we can take + +  L ¼ I + EDtD x A , U ¼ I + EDtDx A ,

Dx+

(25)

D x

and denote forward and backward difference operators approxwhere imating @/@x. The reason for splitting A is to ensure the diagonal dominance of L and U, independent of Dt. Otherwise stable inversion of both factors will only be possible for a limited range of Dt. A crude choice is 1 A ¼ ðA  EIÞ, 2

(26)

where E is at least equal to the spectral radius of A. If flux splitting is used in the calculation of the residual, it is natural to use the corresponding splitting for L and U. An interesting variation is to combine an alternating direction scheme with LU decomposition in the different coordinate directions (Obayashi and Kuwakara, 1984; Obayashi et al., 1986). If one chooses to adopt the iterative solution technique, the principal alternatives are variants of the Jacobi and Gauss–Seidel methods. These may be applied to either the nonlinear equation (19) or the linearized equation (21). A Jacobi method of solving (19) can be formulated by regarding it as an equation   (27) w  wð0Þ + EDtRðwÞ + ð1  EÞDtR wð0Þ ¼ 0, to be solved for w. Here w(0) is a fixed value obtained as the result of the previous time step. Now using bracketed superscripts to denote the iterations, we have wð0Þ ¼ wn   wð1Þ ¼ wð0Þ + DtR wð0Þ , and for k > 1 wðk + 1Þ ¼ wðkÞ + sk + 1

n

(28) (29)

   o wðkÞ  wð0Þ + EDtR wðkÞ + ð1  EÞDtR wð0Þ , (30)

where the parameters sk+l can be chosen to optimize convergence. Finally, if we stop after m iterations,

The Design of Steady State Schemes Chapter

11 315

wn + 1 ¼ wðmÞ :

(31)

We can express w(k+1)

  wðk + 1Þ ¼ wð0Þ + ð1 + sk + 1 Þ wðkÞ  wð0Þ n    o + sk + 1 EDtR wðkÞ + ð1  EÞDtR wð0Þ :

(32)

Since

  (33) wð1Þ  wð0Þ ¼ s1 DtR wð0Þ ,   it follows that for all k we can express wðkÞ  wð0Þ as a linear combination   of R wðjÞ , j < k. Thus this scheme is a variant of the multistage

time-stepping scheme described by Eq. (13). It has the advantage that it permits simultaneous or overlapped calculation of the corrections at every mesh point and is readily amenable to parallel and vector processing. Symmetric Gauss–Seidel schemes have proved to be particularly effective (Chakravarthy, 1984; Hemker and Spekreijse, 1984; MacCormack, 1985; Rieger and Jameson, 1988; Yoon and Jameson, 1987). Following the analysis of Jameson (1986a), consider the case of a flux split scheme in one dimension, for which + RðwÞ ¼ Dx+ f  ðwÞ + D x f ðwÞ,

(34)

where the flux is split so that the Jacobian matrices A+ ¼

@f + @f  and A ¼ , @w @w

(35)

have positive and negative eigenvalues, respectively. Now Eq. (19) becomes    + I + EDt Dx+ A + D dw + DtRðwÞ ¼ 0: (36) xA At the jth mesh point this is n  o + I + a Aj+  A dwj + aA j j + 1 dwj + 1  aAj1 dwj1 + DtRj ¼ 0,

(37)

where a¼E ð0Þ

Dt : Dx

Set dwj ¼ 0. A two sweep symmetric Gauss–Seidel scheme is then n  o ð1Þ ð1Þ + I + a Aj+  A dwj1 + DtRj ¼ 0 dwj  aAj1 j n  o ð2Þ ð2Þ ð1Þ + dwj + aA I + a Aj+  A j j + 1 dwj + 1  aAj1 dwj1 + DtRj ¼ 0:

(38)

316 Handbook of Numerical Analysis

Subtracting (1) from (2) we find that n  o n  o ð2Þ ð2Þ ð1Þ +  I + a Aj+  A dwj + aA dwj : j j + 1 dwj + 1 ¼ I + a Aj  Aj

(39)

Define the lower triangular, upper triangular and diagonal operators L, U and D as + L ¼ I  aA + EtD xA

U ¼ I + aA+ + EtDx+ A D ¼ I + aðA+  A Þ: It follows that the scheme can be written as LD1 Udw ¼ DtRðwÞ:

(40)

Commonly the iteration is terminated after one double sweep. The scheme is then a variation of an LU implicit scheme. If we use the simple choice (26) for A, D reduces to a scalar factor and the scheme requires no inversion. This is a significant advantage for the treatment of flows with chemical reaction with large numbers of species, and a correspondingly large numbers of equations. + d~v i1 of Eq. (37) are a linearization of DtRi evaluThe terms DtRi  aAi1 ated with ~v i1 ¼ vi1 + d~v i1 . Following this line of reasoning, the LU-SGS scheme can be recast (Jameson and Caughey, 2001) as    (41) ~i + DtR~i ¼ 0; I + a A+i  A dw i 

  ~~ i + DtR ~~ i ¼ 0, I + a A+i  A dw i

(42)

where ~ i; ~ i ¼ w i + dw w

 ~ f~ i Þ; i ¼ f ðw

~~ i ¼ w ~ ~ i + dw ~ i; wni + 1 ¼ w

~~ i Þ; ~  ¼ f  ðw f~ i

(43) (44)

and   ~ i ¼ 1 f   f  + fi +  f~ + , R i1 i Dx i + 1    ~  f~ + f~ +  f~ + : ~~ i ¼ 1 f~ R i i i1 Dx i + 1

(45) (46)

With the definitions of Eq. (35), Eqs. (41) and (42) can be written as ~i ¼  dw

Dt ~ Ri, 1+C

(47)

The Design of Steady State Schemes Chapter

~~ i ¼  dw

Dt ~~ R i, 1+C

11 317

(48)

where C ¼ rDt=Dx is the Courant number. Alternatively, one may use the Jacobian splitting defined as 1 1 A + ¼ ðA + jAjÞ, A ¼ ðA  jAjÞ, 2 2

(49)

where jAj ¼ V jLjV1, and jLj is the diagonal matrix whose entries are the absolute values of the eigenvalues of the Jacobian matrix A, while V and V1 are the modal matrix of A and its inverse as defined in Section 2. Then Eqs. (41) and (42) can be written ~i, (50) ~i ¼ DtR fI + ajAjgdw ~~ i ¼ DtR ~~ i , fI + ajAjgdw

(51)

and, in the limit as the time step Dt goes to infinity, these equations represent the SGS Newton iteration (52) ~i ¼ DxR~ i , jAjdw ~~ i ¼ DxR ~~ i : jAjdw

(53)

The introduction of the splitting defined by Eq. (49) is motivated, in part, by the success of the similar preconditioner introduced by Allmaras (1993) and used by Pierce and Giles (1997) to accelerate the convergence of codes based on explicit Runge–Kutta time stepping. This preconditioner seems to have its roots in the diagonally dominant ADI scheme (Bardina and Lombard, 1987; MacCormack, 1997). When the scheme corresponding to Eqs. (52) and (53) is implemented for the finite volume form (Jameson et al., 1981) of the equations, it can be represented (in two dimensions) as ~i, j ¼ sR~ i, j , fjAj + jBjgdw

(54)

~~ i, j ¼ sR ~~ i, j , fjAj + jBjgdw

(55)

where ~+ + ~ i, j ¼ F  F + F +  F R i1, j i + 1, j i, j i, j  + ~+ G i, j + 1  Gi, j + Gi, j  G i, j1 ,  ~ ~ + ~ + ~~ i, j ¼ F~~ R i + 1, j  F i, j + F i, j  F i1, j +  ~ ~ + G ~ + G ~+ , ~ G G i, j + 1

i, j

i, j

(56)

(57)

i, j1

and s is a relaxation factor that can be used to optimize convergence rates. In these equations F+, F, G+ and G represent the split approximations of the flux vectors in the corresponding mesh coordinate directions.

318 Handbook of Numerical Analysis

Numerical experiments indicate that it can be beneficial to perform additional corrections in supersonic zones, when they are present in the solution. The CPU time required for these multiple sweeps is reduced by “freezing” the matrix coefficients jAj and jBj that appear in Eqs. (52) and (53). The additional memory required to store these coefficient matrices is minimized by storing only the symmetrized form of the Jacobians (which requires only seven additional quantities to be stored for each mesh cell).

3.4 Acceleration Methods Acceleration methods fall into two main classes. The first class consists of modifications to the underlying differential equations which do not alter the steady state. Some ways of modifying the differential equations to accelerate the rate of convergence to a steady state are as follows: 1. to increase the speed at which disturbances are propagated through the domain, 2. to equalize the wave speeds of different types of disturbance, thereby enabling the use of larger time steps in the numerical scheme without violating the CFL condition, 3. to introduce terms which cause disturbances to be damped. The second class of acceleration techniques consists of modifications to the numerical techniques. These range from modification to the time integration schemes to the adoption of general iterative methods for the solution of linear and nonlinear equations. The next sections explore both classes of acceleration methods.

3.4.1 Variable Local Time Stepping An obvious way in which Eq. (1) can be modified without changing the steady state is to multiply the space derivatives by a preconditioning matrix P to produce   @w @ @ +P f ðwÞ + gðwÞ ¼ 0 (58) @t @x @y in the two-dimensional case. The simplest choice of P is a diagonal matrix aI with more general choices of P being discussed in Section 3.4.3. Then, one can choose a locally so that the equations are advanced at the maximum CFL number permitted by the time integration scheme at every point in the domain. This is equivalent to using different local time steps at different points. Typically, one uses meshes with small cells adjacent to the body and increasingly large cells as the distance from the body increases, thus allowing increasingly large time steps in the far field. As a model for this procedure, consider the wave equation in polar coordinates r and y

The Design of Steady State Schemes Chapter

ftt ¼ c

2

11 319

1@ 1 ðrfr Þ + 2 fyy : r @r r

Suppose that the wave speed c is proportional to the radius, say c ¼ ar. Then,

@ ftt ¼ a2 r ðrfr Þ + fyy : @r This has solutions of the form f¼

1 ant e , rn

indicating the possibility of exponential decay. In practice, there are often very large variations in the size of the cells in body fitted meshes, such as the O-meshes, typically used for airfoil calculations. Then, the use of variable local time steps with a fixed CFL number generally leads to an order of magnitude reduction in the number of time steps needed to reach a steady state.

3.4.2 Enthalpy Damping Solutions of the wave equation in an infinite domain have constant energy. If, on the other hand, the wave equation is modified by the addition of a term aft, the energy decays. The modified equation takes the form ftt + aft ¼ c2 ðfxx + fyy Þ: Now, multiplying by ft and integrating the right-hand side by parts as before, we find that Z Z Z ∞Z ∞  d ∞ ∞ 1 2 2 2 af2t dx dy: f + fx + fy dx dy ¼  dt ∞ ∞ 2 t ∞ ∞ If a > 0, the nonnegative integral on the left must continue to decrease as long as ft 6¼ 0 anywhere in the domain. In fact, the over-relaxation method for solving Laplace’s equation may be interpreted as a discretization of a damped wave equation, and the rate of convergence may be optimized by a proper choice of a. Provided that the flow is irrotational, as can be expected in subsonic flow, the Euler equations are satisfied by solutions of the unsteady potential flow equation. This does not contain a term in ft. However, in unsteady potential flow @f + H  H∞ ¼ 0, @t

(59)

where H is the total enthalpy and H∞ is the total enthalpy in the far field. This suggests that the difference H  H∞ can serve in the role of ft. Moreover, H is constant in steady solutions of the Euler equations, so such a term can be added without altering the steady state.

320 Handbook of Numerical Analysis

With enthalpy damping (Jameson, 1982) the Euler equations are modified by the addition of source terms proportional to H  H∞ as follows @w @f 1 ðwÞ @f 2 ðwÞ + + + sðwÞ ¼ 0, @t @x1 @x2 where 2

r

3

2

ru1

3

2

ru2

3

2

1

3

6 ru 7 6 ru2 + p 7 6 ru u 7 6u 7 r 6 17 6 1 7 6 2 17 6 17 w¼6 7, f 1 ¼ 6 7, f 2 ¼ 6 2 7, s ¼ 2 ðH  H∞ Þ6 7: 4 ru2 5 4 ru1 u2 5 4 ru2 + p 5 4 u2 5 c rE

ru2 H

ru1 H

H

The energy equation has a quadratic term in H, like a Riccati equation, which could be destabilizing. An alternative is to modify the energy equation to the form @ @ @ ðru1 HÞ + ðru2 HÞ + bðH  H∞ Þ ¼ 0, rE + @t @x1 @x2 which tends to drive H towards H∞ if the coefficient b is positive.

3.4.3 Preconditioning When the spatial derivatives are multiplied by a preconditioning matrix, as in Eq. (58), P is typically designed to equalize the eigenvalues, so that all the waves can be advanced with optimal time steps. van Leer et al. (1991) have proposed a symmetric preconditioner, which minimizes the ratio between the largest and smallest eigenvalues. When the equations are written in stream-aligned coordinates with the symmetrizing variables, which may be written in differential form as  T dp r r r dp ~ ¼ 2 , du1 , du2 , du3 , 2  dr , dw c c c c c it has the form 2t b2

t b

M2  M 0 0 0

3

6 7 6 t 7 6  M t2 + 1 0 0 0 7 6 b 7 b 6 7 P¼6 , 0 t 0 07 6 0 7 6 7 6 0 0 0 t 07 4 5 0

0

0 0 1

The Design of Steady State Schemes Chapter

where

11 321

pffiffiffiffiffiffiffiffiffiffiffiffiffiffi b ¼ t ¼ 1  M2 , if M < 1,

or pffiffiffiffiffiffiffiffiffiffiffiffiffiffi b ¼ M 2  1, t ¼

rffiffiffiffiffiffiffiffiffiffiffiffiffiffi 1 1  2 , if M  1, M

Turkel has proposed an asymmetric preconditioner designed to treat flow at low Mach numbers (Turkel, 1987). A special case of the Turkel preconditioner advocated by Smith and Weiss (1995) has the simple diagonal form 3 2 2 E 0 0 0 0 60 1 0 0 07 7 6 7 P¼6 6 0 0 1 0 0 7, 40 0 0 1 05 0 0 0 0 1 when written in the symmetrizing variables. If E2 varies as M2 as M ! 0, all the eigenvalues of PA depend only on the speed q. In order to improve the accuracy, the absolute Jacobian matrix jAj appearing in the artificial diffusion should be replaced by P1jPAj. In effect, this makes the diffusion depends on the modified wave speeds. The use of preconditioners of this type can lead to instability at stagnation points, where there is a zero eigenvalue which cannot be equalized with the eigenvalues c. With a judiciously chosen limit on E2 as M ! 0, they have been proved effective in treating low speed flows.

3.4.4 Residual Averaging Another approach to increasing the time step is to replace the residual at each point by a weighted average of residuals at neighbouring points. Consider the multistage scheme described by Eq. (13). In the one-dimensional case, one might replace the residual Rj by the average Rj ¼ ERj1 + ð1  2EÞRj + ERj + 1

(60)

at each stage of the scheme. This smooths the residuals and also increases the support of the scheme, thus relaxing the restriction on the time step imposed by the Courant–Friedrichs–Lewy condition. In the case of the model problem (7), this would modify the Fourier symbol (11) by the factor A ¼ 1  2Eð1  cos xÞ: 1 As long as c < , the absolute value jAj decreases with increasing wave num4 1 bers x in the range 0 x p. If E ¼ , however, Rj ¼ 0 for the odd–even 4 mode Rj ¼ (1)j.

322 Handbook of Numerical Analysis

In order to avoid restriction on the smoothing coefficient, it is better to perform the averaging implicitly by setting ERj1 + ð1  2EÞRj  ERj + 1 ¼ Rj :

(61)

This corresponds to a discretization of the inverse Helmholtz operator. For an infinite interval, this equation has the explicit solution ∞ 1r X Rj ¼ r jqj Rj + q , 1 + r q¼∞

(62)

where E¼

r ð1  rÞ2

, r < 1:

Thus, the effect of the implicit smoothing is to collect information from residuals at all points in the field, with an influence coefficient which decays by a factor r at each additional mesh interval from the point of interest. Consider the model problem (7). According to Eq. (61), the Fourier symbol (11) will be replaced by Z ¼ l

isin x + 4mð1  cos xÞ2 : 1 + 2Eð1  cos xÞ

In the absence of dissipation,



sin x

: jZj ¼ l 1 + 2Eð1  cos xÞ

Differentiating with respect to x, we find that jZj reaches a maximum when sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi  ffi 2E 2E 2 , sin x ¼ 1  : cos x ¼ 1 + 2E 1 + 2E Then, jZj attains the maximum value 1 jZjmax ¼ pffiffiffiffiffiffiffiffiffiffiffi : 1 + 4E Accordingly, if l* is the stability limit of the scheme, the CFL number l should satisfy pffiffiffiffiffiffiffiffiffiffiffi l l 1 + 4E: It follows that we can perform stable calculations at any desired CFL number l by using a large enough smoothing coefficient such that !  2 1 l E 1 : 4 l

The Design of Steady State Schemes Chapter

11 323

Implicit residual averaging was originally proposed by Jameson and Baker (1983). We note that this approach is similar to the simplified implicit scheme of Lerat et al. (1982). In practice, it has been found that the most rapid rate of l convergence to a steady state is usually obtained with  in the range of 2–3, l or l 8 for a four-stage Runge–Kutta scheme.

3.5

Multigrid Methods

Radical improvements in the rate of convergence to a steady state can be realized by the multigrid time-stepping technique. The concept of acceleration by the introduction of multiple grids was first proposed by Fedorenko (1964). There is by now a fairly well-developed theory of multigrid methods for elliptic equations based on the concept that the updating scheme acts as a smoothing operator on each grid (Brandt, 1977; Hackbusch, 1978). This theory does not hold for hyperbolic systems. Nevertheless, it seems that it ought to be possible to accelerate the evolution of a hyperbolic system to a steady state by using large time steps on coarse grids so that disturbances will be more rapidly expelled through the outer boundary. Various multigrid time-stepping schemes designed to take advantage of this effect have been proposed (Anderson et al., 1986; Caughey, 1987; Hall, 1985; Hemker and Spekreijse, 1984; Jameson, 1983, 1986a,b; Ni, 1982). One can devise a multigrid scheme using a sequence of independently generated coarser meshes by eliminating alternate points in each coordinate direction. In order to give a precise description of the multigrid scheme, subscripts may be used to indicate the grid. Several transfer operations need to be defined. First the solution vector on grid k must be initialized as ð0Þ

wk ¼ Tk,k1 wk1 , where wk1 is the current value on grid k  1, and Tk,k1 is a transfer operator. Next it is necessary to transfer a residual forcing function such that the solution on grid k is driven by the residuals calculated on grid k  1. This can be accomplished by setting h i ð0Þ Pk ¼ Qk, k1 Rk1 ðwk1 Þ  Rk wk , where Qk,k1 is another transfer operator. Then Rk(wk) is replaced by Rk(wk) + Pk in the time-stepping scheme. Thus, the multistage scheme is reformulated as h i ð1Þ ð0Þ ð0Þ wk ¼ wk  a1 Dtk Rk + Pk (63) ⋯ h i ðq + 1Þ ð0Þ ðqÞ wk ¼ wk  aq + 1 Dtk Rk + Pk : (64)

324 Handbook of Numerical Analysis ðmÞ

The result wk then provides the initial data for grid k + 1. Finally, the accumulated correction on grid k has to be transferred back to grid k  1 with the aid of an interpolation operator Ik1,k. With properly optimized coefficients multistage time-stepping schemes can be very efficient drivers of the multigrid process. A W-cycle of the type illustrated in Fig. 4 proves to be a particularly effective strategy for managing the work split between the meshes. In a three-dimensional case the number of cells is reduced by a factor of eight on each coarser grid. On examination of the figure, it can therefore be seen that the work measured in units corresponding to a step on the fine grid is of the order of 1 + 2=8 + 4=64 + ⋯ < 4=3, and consequently the very large effective time step of the complete cycle costs only slightly more than a single time step in the fine grid. This procedure has proved extremely successful for the solution of the Euler equations for inviscid flow. The most dramatic results to date have been A E

E

E

E

E

T

E

B E

E E

E E E

E

E

C

T

T E

E

E

E

TT

E E

E E

E E

4 Level cycle

T

4 Level cycle

FIG. 4 Multigrid W-cycle for managing the grid calculation. E, evaluate the change in the flow for one step; T, transfer the data without updating the solution. (A) Three levels. (B) Four levels. (C) Five levels.

The Design of Steady State Schemes Chapter

A

B

C

Convergence history for LU-SGS multigrid scheme 1

D

1e−06

1e−04

1e−06

1e−08

1e−08

1e−10

1e−10

1e−12

Residual Delta H0 Lift coeff. Drag coeff.

0.01

Log (residual)

1e−04

Convergence history for LU-SGS multigrid scheme 1

Residual Delta H0 Lift coeff. Drag coeff.

0.01

Log (residual)

11 325

1e−12 0

50 100 150 200 250 300 350 400 450 500 Multigrid cycles

0

50 100 150 200 250 300 350 400 450 500 Multigrid cycles

FIG. 5 Grid and convergence history of flow past the RAE 2822 at M∞ ¼0.75, a ¼ 3 degrees and NACA 0012 airfoil at M∞ ¼ 0:8, a ¼ 1.25 degrees. (A) and (C) RAE 2822. (B) and (D) NACA 0012.

achieved by using the nonlinear SGS scheme to drive a multigrid procedure using W cycles (Jameson and Caughey, 2001). Figs. 5, 6 and Table 1 illustrate the results for two-dimensional transonic flow calculations. In Fig. 6 the fully converged solution is shown by the solid lines, and it can be seen that the results are essentially fully converged after five cycles. This is an example of “text book” multigrid efficiency. The multigrid method can be applied on unstructured meshes by interpolating between a sequence of separately generated meshes with progressively increasing cell sizes (Jameson and Mavriplis, 1987; Mavriplis and Jameson, 1990; Mavriplis and Martinelli, 1991; Peraire et al., 1992). It is not easy to generate very coarse meshes for complex configurations. An alternative approach, which removes this difficulty, is to automatically generate successively coarser meshes by agglomerating control volumes or by collapsing edges. This approach yields comparable rates of convergence and has proved

326 Handbook of Numerical Analysis

A

B

RAE 2822 airfoil; Mach 0.75, 3.0 degrees Pressure coeff. Delta p0 (× 10)

−1.5

NACA 0012 airfoil; Mach 0.80, 1.25 degrees −2

Pressure coefficient, Cp

Pressure coefficient, Cp

−2

−1 −0.5 0 0.5 1

Pressure coeff. Delta p0 (× 10)

−1.5 −1 −0.5 0 0.5 1

1.5

1.5 0

0.2

0.4

0.6

0.8

1

0

0.2

Pressure coefficient, Cp

D

RAE 2822 airfoil; Mach 0.75, 3.0 degrees

−2

Pressure coeff. Delta p0 (× 10)

−1.5

Pressure coefficient, Cp

C

0.4

0.6

0.8

1

Chordwise station, x/c

Chordwise station, x/c

−1 −0.5 0 0.5 1

NACA 0012 airfoil; Mach 0.80, 1.25 degrees

−2

Pressure coeff. Delta p0 (× 10)

−1.5 −1 −0.5

1.5

0 0.5 1 1.5

0

0.2

0.4 0.6 0.8 Chordwise station, x/c

1

0

0.2

0.4 0.6 0.8 Chordwise station, x/c

1

FIG. 6 Pressure distribution for flow past the RAE 2822 and NACA 0012 airfoil. Solid lines represent fully converged solution. (A) RAE 2822 after three cycles. (B) NACA 0012 after three cycles. (C) RAE 2822 after five cycles. (D) NACA 0012 after five cycles.

TABLE 1 Force Coefficients for the Fast, Preconditioned Multigrid Solutions Using CUSP Spatial Discretization Case

Figures

MG Cycles

CL

CD

RAE 2822; M∞ ¼ 0:75; a ¼ 3:00



100

1.1417

0.04851

Fig. 6C

5

1.1429

0.04851

Fig. 6A

3

1.1451

0.04886



100

0.3725

0.02377

Fig. 6D

5

0.3746

0.02391

Fig. 6B

3

0.3770

0.02387

NACA 0012; M∞ ¼ 0:80; a ¼ 1:25

The Design of Steady State Schemes Chapter

11 327

to be quite robust (Crumpton and Giles, 1995; Lallemand and Dervieux, 1987; Lallemand et al., 1992; Mavriplis and Venkatakrishnan, 1996).

3.6

RANS Equations

Multigrid methods have generally proved less effective in calculations of turbulent viscous flows using the Reynolds-averaged Navier–Stokes equations. These require highly anisotropic grids with very fine mesh intervals normal to the wall to resolve the boundary layers. While simple multigrid methods still yield fast initial convergence, they tend to slow down as the calculation proceeds to a low asymptotic rate. This has motivated the introduction of semicoarsening and directional coarsening methods (Allmaras, 1993, 1995, 1997; Mulder, 1989, 1992; Pierce and Giles, 1997; Pierce et al., 1997). In 2007 Cord Rossow proposed using several iterations of an LUSGS scheme as a preconditioner at each stage of an explicit RK scheme (Rossow, 2007). This hybrid RKSGS scheme was further developed by Swanson et al. (2007), and it has been proven to be an effective driver of a full approximation multigrid scheme for steady state RANS calculations, yielding rates of convergence comparable to those that have been achieved for Euler calculations. Schemes of this type have also been extensively studied by the present authors and the following paragraphs describe an RKSGS scheme which has proved effective. The scheme is generally similar to the Swanson–Turkel–Rossow implementation but differs in some significant details. In order to solve the equation dw (65) + RðwÞ ¼ 0 dt where R(w) represents the residual of the space discretization, an n stage RKSGS scheme is formulated as wð1Þ ¼ wð0Þ  a1 Dt P1 Rð0Þ , wð2Þ ¼ wð0Þ  a2 Dt P1 Rð1Þ , …

(66)

wðmÞ ¼ wð0Þ  Dt P1 Rðm1Þ , where P denotes the LUSGS preconditioner. As in the case of the basis additive RK scheme the convective and dissipative parts of the residual are treated separately. Thus if R(k) is split as RðkÞ ¼ QðkÞ + DðkÞ , then

and for k > 0,

    Qð0Þ ¼ Q wð0Þ , Dð0Þ ¼ D wð0Þ ,

(67)

328 Handbook of Numerical Analysis

  QðkÞ ¼ Q wðkÞ ,   DðkÞ ¼ bk D wðkÞ + ð1  bk ÞDðk1Þ ,

(68)

Two- and three-stage schemes which have proved effective are as follows. The coefficients of the two-stage scheme are a1 ¼ 0:24, b1 ¼ 1, a2 ¼ 1, b2 ¼ 2=3, while those of the three-stage scheme are a1 ¼ 0:15, b1 ¼ 1, a2 ¼ 0:40, b2 ¼ 0:5, a3 ¼ 1, b3 ¼ 0:5, While the residual is evaluated with a second-order accurate discretization, the preconditioner is based on a first-order upwind discretization. Without loss of generality we consider a quadrilateral cell, numbered zero, whose neighbours are numbered k ¼ 1 to 4. The residual of a central difference scheme in this case is Rc0 ¼

4 1X hk0 S0 k¼1

(69)

where S0 is the cell area and 1 hk0 ¼ ½ðf k + f 0 ÞDyk0  ðgk + g0 ÞDxk0 : 2

(70)

Introducing a Roe matrix Ak0 satisfying Ak0 ðwk  w0 Þ ¼ ðf k  f 0 ÞDyk0  ðgk  g0 ÞDxk0 ,

(71)

and noting that the sums 4 X

Dyk0 ¼ 0,

k¼1

4 X

Dxk0 ¼ 0,

k¼1

we can write Rc0 ¼

4 1X Ak0 ðwk  w0 Þ: S0 k¼1

(72)

The residual of the first-order upwind scheme is obtained by subtracting jAk0j(wk w0) from hk0 to produce R0 ¼

4 1 X ðAk0  jAk0 jÞðwk  w0 Þ: 2S0 k¼1

The Design of Steady State Schemes Chapter

11 329

Also noting that we can split Ak0 as + + A Ak0 ¼ Ak0 k0 ,

where 1 A k0 ¼ ðAk0  jAk0 jÞ 2 have positive and negative eigenvalues, respectively, we can write R0 ¼

4 1 X A ðwk  w0 Þ: S0 k¼1 k0

(73)

We now consider an implicit scheme of the form   wn + 1 ¼ wn  Dt ERðwn + 1 Þ + ð1  EÞRðwn Þ and approximate Rn0 + 1 Rn0 + 1 ¼ Rn0 +

4 1 X A ðdwk  dw0 Þ, S0 k¼1 k0

where dw denotes wn+1 wn. This yields the approximate implicit scheme ! 4 4 Dt X Dt X + IE Ak0 A dwk ¼ DtRn0 : (74) dw0 + E S0 k¼1 S0 k¼1 k0 The LUSGS preconditioner uses symmetric Gauss–Seidel forward and backward sweeps to approximately solve the equation using the latest available values for dwk, and starting from dw ¼ 0. In practice it has been found that a single forward and backward sweep is generally sufficient, and very rapid convergence of the overall multigrid scheme can be obtained with both the two- and the three-stage schemes. Moreover, a choice of the coefficient E < 1 is effectively a way to over-relax the iterations, and it turns out that the fastest rate of convergence is obtained with E around 0.65 for the two-stage scheme, and E less than 0.5 for the three-stage scheme. At each interface A is modified by the introduction of an entropy fix to bound the absolute values of the eigenvalues away from zero. Denoting the components of the unit normal to the edge by nx and ny, the normal velocity is qn ¼ nx u + ny v and the eigenvalues are lð1Þ ¼ qn , lð2Þ ¼ qn + c, lð3Þ ¼ qn  c,

330 Handbook of Numerical Analysis

where c is the speed of sound. Velocity components, pressure p and density r rffiffiffiffiffi gp . at the interface may be calculated by arithmetic averaging and then c ¼ r The absolute eigenvalues jl(k)j are then replaced by 8 > jlðkÞ j, jlðkÞ j > a > < ! ðkÞ 2 ek ¼ 1 l ðkÞ > > : 2 a + a , jl j a where a is set as a fraction of the speed of sound a ¼ d1 c: Without this modification the scheme diverges. In numerical experiments it has been found that the overall scheme converges reliably for transonic flow with d1 0.10. The modified eigenvalues of A are then lð1Þ ¼ qn  e1 , lð2Þ ¼ qn + c  e2 , lð3Þ ¼ qn  c  e3 : It also proves helpful to further augment the diagonal coefficients by a term proportional to a fraction d2 of the normal velocity qn. The interface matrix is also modified to provide for contributions from the viscous Jacobian. The final interface matrix A can be conveniently represented via a transformation to the symmetrizing variables defined in differential form as   dp r r dp T ^ dw ¼ 2 , du, dv, 2  dr c c c c Let s be the edge length. Then the interface matrix can be expressed as   s ~ I ~ ~ ~ 1 , A ¼ sM A c + A v  d 2 qn I M rS0 ~ c and A ~ v are the convective and viscous contributions, d2qnI is the where A ~ is the transformation matrix from the diagonal augmentation term, and M conservative to the symmetrizing variables. Here 2 3 1 0 0 1 6 7 6 u c 0 u 7 6 7 ~ M ¼ 6 v 0 c v 7 6 7 4 q2 5 H uc vc  2

The Design of Steady State Schemes Chapter

and

2

q2 ~g u ~g v 6 ~g 2 6 6 u 1 6 0 6  c c ~ 1 ¼ 6 M 6 6 v 1 6  0 6 c c 6 4 q2 ~g  1 ~g u ~g v 2

11 331

3 ~g 7 7 7 7 07 7 7 7 07 7 7 5 ~g

where q2 ¼ u2 + v2 , ~g ¼

g1 : c2

Define 1 r1 ¼ ðq2 + q3  1Þ, 2 1 r2 ¼ ðq2  q3 Þ: 2 Then the modified convective Jacobian is 2 3 nx r2 ny r2 0 r 1 + q1 6 7 6 nr n2x r1 + q1 nx ny r1 0 7 ~ c ¼6 x 2 7 A 6 n r n n r + q n2 r + q 0 7: x y 1 1 1 4 y 2 5 y 1 0 0 0 q1 Also let u, l and k be the viscosity, bulk viscosity and conductivity coefficients. Then the viscous Jacobian is 2 3 ðg  1Þk 0 0 k 6 0 7 0 ðm + n2x m Þ nx ny m 7 ~ ¼6 A 6 7  2  4 ðm + ny m Þ 0 5 0 nx ny m ðg  1Þk

0

0

m

where m ¼ m + g, 2 and typically l ¼  m. Here it is assumed that the Reynolds stress is mod3 elled by an eddy viscosity. Then if mm and mt are the molecular and eddy viscosity, m ¼ m m + mt ,

332 Handbook of Numerical Analysis

while it is the common practice to take m m k¼ m + t , Pr Prt where Pr and Prt are the molecular and turbulent Prandtl numbers. An alternative implementation can be derived from a first-order flux vector split scheme with the interface flux +  hk0 ¼ ðf 0+ + f  k ÞDyk0  ðg0 + gk ÞDxk0 ,

where f and g are split as f ¼ f + + f  , g ¼ g + + g and f and g have positive and negative eigenvalues, respectively. In this case the implicit equation (74) should be replaced by ! 4 4 EDt X EDt X + Ak0 dw0 + A dwk ¼ DtRn0 : I S0 k¼1 S0 k¼1 k0 where + Ak0 ¼ Dyk0

@f + @g +  Dxk0 @w @w

and A k0 ¼ Dyk0

@f  @g  Dxk0 : @w @w

This formula is similar to the scheme proposed by Swanson et al. (2007), but the consistent procedure is then to evaluate A+k0 at cell zero, and A k0 at cell k. Numerical tests indicate that the alternative formulations work about equally well. In any case these preconditioners may be applied with alternative second-order schemes for the residual R0 on the right-hand side. It turns out that the scheme works very well when R0 is evaluated by the JST scheme (Jameson et al., 1981) provided that the artificial viscosity coefficients are suitably tuned. Fig. 7 shows the result for a standard test case, the RAE 2822, case 6, calculated with the JST scheme and a Baldwin–Lomax turbulence model.

4 NEWTON–KRYLOV METHODS 4.1 Background The most popular direct iterative method is the Newton–Krylov method. As pointed out previously, an algorithm for obtaining steady solutions can also be used for time accurate computations of unsteady flows in combination with an implicit time-marching method. Hence Newton–Krylov methods are equally applicable to steady and unsteady flows; our emphasis here is on their application to the former.

1.400

8.000

1.200

4.000

1.000

0.000

0.600 0.400

Nsup

0.800

−4.000

0.200 0.000

Log (error)

−8.000 −12.000 −16.000 0.00

−0.200

RAE 2822 airfoil Mach 0.730 Alpha 2.790 CL 0.8119 CD 0.0115 CM –0.0944 Grid 512 × 64 Ncyc 100 Res 0.756E–09

C

−24.000 −20.000

1.200

0.300

0.400

Cp

B –0.000 –0.400 –0.300 –1.200 –1.600 –2.000

A

50.00

100.00

150.00

200.00

250.00

300.00

Work RAE 2822 airfoil 0.730 Mach Resid 1 0.155E+05 Work 99.00 Grid 512 X 64

Alpha 2.790 Resid 2 0.756E−09 Rate 0.7337

FIG. 7 RAE 2822 airfoil, Ma ¼ 0.730, a ¼ 2.790. RKSGS scheme using the Baldwin–Lomax turbulence model and the JST scheme. (A) Cp distribution; (B) Mach contours; (C) the convergence history.

334 Handbook of Numerical Analysis

After discretization of the spatial derivatives in the Euler or Navier–Stokes equations and the turbulence model equations, if applicable, a system of ordinary differential equations is obtained (1). The steady state solution, if one exists, is the solution to the nonlinear algebraic system of equations given by RðwÞ ¼ 0:

(75)

The Newton method is a natural choice for the solution of nonlinear algebraic equations due to its quadratic convergence property if certain conditions are met. Application of the Newton method to large-scale problems in computational fluid dynamics has historically been limited by two issues. The first is that the method requires the solution of a large linear system at each iteration, and direct solution of these linear systems scales very badly with problem size and is generally infeasible for large-scale problems on current computing hardware. The second issue is that the Newton method will converge only if the initial guess is sufficiently close to the converged solution; in practical problems it is generally only possible to provide a suitable initial guess through a globalization procedure. The first issue can be addressed through the use of iterative methods for linear algebraic systems, leading to the so-called inexact Newton method where the linear problem is solved iteratively to some tolerance at each Newton iteration. While this enables large-scale problems to be solved, it introduces the challenge of finding an iterative method that converges successfully for the linear systems encountered. Krylov methods for nonsymmetric linear systems, among which GMRES (Saad and Schultz, 1986) is most commonly used, have proven to be effective in this context and will be the focus of this section, hence the title Newton–Krylov methods. The most common approach to globalization of the Newton method is pseudo-transient continuation in which a nontime-accurate time-dependent path is taken to partially converge the solution in order to provide a suitable initial solution for an inexact Newton method. This leads back to the time-marching methods described in Section 3. With this approach, the Newton–Krylov method is divided into two phases: a globalization phase followed by an inexact Newton phase. Recently, some success has been achieved through the use of homotopy continuation as an alternative to pseudo-transient continuation for the globalization phase (Brown and Zingg, 2016; Yu and Wang, 2016). While it is natural to classify time-marching methods as explicit or implicit, in application to practical problems it is more accurate to view various methods as lying somewhere on a spectrum ranging from fully explicit to fully implicit, where implicitness is associated with the degree of coupling among solution variables as the solution is advanced iteratively (Pulliam and Zingg, 2014). In a purely explicit scheme, e.g., the explicit Euler time-marching method, the solution is advanced in time locally, without knowledge of the changes in the solution occurring at other nodes in the mesh.

The Design of Steady State Schemes Chapter

11 335

With the Newton method, the solution is fully coupled, i.e., fully implicit, as all variables at all nodes, including boundary conditions, are advanced concurrently. The methods described in Section 3 lie somewhere between these extremes. For example, a multistage method uses intermediate solutions to increase the number of mesh nodes that are coupled as the solution advances. Similarly, implicit residual smoothing, multigrid and approximate factorization accomplish increased coupling in different ways. In this section, we will discuss fully implicit methods, in particular Newton–Krylov methods that include a globalization phase. Our focus is on methods that are fully coupled, such that the mean-flow and turbulence model equations are coupled, and the boundary conditions and any interface conditions between mesh blocks are fully implicit. First, it is important to understand the motivation behind such methods and the problems for which they are likely to be an efficient choice. For this purpose, the concept of stiffness is relevant; with increasing stiffness an implicit approach becomes more efficient. Stiffness can arise through physics, for example, in chemically reacting flows, or through numerics, for example the high aspect ratio grid cells needed for efficient spatial resolution of turbulent flows at high Reynolds numbers in the solution of the RANS equations. Fully implicit methods can also be advantageous for equations with stiff source terms, for example, in a turbulence model. Finally, fully implicit methods have become increasingly popular when high-order spatial discretization is used, for example, through discontinuous Galerkin, flux reconstruction, or summation-by-parts methods, as such methods typically lead to increased stiffness (Persson and Peraire, 2008). The Newton–Krylov approach to be described here is based on that developed in the third author’s research group over the past 20 years, as described in the following four papers: Pueyo and Zingg (1998), Chisholm and Zingg (2009), Hicken and Zingg (2008) and Osusky and Zingg (2013). For a review of Newton–Krylov methods, the reader is directed to Knoll and Keyes (2004).

4.2

Methodology

4.2.1 Inexact Newton Method Application of the implicit Euler method to (1) with a local time linearization gives   I ðnÞ DwðnÞ ¼ RðwðnÞ Þ, (76) +A Dt where A¼

@R @w

(77)

is the Jacobian of the discrete residual vector. It is easy to see that the Newton method is obtained in the limit as Dt goes to infinity. This linear system must

336 Handbook of Numerical Analysis

be solved at each iteration. In the inexact Newton method, an iterative method is used for this purpose, and the system is solved to a specified finite relative tolerance, n, i.e.





ðnÞ

(78)

T + AðnÞ DwðnÞ + RðwðnÞ Þ

n jjRðwðnÞ Þjj2 : 2

Here the term containing the time step has been modified to allow for a local time step as well as potentially a time step that varies between equations; for example the turbulence model equation can have a different time step from the mean-flow equations. Strictly speaking, this term is zero in an inexact Newton method, but we retain it here, as it is included in the pseudo-transient continuation approach to globalization. The sequence of relative tolerance values, n, affects both efficiency and robustness. If n is too small, the linear system will be over-solved, leading to an increase in computing time; if it is too large, the number of Newton iterations will increase, similarly leading to suboptimal performance. While an adaptive approach can be used that enables q-superlinear convergence (Eisenstat and Walker, 1996), this does not usually lead to the fastest performance in terms of CPU time. In their Newton–Krylov algorithm for the Euler equations, Hicken and Zingg (2008) use a sequence of values during the inexact Newton phase (which is preceded by a globalization phase) decreasing from an initial value of 0.5 to 0.01 based on the following formula (Eisenstat and Walker, 1996): pffiffi   ð1 + 5Þ=2 (79) n ¼ max 0:01, n1 : In contrast, Osusky and Zingg (2013) use n ¼ 0.01 throughout the inexact Newton phase in solving the RANS equations. However, a maximum number of GMRES iterations is often reached before this tolerance is achieved.

4.2.2 Jacobian-Free Newton–Krylov Methods One of the attributes of a Krylov method for solving linear systems in the form Ax ¼ b, such as GMRES, is that the matrix A itself is never needed explicitly. What is needed is the product of A with an arbitrary vector v. Therefore, explicit formation and storage of the Jacobian matrix can be avoided by approximating these matrix–vector products by a finite difference approximation to a Frechet derivative as follows: AðnÞ v

RðwðnÞ + EvÞ  RðwðnÞ Þ : E

(80)

The parameter E must be chosen to balance truncation and round-off errors. Both Hicken and Zingg (2008) and Osusky and Zingg (2013) use the following formula from Nielsen et al. (1995): rffiffiffiffiffiffiffiffi Nd (81) , E¼ vT v

The Design of Steady State Schemes Chapter

11 337

where N is the number of unknowns, and d is a small number that is further discussed below. Although the use of (80) avoids the need to form and store the Jacobian matrix in the application of GMRES, it is generally necessary to precondition the linear system prior to the application of GMRES. Some of the most efficient preconditioners require the formation of a matrix that is an approximation to the Jacobian. With this approach, which is the subject of the next section, the method is not matrix free, but the approximate Jacobian used in the formation of the preconditioner generally requires less storage than the exact Jacobian.

4.2.3 Preconditioning and Parallelization The Jacobian matrices arising from the discretization of the Euler and RANS equations are typically poorly conditioned such that GMRES will converge very slowly unless the system is first preconditioned. The choice of preconditioner has a major impact on the overall speed and robustness of the algorithm. Pueyo and Zingg (1998) studied numerous preconditioners and showed that an incomplete lower-upper (ILU) factorization with some fill based on a level of fill approach, ILU(p), is an effective option, where p is the level of fill (Meijerink and van der Vorst, 1977). The level of fill is an important parameter that is discussed further below. Moreover, a block implementation of ILU(p) is preferred over a scalar implementation (Hicken and Zingg, 2008). The process of computing the incomplete factorization requires the formation and storage of a matrix. One option is to form the preconditioner based on an approximation of the Jacobian matrix rather than forming the complete Jacobian matrix. An approximation that includes nearest neighbour entries only reduces the size of the matrix considerably. In a typical second-order spatial discretization, next to nearest neighbour entries are associated with the numerical dissipation and cross-derivative viscous and diffusive terms. The cross-derivative terms can be neglected in forming the approximate Jacobian matrix upon which the ILU factorization is based. With an upwind spatial discretization, a first-order version can be used in the approximate Jacobian. Similarly, with a centred scheme with added second- and fourth-difference numerical dissipation, the approximate Jacobian can be formed by eliminating the fourth-difference dissipation terms and increasing the coefficient of the second-difference dissipation. This can be achieved by adding a factor s times the fourth-difference coefficient to the second-difference coefficient in the approximate Jacobian. Values of s between 4 and 6 are effective in the solution of the Euler equations (Hicken and Zingg, 2008), while higher values are preferred for the RANS equations, for example s ¼ 5 with scalar dissipation and 10 s 12 with matrix dissipation (Osusky and Zingg, 2013). Pueyo and Zingg (1998) showed that an ILU(p) preconditioner based on such an approximate preconditioner is substantially more effective than an ILU(p) factorization of the full Jacobian. This arises from the off-diagonal

338 Handbook of Numerical Analysis

dominance of the full Jacobian matrix, which leads to poorly conditioned incomplete factors such that the long recurrences associated with the backward and forward solves can be unstable. The reduced off-diagonal dominance associated with the approximate Jacobian formed in the manner described above alleviates this behaviour. This conclusion was reached in the context of a typical second-order spatial discretization. Further study is needed in order to determine the optimal approach when high-order methods are used. Two popular strategies for developing a parallel preconditioner are the additive-Schwarz (Saad, 2003) and approximate-Schur (Saad and Sosonkina, 1999) methods. Some form of domain decomposition is needed to assign blocks of data to unique processes. The incomplete factorization is then applied only to the local submatrices. The approximate-Schur approach necessitates the use of a flexible linear solver such as FGMRES (Saad, 1993). Hicken et al. (2010) found the approximate-Schur preconditioner to outperform the additive-Schwarz preconditioner when over 100 processors are used. Osusky and Zingg (2013) showed that the approximate-Schur approach scales well for over 6000 processors.

4.2.4 Globalization A continuation or globalization phase provides a suitable solution to initiate the inexact Newton phase. Recently Yu and Wang (2016) and Brown and Zingg (2016) have shown promising results with homotopy continuation. However, the predominant approach to date is known as pseudo-transient continuation, in which a time-marching method is applied in a nontime-accurate manner to the system of ordinary differential equations (1). For a fully implicit solver, it is natural to use the implicit Euler method with a local time linearization and local time stepping:   (82) TðnÞ + AðnÞ DwðnÞ ¼ RðwðnÞ Þ, where T(n) is a diagonal matrix containing the reciprocal of the local time step. When an implicit algorithm is applied in this delta form, the converged steady solution is independent of the left-hand side matrix (Lomax et al., 2001). Consequently, since we seek neither time accuracy nor quadratic convergence during the globalization phase, in addition to the use of local time stepping, the Jacobian matrix can be approximated and a lagged Jacobian update can be used (Hicken and Zingg, 2008; Osusky and Zingg, 2013). Both robustness and efficiency can be improved by substituting the approximate Jacobian matrix used in the formation of the preconditioner for A(n) in (82). Hence this globalization is often described as the approximate Newton phase. This substantially reduces the number of iterations needed by the linear solver to achieve the specified convergence tolerance. Formation of the ILU factorization is one of the more expensive tasks of a nonlinear iteration. Consequently, it can be advantageous to reuse the approximate Jacobian

The Design of Steady State Schemes Chapter

11 339

for three to five nonlinear iterations, thereby reducing the number of times the preconditioner must be formed during the approximate Newton phase. In addition to a spatially varying local time step, the time step is steadily increased during the approximate Newton phase according to the formula Dtref ¼ abmbmc , n

ðnÞ

(83)

where the floor operator returns the largest integer less than or equal to its argument, Dt(n) ref is a reference time step used in calculating the local time step, and m is the Jacobian update period. If the Jacobian is updated every iteration, then (83) simplifies to ðnÞ

Dtref ¼ abn :

(84)

Suitable values of a and b are discussed in Section 4.2.5. The switch from the approximate Newton phase to the inexact Newton phase is made when the normalized residual falls below a specified tolerance t, i.e. ðnÞ

Rd ¼

jjRðnÞ jj2 < t: jjRð0Þ jj2

(85)

If the parameter t is too large, the inexact Newton phase will not converge. If it is too small, then the overall solution time will be increased. Suitable values of t are presented in Section 4.2.5. It is advantageous for robustness to include a local time step during the inexact Newton phase as well; this should increase rapidly as the residual decreases. An approach based on the successive evolution relaxation approach (Mulder and van Leer, 1985) is effective for this purpose. The reference time step used in computing the local time step increases according to the following formula:     ðnÞ ðnÞ b ðn1Þ , (86) , Dtref Dtref ¼ max a Rd where 3/2 b 2. A smooth transition between the approximate and inexact Newton phases is obtained with  nd  ðn Þ b (87) a ¼ abmb m c Rd d , where nd is the index of the first inexact Newton iteration, while a and b are consistent with (83). Here m is the period of formation of the approximate Jacobian matrix and its factorization used for preconditioning. If this is updated at each Newton iteration, (87) becomes  b ðn Þ (88) a ¼ abnd Rd d :

340 Handbook of Numerical Analysis

4.2.5 Additional Considerations and Algorithm Parameters The parallel Newton–Krylov algorithm described earlier, consisting of an approximate Newton pseudo-transient continuation phase followed by a Jacobian-free inexact Newton phase, both based on an approximate Schur parallel preconditioner using local block ILU(p) factorization, is an effective algorithm, but there are some additional considerations to ensure reliable performance. Moreover, the algorithm includes several user defined parameters that must be selected appropriately to provide the desired balance between robustness and fast convergence to steady state. Fortunately, sets of parameters can be found that provide excellent performance over a wide range of flow problems. Moreover, parameter tuning is possible to obtain convergence for particularly challenging problems. The parameters presented below have been used extensively in the context of gradient-based aerodynamic shape optimization, which provides a stiff challenge to a flow solver as a result of the many different geometries encountered and the need for reliable flow solution in order for the optimization algorithm to converge. Challenging aerodynamic shape optimization examples based on the application of the parallel Newton–Krylov algorithm for the Euler and RANS equations described here can be found in Hicken and Zingg (2010), Gagnon and Zingg (2016), Osusky et al. (2015) and Reist and Zingg (2016). The accuracy of an incomplete lower-upper factorization is sensitive to the matrix structure, e.g., its bandwidth, and therefore to the ordering of the grid nodes. Pueyo and Zingg (1998) and Chisholm and Zingg (2009) have shown that the reverse Cuthill–McKee ordering (Liu and Sherman, 1976) can be very effective if a node on the downstream boundary is selected as the root node. With reverse Cuthill–McKee ordering, such a root node leads to an ordering from upstream to downstream, which improves the accuracy of the ILU factorization. Chisholm and Zingg (2009) also introduced a downstream bias into the tie-breaking strategy used in applying the reverse Cuthill–McKee ordering. The use of this ordering with a downstream root node can have a surprisingly large impact on the effectiveness of an ILU(p) preconditioner and hence the convergence of a Newton–Krylov algorithm. In a parallel implementation, the reverse Cuthill–Mckee ordering can be applied on each process independently. The scaling of the solution variables and residual equations is another important consideration. Several difficulties can arise if either the solution variables or the residual values can vary greatly in magnitude either from equation to equation or from node to node. This can occur, for example, if the turbulence model variable takes on values much different from the mean-flow variables as a result of a particular nondimensionalization. If the residual equations are proportional to the cell volume, then their values will vary by several orders of magnitude. Such discrepancies can cause several problems. For example, they can make finding a value of E in (80) that balances round-off and truncation error difficult or impossible to find. If the

The Design of Steady State Schemes Chapter

11 341

entries in v vary greatly in magnitude, the scalar vTv will be representative only of the larger entries, leading to a value of E that is inappropriately small for the smaller entries. Moreover, convergence tolerances are often defined with respect to residual norms, e.g., (78) and (85). If some residual entries dominate these norms, then tolerances will appear to be satisfied even if they are not met for the equations with smaller residual values that have little effect on the norm. A similar effect can arise in the time step formula used during the inexact Newton phase (86). If a large residual component is being reduced more rapidly than a smaller component, the time step will increase more rapidly than is desired for the smaller component. In order to avoid the convergence difficulties associated with such issues, row and column scaling can be used to balance the components of both the solution variables and the residual. The precise approach taken will depend on the solver details, such as the nondimensionalization, in particular those associated with the turbulence model equations in a RANS solver. Examples for specific spatial discretizations of the RANS equations are given by Chisholm and Zingg (2009) and Osusky and Zingg (2013). Convergence problems can also arise with turbulence models that require a quantity to be positive. Ideally, the turbulence model should be robust to small negative values, such as the negative Spalart–Allmaras one-equation turbulence model (Allmaras et al., 2012). This avoids the need to trim the values to nonnegative values. Nevertheless, a turbulence model can produce large destabilizing updates when time step values are used that are effective for the mean-flow equations. This can arise, for example, when the laminar-turbulent transition trip terms in the Spalart–Allmaras model are activated or when a local correlation-based transition model is solved. Under these circumstances, it can be advantageous to reduce the time step for the turbulence model equation to a value smaller than that used for the mean-flow equations. For example, Osusky and Zingg (2013) use a time step for the Spalart–Allmaras turbulence model one hundred times smaller than that used for the mean-flow equations in the presence of the trip terms, but found that this is not necessary when the trip terms are not used and fully turbulent flow is assumed. User defined algorithm parameters are dependent on the nature of the particular equations, e.g., the turbulence model, the spatial discretization and how dissipative it is, and the range of flow problems of interest. We will present sample parameters from Hicken and Zingg (2008) for the Euler equations and Osusky and Zingg (2013) for the RANS equations, both applied to external aerodynamic flows. Both use multiblock structured meshes discretized using second-order summation-by-parts finite difference operators with block coupling and boundary conditions imposed weakly through a penalty approach. The solver also includes higher-order operators, but these have primarily been used for unsteady flows. Some of the algorithm parameters also depend on the specific nondimensionalization used in the solver, so the reader

342 Handbook of Numerical Analysis

is advised to establish suitable parameters for their specific solver; the parameters presented here provide only a starting point based not only on a particular solver but also on a particular balance between speed and robustness. Beginning with the approximate Newton phase, Hicken and Zingg (2008) use the following parameters in (83): a ¼ 0.1, 1.4 b 1.7 and 3 m 5, while Osusky and Zingg (2013) use a ¼ 0.001, b ¼ 1.3, and m ¼ 1, as a much smaller initial time step is needed for the RANS equations. A level of fill of unity is used in the ILU(p) factorization for the Euler equations. For the RANS equations, p ¼ 2 is used during the approximate Newton phase and p ¼ 3 during the inexact Newton phase. Another major difference between the Euler and RANS equations is in the parameter used to switch from the approximate Newton to the inexact Newton phase, t in (85). A value of t ¼ 0.1 is effective for the Euler equations, but was found to be inadequate for the RANS equations, for which t ¼ 104 was found to provide a good balance between speed and robustness. Hicken and Zingg (2008) use a value of n ¼ 0.5 for the linear solution tolerance during the approximate Newton phase for the Euler equations, whereas Osusky and Zingg (2013) use n ¼ 0.05 for the RANS equations. Parameters used for the inexact Newton phase are as follows. For the Euler equations, Hicken and Zingg (2008) use b ¼ 2 in (86), an ILU(p) fill level of p ¼ 1, d ¼ 1013 in (80), and n determined according to (79). For the RANS equations, Osusky and Zingg (2013) use 3/2 b 2, p ¼ 3, d ¼ 1010 and n ¼ 0.01. With these parameters, efficient convergence is achieved for a wide range of flow problems and grids. Sample convergence histories are presented in the next section.

4.2.6 Examples In this section, convergence histories are presented for two popular flow problems governed by the RANS equations; parallel scaling performance is shown as well. The Spalart–Allmaras one-equation turbulence model is used in all cases. Convergence plots are shown with respect to the number of GMRES iterations. In addition, the residual is plotted vs CPU time in seconds and in equivalent residual evaluations. Intel Nehalem processors were used interconnected with nonblocking 4x- and 8x-DDR infiniband. The equivalent residual evaluations are determined by dividing the total CPU time by the CPU time required for a single complete residual evaluation. This enables comparisons that are independent of the particular hardware used. The first test case is a transonic flow over the ONERA M6 wing at M ¼ 0.8395, Re ¼ 11.72 million, a ¼ 3.06 degrees. Experimental data are available in Schmitt and Charpin (1979). The flow is assumed fully turbulent. The grid used has 15.1 million nodes in 128 blocks with an off-wall spacing of 2.3  107 root chord units, giving an average y+ value of 0.4. Load balancing is performed by hand during grid generation such that all blocks have the same number of nodes, and each block is assigned to a processor, i.e., 128 processors are used. Fig. 8 shows that the residual is reduced by twelve orders

11 343

The Design of Steady State Schemes Chapter

A

B

Equivalent residual evaluations 0

End of startup phase

102

102

100

100

10−2

10−4

10−6

10−6 500

1000

1500

Linear iterations

2000

4000

6000

8000

End of startup phase

10−2

10−4

0

2000

104

Residual

Residual

104

0

1000

2000

3000

4000

5000

Time (s)

FIG. 8 Convergence history for computation of flow over the ONERA M6 wing at M ¼ 0.8395, Re ¼ 11.72 million, a ¼ 3.06 degrees on a grid with 15.1 million nodes using scalar dissipation and 128 processors. Each symbol represents a nonlinear or Newton iteration. (A) Residual norm vs number of GMRES iterations. (B) Residual norm vs CPU time in seconds and equivalent residual evaluations.

of magnitude in roughly 83 minutes, requiring just over 3000 GMRES iterations. The switch from the approximate Newton to the inexact Newton phase, which occurs once the residual has been reduced by four orders of magnitude, is indicated on the figure. The globalization phase takes just under half of the total CPU time. Roughly 8000 equivalent residual evaluations are required to achieve a 12-order reduction in the residual. The next test case is a wing-body geometry known as the NASA Common Research Model (Vassberg, 2011). The flow conditions are M ¼ 0.85, Re ¼ 5 million, CL ¼ 0.5, where the Reynolds number is based on the mean aerodynamic chord. The convergence results shown in Fig. 9 were computed on a grid with 19 million nodes in an O–O topology on 704 processors. As a result of the original grid construction, the load balancing is not perfect; better performance is possible through a more formal load balancing approach. A 12-order residual reduction is achieved in roughly 80 min or 15,000 equivalent residual evaluations, requiring roughly 2300 GMRES iterations. In this case, the approximate Newton phase requires about one third of the total CPU time. The same test case and flow conditions are used to examine the parallel scaling of the algorithm. Two grids are considered, one with 48 million nodes (“X” grid), the other with 154 million nodes (“S” grid). Both are subdivided into 6656 blocks, with the same number of grid nodes in each block, enabling perfect load balancing. Fig. 10 plots the CPU time required to reduce the residual by ten orders of magnitude for varying numbers of processors, with the number of blocks fixed at 6656, showing that the algorithm scales almost perfectly under these conditions. The number of GMRES iterations is nearly constant as the number of processors is varied, suggesting that the approximate-Schur preconditioning is performing very well.

344 Handbook of Numerical Analysis

Equivalent residual evaluations

B

A

0 End of startup phase

102

102

100

100

Residual

Residual

10

10−2

10−4

10−6

10−6 1000

2000

10,000

15,000

End of startup phase

10−2

10−4

0

5000

104

4

3000

0

1000

Linear iterations

2000

3000

4000

5000

Time (s)

FIG. 9 Convergence history for computation of flow over the NASA Common Research Model wing-body configuration at M ¼ 0.85, Re ¼ 5 million, CL ¼ 0.5 on a grid with 19 million nodes using matrix dissipation and 704 processors. Each symbol represents a nonlinear or Newton iteration. (A) Residual norm vs number of GMRES iterations. (B) Residual norm vs CPU time in seconds and equivalent residual evaluations.

30,000 25,000 20,000 15,000

Time (s)

10,000

5000

"X " grid "S" grid Ideal time 2000

4000 6000

Processors FIG. 10 Parallel scaling performance for computation of flow over NASA Common Research Model wing-body configuration at M ¼ 0.85, Re ¼ 5 million, CL ¼ 0.5 on grids with 48 million nodes (“X” grid) and 154 million nodes (“S” grid).

5 CONCLUSIONS Time-marching methods, when paired with geometric multigrid, represent an extremely effective means by which to obtain steady state solutions to the Euler and RANS equations. A variety of schemes and acceleration methodologies have been presented along with results for several benchmark flow

The Design of Steady State Schemes Chapter

11 345

problems. In particular, the hybrid RKSGS scheme is observed to converge a RANS problem in under 100 iterations. Newton–Krylov methods provide an efficient option for problems with higher than usual stiffness. This can arise, for example, from the turbulence model, reacting flows, very high Reynolds numbers, or when high-order spatial discretization is used. The basic components of a Newton–Krylov algorithm have been described and convergence results presented for two well known flow problems.

REFERENCES Allmaras, S., 1993. Analysis of a local matrix preconditioner for the 2-D Navier-Stokes equations. In: AIAA 11th Computational Fluid Dynamics Conference, AIAA Paper 93-3330, Orlando, FL. Allmaras, S., 1995. Analysis of semi-implicit preconditioners for multigrid solution of the 2-D Navier-Stokes equations. In: AIAA 12th Computational Fluid Dynamics Conference, AIAA Paper 95-1651, San Diego, CA. Allmaras, S., 1997. Algebraic smoothing analysis of multigrid methods for the 2-D compressible Navier-Stokes equations. In: AIAA 13th Computational Fluid Dynamics Conference, AIAA Paper 97-1954, Snowmass, CO. Allmaras, S.R., Johnson, F.T., Spalart, P.R., 2012. Modifications and clarifications for the implementation of the Spalart-Allmaras turbulence model. In: ICCFD7, Hawaii. Anderson, W.K., Thomas, J.L., Whitfield, D.L., 1986. Multigrid acceleration of the flux split Euler equations. In: AIAA 24th Aerospace Sciences Meeting, AIAA Paper 86-0274, Reno, NV. Bardina, J., Lombard, C.K., 1987. Three-dimensional hypersonic flow simulations with the CSCM implicit upwind Navier-Stokes method. In: AIAA 8th Computational Fluid Dynamics Conference, AIAA Paper 87-1114, Honolulu, HI. Beam, R.W., Warming, R.F., 1976. An implicit finite difference algorithm for hyperbolic systems in conservation form. J. Comput. Phys. 23, 87–110. Brandt, A., 1977. Multi-level adaptive solutions to boundary value problems. Math. Comput. 31, 333–390. Brown, D.A., Zingg, D.W., 2016. A monolithic homotopy continuation algorithm with application to computational fluid dynamics. J. Comput. Phys. 321, 55–75. Caughey, D.A., 1987. A diagonal implicit multigrid algorithm for the Euler equations. In: AIAA 25th Aerospace Sciences Meeting, AIAA Paper 87-453, Reno, NV. Chakravarthy, S.R., 1984. Relaxation methods for unfactored implicit upwind schemes. In: AIAA 23rd Aerospace Sciences Meeting, AIAA Paper 84-0165, Reno. Chisholm, T.T., Zingg, D.W., 2009. A Jacobian-free Newton-Krylov algorithm for compressible turbulent flows. J. Comput. Phys. 228, 3490–3507. Crumpton, P.I., Giles, M.B., 1995. Implicit time accurate solutions on unstructured dynamic grids. In: AIAA 12th Computational Fluid Dynamics Conference, AIAA Paper 95-1671, San Diego, CA. Eisenstat, S.C., Walker, F.H., 1996. Choosing the forcing terms in an inexact Newton method. SIAM J. Sci. Stat. Comput. 7, 16–32. Fedorenko, R.P., 1964. The speed of convergence of one iterative process. USSR Comput. Math. Math. Phys. 4, 227–235.

346 Handbook of Numerical Analysis Gagnon, H., Zingg, D.W., 2016. Euler-equation-based drag minimization of unconventional aircraft configurations. J. Aircr. 53 (4), 1361–1371. Giles, M.B., Drela, M., 1987. Two-dimensional transonic aerodynamic design method. AIAA J. 25 (9), 1199–1206. Giles, M., Drela, M., Thompkins, W.T., 1985. Newton solution of direct and inverse transonic Euler equations. In: AIAA 7th Computational Fluid Dynamics Conference, AIAA Paper 85-1530, Cincinnati, pp. 394–402. Gourlay, A.R., Mitchell, A.R., 1966. A stable implicit difference scheme for hyperbolic systems in two space variables. Numer. Math. 8, 367–375. Hackbusch, W., 1978. On the multi-grid method applied to difference equations. Computing 20, 291–306. Hall, M.G., 1985. Cell vertex multigrid schemes for solution of the Euler equations. In: Morton, K.W., Baines, M.J. (Eds.), Conference on Numerical Methods for Fluid Dynamics, University Reading. Oxford University Press, Oxford, pp. 303–345. Hemker, P.W., Spekreijse, S.P., 1984. Multigrid solution of the steady Euler equations. In: Proc. Oberwolfach Meeting on Multigrid Methods. Hicken, J.E., Zingg, D.W., 2008. A parallel Newton-Krylov solver for the Euler equations discretized using simultaneous approximation terms. AIAA J. 46 (11), 2773–2786. Hicken, J.E., Zingg, D.W., 2010. Aerodynamic optimization algorithm with integrated geometry parameterization and mesh movement. AIAA J. 48 (2), 401–413. Hicken, J.E., Osusky, M., Zingg, D.W., 2010. Comparison of parallel preconditioners for a Newton-Krylov solver. In: ICCFD6, St. Petersburg. Jameson, A., 1982. Steady state solution of the Euler equations for transonic flow. In: Meyer, R.E. (Ed.), Proc. Symposium on Transonic, Shock, and Multidimensional Flows, Madison, 1980. Academic Press, Cambridge, MA, pp. 37–70. Jameson, A., 1983. Solution of the Euler equations by a multigrid method. Appl. Math. Comput. 13, 327–356. Jameson, A., 1985. Transonic flow calculations for aircraft. In: Brezzi, F. (Ed.), Numerical Methods in Fluid Dynamics, Lecture Notes in Mathematics. Springer-Verlag, Berlin, Heidelberg, pp. 156–242. Jameson, A., 1986a. Multigrid algorithms for compressible flow calculations. In: Hackbusch, W., Trottenberg, U. (Eds.), Proceedings of the 2nd European Conference on Multigrid Methods, Lecture Notes in Mathematics, vol. 1228. Springer-Verlag, Berlin, pp. 166–201. Jameson, A., 1986b. A vertex based multigrid algorithm for three-dimensional compressible flow calculations. In: Tezduar, T.E., Hughes, T.J.R. (Eds.), Numerical Methods for Compressible Flow—Finite Difference, Element and Volume Techniques, vol. AMD 78. ASME Publication, New York, NY, pp. 45–73. Jameson, A., 1991. Time dependent calculations using multigrid, with applications to unsteady flows past airfoils and wings. Jameson, A., 1995a. Analysis and design of numerical schemes for gas dynamics 1, artificial diffusion, upwind biasing, limiters and their effect on multigrid convergence. Int. J. Comput. Fluid Dyn. 4, 171–218. Jameson, A., 1995b. Analysis and design of numerical schemes for gas dynamics 2, artificial diffusion and discrete shock structure. Int. J. Comput. Fluid Dyn. 5, 1–38. Jameson, A., 2015. Application of dual time stepping to fully implicit Runge-Kutta schemes for unsteady flow calculations. In: 22nd AIAA Computational Fluid Dynamics Conference, pp. 2753.

The Design of Steady State Schemes Chapter

11 347

Jameson, A., Baker, T.J., 1983. Solution of the Euler equations for complex configurations. In: Proc. AIAA 6th Computational Fluid Dynamics Conference, Denvers, pp. 293–302. Jameson, A., Caughey, D.A., 2001. How many steps are required to solve the Euler equations of steady compressible flow. In: 15th AIAA Computational Fluid Dynamics Conference, AIAA Paper 2001-2673, Anaheim, CA. Jameson, A., Mavriplis, D.J., 1987. Multigrid solution of the Euler equations on unstructured and adaptive grids. In: McCormick, S. (Ed.), Multigrid Methods, Theory, Applications and Supercomputing, Lecture Notes in Pure and Applied Mathematics, vol. 110. Marcel Dekker, New York, NY, pp. 413–430. Jameson, A., Turkel, E., 1981. Implicit schemes and LU decompositions. Math. Comput. 37, 385–397. Jameson, A., Schmidt, W., Turkel, E., 1981. Numerical solution of the Euler equations by finite volume methods using Runge-Kutta time stepping schemes. In: 4th Fluid Dynamics and Plasma Dynamics Conference, AIAA Paper 81-1259, Palo Alto, CA. Kinnmark, I.P.E., 1984. One step integration methods with large stability limits for hyperbolic partial differential equations. In: Vichnevetsky, R., Stepleman, R.S. (Eds.), Advance in Computer Methods for Partial Differential Equations, vol. 5. Publ. IMACS, New Brunswick, NJ. Knoll, D.A., Keyes, D.E., 2004. Jacobian-free Newton-Krylov methods: a survey of approaches and applications. J. Comput. Phys. 193, 357–397. Lallemand, M.H., Dervieux, A., 1987. A multigrid finite-element method for solving the two-dimensional Euler equations. In: McCormick, S.F. (Ed.), Proceedings of the Third Copper Mountain Conference on Multigrid Methods, Copper Mountain, Lecture Notes in Pure and Applied Mathematics. Marcel Dekker, New York, NY, pp. 337–363. Lallemand, M.H., Steve, H., Dervieux, A., 1992. Unstructured multigridding by volume aggregation: current status. Comput. Fluids 21, 397–433. Lerat, A., Side`s, J., Daru, V., 1982. An implicit finite-volume method for solving the Euler equations. In: Krause, E. (Ed.), Eighth International Conference on Numerical Methods in Fluid Dynamics: Proceedings of the Conference, Rheinisch-Westf€alische Technische Hochschule Aachen, Germany, June 28–July 2, 1982. Springer, Berlin, Heidelberg, pp. 343–349. Liou, M.-S., Steffen, C.J., 1993. A new flux splitting scheme. J. Comput. Phys. 107, 23–39. Liu, W.H., Sherman, A.H., 1976. Comparative analysis of the Cuthill-McKee and reverse Cuthill-McKee ordering algorithms for sparse matrices. SIAM J. Numer. Anal. 13, 198–213. Liu, X.D., Osher, S., Chan, T., 1994. Weighted essentially non-oscillatory schemes. J. Comput. Phys. 115, 200–212. Lomax, H., Pulliam, T.H., Zingg, D.W., 2001. Fundamentals of Computational Fluid Dynamics. Springer, Germany. MacCormack, R.W., 1985. Current status of numerical solutions of the Navier-Stokes equations. In: AIAA 23rd Aerospace Sciences Meeting, AIAA Paper 85-0032, Reno. MacCormack, R.W., 1997. A new implicit algorithm for fluid flow. In: Proc. AIAA 13th CFD Conference, AIAA Paper, Snowmass, Colorado, pp. 112–119. Mavriplis, D.J., Jameson, A., 1990. Multigrid solution of the Navier-Stokes equations on triangular meshes. AIAA J. 28 (8), 1415–1425. Mavriplis, D.J., Martinelli, L., 1991. Multigrid solution of compressible turbulent flow on unstructured meshes using a two-equation model. In: AIAA 29th Aerospace Sciences Meeting, AIAA Paper 91-0237, Reno, NV. Mavriplis, D.J., Venkatakrishnan, V., 1996. A 3D agglomeration multigrid solver for the Reynolds-averaged Navier-Stokes equations on unstructured meshes. Int. J. Numer. Methods Fluids 23, 1–18.

348 Handbook of Numerical Analysis Meijerink, J.A., van der Vorst, H.A., 1977. An iterative solution method for linear systems of which the coefficient matrix is a symmetric M-matrix. Math. Comput. 31, 148–162. Mulder, W.A., 1989. A new multigrid approach to convection problems. J. Comput. Phys. 83, 303–323. Mulder, W.A., 1992. A high-resolution Euler solver based on multigrid, semi-coarsening, and defect correction. J. Comput. Phys. 100, 91–104. Mulder, W.A., van Leer, B., 1985. Experiments with implicit upwind methods for the Euler equations. J. Comput. Phys. 59, 232–246. Ni, R.H., 1982. A multiple grid scheme for solving the Euler equations. AIAA J. 20, 1565–1571. Nielsen, E.J., Walters, R.W., Anderson, W.K., Keyes, D.E., 1995. Application of Newton-Krylov methodology to a three-dimensional unstructured Euler code. In: AIAA 12th Computational Fluid Dynamics Conference, AIAA Paper 95-1733, San Diego, CA. Obayashi, S., Kuwakara, K., 1984. LU factorization of an implicit scheme for the compressible Navier-Stokes equations. In: AIAA 17th Fluid Dynamics and Plasma Dynamics Conference, AlAA Paper 84-1670, Snowmass. Obayashi, S., Matsukima, K., Fujii, K., Kuwakara, K., 1986. Improvements in efficiency and reliability for Navier-Stokes computations using the LU-ADI factorization algorithm. In: AIAA 24th Aerospace Sciences Meeting, AlAA Paper 86-0338, Reno. Osusky, M., Zingg, D.W., 2013. A parallel Newton-Krylov-Schur flow solver for the Navier-Stokes equations discretized using summation-by-parts operators. AIAA J. 51 (12), 2773–2786. Osusky, L., Buckley, H.P., Reist, T.A., Zingg, D.W., 2015. Drag minimization based on the Navier-Stokes equations using a Newton-Krylov approach. AIAA J. 53 (6), 1555–1577. Peraire, J., Peir€ o, J., Morgan, K., 1992. A 3D finite-element multigrid solver for the Euler equations. In: AIAA 30th Aerospace Sciences Conference, AIAA Paper 92-0449, Reno, NV. Persson, P.-O., Peraire, J., 2008. Newton-GMRES preconditioning for discontinuous Galerkin discretizations of the Navier-Stokes equations. SIAM J. Sci. Comput. 30 (6), 2709–2722. Pierce, N.A., Giles, M.B., 1997. Preconditioning compressible flow calculations on stretched meshes. J. Comput. Phys. 136, 425–445. Pierce, N.A., Giles, M.B., Jameson, A., Martinelli, L., 1997. Accelerating three-dimensional Navier-Stokes calculations. In: AIAA 13th Computational Fluid Dynamics Conference, AIAA Paper 97-1953, Snowmass, CO. Pueyo, A., Zingg, D.W., 1998. Efficient Newton-Krylov solver for aerodynamic flows. AIAA J. 36 (11), 1991–1997. Pulliam, T.H., Steger, J.L., 1985. Recent improvements in efficiency, accuracy and convergence for implicit approximate factorization algorithms. In: AIAA 23rd Aerospace Sciences Meeting, AIAA Paper 85-0360, Reno. Pulliam, T.H., Zingg, D.W., 2014. Fundamental Algorithms in Computational Fluid Dynamics. Springer, Switzerland. Reist, T.A., Zingg, D.W., 2016. High-fidelity aerodynamic shape optimization of a lifting fuselage concept for regional aircraft. J. Aircr. http://dx.doi.org/10.2514/1.C033798 (accepted for publication). Rieger, H., Jameson, A., 1988. Solution of steady three-dimensional compressible Euler and Navier-Stokes equations by and implicit LU scheme. In: AIAA 26th Aerospace Sciences Meeting, AIAA Paper 88-0619, Reno, NV. Roe, P.L., 1981. Approximate Riemann solvers, parameter vectors, and difference schemes. J. Comput. Phys. 43, 357–372. Rossow, C.-C., 2007. Efficient computation of compressible and incompressible flows. J. Comput. Phys. 220 (2), 879–899.

The Design of Steady State Schemes Chapter

11 349

Rusanov, V.V., 1961. Calculation of interaction of non-steady shock waves with obstacles. J. Comput. Math. Phys. USSR 267–279. Saad, Y., 1993. A flexible inner-outer preconditioned GMRES algorithm. SIAM J. Sci. Stat. Comput. 14, 461–469. Saad, Y., 2003. Iterative Methods for Sparse Linear Systems. SIAM, Philadelphia. Saad, Y., Schultz, M.H., 1986. GMRES: a generalized minimal residual algorithm for solving nonsymmetric linear systems. SIAM J. Sci. Stat. Comput. 7, 856–869. Saad, Y., Sosonkina, M., 1999. Distributed Schur complement techniques for general sparse linear systems. SIAM J. Sci. Comput. 21, 1337–1357. Schmitt, V., Charpin, F., 1979. Pressure distributions on the ONERA M6 wing at transonic Mach numbers. Tech. Rep., ONERA, France. Smith, W.A., Weiss, J.M., 1995. Preconditioning applied to variable and constant density flows. AIAA J. 33 (11), 2050–2057. Swanson, R., Turkel, E., Rossow, C.-C., 2007. Convergence acceleration of Runge-Kutta schemes for solving the Navier-Stokes equations. J. Comput. Phys. 224 (1), 365–388. Toro, E.F., Spruce, M., Speares, W., 1994. Restoration of the contact surface in the HLL-Riemann solver. Shock Waves 4 (1), 25–34. ISSN 1432-2153. Turkel, E., 1987. Preconditioned methods for solving the incompressible and low speed equations. J. Comput. Phys. 72, 277–298. van Leer, B., 1974. Towards the ultimate conservative difference scheme. II, Monotonicity and conservation combined in a second order scheme. J. Comput. Phys. 14, 361–370. van Leer, B., Lee, W.T., Roe, P.L., 1991. Characteristic time stepping or local preconditioning of the Euler equations. In: AIAA 10th Computational Fluid Dynamics Conference, AIAA Paper 91-1552, Honolulu, Hawaii. Vassberg, J.C., 2011. A unified baseline grid about the common research model wing-body for the fifth AIAA CFD drag prediction workshop. In: 29th AIAA Applied Aerodynamics Conference, AIAA Paper 2011-3508, Honolulu, HA. Venkatakrishnan, V., 1988. Newton solution of inviscid and viscous problems. In: AIAA 26th Aerospace Sciences Meeting, AIAA Paper 88-0413, Reno, NV. Wilcox, D.C., 1998. Turbulence Modelling of CFD. DCW Industries, La Canada, CA. Yee, H.C., 1985. On symmetric and upwind TVD schemes. In: Proc. 6th GAMM Conference on Numerical Methods in Fluid Mechanics, Gottingen. Yoon, S., Jameson, A., 1987. Lower-upper Symmetric-Gauss-Seidel method for the Euler and Navier-Stokes equations. In: AIAA 25th Aerospace Sciences Meeting, AIAA Paper 87-0600, Reno, NV. Yu, M.L., Wang, Z.J., 2016. Homotopy continuation of the high-order flux reconstruction/ correction procedure via reconstruction (FR/CPR) methods for steady flow simulation. Comput. Fluids 131, 16–28.

Chapter 12

Some Failures of Riemann Solvers R. Abgrall € € Institute of Mathematics, University of Zurich, Zurich, Switzerland

Chapter Outline 1 Introduction 2 Real Gas Effects 2.1 Mixture of Gases 2.2 Nonlinear Equation of State

351 353 353 355

3 Multidimensional Effects 4 Accuracy Effects References

356 358 360

ABSTRACT In this small chapter, we review a few problems of classical Riemann solvers for the Euler equations. They are all related to the existence of linearly degenerate fields in this system and the averaging procedure of finite volume methods. Keywords: Riemann solvers, Linearly degenerate fields, Default of Riemann solvers AMS Classification Codes: 65M08, 65M12, 76N15

1

INTRODUCTION

We are interested in the Euler equations of Fluid dynamics @w (1) + div fðwÞ ¼ 0 @t where U ¼ (r, ru, E)T. As usual, r is the density, u the velocity and 1 E ¼ e + ru2 is the total energy, where e is the internal energy. Taking any 2 direction n, it is well known that (1) admits two types of waves: acoustic waves l ¼ u  n  c and material waves u  n. The first two ones are single and are genuinely nonlinear, while the second ones have multiplicity d where 2 + d is the number of variables defining w: in the simplest case, this is the dimension of the problem. Among the material waves, one has two types: the entropy wave that moves at velocity u and the shear waves. Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.10.005 © 2017 Elsevier B.V. All rights reserved.

351

352 Handbook of Numerical Analysis

We are interested in some drawbacks of standard conservative schemes. Considering the method:  Dt ^ (2) wni + 1 ¼ wni  f i + 1=2  ^f i1=2 , Dx we know from Lax–Wendroff theorem, which under stability assumptions, a conservative scheme will provide solutions from which one can extract a subsequence that, if convergent towards a L1 function w, then this function is a weak solution of the problem. If in addition, the scheme is entropy dissipative, this weak solution will also satisfy the corresponding entropy inequality. However, the convergence rate can be extremely slow. The purpose of this chapter is to explore this problem, and the accuracy problem in general. Indeed all these problems are related to the following fact. Given a set of n control Z volumes {Cj}j2I, the data wi is in principle and approximation of 1 wðx, tn Þdx. Looking at the definition of the variable, the first one is jCi j Ci the average of the density with the measure dx/jCij. The second one is the average of the momentum ru with respect to the same measure, and the last one is an approximation of the total energy. From this, we must recover the working variables, i.e. the density, the velocity and the pressure. The evaluation of the velocity does not pose real problem: by setting Z rudx Ci n Z , (3) ui ¼ rdx Ci

we simply see uni as the R average velocity, not with the measure dx/jCij, but with the measure rdx= Ci rdx. This is consistent because we would like that ri u2i 

ðruÞ2 on the one hand, i.e. r 0Z 12 rudx B Ci C B C @ jCi j A ri u2i ¼

Z rdx

Z

2 rudx Ci Z ¼ jCi j rdx

Ci

(4)

Ci

jCi j On the other hand, using (3), we would like to have ri u2i  rðuÞ2 , i.e. Z 0Z 12 rdx rudx B Ci C C BZ C: ri u2i ¼ i @ A jCi j rdx Ci

It is clear that the two definitions (4) and (5) coincide.

(5)

Some Failures of Riemann Solvers Chapter

12 353

Let us turn now to the energy. In the case of a perfect gas equation of state, we havea 1 p E ¼ e + ru2 ; e ¼ 2 g1 and, using the scheme, we claim that Eni ¼

pni 1 + rn ðun Þ2 g1 2 i i

Again, the evaluation of the kinetic energy can be done via (4). The interpretation is coherent with the finite volume formalism. The same hold true for the pressure: since g is constant, the average of the internal energy is Z Z Z p 1 dx ¼ e dx ¼ pdx g  1 Ci Ci Ci g  1 and this interprets pni as the average value of the pressure in the cell. However, this is very specific to the perfect gas EOS, and this interpretation is even in contradiction with thermodynamics: while mass, momentum and total energy are quantities attached to a volume (if we double the volume, we double the mass and so on), this is not the case for pressure. In this note, we are attached to showing what kind of problems arise from this remark.

2

REAL GAS EFFECTS

2.1

Mixture of Gases

Let us consider the simplest possible model of a mixture of two gases. We will assume they are perfect gases (if more complex EOS are taken, the results are likely to be worse), and we assume the Dalton law. The Dalton law assumption implies that the two gases have the same temperature, otherwise we have to rely on a multiphase assumption with nonmiscible fluids. However, the results are similar, see Saurel and Abgrall (1999). Hence, the pressure is p ¼ p1 + p2 ¼ r1 R1 T + r2 R2 T ¼ rRT with R ¼ Y1 R1 + Y2 R2

where Yi ¼

ri , r

r ¼ r1 + r2 :

One choice of conservative variable is W ¼ (r1, r2, ru, E)T, the associated 1 flux is F(W) ¼ (r1u, r2u, ru2 + p, u(E + p))T. As usual, E ¼ e + ru2 , where 2

a

e is the internal energy.

354 Handbook of Numerical Analysis

e is the sum of the internal energies of the two components: e ¼ r1 cv1 T + r2 cv2 T where the cvi are the specific heat at constant volume that we assume to be constant without any loss of generality. The total energy can be rewritten as: E¼

p 1 + ru2 , g1 2

with g ¼

Y 1 R 1 + Y2 R 2 : Y1 cv1 + Y2 cv2

If we update the variables with a fully conservative scheme, this will result into thermodynamical inconsistencies: from the update of the densities, one gets the update of the mass fraction, hence a new value of g. Using mass conservation, and the update of momentum, one can evaluate the kinetic energy, 1 and then En + 1  rn + 1 ðun + 1 Þ2 . Then the standard assumption is to say that 2 pn + 1 gn + 1  1

1 ¼ En + 1  rn + 1 ðun + 1 Þ2 : 2

This means that we modelise a mixture equation of state for each control volume, this model is completely defined here by the value of g. We use the word “modelise” because in real, the interface is sharp, while in numerics, because of numerical diffusion, this is no longer true. This means that there is some transfer between the two gases. However, this cannot be correct. This becomes clear if one considers a simple contact, with uniform pressure and velocity. We know that the solution is a simple transport of mass, with constant and uniform velocity and pressure. In Abgrall (1988) it was shown numerically that oscillations of the pressure and the velocity occur for the Roe scheme. The rational is described in Fig. 1 where the Godunov solver (exact solver) is used. The dotted line represents the location of the contact discontinuity which is the only active wave in the case of a pure contact. On the left of the dotted line, the state is the left initial state, while on the right it is the right initial one. The density will be smeared. Since we use Godunov solver, it is easy to see that the momentum is smeared in a consistent way, so that the speed at the next time step remains uniform. When the total energy is averaged, we obtain an estimate of the internal energy. In order to recover the pressure we need to estimate g. Again, this is done using the evolution relation of the density. Because of the form of g (it is a rational function of the mass fractions or the densities), there is no

L

L

R

R

L

L

L

R

R

FIG. 1 Left: initial condition for a pure contact (uL ¼ uR, pL ¼ pR), only the density differs. Right: after one time step. The dotted line represents the location of the contact discontinuity which is the only active wave in the case of a pure contact. On the left of the dotted line, the state is the left initial state, while on the right it is the right initial one. Then, the finite volume procedure averages them.

Some Failures of Riemann Solvers Chapter

12 355

reason why the profile of g will be compatible with the respect of a uniform pressure. This is indeed not the case. This was further the analysed by Karni (1994) for various models (in particular a model where the mixture is represented by rg and the numerical method uses the level set technique as in Mulder et al. (1992). Cures are presented in Abgrall (1996), Abgrall and Karni (2001) and then Shyue (1999) among others. In Abgrall (1996), the principle is as follows: given one’s favourite scheme, one starts to update the density, momentum and energy. Looking at the situation of a pure contact, and if the numerical flux is contact friendly, one can see that after one time step the velocity remains uniform.b We also get a discrete equation for the density. Looking at the energy equation and asking that the pressure remains uniform, one gets a relation on the coefficient that permits to relate the internal energy to the pressure (and not vice versa). In the case of a 1 . The update relation for this coefficient mixture, this coefficient is g1 depends on the choice of the numerical flux, it is a consistent approximation of     @ 1 @ 1 +u ¼ 0: (6) @t g  1 @x g  1 However, one needs to be careful: if we approximate the evolution equation on the mass, momentum and total energy with a conservative flux that is contact friendly, and considering a consistent approximation of (6), there is no reason why the pressure is oscillation free: the approximation of (6) depends on the approximation of the mass, momentum and total energy equations. The discretisation of this equation must be compatible with the initial scheme. Further refinement can be found in Abgrall et al. (2003), in particular for high-order schemes. The common characteristic of these methods is that one has to forget a bit conservation: we need to force the profile of g to be compatible with the profile of energy in order not to have pressure oscillation.

2.2

Nonlinear Equation of State

Consider again the same problem (1) approximated by (2). We assume that the equation of state is nonlinear. One example, among many others, is the Jones–Wilkins–Lee (JWL) equation of state that is used to represent some combustion products. The pressure is defined by

b This is our definition of contact friendly numerical flux: starting from an initial condition where the velocity and the pressure are uniform, after one time step, the velocity must stay uniform. Note this does not say anything on the behaviour of the pressure.

356 Handbook of Numerical Analysis

p ¼ ðg  1Þe + fj ðrÞ, where

        ðg  1Þr R1 r ðg  1Þr R1 r exp  exp  + A2 1  : fj ðrÞ ¼ A1 1  R1 r r R1 r r

In these relations, g is a constant, as well as R1, R2, A1, A2 and r. Let us consider the Godunov solver, and let us refer again at Fig. 1 that corresponds to a pure contact. After one time step, one can recover a density as a weighted average of the left and right densities. The velocity will stay uniform, and the total energy will be a weighted average between the left and right energies. Hence, for the same reason as above, there is no reason that the pressure will remain constant. It is quite difficult to cure this drawback. In Petitpas et al. (2007), a general method is proposed. It relies on the judicious use of a relaxation method combined with a Lagrangian rephrasing of the problem. In Pantano et al. (2016), the case of the van der Waals equation of state is considered.

3 MULTIDIMENSIONAL EFFECTS In the multidimensional case, contact and slip line are also a cause of problems even in the case of a calorically perfect gas. Of course if other effects are added as described earlier, the effects can be worse and lead in some situations to the crash of the code. Let us describe what is the situation in the case of a Cartesian mesh, with the simplest possible splitting strategy to update the solution. We start from @w @w @f x @f y + ¼ 0: + div fðwÞ ¼ + @t @t @x @y

(7)

We approximate the two-dimensional operator by a succession of one-dimensional sweeps: Dt

Dt

n 2 wni + 1 ¼ ðLx2 LDt y Lx w Þi

(8)

where Lx (resp. Ly) represents the one-dimensional operator along x-direction (resp. y). Along the direction x ¼ x or y, we use the scheme (2), of course with the correct modification of indices, this is left to the reader. Again, some precautions must be taken in order to preserve equality of pressure and velocities during each sweep. Let us examine for example the x-sweep. The same remarks applies directly to the y-sweep. Equations to solve during the x-sweep are @w @f x ¼0 + @t @x

(9)

where w ¼ (r, ru, rv, E)T and fx ¼ (ru, ru2 + p, ruv, u(re + p))T where r E ¼ e + ðu2 + v2 Þ. 2

Some Failures of Riemann Solvers Chapter

12 357

We consider the case of the Rusanov scheme, for which the numerical flux between the states wj and wj+1 is   ^f j + 1=2 ¼ 1 f x ðwj Þ + f x ðwj + 1 Þ + aj + 1=2 ðwj + 1  wj Þ 2 where aj+1/2 is an upper bound of the spectral radius of the Jacobian of fx in a neighbourhood of (wj, wj+1). Other examples can be worked out in the same spirit. Let us assume once more that the x-velocity is uniform while y-component is not. The pressure is also assumed to be uniform. Following the same development as in Section 2, we obtain     rni + 1 ¼ rni  l½uni rni+ 1  rni1  ai + 1=2 rni+ 1  rni   (10a) +ai + 1=2 rni  rni1    rni + 1 uni + 1 ¼ rni uni  l½ ðru2 + pÞni+ 1  ðru2 + pÞni1 + ai + 1=2 ðrni+ 1 uni+ 1  rni uni Þ + ai + 1=2 ðrni uni  rni1 uni1 Þ (10b) The transverse momentum equation reads  rvni + 1 ¼ rvni  l uni ðrvni+ 1  rvni1 Þ  ai + 1=2 ðrvni+ 1  rvni Þ + ai1=2 ðrvni  rni1 Þ The total energy equation is  2 n + 1  2 n  2 n  2 n pni + 1 v pn v v v + r ¼ i + r  l uni r  r g1 2 i g1 2 i 2 i+1 2 i1

  ai + 1=2

v2 r 2

n

 2 n v  r 2 i i+1

 2 n  2 n v v + ai1=2 r  r 2 i 2 i1

v2 We see that in order to have pni + 1 ¼ pni , we have to impose, denoting Kt ¼ r : 2  n n   n   n  n+1 n n n n Kt, i ¼ Kti  l ui Kt, i + 1  Kt, i1  ai1 =2 Kt, i + 1  Kt, i + ai1=2 Kt, i  Kt, i1 (11) This shows that if (11) is not satisfied, the pressure starts to deviate from the initial value as well as the tangential and normal component of the velocity. In most cases, this effect is indeed very small. For very strong shear waves, the effect is much more pronounced so that the strict application of Lax–Wendroff theorem need very fine meshes. It is possible to derive a scheme that will genuinely preserve the slip line (aligned with the mesh). The idea is to consider the system:

358 Handbook of Numerical Analysis

@w0 @f 0 + ¼0 @t @x @v @v +u ¼0 @t @x

(12)

v2 that 2 can be derived from the original Euler equations. Then applying once more the same principles, we can obtain a discretisation which will be consistent with the preservation of slip lines. The difficulty, as it can easily be seen, is that (12) is valid only in the x-direction. For the y-direction, another value of e0 (namely u2 E0 ¼ E  r ) has to be considered. The synchronisation of the x and y sweeps 2 has to be done, with the consequence that strict conservation of the energy is lost. One can consult Saurel and Abgrall (1999) for more details and in Abgrall et al. (2003) a fully conservative method that preserves slip lines. If the tangential kinetic energy is not convected, the numerical errors become so large for very strong slip lines that the scheme blows up. where w0 ¼ (r, ru, E0 )T and f0 ¼ (ru, ru2 + p, u(E0 + p))T with E0 ¼ E  r

4 ACCURACY EFFECTS When the MUSCL method is applied, the set of variables that are used for the approximation plays a role. In many cases, the choice of characteristic variables is advocated. However, the choice of the physical variables (density, velocity, pressure) is another popular choice: in order to defined characteristic variables, one has to prescribe a given direction (typically the local cell normal), and when the shape of the control volume is complex, the computational cost increases. While the physical variables are good for any cell interface, there is a second reason why one could consider them: we get a better control on the density and the pressure and thus their sign. Let us examine the question of polynomial reconstruction. We are given a stencil S ¼ fC0 ,…, C# g and we wish to construct a polynomial of degree r that is a “good” approximation of the data w0, …, w#, Z w dx C : wj ¼ j jCj j To do so, one method is to define a polynomial PS for which, for any C 2 S, we have Z Z PS ðxÞdx ¼ wðxÞdx: C

C

It can be shown, by a simple adaptation of the results of Ciarlet and Raviart (1972), it is easy to show that PS approximate w to r + 1th order in the convex hull of D ¼ [C2S C. For this let us introduce the linear mapping

Some Failures of Riemann Solvers Chapter

12 359

Y : L1 ðDÞ ! # + 1 Z 0Z 1 f dx f dx B C0 C C# C f 7!B @ jC0 j , …, jC# j A and the problem: given f 2 L1 ðDÞ, find P 2 ðDÞ such that Y(P  f ) ¼ 0. Under a Vandermonde-like condition, see Abgrall and Sonar (1997), it is easy to see that the image of ðDÞ by Y is # + 1 , so that the polynomial P is uniquely defined. One necessary condition is that, for two variables polynoðr + 1Þðr + 2Þ . A similar condition holds true for polynomial in mials, # + 1 ¼ 2 three variables. One can also use a least square procedure to solve this problem of finding a reconstruction polynomial. One of the reasons often advocated is that the conditioning number of the linear problem can be large. However, following Abgrall (1994) and Abgrall and Sonar (1997) one can easily define an algorithm that is similar to the Newton algorithm for 1D Lagrange interpolation, for which the conditioning is optimal. In any case, the reconstruction procedure leaves the polynomials of degree r invariant, and following Ciarlet and Raviart (1972) this enable to get error estimates on the function and its successive derivative. These error estimates are similar to those known for standard Lagrange interpolation, see Abgrall and Sonar (1997) for details. One applies this procedure to the density without any problem. One can also apply it to the velocity, provided we change the definition of Y into Z 0Z 1 f rdx f rdx B C0 C C , …, ZC# Yð f Þ ¼ B @Z A rdx rdx C0

C# c

and it is easy to extend the previous results. When we come to the pressure, unless we are in the very particular case of a perfect equation of state where the pressure is linear in term of the internal energy, interpreting the pressure pC as the average of the pressure on the cell C is wrong: the approximation result becomes very doubtful. Except for second order where the average is, up to second order, the value of the function at the centroid of the cell. For higher than second order, the procedure is doubtful.

c Indeed, if m0, …m# are linear forms defined on L1(C0), …, L1(C#), it is easy to generalise the Vandermonde condition and then apply again (Ciarlet and Raviart, 1972) to generalise these approximation results.

360 Handbook of Numerical Analysis

In the case of the use of the characteristic variables, the situation is better. In one dimension, for example, once is defined an average state from which one can define an average Jacobian matrix and then characteristic variables, we write aj ¼ ‘ j  w where the ‘j only depend on the averaged state. Hence, the reconstruction problem becomes indeed a reconstruction problem on the conserved variables, for which there is no problem, for the same reason as for the density, provided the same averaged state is used for all the cells of the stencil S.

REFERENCES Abgrall, R., 1988. Generalisation of the Roe scheme for mixture of perfect gases. Rech. Arospat. 6, 31–43. Abgrall, R., 1994. On essentially non-oscillatory schemes on unstructured meshes: analysis and implementation. J. Comput. Phys. 114 (1), 45–58. Abgrall, R., 1996. How to prevent pressure oscillations in multicomponent flows: a quasi conservative approach. J. Comput. Phys. 125 (1), 150–160. Abgrall, R., Karni, S., 2001. Compressible multifluids. J. Comput. Phys. 169 (2), 594–623. Abgrall, R., Sonar, T., 1997. On the use of M€ulbach expansions in the recovery step of ENO methods. Numer. Math. 76 (1), 1–25. Abgrall, R., Nkonga, B., Saurel, R., 2003. Efficient numerical approximation of compressible multi-material flow for unstructured meshes. Comput. Fluids 4 (32), 571–605. Ciarlet, P., Raviart, P.-A., 1972. General Lagrange and Hermite interpolation in n with application to finite elements. Arch. Rational. Mech. Anal. 46, 177–199. Karni, S., 1994. Multi-component flow calculations by a consistent primitive algorithm. J. Comput. Phys. 112, 31–43. Mulder, W., Osher, S., Sethian, J., 1992. Computing interface motion: the compressible Rayleigh-Taylor and Kelvin-Helmholtz instabilities. J. Comput. Phys. 100, 209. Pantano, C., Saurel, R., Smitt, T., 2016. An oscillation free shock-capturing method for compressible van der Waals supercritical fluid flows. J. Comput. Phys. In revision. Petitpas, F., Franquet, E., Saurel, R., Metayer, O.L., 2007. A relaxation-projection method for compressible flows. Part II: Artificial heat exchange for multiphase shocks. J. Comput. Phys. 225 (2), 2214–2248. Saurel, R., Abgrall, R., 1999. A simple method for compressible multifluid flows. SIAM J. Sci. Comput. 21 (3), 1115–1145. Shyue, K.-M., 1999. A fluid-mixture type algorithm for compressible multicomponent flow with van der Waals equation of state. J. Comput. Phys. 1, 43–88.

Chapter 13

Numerical Methods for the Nonlinear Shallow Water Equations Y. Xing University of California Riverside, Riverside, CA, United States

Chapter Outline 1 Overview 2 Mathematical Model 3 Numerical Methods 3.1 Numerical Methods for the Homogeneous Equations 3.2 Well-Balanced Methods 3.3 Positivity-Preserving Methods 4 Shallow Water-Related Models

362 363 364

364 368 374 377

4.1 Shallow Water Flows Through Channels With Irregular Geometry 4.2 Shallow Water Equations on the Sphere 4.3 Two-Layer Shallow Water Equations 5 Conclusion Remarks Acknowledgements References

377 378 379 380 380 380

ABSTRACT Free surface flows often appear in ocean, engineering and atmospheric modelling. In many applications involving unsteady water flows where the horizontal length scale is much greater than the vertical length scale, the shallow water equations are commonly used to model these flows. Research on effective and accurate numerical methods for their solutions has attracted great attention in the past two decades. In this chapter, we review some work on designing positivity-preserving and well-balanced methods for solving the shallow water equations with a nonflat bottom topography. Some shallow water-related models, including the shallow water flows through channels with irregular geometry, the shallow water equations on the sphere and the two-layer shallow water equations, and their numerical approximation will also be presented. Keywords: Shallow water equation, Source term, Well balanced, Positivity preserving, Finite volume scheme, Finite difference scheme, Discontinuous Galerkin method AMS Classification Codes: 65N06, 65N08, 65N30

Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.09.003 © 2017 Elsevier B.V. All rights reserved.

361

362 Handbook of Numerical Analysis

1 OVERVIEW Free surface flows have wide applications in ocean, environmental, hydraulic engineering and atmospheric modelling, with examples including dam break and flooding problems, tidal flows in coastal water regions, nearshore wave propagation with complex bathymetry structure, tsunami wave propagation and ocean model. In many applications involving unsteady water flows where the horizontal length scale is much greater than the vertical length scale, the shallow water equations (SWEs), often known as Saint-Venant equations, are commonly used to model these flows. The two-dimensional SWEs are a nonhomogeneous system of nonlinear hyperbolic equations, which takes the form of ht + ðhuÞx + ðhvÞy ¼ 0,   2 2 1 + ðhuvÞy ¼ ghbx + fhv + cf ujuj, ðhuÞt + hu + gh 2 x  1 ðhvÞt + ðhuvÞx + hv2 + gh2 ¼ ghby  fhu + cf vjuj, 2 y

(1)

where h denotes the water height, u ¼ (u, v)T is the velocity vector of the fluid and g is the gravitational constant. The source terms on the right-hand side represent the effect of nonflat bathymetry, Coriolis force and friction on the bottom, with b being the bottom topography, f the Coriolis parameter and cf the friction parameter (from the classical Manning or Darcy formulation). SWEs play a critical role in the modelling and simulation of free surface flows in rivers and coastal areas and can predict tides, storm surge levels and coastline changes from hurricanes and ocean currents. SWEs also arise in atmospheric flows, debris flows, internal flows and certain hydraulic structures like open channels and sedimentation tanks. Due to the large scientific and engineering applications of the SWEs, research on effective and accurate numerical methods for their solutions has attracted great attention in the past two decades. The homogeneous SWEs are simply a system of hyperbolic conservation laws. Tremendous numerical methods designed for conservation laws can be applied to simulate the SWEs directly. But the SWEs also admit other numerical challenges. Two types of difficulties are often encountered at the simulation of the SWEs, coming from the preservation of steady-state solutions and the preservation of water height positivity. The first difficulty is related to the treatment of the source terms due to nonflat bottom topography. An essential part for the SWEs and other conservation laws with source terms is that they often admit steady-state solutions in which the flux gradients are exactly balanced by the source terms. SWEs admit the general moving-water equilibrium, as well as a simpler still water steady-state solution, which represents a still flat water surface, and referred as the “lake at rest” solution. Traditional numerical schemes with a straightforward handling of the bottom source term cannot balance the effect of the source term and the flux in the discrete level, and usually fail to capture the steady-state well. This

Numerical Methods for the Nonlinear Shallow Water Equations Chapter

13 363

will introduce spurious oscillations near the steady state. The well-balanced schemes are specially designed to preserve exactly these steady-state solutions up to machine error with relatively coarse meshes, and therefore, it is desirable to design numerical methods which have the well-balanced property. The other major difficulty often encountered in the simulations of the SWEs is the appearance of dry regions in many engineering applications. Typical applications include the dam break problem, flood waves and run-up phenomena at a coast with tsunamis being the most impressive example. Special attention needs to be paid near the dry/wet front to preserve the water height positivity, otherwise they may produce nonphysical negative water pheight, ffiffiffiffiffi which becomes problematic when calculating the eigenvalues u  gh to determine the time step size Dt, and renders the system not hyperbolic and not well posed. The rest of this chapter is organized as follows: In Section 2, we describe the mathematical model, as well as some properties of this model in the onedimensional setting. Review and discussion of some numerical methods for the SWEs are presented in Sections 3. In Section 4, we discuss some models which are similar to SWEs, and some references on their numerical approximation. Concluding remarks are given in Section 5.

2

MATHEMATICAL MODEL

Free surface flows appear in many engineering and atmospheric applications. Three-dimensional Navier–Stokes equations can be used to simulate such flows directly. However, in the case where the horizontal length scale is much greater than the vertical length scale, one can average over the depth to eliminate the vertical direction and reduce the model into the simpler twodimensional nonlinear SWEs. In one space dimension, the SWEs are defined as follows ht + ðhuÞx ¼ 0,   1 ðhuÞt + hu2 + gh2 ¼ ghbx , 2 x

(2)

where we ignore the Coriolis force and friction source terms and keep the only source term due to bottom topography. The two equations represent the conservation of mass and momentum. This model also admits other conserved quantities, including the energy (E ¼ gh + u2/2), vorticity (for two-dimensional model, o ¼ vx  uy), potential vorticity and potential enstrophy, etc. For the ease of presentation, we denote the SWEs (2) by Ut + f ðUÞx ¼ sðU, bÞ where U ¼ (h, hu)T with the superscript T denoting the transpose, 1 f ðUÞ ¼ ðhu, hu2 + gh2 ÞT is the flux and s(U, b) is the source term. The Jacobi 2 matrix of the flux is given by:

364 Handbook of Numerical Analysis



 0 1 , AðUÞ ¼ u2 + gh 2u pffiffiffiffiffi with the two eigenvalues l1, 2 ðUÞ ¼ u  gh. When the solutions are smooth, the SWEs (2) can also be rewritten in the equivalent form of ht + ðhuÞx ¼ 0, ut + ðu2 =2 + gðh + bÞÞx ¼ 0:

(3)

We can easily observe that the SWEs admit the general moving-water equilibrium state, given by 1 m :¼ hu ¼ const and E :¼ u2 + gðh + bÞ ¼ const, 2

(4)

where m and E are the moving-water equilibrium variables. A special case is the still water at rest steady state u ¼ 0 and h + b ¼ const,

(5)

which represents a flat water surface. For the homogeneous SWEs without any source term, the Riemann problem can be easily solved (LeVeque, 2002). When the source term due to the variable bottom topography is added to the system, solving the Riemann problem for the SWEs with discontinuous bathymetry becomes a less trivial issue. One approach is to augment a separate equation bt ¼ 0 for the bottom, and rewrite the SWEs in a nonconservative form with the variables (h, hu, b)T. One can then investigate its Riemann solution based on this formulation. Some results on this topic can be found in Bernetti et al. (2008) and LeFloch and Thanh (2007).

3 NUMERICAL METHODS Extensive research has been done to numerically simulate the SWEs in the past two decades. The commonly used numerical methods range from finite difference, finite volume to finite element methods. In this section, we start by reviewing numerical methods for the homogeneous SWEs, and then present the well-balanced and positivity-preserving numerical methods to overcome some numerical challenges encountered at the simulation of the SWEs.

3.1 Numerical Methods for the Homogeneous Equations The homogeneous system of the SWEs is a hyperbolic conservation law. A tremendous amount of numerical methods for conservation laws has been designed, and most of them can be applied to the SWEs directly. In this

Numerical Methods for the Nonlinear Shallow Water Equations Chapter

13 365

section, we briefly mention a few numerical methods to solve SWEs. For the ease of presentation, we use one-dimensional model (2) (without the source term) as an example to demonstrate these methods. In this chapter, we mainly focus on the spatial discretization. Total variation diminishing (TVD) Runge– Kutta time discretization (Shu and Osher, 1988) is usually used in practice for stability and to increase temporal accuracy. For example, the third-order TVD Runge–Kutta method can be coupled with all the spatial discretization introduced in this chapter: Uð1Þ ¼ U n + DtF ðU n Þ,  3 1 Uð2Þ ¼ Un + U ð1Þ + DtF ðU ð1Þ Þ , 4 4  1 2 Un + 1 ¼ Un + U ð2Þ + DtF ðU ð2Þ Þ , 3 3

(6)

where F ðUÞ is the spatial operator.

3.1.1 Finite Volume Methods We discretize the computational domain into cells Ij ¼ [xj1/2, xj+1/2] and denote the size of the j-th cell by Dxj and the maximum mesh size by Dx ¼ max j Dxj . In a finite volume scheme, our computational Z variables 1 Uðx,tÞ dx. are U j ðtÞ, which approximate the cell averages Uðxj ,tÞ ¼ Dxj Ij The conservative finite volume numerical scheme is given by  d 1 ^ fj + 1  ^fj 1 ¼ 0, U j ðtÞ + (7) 2 2 dt Dxj with f^j + 1=2 ¼ FðUj+ 1=2 , Uj++ 1=2 Þ being the numerical flux. Here Uj+ 1=2 and Uj++ 1=2 are the pointwise approximations to U(xj+1/2, t) from left and right, respectively. In a first-order method, one can approximate U by piecewise constant in each cell, therefore, Uj+ 1=2 ¼ U j and Uj++ 1=2 ¼ U j + 1 . The solution can also be approximated by a piecewise linear function in each cell, with the slope of the function constructed by a slope limiter based on U j and U j1 , for example, the minmod limiter (Shu, 1987). This will lead to a second-order method. To construct a high order weighted essentially nonoscillatory (WENO) method, we can use a WENO reconstruction procedure to evaluate + U j+1/2 and Uj+1/2 through the neighbouring cell average values U j . Basically, for a (2k  1)-th order WENO scheme, we first compute k reconstructed ðkÞ,  boundary values Uj + 1=2 corresponding to different candidate stencils. Then by providing each value a weight which indicates the smoothness of the corresponding stencil, we define the (2k  1)-th order WENO reconstruction

366 Handbook of Numerical Analysis

Uj+ 1=2 as a convex combination of all these k reconstructed values. Eventually, the WENO reconstruction can be written out as: Uj++ 1 ¼ 2

k X

wr U j + r , Uj+ 1 ¼ 2

r¼k + 1

k1 X  wr U j + r :

(8)

r¼k

where k ¼ 3 for the fifth-order WENO approximation and the coefficients wr  and w r depend nonlinearly on the smoothness indicators involving the cell average U. We refer to Crnjaric-Zic et al. (2004) and Xing and Shu (2006a,b) for more details in constructing finite volume WENO methods for the SWEs. In order to obtain a stable scheme, the numerical flux f^j + 1=2 ¼ FðUj+ 1=2 , Uj++ 1=2 Þ needs to be a monotone flux, namely F is a nondecreasing function of its first argument and a nonincreasing function of its second argument. One simple and inexpensive choice is the well-known Lax– Friedrichs flux Fða, bÞ ¼ 12ðf ðaÞ + f ðbÞ  aðb  aÞÞ, (9) pffiffiffiffiffi where a ¼ max ðu + ghÞ and the maximum is taken over the whole domain. Other choices include the Roe’s flux, Godunov flux, HLLC flux, etc. Secondorder central-upwind methods have been studied for the SWEs in a series of papers (see Bryson et al., 2011; Kurganov and Levy, 2002; Kurganov and Petrova, 2007 and the references therein), which are based on the choice of numerical flux: FðUj+ 1=2 , Uj++ 1=2 Þ ¼

+ cj++ 1=2 f ðUj+ 1=2 Þ  c j + 1=2 f ðUj + 1=2 Þ

cj++ 1=2  c j + 1=2 +

h cj++ 1=2 c j + 1=2 cj++ 1=2  c j + 1=2

i Uj++ 1=2  Uj+ 1=2 ,

where the one-sided local speeds of propagation c j + 1=2 are determined by pffiffiffiffiffiffiffiffi+  pffiffiffiffiffiffiffiffi pffiffiffiffiffiffiffiffi pffiffiffiffiffiffiffiffi + +  +  c ¼ max ðu + gh , u + gh , 0Þ, c ¼ min ðu  gh + , u  gh , 0Þ, at each cell boundary xj+1/2.

3.1.2 Finite Difference Methods For a finite difference scheme, we approximate the point values of the solution U(x) at mesh points xj by Uj. The spatial derivative f(u)x is then approximated by a conservative flux difference approximation  1 ^ (10) f ðUÞx x¼xj  f j + 1  f^j 1 , 2 2 Dx

Numerical Methods for the Nonlinear Shallow Water Equations Chapter

and the finite difference numerical scheme takes the form of  d 1 ^ Uj ðtÞ + f j + 1  f^j 1 ¼ 0: 2 2 dt Dxj

13 367

(11)

The numerical flux f^j + 1 is computed through the neighbouring point values 2

fj ¼ f(Uj) by a flux limiter, or a finite difference WENO procedure. For a (2k  1)-th order WENO scheme, we first compute k numerical fluxes ðrÞ f^i + 1 ¼ 2

k1 X

crj fir + j , r ¼ 0,…, k  1,

j¼0

corresponding to k different candidate stencils Sr(i) ¼ {xir, …, xir+k1}, r ¼ 0, …, k  1, and each of these k numerical fluxes is k-th order accurate. The (2k  1)-th order WENO flux is a convex combination of all these k numerical fluxes f^i + 1 ¼ 2

k1 X r¼0

ðrÞ wr f^i + 1 , 2

Pk1 where the nonlinear weights wr satisfy wr  0, r¼0 wr ¼ 1, and depend on the linear weights which yield (2k  1)-th order accuracy, and the smoothness indicators’ of the stencil Sr(i). An upwinding mechanism, essential for the stability of the scheme, can be realized by a global ‘flux splitting’. The simplest one is the Lax–Friedrichs splitting, f (u) ¼ ( f(u)  au)/2, where a is taken as 0 a ¼ max u jf ðuÞj. The WENO procedure is applied to f  individually with upwind biased stencils. For hyperbolic systems such as the SWEs, we use the local characteristic decomposition, which is more robust than a component by component version. We first project the values fj into the local characteristic direction, apply the WENO procedure on them to compute the flux, and then project them back to obtain the numerical fluxes in the physical space. We refer to Shu (1998) and Xing and Shu (2005) for further details.

3.1.3 Discontinuous Galerkin Methods Finite element discontinuous Galerkin (DG) methods have been actively applied to hyperbolic conservation laws, especially the SWEs recently (Dawson and Proft, 2002; Eskilsson and Sherwin, 2004; Giraldo et al., ongeter, 2000). We start by pre2002; Nair et al., 2005; Schwanenberg and K€ senting the standard notations. In a high order DG method, we seek an approximation, still denoted by U for the ease of presentation with an abuse of notation, which belongs to the finite dimensional space k  fw : wjIj 2 Pk ðIj Þ, j ¼ 1, …,Jg, VDx ¼ VDx

(12)

368 Handbook of Numerical Analysis

where Pk(I) denotes the space of polynomials of degree at most k and J is the total number of computational cells. Notice that the DG solution U can be discontinuous at the cell boundary xj + 1 . The standard semidiscrete DG method is 2 given by Z Z + @t Uvdx  f ðUÞ@x vdx + fbj + 1 vðx Þ  fbj 1 vðxj (13) 1 Þ ¼ 0, j+1 2 2 Ij

Ij

2

2

where v(x) is a test function from the test space VDx, fbj + 1=2 ¼ FðUðx j + 1=2 , tÞ, Uðxj++ 1=2 ,tÞÞ is a numerical flux. Another important ingredient of the DG method is that a slope limiter procedure should be performed after each inner stage in the Runge–Kutta time stepping. This is necessary for computing solutions with strong discontinuities. There are many choices for the slope limiters (see, e.g. Qiu and Shu, 2005). The total variation bounded (TVB) limiter in Shu (1987), Cockburn and Shu (1989) and Cockburn et al. (1989) is commonly used in many applications, and we refer to these references for the details of this limiter. Multidimensional problems can be handled in the same fashion. The main difference is that the fluxes are now integrals along the cell boundary, which can be calculated by Gauss-quadrature rules.

3.1.4 Residual Distribution Methods Residual distribution (RD) schemes, also referred as Fluctuation Splitting schemes, are introduced in Roe (1981), and the idea behind the method is to decompose the local numerical error (fluctuation) to nodes to evolve the approximation of the solution. They are first designed for the steady problem with an upwinding mechanics, and later generalized to approximate unsteady problem. High order version has also been studied. We refer to the recent review paper (Abgrall, 2010) for the history and development of RD methods. Application of RD methods for the SWEs has been studied in recent years. An earlier investigation can be found in Garcia-Navarro et al. (1995), where a first-order scheme for the unsteady system is presented. We refer to Ricchiuto et al. (2007) and Ricchiuto and Bollermann (2009) for some recent advances in this topic.

3.2 Well-Balanced Methods The nonhomogeneous SWEs with a source term due to the nonflat bottom topography, admit a nontrivial steady-state solution (4)–(5), which describes physical equilibrium such as a flowing river with a rugged bottom but flat surface (on a windless day). It is crucial to accurately simulate these physical equilibria in order to make dynamic, real-time predictions, as geophysical flows are typically perturbations of these underlying equilibrium states. In this section, we review some well-balanced methods which can preserve exactly

Numerical Methods for the Nonlinear Shallow Water Equations Chapter

13 369

these steady-state solutions in the discrete level. For the ease of presentation, we will confine our attention in the framework of DG methods, but the wellbalanced techniques can all be extended to finite volume or difference methods.

3.2.1 Well-Balanced Methods for the Still Water In the past two decades, many well-balanced numerical methods have been developed for the SWEs. The well-balanced property is often referred as “exact C-property”, which means that the scheme is “exact” when applied to the stationary case (5). The well-balanced concept was first proposed by Bermudez and Vazquez (1994), where they extended upwind methods to the SWEs with source terms. Following this pioneering work, many other schemes for the SWEs with such well-balanced property have been developed in the finite volume community. A quasi-steady wave propagation algorithm based upon modified Riemann problems is presented in LeVeque (1998), LeVeque and Bale (1998) and Bale et al. (2002). Another popular approach is to rewrite the equation in terms of the water surface instead of water height (also referred as the prebalanced formulation), and well-balanced methods (Kurganov and Levy, 2002; Rogers et al., 2003; Zhou et al., 2001) can be designed based on such formulation. Well-balanced methods can also be derived utilizing the idea of hydrostatic reconstruction initially proposed in Audusse et al. (2004). A kinetic approach to achieve well-balanced property has been shown in Perthame and Simeoni (2001). In the framework of RD, simulation for the SWEs with well-balanced properties is shown in Ricchiuto et al. (2007) and Ricchiuto and Bollermann (2009). For more related work, see also Galloue¨t et al. (2003), Delis and Katsaounis (2003), Gosse (2000), Greenberg and LeRoux (1996), Jin (2001), Liang and Marche (2009), Luka´cova´-Medviova´ et al. (2007), Russo (2005), Fjordholm et al. (2011), Xu (2002) and Xing and Shu (2014). Most of the works mentioned above are for numerical schemes of first or second-order accuracy. In recent years, high order accurate numerical schemes (with higher than second-order accuracy) have attracted increasing attention in many computational fields. Some finite difference/volume WENO schemes with well-balanced property have been designed for the SWEs recently. In Xing and Shu (2005) and Xing and Shu (2006a), a special decomposition of the source term was introduced which leads to high order finite difference and finite volume well-balanced WENO methods. The hydrostatic reconstruction idea is extended to high order methods in Xing and Shu (2006b) and Noelle et al. (2006) with a careful high order approximation of the source term. Path-conservative methods for the nonconservative product are introduced in Castro et al. (2006) and Pares (2006) and extended to the SWEs. Other high order finite volume methods include Caleffi et al. (2006), Caleffi and Valiani (2009) and Canestrelli et al.

370 Handbook of Numerical Analysis

(2009). High order DG methods for the SWEs have also attracted increasing attention recently. Several well-balanced DG methods have been proposed in the last few years, by the idea of special decomposition of the source term (Xing and Shu, 2006a), hydrostatic reconstruction (Ern et al., 2008; Kesserwani and Liang, 2010; Xing and Shu, 2006b) and path-conservative (Rhebergen et al., 2008). Here, we briefly review the well-balanced idea presented in Xing and Shu (2006a,b). In order to achieve the well-balanced property, we are interested in numerical methods which balance the numerical approximation of the flux and source term at the still water stationary solution (5). The key idea is to introduce high order accurate numerical discretization of the source term, which mimics the approximation of the flux term, so that the exact balance between the source term and the flux can be achieved at the steady state numerically. Here we present two different approaches to achieve such goal. The first approach focuses on a nonstandard discretization of the source term, by following the idea of decomposing the source terms (Xing and Shu, 2005, 2006a). The second approach employs the idea of hydrostatic reconstruction (Audusse et al., 2004) to modify the approximation of the numerical flux and keep a simple source term approximation. We notice that the traditional DG methods are capable of maintaining certain steady states exactly, if a small modification on the numerical flux is provided. The computational cost to obtain such a wellbalanced DG method is basically the same as the traditional DG method. The first well-balanced approach is to decompose the integral of the source term on the DG method as: Z Z    Z Z  1 2 gb  ghbx vdx ¼ vdx  gðh + bÞj bx vdx  g h + b  ðh + bÞj bx vdx Ij Ij 2 Ij Ij  x   Z 1 2    1 2  +  1 2 gb v xj + 1  gb v xj 1  gb vx dx ¼ 2 2 2 2 Ij 2 !     Z  + gðh + bÞj bv xj + 12  bv xj 12  bvx dx Ij Z  gðh + b  ðh + bÞ Þbx vdx: Ij

j

We then replace this source term with a high order approximation of it given by

   1  Z 1 1 2 + sj ¼ gb2j + 1 v x   v x gb gb2 vx dx 1 j + 12 j 12 2 2 2 j 2 Ij 2 ! n o   n o   Z  + (14) bj + 1 v xj + 1  bj 1 v xj 1  bvx dx  gðh + bÞj 2 2 2 2 Ij Z  gðh + b  ðh + bÞj Þbx vdx, Ij

Numerical Methods for the Nonlinear Shallow Water Equations Chapter

13 371

where the notation {f} is defined as the average of f. Combined with the semidiscrete form (13), this gives our well-balanced high order DG schemes. Usually, we perform the limiter on the function U after each Runge–Kutta stage. Note that the slope limiter procedure could destroy the preservation of still water steady state, since if the limiter is enacted, the resulting modified solution h may no longer satisfy h + b ¼ constant. We therefore propose to first check whether any limiting is needed based on the function h + b in each Runge–Kutta stage. If a certain cell is flagged by this procedure needing limiting, then the actual limiter is implemented on h, not on h + b, so that the slope limiter will not conflict with the well-balanced property. The well-balanced property for the still water (5) can be easily proved, and we refer to Xing and Shu (2006a) for the details. A different approach to achieve well-balanced property is to utilize the hydrostatic reconstruction idea in the numerical flux. As mentioned in Xing and Shu (2006b), our well-balanced numerical scheme has the form: Z

Z @t Uvdx  Ij

Ij

    Z l r + b f ðUÞ@x vdx + fbj + 1 v x v x  f ¼ sðh,bÞvdx: (15) j 12 j+1 j 1 2 2

The left and right fluxes

l fbj + 1=2

and

r fbj1=2

0

  l B ,  , + b f j + 1 ¼ F Uj + 1 , Uj + 1 + @ g 

2

are given by: 0

Ij

1

  C g ,  2 A,  hj + 1 2 2 2 1 0 0   r B 2 C, ,  , + 2 g  + @g fbj 1 ¼ F Uj A 1 , Uj 1 , + + 2 2 2 h 1  hj 1 2 j 2 2 2 2

2

2

h j + 12

2

(16)

with the left and right values of U* defined as: 0 U, 1 ¼ @ j+

2

1

 h, j+1 2

  h, u j+1 j+1 2

   A, h, 1 ¼ max 0, h 1 + b 1  max b + 1 , b 1 : j+ j+ j+ j+ j+ 2

2

2

2

2

2

(17) We also require that all the integrals in formula (15) should be calculated exactly at the still water state. This can be easily achieved by using suitable Gauss-quadrature rules since the numerical solutions h, b and v are polynomials at the still water state in each cell Ij, hence f(U) and s(h, b) are both polynomials. We have proven in Xing and Shu (2006b) that the above methods (15), combined with the choice of fluxes (16), are actually well-balanced for the still water steady state of the SWEs.

372 Handbook of Numerical Analysis

3.2.2 Well-Balanced Methods for the Moving Water The well-balanced methods mentioned above target to preserve the still water steady state (5). They cannot preserve the moving water steady state (4), and it is significantly more difficult to obtain well-balanced schemes for such equilibrium. In a recent paper (Xing et al., 2011), several numerical examples are shown to demonstrate the advantage of moving-water well-balanced schemes over still-water well-balanced schemes for the SWEs. Those numerical examples clearly demonstrate the importance of utilizing moving-water well-balanced methods for solutions near a moving-water equilibrium. There have been a few attempts in developing well-balanced methods for the moving water equilibrium. A class of first-order accurate flux-vector-splitting schemes based on the theory of nonconservative products was proposed in Gosse (2000). Well-balanced second-order central schemes on staggered grids can be found in Russo (2005). Numerical methods based on local subsonic steady-state reconstruction, which are exactly well-balanced for subsonic moving equilibria, were shown in Bouchut and Morales (2010). A few high order accurate well-balanced methods for the moving water equilibrium have been introduced recently. In Noelle et al. (2007), well-balanced finite volume WENO methods are designed for arbitrary equilibria of the SWEs. The key component there is a special way to recover the moving water equilibrium and a well-balanced quadrature rule of the source term. Other high order wellbalanced methods for the moving water equilibrium include the central WENO methods (Russo and Khe, 2009), path-conservative WENO methods (Castro et al., 2013) and DG methods (Xing, 2014). In this section, we present high order finite element DG methods for the SWEs (1), with the objective to maintain the general moving steady state (4). The main structure of well-balanced methods for moving water equilibrium (4) follows the one (15) for still water. As explained in Xing (2014), we could define the transformation between the conservative variables U :¼ (h, m)T and the equilibrium variables V :¼ (m, E)T, as well as the recovery of well-balanced  j , Ej Þ. The reference equilibrium values V j lead to the reference states V j ¼ ðm equilibrium functions UðV j ,bðxÞÞ. Since they may not be polynomials, we consider their projection into the finite element space VDx and denote it by Uje ðxÞ ¼ ðhej ðxÞ, mej ðxÞÞ ¼ P UðV j , bðxÞÞ,

(18)

in each cell Ij, where P denotes the L2 projection operator. Therefore, the numerical solutions U, which are piecewise polynomials, can be decomposed as U ¼ Ue + Ur ,

(19)

where U ¼ U  U 2 VDx. The source term approximation now becomes Z Z Z sðh, bÞvdx ¼ sðhe ,bÞvdx + sðhr ,bÞvdx, (20) r

e

Ij

Ij

Ij

Numerical Methods for the Nonlinear Shallow Water Equations Chapter

13 373

since s(h, b) ¼ ghbx is linear with respect to h. Given the fact that  j ÞT is the equilibrium state, we have the relationship UðV j , bÞ ¼ ðhðV j, bÞ, m Z Z sðhðV j , bÞ, bÞvdx ¼  f ðUðV j , bÞÞvx dx Ij

Ij

       + + + f U V j , b  f U V , b v vj j 1 1 1 1: j+ j+ j 2

e

2

2

2

2

Since U is the L projection of UðV j , bÞ, we conclude that Z Z sðhe ,bÞvdx + OðDxk + 1 Þ ¼  f ðU e Þvx dx Ij

Ij

    e, + + vj + f Uje,+1 v  f U 1, j+1 j 1 2

2

2

(21)

2

and can approximate the source term integral (20) by   Z Z e,  e sðh, bÞvdx   f ðU Þvx dx + f Uj + 1 v j+1 Ij

2

Ij

2

  Z e, + + v f Uj + sðhr , bÞvdx: 1 j 1

(22)

2

2

Since Ue is always smooth inside a cell, the relation (21) is always true regardless of the smoothness of the solution U. Therefore, numerical methods with this source term approximation (22) will satisfy the Lax–Wendroff theorem and converge to the weak solution. The well-balanced numerical fluxes are computed by a generalized hydrostatic reconstruction. At each time step tn, one can compute the cell boundary values Uj+ 1=2 from the solution U(x). But in the case of moving water equilibrium, suppose U(x) are computed from the exact solution, these cell boundary values Uj+ 1=2 are not equal to the exact solution value at the same point, as U(x) is the projection of the exact solution into the polynomial space and this projection does not preserve the equilibrium state. To overcome this problem, we redefine an updated boundary value as:    + Ujr,+1 , U~j + 1 ¼ U V j , b (23) 1 j+ 2

2

2

 where U is defined in (19). One can easily verify that U~j + 1=2 ¼ UðV j , b j + 1=2 Þ in the case of moving water equilibrium. We follow the idea of hydrostatic reconstruction to compute the numerical fluxes and define      (24) V j + 1 ¼ V U~j + 1 , bj + 1 : r

2

2

2

The cell boundary values (used to evaluate the numerical fluxes) are then defined by:

374 Handbook of Numerical Analysis

Uj,+1 ¼ 2

 

¼

   T   max 0, h V j + 1 , bj + 1 ; mj + 1 2



2

2

2

2

  T    max 0, h V j + 1 , bj + 1 ; mj + 1 , 2

(25)



as one can easily observe that m j + 1=2 ¼ m j + 1=2 . At the end, the left and right l r fluxes fbj + 1=2 , fbj1=2 are given by:       l ,  , + ,   b f j + 1 ¼ F Uj + 1 , Uj + 1 + f Uj + 1  f Uj + 1 , 2 2 2 2 2       r ,  , + , + + b f j 1 ¼ F Uj 1 , Uj 1 + f Uj 1  f Uj 1 : 2

2

2

2

(26)

2

This completes the well-balanced DG methods for the moving water (4), and we have proven their well-balanced property in Xing (2014).

3.3 Positivity-Preserving Methods The other difficulty in simulating the SWEs is associated with the robustness of the numerical methods near the wet/dry front. This problem relates to the fact that there is no water in these areas, while the SWEs (1) are only defined in wet regions. Therefore, we may need to deal with moving boundary problems. One could use the mesh adaption technique (Bokhove, 2005) which tracks the dry front by changing the meshes. It has the advantage in accuracy but is computationally expensive. A more popular approach is the thin-layer technique, which maintains a very thin layer in dry elements and includes these dry elements in the computation. The difficulty then reduces to the issue of preserving the nonnegativity of water height for the SWEs during the computation. Another related problem is the computation of velocity given height and discharge in the nearly dry region. One usually introduces a threshold on the velocity (or on the water height) to avoid extremely large velocity when h ≪ 1. There have been a number of positivity-preserving schemes (Audusse et al., 2004; Berthon and Marche, 2008; Bryson et al., 2011; Castro et al., 2007; Gallardo et al., 2007; Kurganov and Petrova, 2007; Liang and Marche, 2009) in the finite volume framework. They usually rely on the positivity-preserving Riemann solver, for example the HLL solver (Harten et al., 1983). Some positivity-preserving DG methods with P1 polynomial spaces (Bunya et al., 2009; Ern et al., 2008; Kesserwani and Liang, 2012) have been developed in the past few years, mainly relying on modifying the slope to avoid negative values of water height. For both finite volume and DG methods, the issue of positivitypreserving property for high order methods is nontrivial. Most existing high order wetting and drying treatments are focused on postprocessing

Numerical Methods for the Nonlinear Shallow Water Equations Chapter

13 375

reconstruction of the data obtained from the numerical solution at each time level. One example is to project the solution to a nonnegative linear element in the cell near the wet/dry front. Even though the postprocessing can bring the reconstruction to satisfy nonnegative water height, this alone usually does not guarantee that the solution (e.g. cell average from a finite volume or DG scheme) at the next time step still maintains the nonnegative water height property. If negative cell averages for the water height are obtained at the next time level, the positivity reconstruction postprocessing will destroy the conservation. Recently, following the general approach introduced in Zhang and Shu (2010), a sufficient condition on the time step size to ensure the positivity of cell averages of water height, plus a simple high order positivity-preserving limiter, has been studied in Xing and Shu (2011) for the finite volume methods, and in Xing et al. (2010), Xing and Zhang (2013) and Wen et al. (2016) for the DG methods in one dimension and two dimensions on unstructured meshes. In this section, we review the positivity-preserving limiter studied in Xing et al. (2010), Xing and Shu (2011) and Xing and Zhang (2013) for the SWEs (1) with dry areas. In the previous section, we discussed several different approaches to design well-balanced methods, which focus on the approximation of the momentum equation that has nonzero source term. The positivitypreserving property mainly relies on the numerical approximation to the mass equation, therefore, the positivity-preserving limiter discussed in this section can be applied to all these well-balanced methods. We only consider the Euler forward in time in this subsection. The same results can be generalized to TVD high order Runge–Kutta and multistep time discretizations, since TVD time discretizations are convex combinations of the Euler forward operators. By plugging (17) and (16) into (13), the scheme satisfied by the cell averages of the water height in the well-balanced finite volume WENO or DG methods can be written as      ,  , + ,  , + + + n n+1 b b h ¼ h j  l F hj + 1 , uj + 1 ; hj + 1 , uj + 1  F hj 1 , uj 1 ; hj 1 , uj 1 , (27) j

2

2

2

2

2

2

2

2

 where l ¼ Dx/Dt, h, j + 1=2 are defined in (17) and      1 ,     , + , + + , + , + h Fb h, , u ; h , u u + h u  a h  h ¼ : 1 1 1 1 j + 12 j + 2 j + 12 j + 2 j + 12 j + 12 2 j + 12 j + 2 j + 12 j + 2

(28)

We now consider the (2k  1)-th order WENO scheme (27). For the ease of presentation, we consider a reconstructed polynomial pj(x) of degree 2k  2, which satisfies Z n 1 +  , p ðx Þ ¼ h , pj ðxÞdx ¼ h j : pj ðxj 1 Þ ¼ hj 1 (29) j 1 1 j+2 j + 2 Dx Ij 2 2

376 Handbook of Numerical Analysis

Moreover, pj(x) should be a (2k  1)-th order accurate approximation to the exact solution on Ij. For the WENO method, this polynomial only serves the theoretical purpose to understand the derivation of the limiter and will not need to be explicitly constructed in the implementation. For the DG method, this polynomial pj(x) is simply the DG solution hj(x). Let us introduce the N-point Legendre Gauss–Lobatto quadrature rule on the interval Ij ¼ [xj1/2, xj+1/2], which is exact for the integral of polynomials of degree up to 2N  3. We choose N such that 2N  3  2k  2, therefore this N-point Gauss–Lobatto quadrature is exact for polynomial of degree 2k  2. We denote these quadrature points on Ij as n o Sj ¼ xj 1 ¼ xbj1 , xbj2 , …, xbjN1 , xbjN ¼ xj + 1 : 2

2

b r be the quadrature weights for the interval [1/2, 1/2] such that Let PN w b r ¼ 1. Since pj(x) is polynomial of degree 2k  2 and this quadrature r¼1 w is exact, we have n hj

¼

1 Dx

Z pj ðxÞdx ¼

N X

Ij

b r pj ðb w x jr Þ ¼

r¼1

N 1 X

+ b r pj ðb b 1 hj b N h w x jr Þ + w : 1+w j+1 2

r¼2

(30)

2

If we introduce the variable 1 xj ¼ XN1 r¼2

n +  N 1 X h j  w^1 hj 12  w^N hj + 12 w^r pj ð^ x jr Þ ¼ , 1  w^1  w^N w^r t¼2

(31)

we have n + b 1 hj b N h : 1+w h j ¼ ð1  w^1  w^N Þxj + w j + 12 2

(32)

Following the approaches in Perthame and Shu (1996), Zhang and Shu (2010), Xing et al. (2010) and Xing and Shu (2011), we can conclude that: n+1

 If h j1=2 , hj + 1=2 and xj are all nonnegative, then h j under the CFL condition

b1: la w

is also nonnegative (33)

This result tells us that for the scheme (27), we need to modify pj(x) (satisfying (29)) such that pj(xj1/2) and xj are all nonnegative. At time level n, n given h j  0, we consider the following limiter on the piecewise polynomial pj(x) introduced in Zhang and Shu (2010). It is a linear scaling around the cell average: ( ) n   hj n n  , (34) p j ðxÞ ¼ y pj ðxÞ  h j + h j , y ¼ min 1, n h j  mj

Numerical Methods for the Nonlinear Shallow Water Equations Chapter

13 377

with   +  mj ¼ min hj 1 , h j + 1 , xj : 2

(35)

2

It is easy to observe that these conditions are satisfied with this limiter. Moreover, it can also be shown that this limiter does not destroy the high order accuracy, and we refer to Zhang and Shu (2010) and Xing and Shu (2011) 







+ ¼ p j ðxj1=2 Þ, h  for the detailed proof. Let h j1=2 j + 1=2 ¼ p j ðxj + 1=2 Þ, and define 



, h ,+ j1=2 , h j + 1=2 following (17). Then, the revised positivity-preserving version of the scheme (27) takes the form

n n+1 hj ¼ hj  l

       ,+ ,  ,+  +  + b  F h : Fb h , , u ; h , u , u ; h , u j+1 j+1 j+1 j+1 j 1 j 1 j 1 j 1 2

2

2

2

2

2

2

2

(36) The limiter (34) and (35) is a high order accurate positivity-preserving limiter, and preserves the conservation of pj(x). We would like to mention that in wet regions, where mj is Oð1Þ above  zero, the limiter does not take effect, i.e. p j ðxÞ ¼ pj ðxÞ. Therefore, this positivity-preserving limiter is active only in the dry or nearly dry region. For high order time discretizations, we need to apply the limiter in each stage for a Runge–Kutta method or in each step for a multistep method. To be efficient, we could implement the time step restriction (33) only when a preliminary calculation to the next time step produces negative water height. This limiter has also been extended to two-dimensional SWEs on unstructured triangular meshes (Xing and Zhang, 2013).

4

SHALLOW WATER-RELATED MODELS

In the engineering and environmental applications, there are many physical models that are related to the SWEs, but obtained in slightly different context or assumptions. In this section, we will briefly discuss some numerical methods to solve these shallow water-related models.

4.1 Shallow Water Flows Through Channels With Irregular Geometry As simplified models of some free surface flows, the shallow water equations for flows in an open channel with variable cross-section take the form of Ht + Qx ¼ 0  2  Q + I1 ¼ I2  gsb hbx , Qt + H x

(37)

378 Handbook of Numerical Analysis

where s0(x, z) is the breadth of the channel, sb(x) ¼ s0(x, b(x)) is the bottom Rh+b channel width, H ¼ b s0 ðx, zÞdz is the cross-sectional wet area, and Q ¼ Hu Rh+b is the mass flow rate. I1 is given by I1 ¼ g h ðh + b  zÞs0 ðx,zÞdz which equals to the cross-sectional average of the hydrostatic pressure multiplied Rh+b by H, and I2 ¼ g h ðh + b  zÞs0x ðx,zÞdz. In the simplified case when the channel has rectangular cross-section, i.e. s0(x, z)  s(x), the hydrostatic pressure can be written as a function of variables and the model becomes a system of standard conservation laws. We have sb(x) ¼ s(x), H ¼ sh, I1 ¼ gsh2/2, I2 ¼ gsxh2/2, and the model (37) can be reduced to Ht + Qx ¼ 0  2  Q 1 1 2 + gsh ¼ gh2 sx  gshbx : Qt + H 2 2 x

(38)

pffiffiffiffiffi The system is hyperbolic and has two eigenvalues given by u  gh. Note that when the channel width s is a constant and independent of x, the model (38) becomes the SWEs with a nonflat bottom topography. Like the SWEs, the shallow water model (38) in rectangular channel admits the general moving water and the still water steady-state solutions. Well-balanced methods for the shallow water model in rectangular channel have been designed in Vazquez-Cendon (1999), Garcia-Navarro and Vazquez-Cendon (2000), Balbas and Karni (2009), Herna´ndez-Duenas and Karni (2011), Murillo and Garcı´a-Navarro (2014) and Xing (2016), and an extension of the positivity-preserving limiter in Section 3.3 to this model has been studied in Xing (2016).

4.2 Shallow Water Equations on the Sphere The SWEs on a rotating sphere have been known as a common test bed for numerical methods used in modelling global atmospheric flows. They describe the behaviour of a shallow homogeneous incompressible and inviscid fluid layer, and present the major difficulties found in the horizontal aspects of three-dimensional global atmospheric modelling. The SWEs on the sphere can be written in the flux form of ht + r ðhuÞ ¼ 0, ^ hu  ghrb, ðhuÞt + r ðhu uÞ + ghrh ¼ f k

(39)

in the latitude–longitude coordinate, where the horizontal (on the sphere) vector velocity u has the longitudinal (l) component u and the latitudinal (y) component v. The operators r and r are the spherical horizontal gradient and divergence operators given by

Numerical Methods for the Nonlinear Shallow Water Equations Chapter

rð Þ ¼

13 379

  ^i ^j @ @ 1 @u @ðvcos yÞ ð Þ+ ð Þ, r u ¼ + : a cos y @l a @y acos y @l @y

^ The longitudinal, latitudinal and outwards radial unit vectors are ^i, ^j and k, respectively, and a is the radius of the earth. The intrinsic curvature properties of the spherical computational domain lead to new numerical difficulties for the choice of the computational mesh. Many successes have been observed using the traditional latitude–longitude mesh (Williamson et al., 1992). To remove its disadvantage of pole-singularity, other choices of meshes have been proposed and studied, including the Yin–Yang mesh, cubed-sphere mesh, among others. Well-balanced and positivity-preserving methods under these meshes, including spectral element, finite volume, continuous low order finite elements and DG methods, have also been investigated, and we refer to Taylor et al. (1997), Giraldo et al. (2002), Nair et al. (2005), Verkley (2009), Ullrich et al. (2010) and Duben et al. (2012) for recent development on numerical methods for the SWEs on the sphere.

4.3

Two-Layer Shallow Water Equations

One primary source of error in storm surge modelling is due to the fact that the vertical structure is not taken into account by the single-layer depth averaged SWEs. The multilayer SWEs have obtained increasing attention as a model for primarily long wave phenomena where vertical structure plays an important role in the flow. The two-layer SWEs are used to describe incompressible flows in the shallow water regime, in the situation where two layers with different densities can be identified. They appear in oceanographic models when a warm, light upper layer flows over a lower layer of cooler, heavier water with larger salinity. In one dimension, they take the form of ðh1 Þt + ðh1 u1 Þx ¼ 0,   1 ðh1 u1 Þt + h1 u21 + gh21 ¼ gh1 bx  gh1 ðh2 Þx , 2 x ðh2 Þt + ðh2 u2 Þx ¼ 0,   1 ðh2 u2 Þt + h2 u22 + gh22 ¼ gh2 bx  rgh2 ðh1 Þx , 2 x

(40)

where h1, u1 denote the water height and velocity in upper layer, and h2, u2 denote the water height and velocity in lower layer. r ¼ r1/r2 is the ratio of the layer densities. Solving the two-layer SWEs is a challenging problem due to several reasons: they are only conditionally hyperbolic; they contain nonconservative product terms; they admit steady state to be exactly preserved; their water heights should stay nonnegative, and their eigenstructure cannot be obtained

380 Handbook of Numerical Analysis

in explicit form. Despite these difficulties, some numerical methods were developed recently from different approaches to overcome some of these difficulties. We refer to Kurganov and Petrova (2009), Abgrall and Karni (2009), Bouchut and de Luna (2008), Bouchut and Zeitlin (2010), Mandli (2013) and references therein for the details.

5 CONCLUSION REMARKS In this chapter, we provide an overview of some numerical schemes, including finite difference, finite volume schemes and finite element DG methods for the SWEs. We have discussed two commonly encountered difficulties in simulating SWEs numerically and presented well-balanced methods and positivity-preserving methods to overcome these challenges. A list of shallow water-related models, as well as some numerical methods for them, has also been shown at the end. The numerical methods reviewed in this chapter can be very useful to model, simulate and help us understand the scientific and engineering applications related to the shallow water flows.

ACKNOWLEDGEMENTS Research of Y.X. is sponsored by NSF grants DMS-1216454, DMS-1621111 and ONR grant N00014-16-1-2714.

REFERENCES Abgrall, R., 2010. A review of residual distribution schemes for hyperbolic and parabolic problems: the July 2010 state of the art. Commun. Comput. Phys. 11, 1043–1080. Abgrall, R., Karni, S., 2009. Two-layer shallow water system: a relaxation approach. SIAM J. Sci. Comput. 31, 1603–1627. Audusse, E., Bouchut, F., Bristeau, M.-O., Klein, R., Perthame, B., 2004. A fast and stable wellbalanced scheme with hydrostatic reconstruction for shallow water flows. SIAM J. Sci. Comput. 25, 2050–2065. Balbas, J., Karni, S., 2009. A central scheme for shallow water flows along channels with irregular geometry. ESAIM: Math. Model. Num. 43, 333–351. Bale, D.S., LeVeque, R.J., Mitran, S., Rossmanith, J.A., 2002. A wave propagation method for conservation laws and balance laws with spatially varying flux functions. SIAM J. Sci. Comput. 24, 955–978. Bermudez, A., Vazquez, M.E., 1994. Upwind methods for hyperbolic conservation laws with source terms. Comput. Fluids 23, 1049–1071. Bernetti, R., Titarev, V., Toro, E., 2008. Exact solution of the Riemann problem for the shallow water equations with discontinuous bottom geometry. J. Comput. Phys. 227, 3212–3243. Berthon, C., Marche, F., 2008. A positive preserving high order VFRoe scheme for shallow water equations: a class of relaxation schemes. SIAM J. Sci. Comput. 30, 2587–2612. Bokhove, O., 2005. Flooding and drying in discontinuous Galerkin finite-element discretizations of shallow-water equations. Part 1: one dimension. J. Sci. Comput. 22, 47–82.

Numerical Methods for the Nonlinear Shallow Water Equations Chapter

13 381

Bouchut, F., de Luna, T.M., 2008. An entropy satisfying scheme for two-layer shallow water equations with uncoupled treatment. ESAIM: Math. Model. Numer. 42, 683–698. Bouchut, F., Morales, T., 2010. A subsonic-well-balanced reconstruction scheme for shallow water flows. SIAM J. Numer. Anal. 48, 1733–1758. Bouchut, F., Zeitlin, V., 2010. A robust well-balanced scheme for multi-layer shallow water equations. Discrete Continuous Dyn. Syst. Ser. B 13, 739–758. Bryson, S., Epshteyn, Y., Kurganov, A., Petrova, G., 2011. Well-balanced positivity preserving central-upwind scheme on triangular grids for the Saint-Venant system. ESAIM: Math. Model. Numer. 45, 423–446. Bunya, S., Kubatko, E.J., Westerink, J.J., Dawson, C., 2009. A wetting and drying treatment for the Runge-Kutta discontinuous Galerkin solution to the shallow water equations. Comput. Methods Appl. Mech. Eng. 198, 1548–1562. Caleffi, V., Valiani, A., 2009. Well-balanced bottom discontinuities treatment for high-order shallow water equations WENO scheme. J. Eng. Mech. 135, 684–696. Caleffi, V., Valiani, A., Bernini, A., 2006. Fourth-order balanced source term treatment in central WENO schemes for shallow water equations. J. Comput. Phys. 218, 228–245. Canestrelli, A., Siviglia, A., Dumbser, M., Toro, E.F., 2009. Well-balanced high-order centred schemes for non-conservative hyperbolic systems. Applications to shallow water equations with fixed and mobile bed. Adv. Water Resour. 32, 834–844. Castro, M.J., Gallardo, J.M., Pares, C., 2006. High order finite volume schemes based on reconstruction of states for solving hyperbolic systems with nonconservative products. Applications to shallow-water systems. Math. Comput. 75, 1103–1134. Castro, M.J., Milanes, A.P., Pares, C., 2007. Well-balanced numerical schemes based on a generalized hydrostatic reconstruction technique. Math. Mod. Meth. Appl. S. 17, 2055–2113. Castro, M.J., Lo´pez-Garcı´a, J.A., Par´es, C., 2013. High order exactly well-balanced numerical methods for shallow water systems. J. Comput. Phys. 246, 242–264. Cockburn, B., Shu, C.-W., 1989. TVB Runge-Kutta local projection discontinuous Galerkin finite element method for conservation laws II: general framework. Math. Comput. 52, 411–435. Cockburn, B., Lin, S.-Y., Shu, C.-W., 1989. TVB Runge-Kutta local projection discontinuous Galerkin finite element method for conservation laws III: one dimensional systems. J. Comput. Phys. 84, 90–113. Crnjaric-Zic, N., Vukovic, S., Sopta, L., 2004. Balanced finite volume WENO and central WENO schemes for the shallow water and the open-channel flow equations. J. Comput. Phys. 200, 512–548. Dawson, C., Proft, J., 2002. Discontinuous and coupled continuous/discontinuous Galerkin methods for the shallow water equations. Comput. Methods Appl. Mech. Eng. 191, 4721–4746. Delis, A., Katsaounis, N., 2003. Relaxation schemes for the shallow water equations. Int. J. Numer. Methods Fluids 41, 695–719. Duben, P., Korn, P., Aizinger, V., 2012. A discontinuous/continuous low order finite element shallow water model on the sphere. J. Comput. Phys. 231, 2396–2413. Ern, A., Piperno, S., Djadel, K., 2008. A well-balanced Runge-Kutta discontinuous Galerkin method for the shallow-water equations with flooding and drying. Int. J. Numer. Methods Fluids 58, 1–25. Eskilsson, C., Sherwin, S.J., 2004. A triangular spectral/hp discontinuous Galerkin method for modelling 2D shallow water equations. Int. J. Numer. Methods Fluids 45, 605–623. Fjordholm, U., Mishra, S., Tadmor, E., 2011. Well-balanced and energy stable schemes for the shallow water equations with discontinuous topography. J. Comput. Phys. 230, 5587–5609.

382 Handbook of Numerical Analysis Gallardo, J.M., Pares, C., Castro, M., 2007. On a well-balanced high-order finite volume scheme for shallow water equations with topography and dry areas. J. Comput. Phys. 227, 574–601. Galloue¨t, T., Herard, J.-M., Seguin, N., 2003. Some approximate Godunov schemes to compute shallow-water equations with topography. Comput. Fluids 32, 479–513. Garcia-Navarro, P., Vazquez-Cendon, M., 2000. On numerical treatment of the source terms in the shallow water equations. Comput. Fluids 29, 951–979. Garcia-Navarro, P., Hubbard, M., Priestley, A., 1995. Genuinely multidimensional upwinding for the 2D shallow water equations. J. Comput. Phys. 121, 79–93. Giraldo, F.X., Hesthaven, J.S., Warburton, T., 2002. Nodal high-order discontinuous Galerkin methods for the spherical shallow water equations. J. Comput. Phys. 181, 499–525. Gosse, L., 2000. A well-balanced flux-vector splitting scheme designed for hyperbolic systems of conservation laws with source terms. Comput. Math. Appl. 39, 135–159. Greenberg, J.M., LeRoux, A.Y., 1996. A well-balanced scheme for the numerical processing of source terms in hyperbolic equations. SIAM J. Numer. Anal. 33, 1–16. Harten, A., Lax, P.D., Leer, B.V., 1983. On upstream differencing and Godunov-type schemes for hyperbolic conservation laws. SIAM Rev. 25, 35–61. Herna´ndez-Duenas, G., Karni, S., 2011. Shallow water flows in channels. J. Sci. Comput. 48, 190–208. Jin, S., 2001. A steady-state capturing method for hyperbolic systems with geometrical source terms. Math. Model. Numer (M2AN) 35, 631–645. Kesserwani, G., Liang, Q., 2010. Well-balanced RKDG2 solutions to the shallow water equations over irregular domains with wetting and drying. Comput. Fluids 39, 2040–2050. Kesserwani, G., Liang, Q., 2012. Locally limited and fully conserved RKDG2 shallow water solutions with wetting and drying. J. Sci. Comput. 50, 120–144. Kurganov, A., Levy, D., 2002. Central-upwind schemes for the Saint-Venant system. Math. Model. Numer. 36, 397–425. Kurganov, A., Petrova, G., 2007. A second-order well-balanced positivity preserving centralupwind scheme for the Saint-Venant system. Commun. Math. Sci. 5, 133–160. Kurganov, A., Petrova, G., 2009. Central-upwind schemes for two-layer shallow water equations. SIAM J. Sci. Comput. 31, 1742–1773. LeFloch, P., Thanh, M., 2007. The Riemann problem for the shallow water equations with discontinuous topography. Commun. Math. Sci. 5, 865–885. LeVeque, R.J., 1998. Balancing source terms and flux gradients on high-resolution Godunov methods: the quasi-steady wave-propagation algorithm. J. Comput. Phys. 146, 346–365. LeVeque, R., 2002. Finite Volume Methods for Hyperbolic Problems. In: Cambridge Texts in Applied Mathematics. Cambridge University Press, Cambridge. LeVeque, R.J., Bale, D.S., 1998. Wave propagation methods for conservation laws with source terms. In: Proceedings of the 7th International Conference on Hyperbolic Problems, pp. 609–618. Liang, Q., Marche, F., 2009. Numerical resolution of well-balanced shallow water equations with complex source terms. Adv. Water Resour. 32, 873–884. Luka´cova´-Medviova´, M., Noelle, S., Kraft, M., 2007. Well-balanced finite volume evolution Galerkin methods for the shallow water equations. J. Comput. Phys. 221, 122–147. Mandli, K.T., 2013. A numerical method for the two layer shallow water equations with dry states. Ocean Model. 72, 80–91. Murillo, J., Garcı´a-Navarro, P., 2014. Accurate numerical modeling of 1D flow in channels with arbitrary shape. Application of the energy balanced property. J. Comput. Phys. 260, 222–248.

Numerical Methods for the Nonlinear Shallow Water Equations Chapter

13 383

Nair, R.D., Thomas, S.J., Loft, R.D., 2005. A discontinuous Galerkin global shallow water model. Mon. Weather. Rev. 133, 876–888. Noelle, S., Pankratz, N., Puppo, G., Natvig, J., 2006. Well-balanced finite volume schemes of arbitrary order of accuracy for shallow water flows. J. Comput. Phys. 213, 474–499. Noelle, S., Xing, Y., Shu, C.-W., 2007. High-order well-balanced finite volume WENO schemes for shallow water equation with moving water. J. Comput. Phys. 226, 29–58. Pares, C., 2006. Numerical methods for nonconservative hyperbolic systems. A theoretical framework. SIAM J. Numer. Anal. 44, 300–321. Perthame, B., Shu, C.-W., 1996. On positivity preserving finite volume schemes for Euler equations. Numer. Math. 273, 119–130. Perthame, B., Simeoni, C., 2001. A kinetic scheme for the Saint-Venant system with a source term. Calcolo 38, 201–231. Qiu, J., Shu, C.-W., 2005. Runge-Kutta discontinuous Galerkin method using WENO limiters. SIAM J. Sci. Comput. 26, 907–929. Rhebergen, S., Bokhove, O., van der Vegt, J., 2008. Discontinuous Galerkin finite element methods for hyperbolic nonconservative partial differential equations. J. Comput. Phys. 227, 1887–1922. Ricchiuto, M., Bollermann, A., 2009. Stabilized residual distribution for shallow water simulations. J. Comput. Phys. 228, 1071–1115. Ricchiuto, M., Abgrall, R., Deconinck, H., 2007. Application of conservative residual distribution schemes to the solution of the shallow water equations on unstructured meshes. J. Comput. Phys. 222, 287–331. Roe, P.L., 1981. Approximate Riemann solvers, parameter vectors, and difference schemes. J. Comput. Phys. 43, 357–372. Rogers, B., Borthwick, A., Taylor, P., 2003. Mathematical balancing of flux gradient and source terms prior to using Roe Os approximate Riemann solver. J. Comput. Phys. 192, 422–451. Russo, G., 2005. Central schemes for conservation laws with application to shallow water equations. In: Rionero, S., Romano, R. (Eds.), Trends and Applications of Mathematics to Mechanics: STAMM 2002. Springer-Verlag Italia SRL, Milano, pp. 225–246. Russo, G., Khe, A., 2009. High order well balanced schemes for systems of balance laws. In: Proceedings of Symposia in Applied Mathematics. Hyperbolic Problems: Theory, Numerics and Applications, vol. 67. American Mathematics Society, Providence, RI, pp. 919–928. Schwanenberg, D., K€ongeter, J., 2000. A discontinuous Galerkin method for the shallow water equations with source terms. In: Cockburn, B., Karniadakis, G., Shu, C.-W. (Eds.), Discontinuous Galerkin Methods: Theory, Computation and Applications. Lecture Notes in Computational Science and Engineering. Part I: Overview, vol. 11. Springer, Berlin, Heidelberg, pp. 289–309. Shu, C.-W., 1987. TVB uniformly high-order schemes for conservation laws. Math. Comput. 49, 105–121. Shu, C.-W., 1998. Essentially non-oscillatory and weighted essentially non-oscillatory schemes for hyperbolic conservation laws. In: Quarteroni, A. (Ed.), Advanced Numerical Approximation of Nonlinear Hyperbolic Equations. Lecture Notes in Mathematics, vol. 1697. Springer, Berlin, Heidelberg, pp. 325–432. Shu, C.-W., Osher, S., 1988. Efficient implementation of essentially non-oscillatory shockcapturing schemes. J. Comput. Phys. 77, 439–471. Taylor, M., Tribbia, J., Iskandrani, M., 1997. The spectral element method for the shallow water equations on the sphere. J. Comput. Phys. 130, 92–108.

384 Handbook of Numerical Analysis Ullrich, P., Jablonowski, C., Leer, B.V., 2010. High-order finite-volume methods for the shallowwater equations on the sphere. J. Comput. Phys. 229, 6104–6134. Vazquez-Cendon, M.E., 1999. Improved treatment of source terms in upwind schemes for the shallow water equations in channels with irregular geometry. J. Comput. Phys. 148, 497–526. Verkley, W., 2009. A balanced approximation of the one-layer shallow-water equations on a sphere. J. Atmos. Sci. 66, 1735–1748. Wen, X., Gao, Z., Don, W., Xing, Y., Li, P., 2016. Application of positivity-preserving wellbalanced discontinuous Galerkin method in computational hydrology. Comput. Fluids 139, 112–119. Williamson, D.L., Drake, J.B., Hack, J.J., Jakob, R., Swarztrauber, P.N., 1992. A standard test set for numerical approximations to the shallow water equations in spherical geometry. J. Comput. Phys. 102, 211–224. Xing, Y., 2014. Exactly well-balanced discontinuous Galerkin methods for the shallow water equations with moving water equilibrium. J. Comput. Phys. 257, 536–553. Xing, Y., 2016. High order finite volume WENO schemes for the shallow water flows through channels with irregular geometry. J. Comput. Appl. Math. 299, 229–244. Xing, Y., Shu, C.-W., 2005. High order finite difference WENO schemes with the exact conservation property for the shallow water equations. J. Comput. Phys. 208, 206–227. Xing, Y., Shu, C.-W., 2006a. High order well-balanced finite volume WENO schemes and discontinuous Galerkin methods for a class of hyperbolic systems with source terms. J. Comput. Phys. 214, 567–598. Xing, Y., Shu, C.-W., 2006b. A new approach of high order well-balanced finite volume WENO schemes and discontinuous Galerkin methods for a class of hyperbolic systems with source terms. Commun. Comput. Phys. 1, 100–134. Xing, Y., Shu, C.-W., 2011. High-order finite volume WENO schemes for the shallow water equations with dry states. Adv. Water Resour. 34, 1026–1038. Xing, Y., Shu, C.-W., 2014. A survey of high order schemes for the shallow water equations. J. Math. Study 47, 221–249. Xing, Y., Zhang, X., 2013. Positivity-preserving well-balanced discontinuous Galerkin methods for the shallow water equations on unstructured triangular meshes. J. Sci. Comput. 57, 19–41. Xing, Y., Zhang, X., Shu, C.-W., 2010. Positivity-preserving high order well-balanced discontinuous Galerkin methods for the shallow water equations. Adv. Water Resour. 33, 1476–1493. Xing, Y., Shu, C.-W., Noelle, S., 2011. On the advantage of well-balanced schemes for movingwater equilibria of the shallow water equations. J. Sci. Comput. 48, 339–349. Xu, K., 2002. A well-balanced gas-kinetic scheme for the shallow-water equations with source terms. J. Comput. Phys. 178, 533–562. Zhang, X., Shu, C.-W., 2010. On maximum-principle-satisfying high order schemes for scalar conservation laws. J. Comput. Phys. 229, 3091–3120. Zhou, J.G., Causon, D.M., Mingham, C.G., Ingram, D.M., 2001. The surface gradient method for the treatment of source terms in the shallow-water equations. J. Comput. Phys. 168, 1–25.

Chapter 14

Maxwell and Magnetohydrodynamic Equations € cker†,{ C.-D. Munz* and E. Sonnendru *

Institute for Aerodynamics and Gas Dynamics, University of Stuttgart, Stuttgart, Germany Max-Planck Institute for Plasma Physics, Garching, Germany { Mathematics Center, TU Munich, Garching, Germany †

Chapter Outline 1 Introduction 2 Maxwell’s Equations 2.1 The Model 2.2 Generalised Maxwell’s Equations: Correcting the Fields 2.3 Cartesian Grids: Finite Difference and Spectral Methods

386 386 386

387

389

2.4 FV Schemes 2.5 Discontinuous Galerkin Schemes 2.6 Finite Element Methods 3 Magnetohydrodynamics 3.1 The Model 3.2 Discretization 4 Conclusion References

390 393 394 396 396 397 398 398

ABSTRACT While time-domain simulations of electromagnetic waves have been performed in the past often by finite difference schemes the use of unstructured grids for complicated geometries changes the situation. Finite volume, finite elements or the combination in the discontinuous Galerkin approach allow unstructured grids as well as higher order accuracy in a straightforward way. Based on the evolution equations with a forcing of the divergence constraints a review of these different approaches is presented in this chapter. Keywords: Maxwell, Magnetohydrodynamic, Finite elements, Finite volumes, Discontinuous Galerkin AMS Classification Codes: 35Q61, 76W05, 65M60, 65M08

Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.10.006 © 2017 Elsevier B.V. All rights reserved.

385

386 Handbook of Numerical Analysis

1 INTRODUCTION Maxwell’s equations describe the evolution of an electromagnetic field in the presence or without sources. Most often the Maxwell’s equations are written in free space, in which case they form a linear hyperbolic system. The equations of magnetohydrodynamics (MHD) describe the evolution of a plasma, which is a gas of charged particles considered as a single fluid. The ideal MHD equations result from the conservation of mass, momentum and energy of the fluid along with the appropriately reduced Maxwell equations. Altogether they form a hyperbolic system of nonlinear conservation laws. Apart from both being hyperbolic systems, a main difficulty in the simulation of Maxwell’s equations and the MHD equations in more than one dimension is that they depend on the so-called involutions, which are constraints on the divergence of the magnetic field B and also the electric field E. For the linear Maxwell’s equations the problem is noticeable mainly in the presence of external sources and most prominently when nonlinearly coupled to another model, describing the evolution of charged particles like the Vlasov equation. In this review of the numerical methods for Maxwell and the MHD equations we will especially examine this issue. Early references to this issue in the Maxwell equations for the simulation of charged particles can be found in Boris (1970), Marder (1987), Langdon (1992) and in Brackbill and Barnes (1980) in the case of MHD. There is also a vast literature on Maxwell’s equations in unbounded domains using integral-type methods and also frequency domain simulations. We shall focus here only on time-domain simulations.

2 MAXWELL’S EQUATIONS 2.1 The Model The Maxwell equations describe the evolution of an electromagnetic field (E, B) in the presence of a charge density denoted by r and a current density J. In a domain O  3 , they read @E 2  c curl B ¼ J=e0 , @t

(1)

@B + curl E ¼ 0, @t

(2)

div E ¼ r=e0 ,

(3)

div B ¼ 0,

(4)

in addition to initial and boundary conditions. Typical boundary conditions are perfectly conducting conditions, which simply read En ¼ 0, where n is the outward unit normal at the boundary, E0 and m0 are, respectively, the

Maxwell and Magnetohydrodynamic Equations Chapter

14 387

permittivity and permeability, which are constants in free space, and describe material properties in a more complicated setting. In free space these constants are related to the speed of light c by the relation m0E0c2 ¼ 1. Taking the divergence of the Ampere equation (1) and using the Gauss law (3), we obtain @r + div J ¼ 0: @t

(5)

This is the so-called continuity equation, which is a compatibility condition for Maxwell’s equations, those being ill-posed when the continuity equation is not satisfied. Moreover, it can be shown that provided the divergence constraints (3) and (4) are satisfied at the initial time, they remain satisfied for all times by the solution of Ampere (1) and Faraday (2), which have a unique solution by themselves provided adequate initial and boundary conditions. This follows directly from the fact that the divergence of the curl vanishes and the continuity equation (5). The problem for numerical methods is then to find a way to have discrete sources, which satisfy a discrete continuity equation compatible with the discrete divergence and curl operators. Another option is to modify the Maxwell equations, so that they are well-posed independently of the sources, by introducing two additional scalar unknowns that can be seen as Lagrange multipliers for the divergence constraints. These should become arbitrarily small when the continuity equation is close to being satisfied. Although the compatibility problems of discrete Vlasov–Maxwell solvers have been widely discussed in the particle-in-cell (PIC) literature it also exists for grid-based discretizations of the Vlasov equations and the same recipes apply there as discussed in Crouseilles et al. (2014) and Sircombe and Arber (2009). Note also that the infinite dimensional kernel of the curl operator has made it particularly hard to find good discretization for Maxwell’s equations, especially for the eigenvalue problem (Boffi, 2006, 2010; Buffa and Perugia, 2006; Caorsi et al., 2000; Hesthaven and Warburton, 2004).

2.2

Generalised Maxwell’s Equations: Correcting the Fields

Even though, provided the divergence constraints are satisfied at the initial condition, they are satisfied at all times for the continuous Maxwell’s equations, this may be not true when only Ampere (1) and Faraday’s equations (2) are numerically solved. This has been recognised early in the PIC literature and the first solution proposed by Boris (1970), the so-called Boris correction, consists in correcting a posteriori, after each field solve, where the only the Ampe`re law. The electric field electric field En+1 is computed using  is then corrected from En+1 into E n + 1 ¼ En + 1 + r’ such that r  E n + 1 ¼ r=e0 . The correction ’ is then solution of the Poisson equation

388 Handbook of Numerical Analysis

D’ ¼ r  En + 1 

r : e0

In order to avoid a costly Poisson solve, Marder (1987) proposed the following correction of the electric field 

E n + 1 ¼ En + 1 + Dt grad ðnðr  En  rn =e0 ÞÞ with n a diffusion parameter chosen small enough for stability. This method has been further improved by Langdon (1992) to the form 

E n + 1 ¼ En + 1 + Dt grad ðnðr  En + 1  rn + 1 =e0 ÞÞ, which can also be seen as one Jacobi iteration for solving the Poisson equation proposed by Boris. A comparison of these methods is performed in Mardahl and Verboncoeur (1997). These classical methods can all be interpreted as imposing the divergence constraint on the electric field by using a Lagrange multiplier using the following generalised formulation of Maxwell’s equations introduced in Munz et al. (1999) J @t E  c2 curl B + c2 rp ¼  , E0 @t B + curl E ¼ 0, r gðpÞ + div E ¼ , E0 div B ¼ 0: @gðpÞ 2 1 @r  c Dp ¼ ð + div JÞ. @t E0 @t A mathematical study of this system has been performed in Barthelme et al. (2007). The Boris correction corresponds to the case g ¼ 0, and the resulting Lagrange multiplier p satisfies a Poisson equation with source @r + div J. The Marder and Langdon corrections are equivalent to two differ@t ent discretizations of these equations with g( p) ¼ p, in which case p satisfies a @r heat equation diffusing and transporting the continuity error + div J out of @t the domain. It then becomes natural to also consider the case g( p) ¼ @ tp, in which case the Lagrange multiplier satisfies a wave equation and the generalised Maxwell’s equations become hyperbolic and even strictly hyperbolic if a Lagrange multiplier is also used for the div B constraint. This set of generalised Maxwell’s equations reads J (6) @t E  c2 curl B + wc2 rp ¼  , E0

This implies

@t B + curl E + grq ¼ 0,

(7)

Maxwell and Magnetohydrodynamic Equations Chapter

14 389

1 @p r + div E ¼ , w @t E0

(8)

1 @q + div B ¼ 0: gc2 @t

(9)

This is called the hyperbolic correction and was introduced in Munz et al. (2000). The error is transported out of the domain with wave speeds that are controlled by the parameters w and g. These parameters should be chosen large enough to avoid local accumulation of divergence errors. For this, absorbing boundary conditions are needed.

2.3

Cartesian Grids: Finite Difference and Spectral Methods

A very popular finite difference scheme for Maxwell’s equations in the time domain is the scheme of Yee (1966), proposed in 1966 for equidistant Cartesian grids. This is a second-order accurate method, very efficient and robust. It has been working for 50 years also for problems where many other methods were failing. It uses a staggered grid arrangement, where approximate values of the electromagnetic field components are calculated at different locations within the spatial grid. These locations differ by half the step size and the approximate values are also calculated at different time levels by a staggered-in-time leap-frog scheme. This staggering leads to a small stencil for second-order accuracy and to the property that the divergence of the curl exactly vanishes for the discrete equations. Due to its simplicity and efficiency it has been widely applied to simulate transient electromagnetic wave propagations in a broad range of practical problems. The Yee scheme has been extended to curvilinear structured grids by Holland in 1983 and to an implicit time approximation in Holland (1984). For a convergence analysis of the Yee scheme the reader is referred to Monk and Suli (1994). An extensive description is given in the book of Taflove and Hagness (2000). In recent years the second-order schemes on staggered grids have also been extended to higher order accuracy, see for details the quite exhaustive review on high order methods for the Maxwell equations of Hesthaven (2002). Note also that in the laser-plasma interaction community different extensions of the Yee scheme have been proposed, extending the stencil and adding tunable parameters enabling to optimise the dispersion properties as needed by the application (Cowan et al., 2011; Nuter et al., 2014; Pukhov, 1999; Vay et al., 2011). A big advantage of the finite difference schemes is their simplicity. But, the disadvantage of their restrictive grid requirement cause that they are only applied to problems with simple geometries. Simulations of complex geometries of technical devices are nowadays based on unstructured grids. Especially for the Yee scheme and the staggered grid, the formulation of boundary conditions and discontinuous material properties become difficult. Very efficient on Cartesian grids are also spectral schemes with an approximate solution being defined as linear combination of basis functions that are

390 Handbook of Numerical Analysis

nonzero in the whole computational domain. By this global approach the spectral methods may have the fastest convergence when the solution is smooth enough. Beside a lack of the smoothness the spectral methods become also less accurate for problems with complex geometries and discontinuous coefficients. Boundary conditions are also very difficult by the need of an absorbing layer around the whole computational domain. For the class of spectral methods we also refer to the review of high-order methods by Hesthaven (2002) and the references, cited therein. In recent times the methods based on unstructured grids become more and more important. The main time saving in the industrial design process by numerical simulations is due to the much faster grid generation possibilities in the last 10 years. Instead of weeks, hours are needed nowadays. Hence, our focus here are schemes as finite volumes (FV) and the finite elements that allow unstructured grid arrangements.

2.4 FV Schemes The FV discretization approach starts directly from the mesh on hand by integrating the Maxwell equations over the grid zones and performing afterwards appropriate approximations to the integral equations. Rewriting the integral Maxwell equations using Stokes’ theorem, Weiland (1996) and Madsen and Ziolkowski (1990) introduced an FV formulation for general grids, which reduces to the classical Yee algorithm in the Cartesian case. A nonstaggered FV scheme for the constrained Maxwell equations (6)–(9) is based on a reformulation as a system of conservation laws, which reads as 3 @f j ðuÞ @u X + ¼ g, @t j¼1 @xj

(10)

with the vector of the variables u ¼ (E1, E2, E3, C, B1, B2, B3, F) and the vector-valued flux functions and source terms: 0 1 0 0 2 0 1 1 1 j1 wc2 C c B3 c2 B2 B j C B B B 2 C C C B 2C B c2 B3 C B wc2 C C B c B1 C B C B 2 C B C B C B j3 C B c B2 C B c2 B1 C B wc2 C C B C B C B C B C C B wE C B wE C B wE C 1B 1 C 2 C 3 C B r C B B B f1 ¼ B C: C, f 2 ¼ B C, f 3 ¼ B C, g ¼ B B gC C B E3 C B E2 C e0 B 0 C B C B C B C B C B 0 C B E B gF C B E C C 3 1 C B C B C B C B B C B C B C B C @ 0 A @ E2 A @ E1 A @ gF A 0 gc2 B3 gc2 B1 gc2 B2 (11) If these equations are integrated over a spatial grid cell Vi and the Gauss theorem applied the resulting integral equations read as

Maxwell and Magnetohydrodynamic Equations Chapter si d 1 X Gi, a , ui ¼  dt jVi j a¼1

14 391

(12)

where Gi, a denotes the flux into normal direction through the face a of the grid cell Vi. The value si represents the number of faces of the grid cell Vi. Here, we follow the method of lines approach and introduced only the spatial approximation. Time is still continuous in (12) and the approximation of the system of ordinary differential equations in time has yet to be specified. The FV scheme is a direct approximation of the integral equation (12). It is completely defined if the numerical flux is specified as a suitable approximation of the physical flux through the boundary face a. The problem is that the FV scheme approximates the integral means and no local values are available at the side faces to determine the flux into normal direction. Hence, the reconstruction of local values at the side faces is beside the flux calculation the other important building block in the FV framework. Assuming that we have local values uL and uR at the grid cell interface a numerical flux calculation may be written in the form   Gi,a ¼ Li, a Ai,+a uL + A (13) i, a uR , where A+ and A are the Jacobian matrices with nonnegative and nonpositive eigenvalues, respectively, and with A+ +A ¼ dfn(u)/du where fn denotes the flux in the normal direction. This numerical flux is determined by taking into account the direction of the movement of information along the characteristics. This representation is called flux-splitting formulation and is described in detail in Munz et al. (2000). An identical expression is obtained taking the flux of the local solution for the initial value problem with the piecewise constant initial values uL and uR, called Riemann problem. The use of the integral means evaluating the numerical flux leads to first order accuracy in space only. For practical simulations a better reconstruction of grid cell interface values has to be introduced. In the groundbreaking work of van Leer in 1979, a reconstruction has been introduced based on piecewise linear polynomials and the TVD property (total variation diminishing) has been formulated. The quest towards higher-order schemes was then continued with the paper on essentially non-oscillatory (ENO) schemes by Harten et al. (1987) proposing the use of a piecewise polynomial approximation. In this reconstruction the integral mean values have to be preserved and the scheme has to be non-oscillatory to allow the resolution of strong gradients or under-resolution without generating spurious oscillations. A more robust high-order scheme was introduced in 1996 by Jiang and Shu (1996) in their famous work on WENO (weighted ENO) methods. The early approaches have been formulated for Cartesian grids, for which the reconstruction can be applied into the different space direction separately. Barth and Jespersen (1989) were some of the first authors to develop a second-order accurate FV scheme on unstructured triangular meshes and

392 Handbook of Numerical Analysis

Barth and Frederickson laid the ground work for higher order reconstruction schemes on unstructured meshes in Barth and Frederickson (1990). The first ENO methods on unstructured two-dimensional meshes were proposed by Abgrall (1994) and Sonar (1997), and the first unstructured WENO schemes have been developed in Hu and Shu (1999). Advection diffusion problems on unstructured meshes with curved boundaries have been recently discussed by Ollivier-Gooch and Van Altena (2002). More recently, Dumbser and K€aser (2007) proposed and implemented a reconstruction technique in three space dimensions for general unstructured tetrahedral meshes. They introduced a representation of the approximation in the form uh ðx, tÞ :¼ ui ðx, tÞ ¼

N X ^ i, l ðtÞci, l ðxÞ for x 2 Vi , u

(14)

l¼1

where Vi denotes again some arbitrary grid cell. The vector-valued functions ci, l ¼c i, l(x) are basis functions spanning the space of polynomials of degree p restricted to the cell Vi. In every grid cell Vi the polynomial ui(x) with degree N is reconstructed by collecting information from the mean values within a stencil SNi of neighbouring grid cells. The conditions to determine the degrees of freedom of ui(x, t) are then based on the requirement that Z ui ðx,tÞ dx ¼ uj ðtÞ for all j 2 SNi , (15) Vj

is fulfilled, where uj(t) is the mean value in cell Vj. Thereby, the polynomial ui(x, t) is extended continuously to the whole stencil and restricted to Vi after the reconstruction. We note that the total number of grid cells within the stencil depends on whether a central reconstruction, or a WENO reconstruction is applied. In general, more grid cells have to be taken into account as needed to determine the coefficients of the polynomial ui. Hence the system becomes overdetermined and a constrained least squares approach is applied as proposed by Barth and Frederickson (1990). In practical simulation the success of the reconstruction depends on the grid quality. Grid distortions strongly affect the accuracy. We did not specify up to now the time approximation. The system of ordinary differential equations in time (12) may be approximated by any solver for initial value problems. The commonly used time integration schemes for explicit FV schemes are Runge–Kutta schemes. An alternative is the use of a space–time Taylor expansion within the local grid cells, in which time derivatives are obtained from known space-derivatives by the Cauchy–Kovalewsky of Lax–Wendroff procedure. The advantage of the predictor–corrector formulation is that the time evolution is done in one step which establishes optimal locality during the whole time step (see Schwartzkopff et al., 2006). If a time accurate solution is not needed a low-order implicit scheme may be also applied

Maxwell and Magnetohydrodynamic Equations Chapter

14 393

avoiding the severe time step restriction involving the light speed. We note that in the constrained formulation (6)–(9) the electrostatic limit may be also modelled by a subsystem (see Pfeiffer et al., 2015). The advantage of the FV approach is that there is no requirement with respect to the regularity of the solution. The numerical flux calculation introduces robustness at steep gradients by the inherent numerical dissipation and allows the under-resolution of physical phenomena. A combination of the FV schemes with automatic mesh refinement for Maxwell equations has been recently proposed in Barbas and Velarde (2015).

2.5

Discontinuous Galerkin Schemes

While grid distortion strongly affects the accuracy of a higher order FV scheme, the discontinuous Galerkin (DG) schemes are more robust in this case. This is due to the fact that the approximate piecewise polynomials (14) are advanced in time locally needing only data from the direct neighbours. The time evolution is based on the integral weak formulation as known from the finite element framework. The application of discontinuous Galerkin (DG) schemes to timedependent evolution equations was starting with the work of Cockburn and Shu, who established a framework with high-order discretization in space and a Runge–Kutta discretization in time, for a review of this development of DG methods (see, e.g., Cockburn et al., 2000). In the last years DG schemes have become more and more popular, since they combine the flexibility in handling complex geometries, hp-adaptivity and efficiency of parallel implementation. DG methods are based on a weak formulation on each cell. To obtain this weak formulation, Maxwell’s equations in the divergence form (10) are multiplied by a test function f and integrated over a grid cell Vi with respect to space. If the fluxes are written as a matrix F and the divergence is applied row wise then the integral equations read as Z ðut + r  FÞc dx ¼ 0 : (16) Vi

Integration by parts is applied to every component of the system Z Z Z ut c dx  F  rc dx + ðF  nÞc dsdt ¼ 0: Vi

Vi

(17)

@Vi

This introduces a cell boundary integral, which couples adjacent grid cells via the fluxes. Here, n denotes the outwards directing normal vector on the side face @Vi of the grid cell Vi. A polynomial approximation of ui ¼ ui(x, t) in each cell Vi of the form (14) is inserted into the weak formulation (17) and the test functions run through the full set of basis functions. In every grid cell Vi a system of ordinary differential equations in time is then obtained

394 Handbook of Numerical Analysis

  ^ i Þt ðtÞ ¼ RS u ^ i+ ðtÞ + RV ðu ^ i ðtÞ, u ^ i ðtÞÞ : M ðu

(18)

^ i ðtÞ, written ^ i Þ comFor the N degrees of freedom u  as a vector, the term RV ðu ^ i+ represents the surface integrals, ^ i, u prises the volume integrals and RS u ^ i+ , the matrix M is a mass matrix. which also depend on neighbour data u Considering the global approximate solution, we get a weakly coupled system of ordinary differential equations for the time-dependent degrees of freedom. There are different possibilities to choose the building blocks in the DG approach. The set of basis functions may be a nodal set, in which the basis functions are defined as Lagrange polynomials by specifying interpolation points (see, e.g., Hesthaven and Warburton, 2008). The other possibility is a modal basis, which is chosen such that the basis functions define an orthonormal basis. The advantage here is that the mass matrix becomes diagonal. This can also be obtained in a nodal framework by the so-called spectral elements, in which the interpolation points coincide with the integration points. The advantage of the nodal framework is the fast evaluation of the integrals in (18), which need the main part of the computational effort (see, e.g., Gassner et al., 2009). The numerical flux function in the surface integral is chosen as in the FV framework. The different possibilities with respect to the approximation in time have been listed in the section about the FV scheme. Here, additionally, the possibility of an implicit space–time Galerkin formulation may be chosen (see, e.g., van der Vegt and van der Ven, 2002). A finite element approach continuous in time was proposed in Lilienthal et al. (2014). The discontinuous Galerkin approach with explicit time approximation can be implemented very efficiently on massively parallel computers. While the subdomain data for the surface integrals are sent between the corresponding processors in an unlocked manner the volume integrals in (18) can be be calculated because they only need interior data that are available without exchange. The use of discontinuous finite element spaces allows a very flexible grid arrangement. They provide an hp-refinement in a natural way or even a time accurate local time-stepping scheme (Taube et al., 2009).

2.6 Finite Element Methods Even though discontinuous Galerkin methods are more flexible in particular for h or p adaptivity, conforming finite elements have the advantage that they can reproduce at the discrete level the main properties of the Maxwell equations, which makes them convenient to analyze as well as very robust. Such finite element methods also fall into the category of geometric methods that have had a considerable success recently. The right framework for this is the so-called finite element exterior calculus (FEEC) introduced by Arnold et al. (2006, 2010). For Maxwell’s equations it is based on the following commuting diagram

Maxwell and Magnetohydrodynamic Equations Chapter

H 1 (Ω)

grad

Π0 V0

H(curl, Ω)

curl

Π1 grad

V1

H(div, Ω)

div

Π2 curl

V2

L2 (Ω)3 Π3

div

14 395

ð19Þ

V3

The first row of (19) represents the exact sequence of function spaces involved in Maxwell’s equations in the sense that at each node, the kernel of the next operator is the image of the previous. And the power of the conforming finite element framework is that this exact sequence can be reproduced at the discrete level by choosing the appropriate discrete spaces. Typically on tetrahedra this would be the H1 conforming Lagrange finite elements for V0, the H(curl) conforming Nedelec elements for V1, the H(div) conforming Raviart–Thomas elements for V2 and DG elements for V3. The order of the approximation is dictated by the choice made for V0 and the requirement of having an exact sequence at the discrete level. The projection operators Pi should be the appropriate finite element interpolants, which have the property that the diagram is commuting. This choice of finite elements naturally leads to a well-behaved discretizations. In particular, the classical Maxwell equations (1)–(4) can be directly used and assuming that an appropriate discrete continuity equation is satisfied the divergence constraints remain satisfied for all time. In this framework one of the Ampe`re or Faraday equations will be enforced strongly at the discrete level and the other weakly. Let us for example consider the case of a strong discrete Faraday equation and a weak discrete Ampe`re equation. This corresponds to looking for E 2 H(curl, O) and B 2 H(div, O). As opposed to the derivation of DG methods, for finite elements the weak formulation is the standard weak formulation on the whole domain. The weak form of Ampe`re’s equation is then found by taking the dot product of (1) with a test function F and applying a Green formula, which corresponds to integration by parts. Assuming perfectly conducting boundary conditions E n ¼ 0 and denoting by H0(curl, O) the subspace of H(curl, O) satisfying this boundary condition, the weak solution of the Ampe`re equation is E 2 H0(curl, O) such that Z Z Z d 1 E  F dx + c2 B  curl F dx ¼  J  F dx 8F 2 H0 ðcurl, OÞ: (20) dt O e0 O O From that, the discrete solution of the Maxwell equations will be Eh 2 V1 and Bh 2 V2 satisfying on the one hand (20) for all test functions Fh 2 V1 and on the other hand the Faraday equation, i.e. @Bh + curl Eh ¼ 0: @t

(21)

Let us denote fc 1i gi¼1…N1 be a basis of V1  Hðcurl,OÞ and fc 2i gi¼1…N2 a basis of V2  Hðdiv, OÞ. We can write elements of V1 and V2, respectively

396 Handbook of Numerical Analysis

Eh ¼

N1 N2 X X ei c1i , Bh ¼ bi c2k : i¼1

k¼1

>

Denoting by e ¼ ðe1 , …, eN1 Þ and b ¼ ðb1 , …, bN2 Þ> the corresponding degrees of freedom, and noting that curl Eh 2 V2 for all Eh 2 V1, we can define the matrix R such that the degrees of freedom of curl Eh are Re. Then denoting R by M1 ¼ ð O c 1i  c 1j Þi, j dx the mass matrix in V1 and similarly M2 the mass matrix in V2 the degrees of freedom are solution of the following linear system of ordinary differential equations M1

de  R> M2 b ¼ J, dt db + Re ¼ 0: dt

(22) (23)

It is easy to verify that the divergence constraints are automatically satisfied in this setting. The constraint div Bh is transmitted from one time step to the next simply because from (21) @div Bh ¼ div curl Eh ¼ 0: @t On the other the Gauss law (3) is satisfied in a weak sense provided the sources verify the following weak form of the continuity equation: Z Z d J  rfh dx ¼ r  rfh dx 8fh 2 V0 : dt O O Indeed for any fh 2 V0, grad fh 2 V1 can be used as a test function in the discrete weak Ampe`re equation (20), which then becomes Z Z Z d 1 1d Eh  rfh dx ¼  J  rfh dx ¼  r  rfh dx 8fh 2 V0 , dt O e0 O e0 dt O so that the weak form of Gauss’ law Z Z 1 Eh  rfh dx ¼  r  rfh dx 8fh 2 V0 , e0 O O is satisfied provided it is at the previous time step. Note that for this to be true at the fully discrete level after time discretization one has to carefully compute the time discrete current (Campos Pinto et al., 2014).

3 MAGNETOHYDRODYNAMICS 3.1 The Model The MHD model describes a plasma (a gas of charged particles) as a single fluid characterized by the conservation laws for mass, momentum and energy

Maxwell and Magnetohydrodynamic Equations Chapter

14 397

along with Maxwell’s equations for the evolution of the self-consistent electromagnetic field. However, in Ampe`re’s equation, the displacement current is neglected so that it reduces to curl B ¼ m0J, and moreover the electric field is assumed to be related to the magnetic field by Ohm’s law, which reduces for the ideal MHD case we are considering here to E ¼ v B (see Freidberg, 1987 for a detailed derivation). We then get the following ideal MHD models, which is a system of conservation laws: @r + divðruÞ ¼ 0, @t @ru 1 + divðru uÞ  curl B  B + rp ¼ 0, @t m0 @B + curlðu  BÞ ¼ 0, @t    @e 1 + div e + p + jBj2 u  ðu  BÞB ¼ 0, @t 2 div B ¼ 0: Here r is the density of the fluid, u its velocity, g ¼ 5/3 is the ratio of specific heats, p the pressure, e is the total energy of the plasma that is related to the other quantities by 1 1 p : e ¼ rjuj2 + jBj2 + 2 2 g1 Note also that the pressure is related to the temperature of the fluid by p ¼ rT. In some formulations, the equation describing the evolution of total energy can be equivalently replaced by an equation on the pressure or on the temperature.

3.2

Discretization

Even more than for Maxwell’s equations a fundamental condition for long time stability is to enforce the div B ¼ 0 constraint at least approximately. One classical strategy for doing this is to work with the vector potential A such that B ¼ curl A. Although this is often used in practice it has the drawback to introduce one more derivative in the equation and thus to require additional regularity. In particular conforming finite element codes based on potentials require C1 finite elements, which are more cumbersome to construct. A review of this kind of methods is given in the book (Jardin, 2010) (see also the review paper Jardin, 2012 more focused on implicit time discretizations). The ideal MHD equations fit in the same framework of hyperbolic conservations laws as the Maxwell equations written in the form (10). Hence the FV and discontinuous Galerkin methods can be expressed exactly in the same

398 Handbook of Numerical Analysis

way as for Maxwell’s equations. In a paper by Balsara and Spicer (1999) it was shown that the staggered Yee mesh can be adopted also for the MHD equation to design schemes that preserve the divergence-free constraint in the magnetic field. For higher order FV schemes this has been generalized recently by Balsara and Dumbser (2015) and Xu et al. (2016). The alternative approach is the use of an a posteriori projection method, like the Boris method, to modify the magnetic field by the gradient of a potential and to solve a Poisson equation for getting at each time step a divergence free magnetic field. Following this, a generalised formulation of the MHD equations introducing Lagrange multipliers can also be written. This has been first proposed by Dedner et al. (2002) with considerable success. Some finite element methods especially in the context of magnetic fusion have also been proposed (see, for example, Czarny and Huysmans, 2008; Sovinec et al., 2004). A structure preserving finite element method using the FEEC framework we introduced for the Maxwell equations has recently been developed for incompressible MHD in Hu et al. (2014).

4 CONCLUSION For a long time the staggered finite difference Yee scheme has been the only scheme that was reliably working for the numerical simulation of Maxwell’s equations in various situations. The understanding of the numerical issues has improved considerably during the last 20 years so that there are now a variety of good arbitrary high-order solvers on different kinds of meshes based on FV, discontinuous Galerkin or conforming finite element methods for which we have provided a review here. The use of unstructured grids allows the application to problems in more complicated geometries. The same numerical techniques have then been successfully extended to the MHD model.

REFERENCES Abgrall, R., 1994. On essentially non-oscillatory schemes on unstructured meshes: analysis and implementation. J. Comput. Phys. 114, 45–58. Arnold, D.N., Falk, R.S., Winther, R., 2006. Finite element exterior calculus, homological techniques, and applications. Acta Numer. 15, 1–155. Arnold, D.N., Falk, R.S., Winther, R., 2010. Finite element exterior calculus: from Hodge theory to numerical stability. Bull. Am. Math. Soc. 47, 281–354. Balsara, D.S., Dumbser, M., 2015. Divergence-free MHD on unstructured meshes using high order finite volume schemes based on multidimensional Riemann solvers. J. Comput. Phys. 299, 687–715. Balsara, D.S., Spicer, D.S., 1999. A staggered mesh algorithm using high order Godunov fluxes to ensure solenoidal magnetic fields in magnetohydrodynamic simulations. J. Comput. Phys. 149, 270–292. Barbas, A., Velarde, P., 2015. Development of a Godunov method for Maxwell’s equations with adaptive mesh refinement. J. Comput. Phys. 300, 186–201.

Maxwell and Magnetohydrodynamic Equations Chapter

14 399

Barth, T.J., Frederickson, P.O., 1990. Higher order solution of the Euler equations on unstructured grids using quadratic reconstruction. In: 28th Aerospace Sciences Meeting, AIAA-90-0013, Reno, Nevada. Barth, T.J., Jespersen, D.C., 1989. The design and application of upwind schemes on unstructured meshes. In: 27th Aerospace Sciences Meeting, AIAA-89-0366, Reno, Nevada. Barthelme, R., Ciarlet Jr., P., Sonnendr€ucker, E., 2007. Generalized formulations of Maxwell’s equations for numerical Vlasov-Maxwell simulations. Math. Models Methods Appl. Sci. 17 (5), 657–680. Boffi, D., 2006. Compatible discretizations for eigenvalue problems. In: Compatible Spatial Discretizations. Springer, New York, NY, pp. 121–142. Boffi, D., 2010. Finite element approximation of eigenvalue problems. Acta Numer. 19, 1–120. Boris, J.P., 1970. Relativistic plasma simulations-optimization of a hybrid code. In: Proc. 4th Conf. Num. Sim. Plasmas, NRL Washington, Washington, DC, pp. 3–67. Brackbill, J.U., Barnes, D.C., 1980. The effect of nonzero div B on the numerical solution of the magnetohydrodynamic equations. J. Comput. Phys. 35, 426–430. Buffa, A., Perugia, I., 2006. Discontinuous Galerkin approximation of the Maxwell eigenproblem. SIAM J. Numer. Anal. 44, 2198–2226. Campos Pinto, M., Jund, S., Salmon, S., Sonnendr€ucker, E., 2014. Charge conserving FEM-PIC schemes on general grids. C. R. Mec. 342 (10–11), 570–582. Caorsi, S., Fernandes, P., Raffetto, M., 2000. On the convergence of Galerkin finite element approximations of electromagnetic eigenproblems. SIAM J. Numer. Anal. 38, 580–607. Cockburn, B., Karniadakis, G.E., Shu, C.-W., 2000. Discontinuous Galerkin Methods, Lecture Notes in Computational Science and Engineering. Springer, Berlin. Cowan, B.M., Bruhwiler, D.L., Cormier-Michel, E., Esarey, E., Geddes, C.G.R., Messmer, P., Paul, K.M., 2011. Characteristics of an envelope model for laser-plasma accelerator simulation. J. Comput. Phys. 230, 61–86. Crouseilles, N., Navaro, P., Sonnendr€ucker, E., 2014. Charge conserving grid based methods for the Vlasov-Maxwell equations. C. R. Mec. 342 (10–11), 636–646. Czarny, O., Huysmans, G., 2008. Bezier surfaces and finite elements for MHD simulations. J. Comput. Phys. 227, 7423–7445. Dedner, A., Kemm, F., Kr€oner, D., Munz, C.-D., Schnitzer, T., Wesenberg, M., 2002. Hyperbolic divergence cleaning for the MHD equations. J. Comput. Phys. 175, 645–673. Dumbser, M., K€aser, M., 2007. Arbitrary high order non-oscillatory finite volume schemes on unstructured meshes for linear hyperbolic systems. J. Comput. Phys. 221, 693–723. Freidberg, J.P., 1987. Ideal Magnetohydrodynamics. Plenum Press, New York, NY. Gassner, G., L€ orcher, F., Munz, C.-D., Hesthaven, J.S., 2009. Polymorphic nodal elements and their application in discontinuous Galerkin methods. J. Comput. Phys. 228, 1573–1590. Harten, A., Engquist, B., Osher, S., Chakravarthy, S., 1987. Uniformly high order essentially non-oscillatory schemes, III. J. Comput. Phys. 71, 231–303. Hesthaven, J.S., 2002. High-order accurate methods in time-domain computational electromagnetics: a review. Adv. Imaging Electron Phys. 181, 1–54. Hesthaven, J.S., Warburton, T., 2004. High-order nodal discontinuous Galerkin methods for the Maxwell eigenvalue problem. Philos. Trans. R. Soc. A Math. Phys. Eng. Sci. 362 (1816), 493–524. Hesthaven, J.S., Warburton, T., 2008. Nodal Discontinuous Galerkin Methods: Algorithms, Analysis, and Applications. Springer-Verlag, New York, NY. Holland, R., 1983. Finite-difference solution of Maxwell’s equations in generalized nonorthogonal coordinates. IEEE Trans. Nucl. Sci. 30, 4589–4591.

400 Handbook of Numerical Analysis Holland, R., 1984. Implicit three-dimensional finite differencing of Maxwell’s equations. IEEE Trans. Nucl. Sci. 31, 1322–1326. Hu, C., Shu, C.-W., 1999. Weighted essentially non-oscillatory schemes on triangular meshes. J. Comput. Phys. 150, 97–127. Hu, K., Ma, Y., Xu, J., 2014. Stable finite element methods preserving rB ¼ 0 exactly for MHD models. Numer. Math. 1–26. Jardin, S., 2010. Computational Methods in Plasma Physics. CRC Press, Boca Raton, FL. Jardin, S.C., 2012. Review of implicit methods for the magnetohydrodynamic description of magnetically confined plasmas. J. Comput. Phys. 231, 822–838. Jiang, G.S., Shu, C.-W., 1996. Efficient implementation of weighted ENO schemes. J. Comput. Phys. 126, 202–228. Langdon, A.B., 1992. On enforcing Gauss’ law in electromagnetic particle-in-cell codes. Comput. Phys. Commun. 70, 447–450. Lilienthal, M., Schnepp, S.M., Weiland, T., 2014. Non-dissipative space-time hp-discontinuous Galerkin method for the time-dependent Maxwell equations. J. Comput. Phys. 275, 589–607. Madsen, N.K., Ziolkowski, R.W., 1990. A three-dimensional modified finite volume technique for Maxwell’s equations. Electromagnetics 10, 147–161. Mardahl, P.J., Verboncoeur, J.P., 1997. Charge conservation in electromagnetic PIC codes; spectral comparison of Boris/DADI and Langdon-Marder methods. Comput. Phys. Commun. 106, 219–229. Marder, B., 1987. A method for incorporating Gauss’s law into electromagnetic PIC codes. J. Comput. Phys. 68, 48–55. Monk, P., Suli, E., 1994. A convergence analysis of Yee’s scheme on nonuniform grids. SIAM J. Numer. Anal. 31, 393–412. Munz, C.-D., Schneider, R., Sonnendr€ucker, E., Voss, U., 1999. Maxwell’s equations when the charge conservation is not satisfied. C. R. Acad. Sci. Paris Ser. I Math. 328 (5), 431–436. Munz, C.-D., Omnes, P., Schneider, R., Sonnendr€ucker, E., Voss, U., 2000. Divergence correction techniques for Maxwell solvers based on a hyperbolic model. J. Comput. Phys. 161, 484–511. Nuter, R., Grech, M., de Alaiza Martinez, P.G., Bonnaud, G., d’Humie`res, E., 2014. Maxwell solvers for the simulations of the laser-matter interaction. Eur. Phys. J. D 68, 1–9. Ollivier-Gooch, C., Van Altena, M., 2002. A high-order accurate unstructured mesh finite volume scheme for the advection-diffusion equation. J. Comput. Phys. 181, 729–752. Pfeiffer, M., Munz, C.-D., Fasoulas, S., 2015. Hyperbolic divergence cleaning, the electrostatic limit, and potential boundary conditions for particle-in-cell codes. J. Comput. Phys. 294, 547–561. Pukhov, A., 1999. Three-dimensional electromagnetic relativistic particle-in-cell code VLPL (Virtual Laser Plasma Lab). J. Plasma Phys. 61 (3), 425–433. Schwartzkopff, T., L€ orcher, F., Munz, C.-D., Schneider, R., 2006. Arbitrary high order finite-volume methods for electromagnetic wave propagation. Comput. Phys. Commun. 174, 689–703. Sircombe, N.J., Arber, T.D., 2009. VALIS: a split-conservative scheme for the relativistic 2D Vlasov-Maxwell system. J. Comput. Phys. 228, 4773–4788. Sonar, T., 1997. On the construction of essentially non-oscillatory finite volume approximations to hyperbolic conservation laws on general triangulations: polynomial recovery, accuracy and stencil selection. Comput. Methods Appl. Mech. Eng. 140, 157–181. Sovinec, C.R., Glasser, A.H., Gianakon, T.A., Barnes, D.C., Nebel, R.A., Kruger, S.E., Schnack, D.D., Plimpton, S.J., Tarditi, A., Chu, M.S., et al., 2004. Nonlinear magnetohydrodynamics simulation using high-order finite elements. J. Comput. Phys. 195 (1), 355–386.

Maxwell and Magnetohydrodynamic Equations Chapter

14 401

Taflove, A., Hagness, S., 2000. Computational Electrodynamics: The Finite-Difference TimeDomain Method, second ed. Artech House, Boston, MA. Taube, A., Dumbser, M., Munz, C.-D., Schneider, R., 2009. A high-order discontinuous Galerkin method with time-accurate local time stepping for the Maxwell equations. Int. J. Numer. Modell. Electron. Networks Devices Fields 22, 77–103. van der Vegt, J.J.W., van der Ven, H., 2002. Space-time discontinuous Galerkin finite element method with dynamic grid motion for inviscid compressible flows: I. General formulation. J. Comput. Phys. 182, 546–585. van Leer, B., 1979. Towards the ultimate conservative difference scheme. V. A second-order sequel to Godunov’s method. J. Comput. Phys. 32, 101–136. Vay, J.-L., Geddes, C.G.R., Cormier-Michel, E., Grote, D.P., 2011. Numerical methods for instability mitigation in the modeling of laser wakefield accelerators in a Lorentz-boosted frame. J. Comput. Phys. 230, 5908–5929. Weiland, T., 1996. Time domain electromagnetic field computation with finite difference methods. Int. J. Numer. Model. 9, 296–319. Xu, Z., Balsara, D.S., Du, H., 2016. Divergence-free WENO reconstruction-based finite volume scheme for solving ideal MHD equations on triangular meshes. Commun. Comput. Phys. 19, 841–880. Yee, K.S., 1966. Numerical solution of initial boundary value problems involving maxwell’s equations in isotropic media. IEEE Trans. Antennas Propag. 14, 302–307.

Chapter 15

Deterministic Solvers for Nonlinear Collisional Kinetic Flows: A Conservative Spectral Scheme for Boltzmann Type Flows I.M. Gamba The University of Texas at Austin, Austin, TX, United States

Chapter Outline 1 Introduction 1.1 Kinetic Evolution Models 1.2 Binary Collisional Models and Double Mixing Convolution Forms 1.3 Classical Elastic Collisional Transport Theory: The Boltzmann Equation 1.4 Deterministic Solvers for Integral Equations of Boltzmann Type 2 The Landau and Boltzmann Operators Relation Through Their Double Mixing Convolutional Forms 2.1 The Grazing Collision Limit 3 A Conservative Spectral Method for the Collisional Form 3.1 Choosing a Computational Cut-Off Domain OL 3.2 Fourier Series, Projections and Extensions

404 404

405

408

409

410 413 415 416 418

3.3 A Conservative Spectral Method for the Homogeneous Boltzmann Equation 3.4 Conservation Method—An Extended Isoperimetric Problem 3.5 Discrete in Time Conservation Method: Lagrange Multiplier Method 4 Local Existence, Convergence and Regularity for the Semidiscrete Scheme 4.1 Local Existence 4.2 Uniform Propagation of Numerical Unconserved Moments 4.3 Uniform L2k Integrability Propagation 4.4 Uniform Semidiscrete Hk Sobolev Regularity Propagation

Handbook of Numerical Analysis, Vol. 18. http://dx.doi.org/10.1016/bs.hna.2016.11.005 © 2017 Elsevier B.V. All rights reserved.

419

421

425

426 427

428 429

430

403

404 Handbook of Numerical Analysis 5 Final Comments and Conclusions

431

Acknowledgements References

432 432

ABSTRACT We present an overview of deterministic solvers for the Boltzmann and Landau equations inspired by their Fourier space representation as weighted convolutional forms, where the later can be obtained as a grazing collision limit of the former. This presentation offers an introduction to the area and elaborates on recent results for conservative spectral Lagrangian schemes applied to several applications ranging from homogeneous flows for Coulomb potentials given by the Landau equation by an approximating of a corresponding Boltzmann model with grazing transition scattering rates, to a full conservative approach for Vlasov–Poisson–Landau system for electron–ion dynamics. This conservative method is enforced by a Lagrangian constrained optimization problem that and conservation correction estimates that give place to semidiscrete error estimates and long-time convergence to statistical equilibrium states given by Maxwellians distributions. Keywords: Nonlinear integral equations, Rarefied gas flows, Boltzmann and Landau Fokker Plank equations, Deterministic numerical approximations to kinetic equations, Conservative spectral methods 2010 MSC: 45E99, 35A22, 76X05, 76P05, 82C05, 65C20, 65C30

1 INTRODUCTION 1.1 Kinetic Evolution Models The numerical solutions of kinetic evolution transport given by integral equations of Boltzmann type needs the underlying understanding of the problem to be approximated: the evolution of a probability density function usually described by a Hamiltonian particle transport encountering interactions. Thus, before we discuss different aspects of deterministic solvers for such models, we introduced the basic notions associated to kinetic transport evolution models. Our starting point is to recall that complex particle model systems with exchangeability properties yield the propagation of chaos property, that is, the particle system can be models by the evolution of independent and identically distributed (iid) continuous random variables or probability density measures. These models appear in many contexts of classical and quantum statistical physics, and more recently in novel applications to social dynamics of multiagent interactions defined by some multiplicatively interacting stochastic processes. The models we shall be considered share is a unified general framework of material transport dynamics can be derived from the so-called Master Equations derived for the time evolution of a particle system modelled as being in exactly one of the countable number of admissible states at any given time, where switching between states are treated probabilistically when interactions occur. Such evolution is described by associating a

Deterministic Solvers for Nonlinear Collisional Kinetic Flows Chapter

15 405

probability density of states through discrete or continuous random variables. Interactions may be of “mean field” type when macroscopic forces depending on, either particle distribution averages, or particles of the same kind usually refer as collisions. Typical examples of “mean field” type interactions result in the so-called collisionless systems of transport models such as Vlasov– Poisson or Vlasov–Maxwell systems for plasma dynamics of charged particles. However, when interactions due to collisions occur and the “switching” of states are described by a time-independent operator, the model represents a kinetic evolution and the process is Markovian. Such process may also include birth and death rates, meaning that probability density is injected in (birth) or taken away from (death) the system, and so the process is not in equilibrium. Examples of such models are the transport dynamics of classical kinetic collisional transport given by Boltzmann or Landau–Fokker–Plank type equations that may include mean field interactions to obtain a Vlasov–Poisson or Vlasov–Maxwell collisional plasma transport system (Chapman and Cowling, 1970; Graham and Meleard, 1999).

1.2 Binary Collisional Models and Double Mixing Convolution Forms Rigorous justification of the propagation of chaos or Stosszahlansatz relies on contemporary ergodic theory and related areas in probability theory (Chapman and Cowling, 1970; Pulvirenti et al., 2014). We assume here its validity, implying that the system of N-particle interactions can be reduced to a closed form involving products of a single point probability density function (pdf ) denoted by f (x, v, t) solving a nonlocal, linear or multilinear structure in state space defined by v 2 n . In the case of binary interactions such pdf satisfies the following nonlocal weak form Z Z d f ðx, v, tÞ’ðvÞdv :¼ Qðf , f Þðx, v, tÞ ’ðvÞdv d dt d Z  Z ¼k f ðx, v, tÞ f ðx, v  u, tÞ ð’ðv0 Þ  ’ðvÞÞBðu, sÞds dudv d d

O

(1)

where the u ¼ v  v* is the relative position for any interacting states pairs (v, v*) changing into ðv0 , v0* Þ, for v fixed and v0 determined by an interaction law with v0 ¼ v0 ðv, v* , sÞ and v0* ¼ v0* ðv, v* , sÞ, with arbitrary s 2 O a manifold that determines the postcollisional relative position u0 ¼ v0  v0* , for an arbitrary state v* 2 n . Such manifold is the sphere Sn1 when the interaction correspond to particles characterized by indistinguishable spheres interacting by conserving centre of mass and local energies. The parameter k quantifies the scaled mean free path in between interactions, and it is assumed to be or oder of unity in rarefied regimes. The material derivative d/dt refers to the Lagrangian formulation of Hamiltonian dynamics of mixing (x, v) states, as in classical to particle plasma physics, and they are viewed as the divergence-free dynamics of

406 Handbook of Numerical Analysis

space-momentum mixing. The corresponding interacting pairs transition probability rates from (v, v*) to ðv0 , v0* Þ are quantified by the collision kernel B(u, s). This equation is nonlocal and linear in the case when f (x, v  u, t) is replaced by a know probability density. Thus, we define the Kac Master equation formulation as a double mixing convolution structure Z Z d f ðx, v, tÞ’ðvÞ dv ¼ Qðf , f Þðx, v, tÞ ’ðvÞdv (2) dt N d Z ¼k f ðx, v, tÞ f ðx, v  u, tÞG’, B ðu,vÞdu dv: (3) d d

The weight function G’, B (u, v) is a mixing form of premixing and postmixing positions in v-space that depends only on the state variable v and its relative position state u. This weight function models the s-average of the interaction on the O manifold, i.e. Z (4) G’, B ðu, vÞ ¼ ð’ðv0 Þ  ’ðvÞÞ Bðv, u, sÞds, O

that depends on the s-average of the test function ’ on the exchange law of states multiplied to the transition probability interaction rates B(u, s). These weight functions G’, B (u, v) are often nonlinear and encode most of the information about, not only, the dynamics of interactions but also the regularity of the solution to such equation as much the decay rate to equilibrium states. More precisely, (1) The interaction law v0 ¼ v0 ðv, v* ,sÞ; v0* ¼ v0* ðv, v* sÞ, microreversible or not, determines the space of collision invariants: all those ’(v)) that nullify the weight function G’,B(u, v). These collision invariants select the properties of the stationary states. (2) Propagation of chaos assumption and time irreversibility: decorrelation before the next interaction is encoded in the difference ’ðv0 Þ  ’ðvÞ of the weight function and presets stability for the flow. In particular, when the interaction i