23
INTERNATIONAL JOURNAL FOR NUMERICAL METHODS IN ENGINEERING Int. J. Numer. Meth. Engng 2004; 59:2065–2087 (DOI: 10.1002/nme.969) A recipe to detect the error in discretization schemes Giovanni Lapenta , Theoretical Division, Los Alamos National Laboratory, Los Alamos, NM 87545, U.S.A. SUMMARY The necessity for a reliable measure of the discretization error arises in adaptive mesh refinement and in moving mesh adaptation. The present work discusses a detector of the discretization error based on the interpolation reconstruction of the operators. The technique presented here is named operator recovery error source detector (ORESD). Its main features are: First, the technique is based on the operators being discretized and does not require any user intervention or any a priori knowledge of the solution or its properties. Second, the ORESD is an a posteriori error indicator, but it is shown to be consistent with the a priori error provided by the modified equation approach. Third, the technique is based on the operators being solved and is tailored to the specific problem at hand. Four, the technique is simple and is based on a small stencil, resulting in a very inexpensive error detection. In the present work, the ORESD is derived and applied to two tutorial examples: divergence and gradient. With the aid of the two examples and using the general derivation, the ORESD is then applied to the gas dynamics equations. Two benchmarks are used to test the performance. First, a shock tube problem is solved (Sod’s benchmark) in a Lagrangian and in a Eulerian frame. Second, the Colella’s wedge problem is solved using CLAWPACK. Finally, the ORESD is applied to the 2D Poisson equation on a uniform and on a non-uniform grid to test the application to elliptic problems. In all examples the operator recovery error source detector succeeds in detecting the real sources of error. Copyright 2004 John Wiley & Sons, Ltd. KEY WORDS: discretization error; operator recovery error source detector 1. INTRODUCTION To achieve true physics-based predictive capability, one needs to control the truncation error in numerical schemes. To reach this goal at reasonable costs, two approaches can be followed. First, adaptive mesh refinement (AMR) [1] can be used to refine the computational grid in regions where the accuracy is insufficient. Second, moving mesh adaptation (MMA) [2] can be used to move mesh points towards regions where more accuracy is required. Either way, we need to know where the accuracy is required. Correspondence to: Giovanni Lapenta, Theoretical Division, Los Alamos National Laboratory, Los Alamos, NM, 87545, U.S.A. E-mail: [email protected] Received 13 June 2002 Revised 9 January 2003 Copyright 2004 John Wiley & Sons, Ltd. Accepted 14 May 2003

A recipe to detect the error in discretization schemes › ~phoenics › EM974 › TG PHOENICS › BRUNO … · RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2067 applies the

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

  • INTERNATIONAL JOURNAL FOR NUMERICAL METHODS IN ENGINEERINGInt. J. Numer. Meth. Engng 2004; 59:2065–2087 (DOI: 10.1002/nme.969)

    A recipe to detect the error in discretization schemes

    Giovanni Lapenta∗,†

    Theoretical Division, Los Alamos National Laboratory, Los Alamos, NM 87545, U.S.A.

    SUMMARY

    The necessity for a reliable measure of the discretization error arises in adaptive mesh refinement andin moving mesh adaptation. The present work discusses a detector of the discretization error basedon the interpolation reconstruction of the operators. The technique presented here is named operatorrecovery error source detector (ORESD). Its main features are: First, the technique is based on theoperators being discretized and does not require any user intervention or any a priori knowledge ofthe solution or its properties. Second, the ORESD is an a posteriori error indicator, but it is shown tobe consistent with the a priori error provided by the modified equation approach. Third, the techniqueis based on the operators being solved and is tailored to the specific problem at hand. Four, thetechnique is simple and is based on a small stencil, resulting in a very inexpensive error detection.

    In the present work, the ORESD is derived and applied to two tutorial examples: divergence andgradient. With the aid of the two examples and using the general derivation, the ORESD is thenapplied to the gas dynamics equations. Two benchmarks are used to test the performance. First, ashock tube problem is solved (Sod’s benchmark) in a Lagrangian and in a Eulerian frame. Second,the Colella’s wedge problem is solved using CLAWPACK. Finally, the ORESD is applied to the 2DPoisson equation on a uniform and on a non-uniform grid to test the application to elliptic problems.In all examples the operator recovery error source detector succeeds in detecting the real sources oferror. Copyright � 2004 John Wiley & Sons, Ltd.

    KEY WORDS: discretization error; operator recovery error source detector

    1. INTRODUCTION

    To achieve true physics-based predictive capability, one needs to control the truncation errorin numerical schemes. To reach this goal at reasonable costs, two approaches can be followed.First, adaptive mesh refinement (AMR) [1] can be used to refine the computational grid inregions where the accuracy is insufficient. Second, moving mesh adaptation (MMA) [2] canbe used to move mesh points towards regions where more accuracy is required. Either way,we need to know where the accuracy is required.

    ∗Correspondence to: Giovanni Lapenta, Theoretical Division, Los Alamos National Laboratory, Los Alamos, NM,87545, U.S.A.

    †E-mail: [email protected]

    Received 13 June 2002Revised 9 January 2003

    Copyright � 2004 John Wiley & Sons, Ltd. Accepted 14 May 2003

  • 2066 G. LAPENTA

    Typically, regions of interests are detected in one of two approaches. First, heuristic measurescan be devised in a problem-dependent fashion based on the intuition of the physical evolutionof the system. This approach is often used by experienced developers but makes the use ofAMR or MMA more an art than a science. Second, a posteriori error estimators [3] can beused to measure rigorously the truncation error. Such approach is usually highly mathematicaland its rigorous application is of limited scope. Nevertheless, the approach can be appliedapproximately, regardless of its rigor, in a number of applications.

    In the present paper, we follow the second approach and attempt to find a general detectorof the regions where the truncation error is larger. Our aim is to derive a general approachthat can be applied to any given set of equations without requiring any a priori knowledge ofthe physics of the system under investigation or any property of the solution being found.

    The literature on finite element methods offers various error estimation methods. A recentreview book describes several such approaches [3]. Examples often used in the literatureinclude the inner- and inter-element residual jump error estimator [4], the superconvergentpatch recovery error estimator [5] and the equilibration approach [6]. Of particular interestto the preset work is the family of gradient recovery error estimators [3] where the gradientcomputed in a given numerical scheme is compared with a superconvergent recovered gradientto provide an error estimator. Gradient recovery error estimators are widely used in the finiteelement community and are finding application also in other approaches such as finite volumesand finite differences. Rigorously, gradient recovery error estimators are valid only for ellipticproblems.

    In the present paper, we present an approach based on a generalization of the gradientrecovery error estimator valid for any differential operator. The method is called operatorrecovery error source detector (ORESD). In the present work, we present the technique in itssimplest formulation and we apply it to two tutorial examples and to often used benchmarks.In the present paper, the focus will be limited to first-order operators, but the technique canin principle apply to any operator. In a related work [7], we describe the application of theORESD technique to MMA.

    The operator recovery method is designed as a generalization of methods typically usedfor finite element techniques, but can be applied to any discretization approach. In the presentwork, we will limit the examples to finite difference and finite volume methods, but the methodcan in principle be applied also to finite element discretizations.

    The results prove that the ORESD can be used as a general purpose error detector. Thedetector can be applied to any existing numerical scheme and to any existing code either toadapt the grid in MMA schemes [7] or to refine it in AMR schemes.

    The paper is organized as follows. Section 2 derives the ORESD and discusses particularlythe difference between global truncation error and local truncation error. The latter is the truesource of error that propagates in the system and leads to the global truncation error. Thedetector that we develop aims at measuring the source of the error (local truncation error). Thepractical application is to refine the grid where the error is being generated: if we reduce thesource of error we reduce also the global truncation error. Section 3 describes the consistencyof the error source detector that represent an a posteriori measure of the local truncation errorwith the standard textbook a priori error analysis. The detectors derived in the present paper areindeed consistent, as can be proved in all cases using the modified equation approach. Section3 provides one example of such proof. Section 4 provides two tutorial examples where theORESD is applied to the divergence (Algorithm 1) and the gradient (Algorithm 2). Section 5

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2067

    applies the ORESD to the practical case of the gas dynamics equations. Algorithm 3 is presentedto detect the error in the energy equation. Two classic benchmarks are used: Sod’s shock tubeand the Colella’s wedge problem. Section 6 shows the application of the ORESD to an ellipticproblem in 2D uniform and non-uniform grids. Finally, Section 7 draws the conclusions of thepresent work and outlines the directions for future work.

    2. OPERATOR RECOVERY ERROR SOURCE DETECTOR

    Two errors can be of interest to adaptation strategies: the local truncation error or the globaltruncation error. The local truncation error is the classic truncation error found in any textbookand derived using the Taylor series expansion (see Section 3 below). However, the truncationerror does not remain localized and propagates in the system leading to a global truncationerror. In general, the two errors can be different. Clearly, for the user the end result of interest isthe global error, i.e. the answer to the question: what is the accuracy of the solution? However,for grid adaptation and refinement, the error of interest is the local truncation error. The reasonis that the local truncation error is the source of error and grid refinement must remove thesource of error. It would be ineffective to refine the grid where the effects of the error sourceare large, as it would leave the error source unaffected. A recent work [8] has analysed theissue in practice using the modified equation approach [9–11] to compute the local truncationerror and solving the equation for error propagation to obtain the global truncation error. Whenthe grid is adapted to the error source (local truncation error) the quality of the solution isfound to be better than in the case where the grid is adapted to the global truncation error.Based on these ideas and practical examples, we have developed a new a posteriori errorsource detector that can be shown to be consistent (see Section 3 below) with the truncationerror produced by the modified equation approach.

    We name the approach operator recovery error source detector (ORESD) since it extends toany operator the method used for the gradient operator by the gradient recovery error estimator[3]. Below, we describe the derivation of the method and we summarize some of its properties.

    For the sake of definiteness, we shall assume a general K-dimensional grid where a dis-cretized field is node centred. For notation, we label the cells with c and the nodes with n,using further the notation n(c) to indicate the nodes neighbouring cell c and c(n) to indicatethe cells neighbouring node n. The notation is summarized pictorially in Figure 1 for thespecial case of the 2D space, K = 2.

    We consider a general multi-dimensional non-linear partial differential operator

    O(q) (1)

    Equation (1) summarizes the most general operator acting on a function q(x) defined onthe multidimensional space x. We note that the space x should be intended as a generalK-dimensional space and one of the co-ordinates might have the physical meaning of time.

    Equation (1) is discretized on a grid with N nodes xn:

    On(q1, . . . , qN) (2)

    From the discretized field qn and from the discretized operator On applied to qn definedonly on the grid nodes, it is possible to reconstruct two functions defined everywhere in the

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • 2068 G. LAPENTA

    Figure 1. Typical nomenclature for the grid and the discretization.

    continuum space x:

    q̃(x) =L{qn}Õ(x) =L{On(q1, . . . , qN)}

    (3)

    where L is the operator representing interpolation from the grid points to the continuum. Theorder of interpolation (e.g. linear, quadratic) depends on the scheme where the error detectoris applied. In the examples below we will use linear interpolation, but in other applications itmight be necessary to use higher order of interpolation.

    The local truncation error is defined as the difference between the interpolation of thediscretized operator applied to the discretized field Õ(x) and the exact differential operatorapplied to the interpolation of the discretized field q̃(x):

    e = Õ(x) − Oq̃(x) (4)In practice Equation (4) can often be simplified further, since the exact operator applied tothe reconstructed function is often constant over the cell: Oq̃(x) = Oc. When the ORESD isapplied in 1D to first-order differential operators this simplification is exact, in other cases andin multiple dimensions, the simplification is often only an approximation.

    The average local truncation error ec on any given cell c is defined as the �p norm (definedon each cell):

    ec =(

    1

    Vc

    ∫Vc

    ep dV

    )1/p(5)

    where Vc is the cell volume. In the example sections, we use the �2 norm (p = 2) in the 1Dexamples but for simplicity we use the �1 norm (p = 1) in 2D.

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2069

    (a)

    (b)

    Figure 2. Pictorial example of the application of the ORESD. The operator O(q) = dq/dx is thefirst-order derivative in 1D. The upper figure (a) shows the discrete function q defined at the nodesof the grid and its linear reconstruction q̃(x) (solid line). The bottom figure (b) shows the discretizedoperator defined at the nodes (triangles) and, from it, its linear interpolation (dashed line); the exactoperator applied to the reconstructed function is shown by the solid line. The error ec is given by

    the �p norm over each cell of the difference between dashed and solid line.

    The procedure described above represents a terse but complete operational definition of theORESD. To render the description more intuitive, Figure 2 represents pictorially the procedurefor the simple case of the gradient operator in 1D.

    In the example, we consider the derivative of a function q(x) in 1D. The continuum isdiscretized on a uniform grid with spacing �, where the nodes are labelled by n, while thecells are labelled by c = n + 12 with cell c between node n and node n + 1. The nodal valuesqn are shown as dots in Figure 2(a). The reconstructed function q̃(x) in the continuum isobtained by linear interpolation and is shown as a solid line in Figure 2(a). From the discretefunction qn we can define the second-order accurate node centred derivative as

    dq

    dx

    ∣∣∣∣n

    = qn+1 − qn−12�

    (6)

    The discrete approximation to the derivative operator is shown in Figure 2(b) by triangles.From the triangles using linear interpolation, we can reconstruct the operator in the continuumÕ(x), shown as a dashed line. To compute the error we compare the reconstructed operatorwith the exact operator applied to the reconstructed function Oq̃ (solid line in Figure 2(b)). Thedifference between the solid and dotted line in Figure 2(b) is the truncation error e defined

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • 2070 G. LAPENTA

    in Equation (4). The �p norm of e in each cell provides the error detector ec defined inEquation (5).

    Figure 2 provides just a simple example but it is a complete and easy to visualize descriptionof the general procedure.

    The application of the ORESD requires two considerations.First, in its definition we used only the concept of grid, in general unstructured, with a

    discretization scheme that assigns values to the field and to operators on grid points. From thispoint of view, the generality is considerable and the method can be applied to a great varietyof methods from finite differences and finite volumes to finite elements.

    Second, the details of the implementation can vary. In particular, the interpolation schemeis very dependent on the numerical discretization scheme upon which the detector is intendedto be applied. In certain schemes the interpolation procedure might be involved, but in a greatvariety of schemes it is not. For example in the case of triangular or quadrilateral grids (ortheir 3D counterparts) interpolation with b-splines provides an easy to use approach. In theexamples below we will consider this instance. And we will furthermore reduce the scope tosecond-order accurate schemes applied to structured logically quadrilateral grids. In this case,linear interpolation (or bilinear in 2D and multilinear in ND) is adequate.

    3. MODIFIED EQUATION APPROACH AND CONSISTENCY

    In the previous section, we have described a method intended to detect a posteriori thetruncation error of a given numerical scheme. To evaluate its practical value, we have toinvestigate the consistency of the ORESD with the classic a priori truncation error analysis.

    A very useful tool for a priori truncation error analysis is the modified equation approach(MEA) [9–11], where the discretized equation is analysed using Taylor series. Each term in thediscretized equation is replaced with its Taylor series expansion; the final result is to recoverthe original differential equation plus additional terms. The lowest-order additional term notpresent in the original differential equation is the leading truncation error. This analysis isfound in any textbook and has been used successfully in a number of applications.

    A given discretization scheme is said to be consistent when the MEA gives back the originalequation plus a truncation error that vanishes as the discretization is refined. In analogy, weshall call the error detector consistent when it is found by the MEA to be of the same orderas the actual a priori truncation error.

    The ORESD is indeed consistent in all the examples shown below. The proof in each caseis a tedious exercise and is not reported below for all cases. For the sake of completeness, theproof is shown for the simplest example. All algebraic manipulations were done easily usingMATHEMATICA [12].

    We consider a uniform grid in 1D and we apply the error source detector to the first-order derivative. For the typical configuration with nodes labelled by n and cells labelled byc = n + 12 , the second-order accurate node centred derivative of a node centred 1D field q isdefined as

    dn = qn+1 − qn−12�

    (7)

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2071

    Applying Taylor series expansion around the cell centre, we can compute the actual truncationerror as can be found on any numerical analysis textbook:

    T = 16

    �3q�x3

    ∣∣∣∣∣n

    �2 (8)

    since the discretization is centred (i.e. is second-order accurate).We can compare this result with the MEA analysis applied to the error source detector. The

    ORESD is computed as described in Section 2 and as summarized in Figure 2. To computethe detector, it is useful to define an auxiliary derivative computed in each cell c:

    dc = qn+1 − qn�

    (9)

    From definition (4), the truncation error described above becomes

    e =(

    dc−1 − dn + dn − dn−14

    )1

    2+

    (dc − dn + dn − dn+1

    4

    )1

    2(10)

    when averaged over the node control volume.Equation (10) can be analysed with the modified equation approach. Applying again Taylor

    series expansion, with lengthy but trivial algebra we obtain that the average error on a cell is

    ēc = 18

    �3q�x3

    ∣∣∣∣∣n

    �2 (11)

    Comparing the actual truncation error, Equation (8), with the ORESD, Equation (11), theconsistency of the detector is readily observed.

    4. APPLICATION TO FUNDAMENTAL OPERATORS

    The method outlined above is composed by four practical ingredients.

    1. The continuum exact partial differential operator.2. A given discretization scheme for which the truncation error needs to be detected a

    posteriori.3. The interpolation reconstruction.4. Computation of the detector according to Equation (4).

    Below, we show how the procedure is applied in practice for the divergence and gradientoperators. Note that the detail of the implementation of the ORESD depend on the type ofdiscretization and particularly on whether the discretization is centred or staggered. In Figure 2,an example of node centred discretization was given. Below, examples are shown for staggereddiscretizations.

    4.1. Divergence operator

    We study the error of a given scheme to compute the cell centred divergence based on nodecentred values of a vector field un

    div u → (DIV u)c (12)

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • 2072 G. LAPENTA

    where div is the exact divergence operator in the continuum and DIV is the discretized diver-gence. Any scheme can be analysed; given the scheme to analyse, the present method detectsthe discretization error.

    To apply the theory developed above we identify the operator as O = div u and the field qis u. The ORESD, Equation (5), becomes

    epc = 1

    Vc

    ∫Vc

    (D̃IV u − div ũ)p dV (13)

    The definition of the ORESD (13) requires the analytical integration of simple polynomialfunctions, a tedious but straightforward task. For simplicity we will use the �2 norm in 1D butthe �1 norm in 2D, allowing for simpler computations in 2D. Such computation is performedonce with pencil and paper and the final expression can be coded once for a given equation.All runs of the computer code will use the same analytical expression.

    To evaluate Equation (13), we need to compute the continuum divergence (div) applied tothe interpolated field ũ, and the interpolation of the discrete divergence (D̃IV u).

    The continuum divergence applied to the interpolated field, div ũ, is assumed to be uniformover the cell and equal to the cell centred discretization of the divergence, obtained from thenodal values of un using any suitable discretization rule. Note that this approximation simplifiesthe derivation but can be avoided at the cost of a complication of the algorithm.

    The interpolation of the discrete divergence (D̃IV u) is computed by first approximating thedivergence in each node. Since the field u is assumed to be node centred, the node centreddivergence cannot be computed directly. To approximate it, we first obtain a cell centred versionof uc, for example by simple linear average. Once the centred values uc are obtained, the nodaldivergence can be readily computed. From the nodal value of (DIV u)n, we compute the linearinterpolation and perform the integral directly.

    The procedure just outlined is summarized in Algorithm 1. Algorithm 1 can be applied toany second-order accurate discretization schemes for the cell centred divergence operator. Giventhe discretization schemes, Algorithm 1 provides a procedure to compute the operator basederror source detector for the divergence operator. Algorithm 1 is trivially modified for the nodecentred divergence operator computed using a cell centred field.

    4.2. Gradient operator

    We study the error of a given scheme to compute the node centred gradient based on cellcentred values of a scalar field �c

    grad� → (GRAD�)m (14)where grad is the exact gradient operator in the continuum and GRAD is the discretizedgradient. Any scheme can be analysed; given the scheme to analyse, the present methoddetects the discretization error.

    To apply the theory developed above we identify the operator as O = grad� and the fieldq is �. The ORESD, Equation (5), becomes

    epc = 1

    Vc

    ∫Vc

    ∥∥∥ ˜GRAD� − grad �̃∥∥∥p dV (15)Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2073

    Given node centred values un, compute cell centred values by linear averaging

    uc = 1Nc

    ∑n(c)

    un

    where the summation is over the Nc nodes around cell c.From the node centred values compute the cell centred divergence

    un → (DIV u)cand from the cell centred values compute the node centred divergence

    uc → (DIV u)nFrom the node centred operator compute the linear interpolation within the cell

    D̃IV u = ∑n(c)

    (DIV u)nS(xn − x)

    where S(xn − x) are the basis functions for linear interpolation.Finally compute the operator recovery error as

    ep = 1Vc

    ∫Vc

    (D̃IV u − (DIV u)c)p dV

    Algorithm 1. ORESD for the Divergence operator. Valid for second-order accurate schemes.

    that is computed again analytically integrating the polynomial functions present in the integraldefinition. Algorithm 2 summarizes the practical steps involved.

    Algorithm 2 can be considered a variant of the family of gradient recovery error estimators[3] often used in the finite element community. Different gradient recovery error estimatorsdiffer in the way the recovered gradient is computed. Algorithm 2 can be seen as yet anotherway of doing that.

    However, the analogy holds only for the gradient operator, the gradient recovery errorestimator and the ORESD are very different in all other examples (e.g. in hyperbolicproblems).

    4.3. Second-order operators

    The ORESD can be applied also to second- and higher-order operators. Two approaches havebeen considered.

    First, one can consider a second-order operator as the combination of two first-order operators.Below, we present an example of this approach where the ∇2 operator is considered thedivergence of the gradient operator.

    Second, the second-order operators can be directly treated using the procedure outlined inSection 2. It should be noted that for second-order accurate discretization of second-orderoperators, the linear interpolation can still be used even though it leads to singularities on the

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • 2074 G. LAPENTA

    Given cell centred values �c, compute node values by linear averaging.

    �n =1

    Nn

    ∑c(n)

    �c

    where the summation is over the Nn cells around node n.From the node centred operator compute the cell centred gradient

    �n → (GRAD�)cand from the cell centred values compute the node centred gradient

    �c → (GRAD�)nFrom the node centred values compute the linear interpolation within the cell

    ˜GRAD� = ∑n(c)

    (GRAD�)nS(xn − x)

    where S(xn − x) are the basis functions for linear interpolation.Finally compute the operator recovery error as

    ep = 1Vc

    ∫Vc

    ∥∥∥ ˜GRAD� − (GRAD�)c∥∥∥p dVAlgorithm 2. ORESD for the Gradient operator. Valid for second-order accurate schemes.

    boundary of the cells. The procedure for handling such singularity is ‘mollification’ and iswidely used in the finite element literature [13]. In practice it simply requires to use distributionsrather than functions in performing the integrals (i.e. Dirac’s deltas should be used to include thecontribution of the singularity at the boundary). Unfortunately this approach is rather involvedin more than 1D and the first approach has proved more practical.

    5. APPLICATION TO HYPERBOLIC PROBLEMS

    We consider the classic problem of gas dynamics. The gas dynamics equations written in ageneral moving frame are

    Dg�

    Dt+ (u − ug) · ∇� = −�∇ · u

    �DguDt

    + (u − ug) · ∇u= −∇(p + q)

    �Dgi

    Dt+ (u − ug) · ∇i = −p∇ · u

    (16)

    where � is the density, u is the velocity, i is the internal specific energy and ug is the gridvelocity. The pressure p satisfies the equation of state: p = (� − 1)�i. An artificial viscosityterm q is applied to smooth shocked solutions [14, 15].

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2075

    The gas dynamics equations (16) have been written in a general moving frame, where thetotal derivative is defined as

    DgDt

    ≡ ��t

    + ug · ∇ (17)

    Two limits can be considered. First, the Lagrangian frame is obtained for ug = u. Second,the Eulerian frame is obtained for a fixed frame, ug = 0. In general, the equations can besolved on any moving frame specified by ug, but in the present study the scope will be limitedto the Eulerian and Lagrangian frames.

    The ORESD for the gas dynamics equations requires to consider the three equations sep-arately. The three error source detectors for the three equations (16) can be obtained readilyusing the prescriptions of Section 2. In a previous paper [7], a simple method was presentedto combine the error source detectors for various equations. In the present work, we focusexclusively on the energy equation. The motivation is that the consideration of the other twoerrors (continuity and momentum equation) does not add understanding and does not provideany improvement in practice. Using the definition given in Section 2 we apply Algorithm 3(valid in any number of dimensions), obtained from the prescriptions in Section 2, identifying:q → i and O → (p/�)∇ ·u+(u−ug) ·∇i. Clearly, the current operator is a combination of thetwo basic operators considered in Section 4. Consequently, Algorithm 3 is derived immediatelyfrom Algorithms 1 and 2.

    Below we compare the ORESD with a number of other error estimators and indicatorswidely used in the literature. We focus the comparison particularly with the family of recoveryerror estimators [3] for their wide practical use and for their close relationship with the ORESDdefined in the present paper.

    5.1. 1D gas dynamics equations

    For the 1D examples, we choose to implement the error detection technique presented abovewithin the Arbitrary Lagrangian Eulerian (ALE) method [16]. In the ALE method, the modelequations are written in Lagrangian form and the typical computational cycle is formed bythree phases. First, in the Lagrangian phase, the Lagrangian equations are advanced on a grid(called Lagrangian grid) co-moving with the same fluid velocity characteristic of the modelequations under consideration. After the Lagrangian phase, in the rezoning phase, a new gridis generated whose properties are chosen to be desirable according to some selected criterion.Last, in the remapping phase, the information is transferred from the Lagrangian grid to thenew grid generated in the rezoning phase.

    In the present work, we use the typical discretization [15] of the Lagrangian equations wheredensity, internal energy and pressure are located in the cell centres �c, ic and the velocity is onthe nodes un. In the tests presented below, we use a combined linear and non-linear artificialviscosity proposed by Kuropathenko [14]:

    q = �c1 (� + 1)

    4|un+1 − un| +

    √c22

    (� + 14

    )2(un+1 − un)2 + �2c2s

    |un+1 − un| (18)where cs is the speed of sound and c1 = c2 = � = 0.45. Note that we impose q = 0 whenun+1 − un > 0 [15].

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • 2076 G. LAPENTA

    Given node centred values un, compute cell centred values by linear averaging

    uc = 1Nc

    ∑n(c)

    un

    where the summation is over the Nc nodes around cell c.Given cell centred values �c, ic compute cell centred values by linear averaging

    �n =1

    Nn

    ∑c(n)

    �c, in =1

    Nn

    ∑c(n)

    ic

    where the summation is over the Nn cells around node n.Compute the cell centred operator

    Oc = pc�c

    (DIV u)c + (uc − ugc) · (GRAD i)c

    and the node centred operator

    On = pn�n

    (DIV u)n + (un − ugn) · (GRAD i)n

    From the node centred operator compute the linear interpolation within the cell

    Õ = ∑n(c)

    OnS(xn − x)

    where S(xn − x) are the basis functions for linear interpolation.Finally compute the operator recovery error as

    ep = 1Vc

    ∫Vc

    (Õ − Oc)p dV

    Algorithm 3. ORESD for the energy equation. Valid for second-order accurate schemes.

    The rezoning phase will be limited to the Eulerian (ug = 0) and Lagrangian (ug = u) case.The remapping phase uses the monotonic implementation of MPDATA [17]. In the remappingphase, the staggering requires to transfer the momentum from vertices to cell centres and viceversa. To avoid numerical diffusion we employ a method proposed by Margolin and Beasonthat requires to advect both momentum and its derivative [18]. Details of the implementationof the ALE method can be found elsewhere [19].

    We have tested the method with a very popular and widely referenced gas dynamics problem,Sod’s shock tube benchmark [20]. The gas is characterized by � = 75 and is assumed to beinitially at rest with two uniform regions characterized by different density and pressure. Theleft half of the system has � = 1, p = 1 and the right half has � = 0.125, p = 0.1. The totalsystem size is 1.

    The results of a Lagrangian calculation are shown in Figure 3. The solution presents anumber of classic singularities. From the left of Figure 3(a), one can recognise an expansionfan delimited by two corners (where the solution is continuous but its derivative is not) at its

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2077

    0 0.2 0.4 0.6 0.8 10.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    x

    ρ

    0 0.2 0.4 0.6 0.8 11.6

    1.8

    2

    2.2

    2.4

    2.6

    2.8

    3

    x

    i

    0 0.2 0.4 0.6 0.8 10

    0.2

    0.4

    0.6

    0.8

    1

    x

    u

    (a) (b)

    (c)

    Figure 3. Gas dynamics—Sod’s shock tube benchmark: density (a), energy (b) and velocity (c) at theend (t = 0.23) of a Lagrangian calculation.

    head (x = 0.227884) and at its tail (x = 0.483839), a contact discontinuity at x = 0.713296 anda shock at x = 0.902962. In a Lagrangian calculation, the grid points move in space accordingto the local velocity and the final grid is highly non-uniform, Figure 4. As consequence, thecorners at the head and tail of the expansion fan and the shock are a major source of errorsince they move relative to the grid. Note in Figure 3(c) that the velocity is not constant acrossthe fan and its corners and it has a sharp discontinuity at the shock. On the contrary, thecontact discontinuity moves at the same velocity of the grid and is well represented by themethod, that propagates the contact discontinuity without diffusing it. Note that in Figure 3(c)the velocity field is constant across the contact discontinuity. As a consequence the contactdiscontinuity is a lesser source of error than the shock.

    Looking at Figure 3 we note that, as expected, the Lagrangian calculation follows thecontact discontinuity accurately, but the accuracy ahead of the shock is rather poor, leading toa spreading of the shock to the right of the shock. Also, the rarefaction region is inaccuratelydescribed.

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • 2078 G. LAPENTA

    0 0.2 0.4 0.6 0.8 12

    4

    6

    8

    10

    12

    14x 10

    -3

    x

    ∆ x

    Figure 4. 1D gas dynamics (Lagrangian form)—Sod’s shock tube benchmark: grid spacing �x as afunction of space, at the end of the run.

    0 0.2 0.4 0.6 0.8 110

    -10

    10-5

    100

    x

    Glo

    bal T

    runc

    atio

    n E

    rror

    0 0.2 0.4 0.6 0.8 110

    -10

    10-5

    100

    x

    Err

    or S

    ourc

    e D

    etec

    tor

    GROR

    (a) (b)

    Figure 5. 1D gas dynamics (Lagrangian form)—Sod’s shock tube benchmark: comparison of theglobal truncation error (a) with two error source detectors (b), at the end (t = 0.23) of a Lagrangiancalculation. The gradient recovery error estimator by Babuska and Rheinboldt [21] (triangles) and the

    ORESD (circles) are shown in (b).

    The present case allows to test the error detector on a non-uniform grid. Below, we testthe ORESD and we compare with the classic error estimator due to Babuska and Rheinboldt(Definition 6.3 of Reference [21]).

    Figure 5 compares the actual global truncation error (i.e. the difference between the computedand the exact solution) with the ORESD. For reference, we consider also the estimator byBabuska and Rheinboldt [21] that for the present case we apply as a gradient recovery errorestimator applied to the energy field i. Note that the global truncation error is shown only forguidance. As discussed in Section 2, the detector does not aim at computing the actual error

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2079

    0 0.2 0.4 0.6 0.8 10.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    x

    ρ

    0 0.2 0.4 0.6 0.8 11.6

    1.8

    2

    2.2

    2.4

    2.6

    2.8

    3

    x

    i

    0 0.2 0.4 0.6 0.8 10

    0.5

    1

    x

    u

    (a) (b)

    (c)

    Figure 6. Gas dynamics (Eulerian form)—Sod’s shock tube benchmark: density (a), energy (b) andvelocity (c) at the end (t = 0.23) of a Eulerian calculation.

    but rather its source. As noted in Section 2, the local truncation error that the detector measurespropagates through space and evolves in time leading to the global truncation errors. The globalerror (Figure 5(a)) and the local error (Figure 5(b)), which is the source for the global error arenot the same and they should not be expected to be even similar, let alone equal. Therefore,while the comparison of the two can be instructive, the main point in analyzing the resultsbelow should be the performance of the detector in measuring where the error is being created.

    As noted above, three sources of error are present in a Lagrangian calculation: the shock andthe corners at the edge of the expansion fan, where the solution’s derivative is discontinuous.The contact discontinuity is not a major source of error since the Lagrangian approach treatsit accurately. Figure 5 proves that indeed the ORESD detects these three sources of errorand nothing more. The gradient recovery error estimator, instead, besides detecting the correctsources of error, detects also the contact discontinuity. This is a success for the ORESD and afailure for the gradient recovery error estimator which detects a false reading: there is no sourceof error at the contact discontinuity and yet the gradient recovery error estimator detects it.

    It is interesting to compare the results for the Lagrangian calculation above with the cor-responding results of an Eulerian calculation where a source of error is indeed present at thecontact discontinuity. Figure 6 shows the results of the same test problem seen in Figure 3

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • 2080 G. LAPENTA

    0 0.2 0.4 0.6 0.8 110

    -10

    10-5

    100

    x

    Glo

    bal T

    runc

    atio

    n E

    rror

    0 0.2 0.4 0.6 0.8 110

    -10

    10-5

    100

    x

    Err

    or S

    ourc

    e D

    etec

    tor

    GROR

    (a) (b)

    Figure 7. 1D gas dynamics (Eulerian form)—Sod’s shock tube benchmark: comparison of the globaltruncation error (a) with two error source detectors (b), at the end (t = 0.23) of a Eulerian calculation.

    The gradient recovery error estimator (triangles) and the ORESD (circles) are shown in (b).

    using the ALE code with Eulerian rezoning. In the Eulerian run, the grid remains uniformand all the singularities of the solution move with respect of the grid and are a major sourceof error: corners, shock and contact discontinuity should all be detected as error sources. Theanalysis of the error detector is in Figure 7.

    Now the ORESD detects correctly also the contact discontinuity. The gradient recovery errorestimator is correct in the present case.

    The comparison of the Lagrangian and Eulerian case shows that the ORESD detects reliablyall the sources of error and nothing more. Its advantage over detectors not tailored to the actualoperators being solved is that it has no spurious readings.

    5.2. 2D gas dynamics equations

    To investigate the performance of the ORESD in 2D, we have applied Algorithm 3 to resultsobtained with CLAWPACK [22]. CLAWPACK is a publicly available software [23] based ona Eulerian formulation of the conservation laws [24]. We have applied the code to the solutionof the gas dynamics equations (16) for the Colella’s wedge problem [25]. A planar shockis incident on an oblique surface; the angle between the shock direction and the surface is�/6. In front of the shock the fluid is at rest and the shock Mach number is 10. Figure 8summarizes the initial conditions as well as the expected features in the solution at time t = 0.2(corresponding to the same time of Figures 9 and 10 of Reference [25]). The actual computedresults at time t = 0.2 for a 240 × 120 grid are shown in Figure 9 where all the expectedfeatures can be recognized.

    The ORESD is computed based on the results obtained from CLAWPACK using Algorithm3. The detector is shown in Figure 10 for a simulation with a grid 120× 60. For comparison,we also provide an estimate of the actual error, computed by difference between the solutionon a 120 × 60 grid and a fiducial solution. The fiducial solution is obtained using a morerefined grid (480 × 240) and using both CLAWPACK and PPM [26] and averaging betweenthe two. Furthermore, two more error measures often used in the literature are considered forcomparison. First, we consider the warp indicator often used in the finite volume literature.

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2081

    Figure 8. 2D gas dynamics (Eulerian form)—Colella’s benchmark: initial and final features. Solidlines are shocks, dashed lines are slip surfaces.

    The warp indicator is defined as the variance among the different values obtained at a nodewhen extrapolating the internal energy from the four directions (backward and forward alongx and backward and forward along y)

    ec =√

    (ic − iNc )2 + (ic − iSc )2 + (ic − iEc )2 + (ic − iWc )2 (19)

    where ic is the internal energy in cell c and iNc is the internal energy extrapolated for cell cusing the two cells to the north (similar extrapolations are done from south, east and west).Second, we consider the superconvergent patch recovery (SPR) error estimator developed byZienkiewicz and Zhu [5].

    Figure 10 shows the results of the comparison of the different error definitions for a simula-tion with a grid 120× 60. Clearly the ORESD is successful in detecting all sources of errors.The shocks are all captured; the slip surface rolling up under the shock is evident. All featuresare detected.

    Figure 10(c) shows the error detected by the warp indicator. The two rightmost planar shocksare captured well, while the top and bow shocks are barely visible. All the structure insidethe rolling up region within the outer shocks is lost: no slip surface is measured and theinternal shock is also lost. In practice the warp indicator is often supplemented by other adhoc detectors to pick up all shocks, but still the rolling up region and the slip surfaces areoften left undetected.

    Figure 10(d) shows the SPR estimator that also detects all the features reliably.

    5.3. 2D Poisson equation

    In the present section, we consider a classic elliptic problem, the 2D Poisson equation:

    divE = � (20)where the vector field can be expressed in terms of a scalar potential as

    E = −grad� (21)

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • 2082 G. LAPENTA

    Figure 9. 2D gas dynamics (Eulerian form)—Colella’s benchmark on a 240 × 120 grid.Density, velocity and internal energy at the end of a Eulerian calculation (t = 0.2).

    Results obtained using CLAWPACK.

    Equations (20) and (21) are the classic Poisson equation. In the electrostatic analogy, usingunits where �0 = 1, E is the electric field and � is the electrostatic potential. Equations (20)and (21) constitute a system of equations where the second specifies that the vector field isirrotational.

    The computational domain is discretized on a logically quadrilateral grid, where the electricfield is a node centred quantity and the potential and charge density are cell centred quantities.The Poisson equation (20) and (21) is solved on a 2D unit square with Dirichelet conditions onall boundaries: �|�V = 0. We use the finite volume method developed by Sulsky and Brackbill[27].

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2083

    Figure 10. 2D gas dynamics—Colella’s benchmark on a 120× 60 grid at t = 0.2. Comparison of theglobal truncation error (a) with the ORESD (b), the warp indicator (c), SPR estimator [5] (d).

    We consider two different grids, a uniform 50 × 50 grid and a non-uniform 50 × 50 griddefined by

    x = i�x + � sin(2�i�x) sin(2�j�y)y = j�y + � sin(2�i�x) sin(2�j�y) (22)

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • 2084 G. LAPENTA

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    x

    y

    Figure 11. 2D elliptic problem—non-uniform 50×50 grid, generated using Equation (22) with � = 0.1.

    where i and j label the discretization along x and y. The average grid spacing is �x along xand �y along y. The non-uniform grid is shown in Figure 11.

    We solve the Poisson equation for a source of the form

    � = sin(�x) sin(�y) (23)

    and we apply the error estimator given by Algorithm 1. The Poisson equation is in reality asecond-order operator, but as noted above we prefer to split the operator in divergence andgradient as shown in Equations (20) and (21). The ORESD is then applied to the divergenceequation (i.e. the Gauss theorem) that expresses the physically more relevant condition. Theirrotational condition, instead, is exactly satisfied within the numerical scheme; its possiblenon-satisfaction analytically is besides the scope of the error analysis conducted here.

    Figure 12 shows the ORESD computed for the solution calculated on the uniform grid. Theerror in the scheme is proportional to the e ∼ ∇4� operator as predicted by the MEA. Indeedthe ORESD agrees remarkably with the actual error computed from the analytical solution.

    Figure 13 shows the ORESD computed for the solution calculated on the non-uniform grid.Now the error is different from its simple expression valid on uniform grids (i.e. e ∼ ∇4�)and it is smaller where the grid is finer. A comparison with the actual error computed from theanalytical solution confirms that the ORESD computes the error remarkably accurately even onnon-uniform grids.

    Note that in the case of elliptic problems, no characteristics exist and the propagation of thelocal truncation error changes nature. In the elliptic case, the comparison of the ORESD withthe actual solution error shows remarkable agreement.

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2085

    Figure 12. 2D Elliptic problem—uniform grid. Comparison of theglobal truncation error (a) with the ORESD (b).

    Figure 13. 2D Elliptic problem—non-uniform grid. Comparison of theglobal truncation error (a) with the ORESD (b).

    6. CONCLUSIONS

    The ORESD has been described in its simplest and most general formulation. The detector hasbeen shown to be consistent with a priori definitions of the truncation error using the MEA.

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • 2086 G. LAPENTA

    Two tutorial examples have been given leading to two practical algorithms that can form thebasis for applying the method to second-order accurate schemes. For the divergence operatorwe have provided Algorithm 1 and for the gradient operator, Algorithm 2.

    As a practical example, we have considered the gas dynamics equations, where Algorithm 3provides the error source detector. The gas dynamics equations have been solved in 1D withan ALE code developed for the purpose of the present paper using available techniques (andparticularly using MPDATA [17] for remapping). In 2D the CLAWPACK [22] code has beenused. Two benchmarks have been considered: Sod’s shock tube [20] in 1D and Colella’s wedgeproblem [25] in 2D.

    To analyse the application to elliptic problems, we have also considered the Poisson equationin 2D, both on uniform and non-uniform grids.

    In all cases the ORESD performed impeccably. For reference other error estimators availablein the literature have been also compared, showing in some cases failure where the ORESDperformed successfully.

    Even though the ORESD performs reliably, its practical implementation has been so farlimited to detect errors in the spatial discretization of first-order operators. The MEA provesthat spatial and temporal errors couple [9–11]. For example in the classic advection problemusing the donor cell (first-order upwind) method the two errors cancel when the CourantFriedricks and Lewey number is CFL = 1. Future work will need to address this issue.Recently, a promising approach in this direction has been presented [28]. The formulation issimilar to the formulation behind the ORESD. In principle, ORESD can be applied to anyK-dimensional space where one of the dimensions can be time. Future work will test ORESDapplied to the coupling of spatial and temporal discretization errors and to extend the applicationto higher-order operators.

    ACKNOWLEDGEMENTS

    The author wishes to acknowledge many useful discussions on the topics reported in the presentmanuscript with Luis Chacón, Doug Kothe, Alex Kurganov, Len Margolin, Bill Rider, Tony Scanna-pieco and Misha Shashkov. This research is supported by the National Nuclear Security Administrationunder the Advance Strategic Computing Initiative (ASCI) Program.

    REFERENCES

    1. Berger MJ, Colella P. Local adaptive mesh refinement for shock hydrodynamics. Journal of ComputationalPhysics 1989; 82:64.

    2. Liseikin VD. Grid Generation Methods. Springer: Berlin, 1999.3. Ainsworth M, Oden JT. A Posteriori Error Estimation in Finite Element Analysis. Wiley: New York, 2000.4. Johnson C. Adaptive finite-element methods for diffusion and convection problems. Computer Methods in

    Applied Mechanics and Engineering 1990; 82:301.5. Zienkiewicz OC, Zhu JZ. The superconvergent patch recovery and a-posteriori error-estimates. 1. the recovery

    technique. International Journal for Numerical Methods in Engineering 1992; 33:1331.6. Babuska I, Strouboulis T, Upadhyay CS. A model study of the quality of a-posteriori error estimators for

    linear elliptic problems: error estimation in the interior of patchwise uniform grids of triangles. ComputerMethods in Applied and Mechanical Engineering 1994; 114:307.

    7. Lapenta G. Variational grid adaptation based on the minimisation of local truncation error: time independentproblems. Journal of Computational Physics 2004; 193:159.

    8. Zhang XD, Trepanier J-Y, Camarero R. A posteriori error estimation for finite-volume solutions of hyperbolicconservation laws. Computer Methods in Applied Mechanics and Engineering 2000; 185:1.

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087

  • RECIPE TO DETECT THE ERROR IN DISCRETIZATION SCHEMES 2087

    9. Hirt CW. Heuristic stability theory for finite-difference equations. Journal of Computational Physics 1968;2:339.

    10. Warming RF, Hyett BJ. Modified equation approach to stability and accuracy analysis of finite-differencemethods. Journal of Computational Physics 1974; 14:159.

    11. Griffiths DF, Sanz-Serna JM. On the scope of the method of modified equations. SIAM Journal on Scientificand Statistical Computing 1986; 7:994.

    12. Wolfram S. The Mathematica Book. Cambridge University Press; Cambridge, 1999.13. Baines MJ. Moving Finite Elements. Clarendon Press: Oxford, 1994.14. Caramana EJ, Shashkov MJ, Whalen PP. Formulations of artificial viscosity for multi-dimensional shock

    wave computations. Journal of Computational Physics 1998; 144:70.15. Shashkov MJ. Conservative Finite-Difference Methods on General Grids. CRC Press: Boca Raton, 1996.16. Hirt CW, Amsden AA, Cook JL. Arbitrary Lagrangian–Eulerian computing method for all flow speeds.

    Journal of Computational Physics 1974; 14:227.17. Smolarkiewicz PK, Margolin LG. MPDATA: a finite-difference solver for geophysical flows. Journal of

    Computational Physics 1998; 140:459.18. Margolin LG, Beason CW. Remapping on the staggered mesh. LLNL Report UCRL-99682, 1988.19. Lapenta G. Grid adaptation and remapping for arbitrary Lagrangian Eulerian (ALE) methods. 8th International

    Conference on Numerical Grid Generation in Computational Field Simulations, Honolulu, HI, USA, June3–6, 2002.

    20. Sod GA. A survey of several finite difference methods for systems of nonlinear hyperbolic conservationlaws. Journal of Computational Physics 1978; 43:1.

    21. Babuska I, Rheinboldt WC. Error estimates for adaptive finite elements computation. SIAM Journal ofNumerical Analysis 1978; 18:736.

    22. LeVeque RJ. CLAWPACK Version 4.0 User’s Manual. University of Washington, 1999.23. http://www.amath.washington.edu/∼claw/24. LeVeque RJ. Numerical Methods for Conservation Laws. Birkhauser: Basel, 1992.25. Colella P. Multidimensional upwind methods for hyperbolic conservation-laws. Journal of Computational

    Physics 1990; 87:171.26. Colella P, Woodward PR. The piecewise parabolic method (ppm) for gas-dynamical simulations. Journal of

    Computational Physics 1984; 54:174.27. Sulsky D, Brackbill JU. A numerical method for suspension flows. Journal of Computational Physics 1991;

    96:339.28. Karni S, Kurganov A, Petrova G. A smoothness indicator for adaptive algorithms for hyperbolic systems.

    Journal of Computational Physics 2002; 178:323.

    Copyright � 2004 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2004; 59:2065–2087