13.07.2015 Views

High-Order, Finite-Volume Methods in Mapped Coordinates

High-Order, Finite-Volume Methods in Mapped Coordinates

High-Order, Finite-Volume Methods in Mapped Coordinates

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>High</strong>-<strong>Order</strong>, <strong>F<strong>in</strong>ite</strong>-<strong>Volume</strong> <strong>Methods</strong> <strong>in</strong><strong>Mapped</strong> Coord<strong>in</strong>atesP. Colella a,2 , M. R. Dorr b,1 , J. A. F. Hitt<strong>in</strong>ger b,∗,1 ,D. F. Mart<strong>in</strong> a,2a Applied Numerical Algorithms Group, Lawrence Berkeley National Laboratory,One Cyclotron Road Mail Stop 50A-1148, Berkeley, CA 94720b Center for Applied Scientific Comput<strong>in</strong>g, Lawrence Livermore NationalLaboratory, 7000 East Avenue L-561, Livermore, CA 94550AbstractWe present an approach for construct<strong>in</strong>g f<strong>in</strong>ite-volume methods of any order of accuracyfor control-volume discretizations of space def<strong>in</strong>ed as the image of a smoothmapp<strong>in</strong>g from a rectangular discretization of an abstract coord<strong>in</strong>ate space. Ourapproach is based on two ideas. The first is that of us<strong>in</strong>g higher-order quadraturerules to compute the flux averages over faces that generalize a method developed forCartesian grids to the case of mapped grids. The second is a method for comput<strong>in</strong>gthe averages of the metric terms on faces such that freestream preservation is automaticallysatisfied. We derive detailed formulas for the cases of fourth-order accuratediscretizations of l<strong>in</strong>ear elliptic and hyperbolic partial differential equations; for thelatter case, we comb<strong>in</strong>e the method so derived with Runge-Kutta time discretizationand the new high-order accurate limiter to obta<strong>in</strong> a method that is robust <strong>in</strong>the presence of discont<strong>in</strong>uities and underresolved gradients. For both elliptic andhyperbolic problems, we demonstrate that the result<strong>in</strong>g methods are fourth-orderaccurate for smooth solutions.Key words: <strong>F<strong>in</strong>ite</strong>-volume method, high-order discretization, mapped grids,hyperbolic and elliptic partial differential equations1991 MSC: 65M06, 65M12, 65N06, 65N12, 65N22∗ Correspond<strong>in</strong>g author.Email addresses: pcolella@lbl.gov (P. Colella ), dorr1@llnl.gov (M. R.Dorr ), hitt<strong>in</strong>ger1@llnl.gov (J. A. F. Hitt<strong>in</strong>ger ), dfmart<strong>in</strong>@llnl.gov (D. F.Mart<strong>in</strong> ).1 This work performed under the auspices of the U.S. Department of Energy byLawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.LLNL-JRNL-422807-DRAFT.2 Research supported by the Office of Advanced Scientific Comput<strong>in</strong>g Research ofPrepr<strong>in</strong>t submitted to Elsevier 8 February 2010


1 Introduction<strong>F<strong>in</strong>ite</strong>-volume methods are a popular choice for the discretization of partial differentialequations <strong>in</strong>volv<strong>in</strong>g flux divergences, e.g., conservation laws. In suchapproaches, the spatial doma<strong>in</strong> is decomposed <strong>in</strong>to a set of control volumes.The boundary of each volume is represented as a union of faces, with each faceshared by exactly two control volumes. Based on this discretization of space,the average of the divergence of the flux function over each control volumeis approximated by apply<strong>in</strong>g the divergence theorem to express the average<strong>in</strong> terms of averages of fluxes over the faces, which are then computed us<strong>in</strong>gsome quadrature rule. The ma<strong>in</strong> advantage is that the result<strong>in</strong>g discretizationsatisfies a discrete form of the divergence theorem. This leads to a local conservationproperty hold<strong>in</strong>g for time-dependent problems and easily-checkedsolvability conditions for steady-state problems. Furthermore, this approachextends to a wide variety of grid systems: Cartesian, mapped, multiblock, andlocally-ref<strong>in</strong>ed structured grids, as well as unstructured grids. A limitation ofthese methods as developed to date is that they have typically been restrictedto second-order accuracy [1–3]. The flux <strong>in</strong>tegrals are approximated us<strong>in</strong>g themidpo<strong>in</strong>t rule, and the metric terms appear<strong>in</strong>g <strong>in</strong> the quadrature computedus<strong>in</strong>g low-order geometric representations (e.g. unions of triangles).In this paper, we present an approach for construct<strong>in</strong>g f<strong>in</strong>ite-volume methodsof any order of accuracy for control-volume discretizations of space def<strong>in</strong>edas the image of a smooth mapp<strong>in</strong>g from a rectangular discretization of anabstract coord<strong>in</strong>ate space. Our approach is based on two ideas. The first isthat of us<strong>in</strong>g higher-order quadrature rules to compute the flux averages overfaces that generalize the method described <strong>in</strong> [4] to the case of mapped grids.The second is a method for comput<strong>in</strong>g the averages of the metric terms onfaces such that freestream preservation is automatically satisfied.Freestream preservation is an important requirement for the discretization ofconservation laws <strong>in</strong> mapped coord<strong>in</strong>ates. This property ensures that a uniformflow is unaffected by the choice of mapp<strong>in</strong>g and discretization. As described<strong>in</strong> numerous works (e.g, [1,5,6]), this goal is typically accomplished by thediscrete enforcement of metric identities, which take the form of divergencefreeconditions for products of the mapp<strong>in</strong>g Jacobian and gradients. S<strong>in</strong>cecell faces are contractible (cont<strong>in</strong>uously deformable to a po<strong>in</strong>t), the Po<strong>in</strong>carélemma guarantees that these products can be written as exterior derivatives.The form of these derivatives is not unique, however (see, e.g., Section 4 of [6]),and the specific choice used for discretization is critical <strong>in</strong> achiev<strong>in</strong>g freestreampreservation. In [5], it is observed that writ<strong>in</strong>g the derivatives <strong>in</strong> “conservativeform” is sufficient to enable second-order central differenc<strong>in</strong>g to be applied <strong>in</strong>the US Department of Energy under contract number DE-AC02-05CH11231.2


the exact enforcement of the metric identities. This result was more recentlyextended <strong>in</strong> [7] to higher-order (second-, fourth- and sixth-order) compact,f<strong>in</strong>ite difference operators. The equivalence of the central difference schemeused <strong>in</strong> [5] with a second-order, f<strong>in</strong>ite-volume method was also used to obta<strong>in</strong>an early result for this class of methods. For the higher-order f<strong>in</strong>ite-volumediscretizations presented here, we describe how to take further advantage of theability to express mapp<strong>in</strong>g metric products as exterior derivatives to achievefreestream preservation.The paper is organized as follows. A formalism for comput<strong>in</strong>g a fourth-orderaccurate average of a flux divergence on a control volume <strong>in</strong> physical space<strong>in</strong> terms of fourth-order accurate face averages on a Cartesian computationalgrid is developed <strong>in</strong> Section 2. In Section 3, we describe the application ofthe mapped grid f<strong>in</strong>ite-volume formalism to obta<strong>in</strong> a fourth-order accuratediscretization of a self-adjo<strong>in</strong>t elliptic equation. In Section 4, we describe theapplication of the formalism to obta<strong>in</strong> a fourth-order accurate discretizationof a scalar, l<strong>in</strong>ear hyperbolic equation. The spatial discretization is comb<strong>in</strong>edwith Runge-Kutta time discretization and the new high-order accurate limiter<strong>in</strong> [8] to obta<strong>in</strong> a method that is robust <strong>in</strong> the presence of discont<strong>in</strong>uities andunder-resolved gradients.2 <strong>High</strong>-<strong>Order</strong> <strong>F<strong>in</strong>ite</strong>-<strong>Volume</strong> <strong>Methods</strong>In the f<strong>in</strong>ite-volume approach, the spatial doma<strong>in</strong> <strong>in</strong> R D is discretized asa union of rectangular control volumes that covers the spatial doma<strong>in</strong>. ForCartesian grid f<strong>in</strong>ite-volume methods, a control volume V i takes the formV i =[i 1 − h 2 , i 1 + h 2]×[i 2 − h 2 , i 2 + h 2]× . . . ×[i D − h 2 , i D + h 2], (1)where the multi-<strong>in</strong>dex i ≡ (i 1 , i 2 , . . . , i D ) ∈ Z D is identified with the locationof the control volume center and h is the grid spac<strong>in</strong>g. A f<strong>in</strong>ite-volumemethod discretizes a partial differential equation by averag<strong>in</strong>g that equationover control volumes and replac<strong>in</strong>g the <strong>in</strong>tegrals that appear by quadratures.For right-hand sides that appear as the divergence of fluxes, the divergencetheorem states that∫∇ · Fdx = ∑ D∑∫±V±=+,− d=1iA ± dF d dA, (2)where F d is the d th component of F and the A ± d are the high and low facesbound<strong>in</strong>g V i with normals po<strong>in</strong>t<strong>in</strong>g the d th coord<strong>in</strong>ate direction. In this case,the f<strong>in</strong>ite-volume approach computes the average of the divergence of the fluxes3


on the left-hand side of (2) with the sum of the <strong>in</strong>tegrals on the right-handside, with the <strong>in</strong>tegrals approximated us<strong>in</strong>g quadratures. Such approximationsare desirable because they lead to conserved quantities <strong>in</strong> the orig<strong>in</strong>al PDEsatisfy<strong>in</strong>g an analogous conservation law <strong>in</strong> the discretized system.Most f<strong>in</strong>ite-volume methods use the midpo<strong>in</strong>t rule to approximate the flux<strong>in</strong>tegrals <strong>in</strong> (2), lead<strong>in</strong>g to a second-order accurate method. We will develophigher-order methods (fourth-order or better) us<strong>in</strong>g the approach <strong>in</strong> [4]. Thestart<strong>in</strong>g po<strong>in</strong>t for this approach is to replace the <strong>in</strong>tegrand <strong>in</strong> the right-handside of (2) by a Taylor expansion about the center of the face:∫F d dA = ∑∫1r! ∇r F d | x=x0 (x − x 0 ) r dA x + O(h R+D−1 ),A d0≤|r| 2) the equality of mixed partial derivatives.4


If we def<strong>in</strong>e control volumes <strong>in</strong> physical space as the images X(V i ) of thecubic control volumes V i <strong>in</strong> the mapped Cartesian grid space, the relationshipcorrespond<strong>in</strong>g to (2) for mapped grids is given as follows:∫X(V i )∫∇ x · Fdx = ∇ ξ · (N T F)dξ = ∑ D∑∫±V±=+,− d=1iA ± d(N T F) d dA ξ . (7)To obta<strong>in</strong> a f<strong>in</strong>ite-volume method, the face <strong>in</strong>tegrals are replaced by quadratures,similar to what was done <strong>in</strong> (3). In the mapped-grid case, some careis required to obta<strong>in</strong> freestream preservation, that is, the property that thediscrete divergence of a constant vector field is zero. To do that, we split eachface <strong>in</strong>tegral <strong>in</strong>to two pieces:∫( ( ∫ ) )(N T F) d dA ξ = N T dA ξ F(xd )A d A dd∫+A d(N T (F − F(x d )) d dA ξ , (8)where x d is the image under the map of the center of the face <strong>in</strong> coord<strong>in</strong>atespace. It is rout<strong>in</strong>e to derive a version of the Taylor expansion <strong>in</strong> (3) to approximatethe second <strong>in</strong>tegrand on the right-hand side of (8) so that, if Fis constant, the <strong>in</strong>tegral is identically zero. To obta<strong>in</strong> a fourth-order accuratediscretization, we can use the follow<strong>in</strong>g formulation∫( ( ∫ ) ( ∫ ) )(N T F) d dA ξ = N T dA ξ · FdA ξdA d A d A d+ h2 ∫∑ ( ∂(N T ∂) · (F) ) 12 ∂ξ d ′ ∂ξ dA ξ + O(h 4 ), (9)d ′ dA dd ′ ≠das h → 0. In either case, we only need to derive quadrature formulas for∫A dN T dA ξ so that the discrete divergence of a constant vector field givenby (8) or (9) is zero.The existence of such quadratures is a consequence of Stokes’ theorem and thePo<strong>in</strong>caré lemma. The rows of the matrix N, denoted by N s , s = 1, . . . , D aredivergence-free. This can be seen by a direct calculation, or <strong>in</strong>ferred <strong>in</strong>directlyfrom apply<strong>in</strong>g (7) to constant vector fields. Then by the Po<strong>in</strong>caré lemma [9],there exist functions N s d,d ′, d ≠ d′ such thatN s d = ∑ d ′ ≠d∂N s d,d ′∂ξ d ′, N s d,d ′ = −N s d ′ ,d. (10)Thus we have∫NddA s ξ = ∑ ∑∫± Nd,d s ′dE ξ, (11)A±=+,− d ′ ≠dd E ± d,d ′5


ule applied to determ<strong>in</strong>ants, we have∑∂(det ( (∇ ξ X) (X|d ′ )(s|e d ) ))d ′ ≠d∂ξ d ′= ∑ det ( (∇ ξ X) ( ∂X |d ′ )(s|e d ) )∂ξd ′ ≠dd ′+ ∑ ∑det ( (∇ ξ X) (X|d ′ ∂ 2 X)( |d ′′ )(s|e d ) ) .∂ξd ′ ≠d d ′′ ≠d,d ′ d ′∂ξ d ′′(15)Each summand <strong>in</strong> the first (s<strong>in</strong>gle) sum is just Nd, s so it suffices to show thatthe second (double) sum vanishes. However, for a given d 1 , d 2 , d 1 ≠ d 2 , summands<strong>in</strong> the double sum <strong>in</strong>volv<strong>in</strong>g the mixed second partial2 X ∂∂ξ d1 ∂ξ d2appearexactly twice, differ<strong>in</strong>g from one another only by the exchange of the d 1 and d 2columns. By the antisymmetry of the determ<strong>in</strong>ant under column exchanges,the two summands cancel, and hence the entire second sum vanishes. F<strong>in</strong>ally,we need to show the antisymmetry condition Nd,d s = −N s ′ d ,d. The follow<strong>in</strong>g is′a consequence of l<strong>in</strong>earity of the determ<strong>in</strong>ant as a function of the d ′ column,plus the identity det(A(e p |q)) = det(A(q|e p )):det ( (∇ ξ X) (X|d ′ )(s|e d ) ) = ∑ s ′ ≠sX s ′ det ( (∇ ξ X) (s|e d )(s ′ |e d′ ) ) . (16)The right-hand side of (16) is manifestly antisymmetric <strong>in</strong> d, d ′ .2.2 Fourth-order mapped-grid f<strong>in</strong>ite-volume discretizationFollow<strong>in</strong>g these ideas, we can specify the <strong>in</strong>formation required for a fourthorderaccurate f<strong>in</strong>ite-volume discretization. Us<strong>in</strong>g a Taylor series, the <strong>in</strong>tegralson the cell faces A ± d can be approximated us<strong>in</strong>g the follow<strong>in</strong>g formula for theaverage of a product <strong>in</strong> terms of fourth-order accurate averages of each factor:〈fg〉 i+12 ed =〈f〉 i+1 〈g〉2 ed i+1 + h22 ed 12 G⊥,d 0( ) ( )〈f〉i+ 1 · G⊥,d2 ed 0 〈g〉i+ 1 + O(h 4 ).2 ed(17)Here, G ⊥,d0 is the second-order accurate central difference approximation tothe components of the gradient operator orthogonal to the d-th direction:G ⊥,d0 ≈ ∇ ξ − e d ∂∂ξ d, and the operator 〈·〉 i+1 denotes a fourth-order accurateed2average over the face centered at i + 1 2 ed :〈q〉 i+1 = 1 ∫2 ed h D−1A dq(ξ)dA ξ + O(h 4 ). (18)7


Alternative expressions to (17) are obta<strong>in</strong>ed by replac<strong>in</strong>g the averages 〈f〉 i+12 edand/or 〈g〉 i+1 used <strong>in</strong> the transverse gradients G ⊥,d2 ed 0 by the correspond<strong>in</strong>gface-centered po<strong>in</strong>twise values f i+1 and/or g 2 ed i+ 1 ed, respectively.2We then approximate the divergence of a flux bywhere∫X(V i )∇ x · Fdx ≈ h D−1D ∑∑d=1 ±=+,−±F di± 1 (19)ed,2F di+ 1 2 ed =D∑〈Nd〉 s i+1ed〈F s 〉 12 i+s=1+ h2 D∑12s=12 ed()G ⊥,d0 (〈Nd〉 s 1 i+·2 ed()G ⊥,d0 (〈F s 〉 1 i+ ed) .2(20)The column vectors {〈Nd〉 s i+1ed, s = 1, . . . , D} are computed on each face us<strong>in</strong>g2(11) and (13), with fourth-order accurate quadratures replac<strong>in</strong>g the <strong>in</strong>tegrals<strong>in</strong> (11). The fourth-order average of F can be computed us<strong>in</strong>g (4).We can apply this approach to compute a fourth-order accurate approximationto the cell volumes by tak<strong>in</strong>g F(x) = x. In that case,∫∇ x · Fdx = D × <strong>Volume</strong>(X(V i )),X(V i )and the volume of the cell can be written as the discrete divergence of fluxes.Such a flux form is convenient for ma<strong>in</strong>ta<strong>in</strong><strong>in</strong>g conservation and freestreampreservation for adaptive mesh ref<strong>in</strong>ement on mapped grids [11].3 Application to Elliptic EquationsIn this section, we apply the mapped grid, f<strong>in</strong>ite-volume formalism describedabove to obta<strong>in</strong> a fourth-order accurate f<strong>in</strong>ite-volume discretization of a selfadjo<strong>in</strong>tequation∇ · F(x) = ρ(x), x ∈ Ω ⊂ R 2 , (21)whereF(x) ≡ D(x)∇Φ(x), (22)and the matrix coefficient D is such that the second-order differential operator<strong>in</strong> (21)-(22) is elliptic. Assum<strong>in</strong>g a mapp<strong>in</strong>g (5) of the physical doma<strong>in</strong> Ω toa computational doma<strong>in</strong>, we have <strong>in</strong> the latter us<strong>in</strong>g (6)F = D∇ X ξ∇ ξ Φ ≡ J −1 DN∇ ξ Φ. (23)8


Follow<strong>in</strong>g (19) and (20), we therefore obta<strong>in</strong>∫X(V i )∇ x · Fdx = h 23∑∑d=1 ±=+,−±F di± 1 2 ed + O ( h 4) , (24)where, us<strong>in</strong>g face-centered po<strong>in</strong>twise values of F <strong>in</strong> the transverse gradients,〈 〉3∑F di+ 1 ≡ 〈F d〉 1 = ∂Φ2 ed i+˜D dd ′2 ed ∂ξd ′ =1d ′i+ 1 ⎡2 ed3∑=〈˜D 〈 〉⎣ ∂Φdd ′〉i+ 1 d ′ =12 ed ∂ξ d ′i+ 1 2 ed+ h212 G⊥,d 0(〈˜D dd ′〉)i+ 1 · G⊥,d 0ed2( ∂Φ∂ξ d ′)i+ 1 2 ed ⎤⎦(25)where˜D ≡ (˜D dd ′)≡ J −1 N T DN. (26)Face averages 〈˜D dd ′〉can be computed to fourth order <strong>in</strong> terms of face averagesof the entries of the factor matrices N T , D and J −1 N us<strong>in</strong>g the productformula (17). Comput<strong>in</strong>g the second-order accurate transverse gradientsG ⊥,d0(〈˜D dd ′〉)i+ 1 ≡ 1 (〉 〈˜D dd ′2 ed hi+ 1 − 〈˜D )〉dd2 ed +e d′ ′i+ 1 , (27)2 ed −e d′it then rema<strong>in</strong>s to specify the discretization of the averages 〈∂Φ/∂ξ d ′〉 1 i+2 edand transverse gradient G ⊥,d0 (∂Φ/∂ξ d ′) 1 i+ ed. 23.1 Discretization of 〈∂Φ/∂ξ d ′〉 1 i+and G⊥,d 0 (∂Φ/∂ξed d ′) 1 i+2 2 edFirst consider the case where d ′ = d. We have〈 ∂Φ∂ξ d〉i+ 1 2 ed =( )∂Φ+ h2 ∂Φ∆⊥,d + O ( h 4) , (28)∂ξ d 24 ∂ξ d i+ 1 2 edwhere ∆ ⊥,d is the Laplacian <strong>in</strong> the directions transverse to the d-th direction.Def<strong>in</strong><strong>in</strong>gβ i+12 ed ≡ 1 24 [27 (Φ i+e d − Φ i) − (Φ i+2e d − Φ i−e d)] , (29)9


β 1 i+2 ed +e❞ ❞ ❞ d′❞β i+❞ ❞ 1 2 ed ❞ ❞β i+ 1 2 ed −e❞ ❞ ❞ d′❞Fig. 1. Stencil for 〈∂Φ/∂ξ d 〉 1 The values of Φ at the cell centers marked by thei+2ed.open circles determ<strong>in</strong>e the β values given by (29) at the cell faces marked by thesolid circles.where the Φ i denote po<strong>in</strong>twise values of Φ at cell centers, we have∆β 1∂Φ| 1∂ξ = i+2 edi++ O(h 4 ), (30)d 2 ed h| 1∂ξ = 1 ∑()i+βd 2 ed h 3 1 i++ βd ′ ≠d 2 ed +e d′ 1 i+− 2β2 ed −e d′ 1 i++ O ( h 2) . (31)2 ed⊥,d ∂ΦFurthermore, we set( ) ∂ΦG ⊥,d0≡ 1 ()β∂ξ d i+ 1 h 2 1 i+− β2 ed 2 ed +e d′ 1 i+. (32)2 ed −e d′Next, for d ′ ≠ d, we have〈 〉 ∂Φ∂ξ d ′i+ 1 2 ed =( ∂Φ∂ξ d ′+ h2 ∂ 3 )Φ+ O ( h 4) . (33)24 ∂ξd 3 ′ i+ 1 2 ed10


we furthermore setG ⊥,d0( ∂Φ≡)i+ 1 (1 h 22 ed∂ξ d ′)γ d′ ,(4),+i+ 1 − γ d′ ,(4),−2 ed i+ 1 . (40)2 edThe stencil entries given by (39) yield fourth-order accurate first derivatives <strong>in</strong>the d ′ direction at the face centers i+ 1 2 ed ±e d′ . We employ these non-centeredformulas to ensure that the result<strong>in</strong>g stencil is conf<strong>in</strong>ed to block of cells atmost 5 cells wide centered on the cell <strong>in</strong> which the flux divergence average isbe<strong>in</strong>g computed.3.2 Boundary conditionsFor boundaries upon which a Dirichlet boundary condition is posed, the faceaverages 〈∂Φ/∂ξ d ′〉 1 i+used <strong>in</strong> (25) on faces conta<strong>in</strong>ed <strong>in</strong> such boundaries caned2be computed us<strong>in</strong>g modified discretizations that <strong>in</strong>corporate the prescribedboundary values. Suppose that the cell face with center at i + 1 2 ed is onesuch face, such as the face centered on the po<strong>in</strong>t labeled A <strong>in</strong> Figure 3. Theaverages 〈∂Φ/∂ξ d ′〉 1 for the transverse coord<strong>in</strong>ates d′ i+ ≠ d can presumably2 edbe computed directly from prescribed Dirichlet data to fourth-order accuracy.For the normal direction, the stencil describ<strong>in</strong>g 〈∂Φ/∂ξ d 〉 1 i+can be modifieded2by replac<strong>in</strong>g the def<strong>in</strong>ition (29) byβ (4)i+ 1 ≡ 1 (2816Φi+ 12 ed 840− 3675Φ 2 ed i+ 1225Φ i−e d − 441Φ i−2e d + 75Φ i−3e d),(41)where Φ 1 i+is the prescribed boundary value at the center of the cell face.ed2Although this formula yields a fourth order accurate approximation of the normalderivative, it results <strong>in</strong> a stencil extend<strong>in</strong>g beyond the 5-cell-wide blockcentered about the cell upon which the discrete divergence is be<strong>in</strong>g computed.To avoid us<strong>in</strong>g a larger stencil at the boundary than <strong>in</strong> the <strong>in</strong>terior, we take advantageof the opportunity to reduce the discretization order at the boundarywhile still ma<strong>in</strong>ta<strong>in</strong><strong>in</strong>g fourth-order accuracy overall due to elliptic regularity.In particular, <strong>in</strong>stead of (41) we def<strong>in</strong>eβ (4)i+ 1 ≡ 1 ()184Φ 12 ed 60− 225Φ i+2 ed i + 50Φ i−e d − 9Φ i−2e d . (42)The same issue affects the normal and transverse derivatives on <strong>in</strong>terior facesparallel to the boundary exactly one cell away, such as the face centered onthe po<strong>in</strong>t labeled B <strong>in</strong> Figure 3, i.e., the use of a non-centered fourth-order12


✠Dirichlet boundaryDCBAFig. 3. Locations at or near a Dirichlet boundary requir<strong>in</strong>g stencil modifications(see text).discretization leads to a stencil that is not conta<strong>in</strong>ed <strong>in</strong> a 5×5 block. However,we may use the same <strong>in</strong>terpolat<strong>in</strong>g cubic polynomial used <strong>in</strong> f<strong>in</strong>d<strong>in</strong>g (42) toobta<strong>in</strong>β (4)i+ 1 ≡ 1 ()−8Φ 12 ed 60+ 75Φ i+2 ed i − 70Φ i−e d + 3Φ i−2e d . (43)Similarly, (34) is replaced byα i+12 ed ≡ 1 20()−4Φ 1 + 15Φ i+2 ed i + 10Φ i−e d − Φ i−2e d . (44)Next, consider cell faces adjacent and normal to a Dirichlet boundary, suchas the face centered on the po<strong>in</strong>t labeled C <strong>in</strong> Figure 3. For the calculation ofthe average of the normal derivative (d = d ′ ), the calculation of the transverseLaplacian (31) us<strong>in</strong>g centered differences can be shifted one cell away from theboundary with no loss of the required second-order accuracy. A non-centered,second-order accurate formula replaces (32):( ) ∂ΦG ⊥,d0≡ 1 ()3β∂ξ d i+ 1 2h 2 1 − 4β i+2 ed 2 ed i+ 1 + β2 ed −e d′ 1 i+. (45)2 ed −2e d′For the average of the transverse derivative (d ≠ d ′ ), we replace (35) and (36)13


yγ d′ ,(4)i+ 1 2 ed ≡ 1 30γ d′ ,(2)i+ 1 2 ed ≡ 1 5[]32Φ 1 i+2 ed + 1 − 15α 1 − 20α2 ed′ i+2 ed i+ 1 + 3α2 ed −e d′ 1 i+, (46)2 ed −2e d′[]16Φ 1 i+2 ed + 1 − 30α 1 + 20α2 ed′ i+2 ed i+ 1 − 6α2 ed −e d′ 1 i+, (47)2 ed −2e d′where Φ i+12 ed + 1 2 ed′ is the prescribed boundary value. This yields a third-orderaccurate first derivative and first-order accurate third derivative, respectively.We furthermore use for the transverse gradients( ) ∂ΦG ⊥,d0≡ 1 [16Φi+∂ξ d ′i+ 1 5h 2 12 ed 2 ed + 1 2 ed′− 25α i+12 ed + 10α i+ 1 2 ed −e d′ − α i+12 ed −2e d′ ].(48)On cell faces normal to a Dirichlet boundary, the transverse gradients of thecoefficient averages are obta<strong>in</strong>ed by replac<strong>in</strong>g the centered formula <strong>in</strong> (27) bythe second-order non-centered formulaG ⊥,d0(〈˜D dd ′〉)i+ 1 2 ed≡ 1 (3 〈˜D 〉dd ′2hi+ 1 − 4 〈˜D 〉dd ′2 ed i+ 1 + 〈˜D )〉dd2 ed −e d′ ′i+ 1 .2 ed −2e d′(49)F<strong>in</strong>ally, consider cell faces normal to a Dirichlet boundary and one cell away,such as the face centered on the po<strong>in</strong>t labeled D <strong>in</strong> Figure 3. The average ofthe normal derivatives (d = d ′ ) is computed <strong>in</strong> the same manner as for the<strong>in</strong>terior cells. For the average of the transverse derivative (d ≠ d ′ ), we replace(35) and (36) byγ d′ ,(4)i+ 1 ≡ 1 [−64Φ 12 ed 210 i+2 ed + 1 + 210α 12 ed′ i+2 ed +e d′]−35α 1 − 126α i+2 ed i+ 1 + 15α2 ed −e d′ 1 i+,2 ed −2e d′γ d′ ,(2)i+ 1 ≡ 1 [64Φ 12 ed 35 i+2 ed + 1 − 105α 12 ed′ i+2 ed +e d′]+35α 1 + 21α i+2 ed i+ 1 − 15α2 ed −e d′ 1 i+,2 ed −2e d′(50)(51)where aga<strong>in</strong> Φ i+12 ed + 1 2 ed′ is the prescribed boundary value. This yields a fourthorderaccurate first derivative and second-order accurate third derivative, respectively.We furthermore use for the transverse gradients the second-order14


10.80.60.40.20−0.2−0.4−0.6−0.8x 2−11.2 1.4 1.6 1.8 2 2.2x 1Fig. 4. Test problem geometry Ω (left) and solution computed with N = 512 (right).formula( ) ∂ΦG ⊥,d0= 1 [32Φi+∂ξ d ′i+ 1 105h 2 12 ed 2 ed + 1 + 35α 12 ed′ i+2 ed +e d′(52)− 140α 1 + 63α ]i+2 ed i+ 1 + 20α2 ed −e d′ 1 i+2 ed −2e . d′Stencil modifications correspond<strong>in</strong>g to a Dirichlet condition at the lower boundaryof a coord<strong>in</strong>ate direction are obta<strong>in</strong>ed <strong>in</strong> the obvious way by permut<strong>in</strong>g<strong>in</strong>dices and negat<strong>in</strong>g the entries of stencils correspond<strong>in</strong>g to odd order derivatives.3.3 A numerical exampleTo test the discretization described <strong>in</strong> the preced<strong>in</strong>g sections, we considerthe solution of Poisson’s equation <strong>in</strong> the “D”-shaped annular geometry Ωpresented <strong>in</strong> Section IV of [12] and depicted <strong>in</strong> Figure 4. The mapp<strong>in</strong>g X fromcomputational coord<strong>in</strong>ates ξ = (ξ 1 , ξ 2 ) to physical coord<strong>in</strong>ates x = (x 1 , x 2 ) is15


given byx 1 = 1.7 + [0.074 (2ξ 1 − 1) + 0.536] cos [ 2πξ 2 + s<strong>in</strong> −1 (0.416) s<strong>in</strong>(2πξ 2 ) ] ,x 2 = 1.66 [0.074 (2ξ 1 − 1) + 0.536] s<strong>in</strong>(2πξ 2 ),(53)for 0 ≤ ξ 1 , ξ 2 ≤ 1. We seek the solution of∇ 2 Φ(x) = ρ(x), x ∈ Ω, (54)satisfy<strong>in</strong>g homogeneous Dirichlet boundary conditions <strong>in</strong> the radial (ξ 1 ) directionΦ(X(0, ξ 2 )) = Φ(X(1, ξ 2 )) = 0, 0 ≤ ξ 2 ≤ 1, (55)and periodic boundary conditions <strong>in</strong> the azimuthal (ξ 2 ) direction. To test theaccuracy of our discretization, we employ a manufactured solution procedureand compute a right-hand side ρ correspond<strong>in</strong>g to a predeterm<strong>in</strong>ed, analyticallyprescribed solution. After form<strong>in</strong>g and solv<strong>in</strong>g the l<strong>in</strong>ear system result<strong>in</strong>gfrom our discretization us<strong>in</strong>g the right-hand side so obta<strong>in</strong>ed, we can computethe discretization error s<strong>in</strong>ce the exact solution is known. In particular, we setΦ(x) = ˜Φ(X −1 (x)), where˜Φ(ξ 1 , ξ 2 ) = 4ξ 1 (1 − ξ 1 ) [1 + 0.1 s<strong>in</strong>(8πξ 2 )] . (56)Us<strong>in</strong>g (56), we apply the divergence theorem to compute the <strong>in</strong>tegral of ρ overa mapped grid cell X(V ) as∫X(V )ρ(x)dx =∑ 2∑∫±=+,− d=1A ± d(J −1 N T N∇ ξ ˜Φ ) d dA ξ. (57)S<strong>in</strong>ce the mapp<strong>in</strong>g (53) is prescribed us<strong>in</strong>g simple analytic formulas, the transformationmatrix N and its Jacobian J are also explicitly available. Theone-dimensional <strong>in</strong>tegrals <strong>in</strong> (57) are evaluated us<strong>in</strong>g the DQAG <strong>in</strong>tegratorfrom QUADPACK [13], which implements a globally adaptive Gauss-Kronrodquadrature to prescribed relative and absolute tolerances. For the convergenceresults presented below, the relative and absolute tolerances were set to 10 −12to reduce the quadrature error well below the discretization errors be<strong>in</strong>g measured,yield<strong>in</strong>g a nearly exact evaluation of the the <strong>in</strong>tegral (57).The discretization described above was implemented <strong>in</strong> a test code us<strong>in</strong>g theChombo <strong>in</strong>frastructure [14]. The result<strong>in</strong>g l<strong>in</strong>ear system was solved us<strong>in</strong>g apreconditioned conjugate gradient (PCG) solver from the Hypre library [15].The Hypre PCG solver accommodates the 5×5 stencil generated by the fourthorderdiscretization at each grid cell. Given the positive-def<strong>in</strong>ite, self-adjo<strong>in</strong>tproperty of the l<strong>in</strong>ear operator, a possible alternative approach would havebeen to employ a multigrid solver. We do not, however, have a multigrid solveravailable that can accommodate a 5×5 stencil, <strong>in</strong>clud<strong>in</strong>g the multigrid solversavailable <strong>in</strong> Hypre. We therefore employ the Hypre PFMG multigrid solver16


10 −2 N10 −310 −410 −510 −6Error10 −710 −810 −9L1 norm errorL2 norm errorMax norm errorN −410 −1010 −1110 1 10 2 10 3Fig. 5. Test problem convergence study.applied to a standard second-order discretization of (54) as a preconditionerfor CG. Beyond the issue of solver availability, it is generally acknowledgedthat the comb<strong>in</strong>ation of a Krylov method with multigrid precondition<strong>in</strong>g yieldsa more robust solver, especially with variable coefficients.Figure 5 shows the L 1 , L 2 and max norm errors <strong>in</strong> the discrete solution of(54) us<strong>in</strong>g an N × N computational grid with N = 16, 32, 64, 128, 256 and512, plotted aga<strong>in</strong>st N −4 . By L 1 and L 2 norms, we mean the discrete normscomputed us<strong>in</strong>g the solution error evaluated at cell centers, rather than cont<strong>in</strong>uousnorms computed us<strong>in</strong>g a reconstruction of the discrete solution overgrid cells. The fourth-order convergence rate is clearly observed. In each casethe PCG iteration was performed to a tolerance of 10 −10 on the relative L 2residual norm (the L 2 norm of the residual relative to that of the right handside). The multigrid preconditioner was solved to a relative tolerance of 10 −2<strong>in</strong> each iteration. Table 1 shows the relative residual at each iteration togetherwith an estimate of the local convergence rate for the f<strong>in</strong>est grid N = 512. Apseudocolor plot of the N = 512 solution is shown on the right-hand side ofFigure 4.17


where we adopt the po<strong>in</strong>twise notation q i±1 ≡ q(ξ 2 ed i± 1 ed). Thus, the faceaveragedflux is expressed <strong>in</strong> terms of po<strong>in</strong>twise values of v, u, and their2derivatives at the center of the face i ± 1 2 ed .The expansion of the <strong>in</strong>tegral (63) also gives po<strong>in</strong>twise values expressed <strong>in</strong>terms of face-averaged values. Specifically, for po<strong>in</strong>twise values of u and v,one can writev i±1 = 〈v〉 h22 ed i± 1 −ed2 24u i±1 = 〈u〉 h22 ed i± 1 −ed2 24∑d ′ ≠d∑d ′ ≠d∂ 2 v∂ξ 2 d ′ ∣ ∣∣∣∣ξ=ξi±12e d + O ( h 4) ,∂ 2 u∂ξ 2 d ′ ∣ ∣∣∣∣ξ=ξi±12e d + O ( h 4) .(65a)(65b)Thus, the average <strong>in</strong>terface flux is〈F〉 i±1 = 〈v〉 2 ed i± 1 ed〈u〉 h2i± 1 +ed2 2 12(∑ ∂vd ′ ≠d)∂u∂ξ d ′ ∂ξ d ′ξ=ξ i± 12e d + O ( h 4) , (66)written <strong>in</strong> terms of the face-averages 〈u〉 i±1 and 〈v〉 2 ed i± 1 and the po<strong>in</strong>twiseed2values of the gradients of u and v at the center of the face.In a f<strong>in</strong>ite-volume scheme, one works with cell-averaged values. Through theuse of primitive functions [16], one can construct face-averages directly <strong>in</strong>terms of cell averages; at fourth-order on a uniform grid, this yields thecentrally-differenced expression〈q〉 i+12 ed = 7 12 (¯q i + ¯q i+e d) − 1 12 (¯q i+2e d + ¯q i−e d) + O( h 4) . (67)To approximate the po<strong>in</strong>twise transverse gradients, we first note that an O(h 2 )approximation is sufficient. In the d ′ -th direction, a suitable centrally differencedapproximation is∂q= 1 (¯qi+e d∂ξ d ′ ∣ ξ=ξi±4h′ + ¯q i±e d +e − ¯q d′ i−e − ¯q ) ( )d′ i±e d −e + O h2. (68)d′12e dExpressions (67) and (68) provide the approximations necessary to evaluatethe face-averaged fluxes (66) to fourth-order given the cell averages of u andv on the computational grid.To obta<strong>in</strong> the average ū i from the average (uJ) i, we aga<strong>in</strong> appeal to Taylorseries expansion of the <strong>in</strong>tegrand to express the average of products as theproduct of averages:(uJ) i= ū i ¯Ji + h212 (∇ ξu · ∇ ξ J) i+ O ( h 4) . (69)20


3Runge Kutta Stability Doma<strong>in</strong>21Im z0−1−2−3−2.5 −2 −1.5 −1 −0.5 0Re zFig. 6. Stability region of the classical Runge-Kutta scheme. The approximation bya semi-ellipse (77) is shown <strong>in</strong> blue.Thus,ū i ≡ h −D ∫V iu(x(ξ))dξ = ( [−1 ¯J) (uJ)i i− h212 ∇ ξu · ∇ ξ J + O ( h 4)] . (70)We require at least second-order approximations of the gradients and choosethe central differences⎡(∇ ξ u) d i= 1 ⎣ (uJ) i+e d2h ¯J i+e d− (uJ) i−e d¯J i−e d⎤⎦ + O ( h 2) (71)<strong>in</strong> each direction d. This choice is freestream preserv<strong>in</strong>g; the difference evaluatesto zero (with<strong>in</strong> roundoff) provided that the averages are <strong>in</strong>itialized suchthat, for constant u, uJ i ≡ u ¯J i .4.2 Time DiscretizationAs <strong>in</strong> [7], we discretize the semi-discrete system of ord<strong>in</strong>ary differential equations(61) us<strong>in</strong>g the explicit, four-stage, fourth-order classical Runge-Kuttascheme [17]. Consider the variable-coefficient problemdydt= A(x)y, (72)21


where y is the vector of N unknowns (uJ) iand A(x) is an N × N spatiallyvary<strong>in</strong>gvariable-coefficient matrix. For all four-stage, fourth-order Runge-Kutta temporal discretizations, the characteristic polynomial isP (z j ) = 1 + z j + z2 j2 + z3 j6 + z4 j24 , (73)where z j = ∆t λ j and the λ j ∈ C are the N eigenvalues of A. The constantcoefficientstability constra<strong>in</strong>t is|P (z j )| ≤ 1, ∀j ∈ [1, N]. (74)Alternatively, for all j, let z j = x j + iy j with x j , y j ∈ R, then the amplificationfactor g j of the fully discrete scheme has real partRe g j =()1 + x j + x2 j2 + x3 j6 + x4 j24− y2 j2(1 + x j + x2 j2)+ y4 j24(75)and imag<strong>in</strong>ary partIm g j = y j()1 + x j + x2 j2 + x3 j6− y3 j6 (1 + x j) , (76)and our notion of stability implies that |g j | ≤ 1 for all j. If one can estimatethe eigenvalues of the spatial operator λ j , one then has a means of select<strong>in</strong>g astable timestep. In practice, the semi-ellipse shown <strong>in</strong> Figure 6,( ) 4x 2 ( ) 2y 2+ ≤ 1 for x ≤ 0, (77)11 5provides a more practical relation to determ<strong>in</strong>e stability.Analytically, the constant-coefficient problem reveals a potential shortcom<strong>in</strong>gof our full discretization. Def<strong>in</strong>e the shift operator and its <strong>in</strong>verseT d u i = u i+e d and T −1d u i = u i−e d.The semi-discrete system of ord<strong>in</strong>ary differential equations (61) reduces tod(uJ) idt= − 1 h( D ∑d=1a d[ 23( )Td − Td−1 1 −12( ) ])T2d − Td−2 (uJ) i. (78)On a periodic doma<strong>in</strong>, the eigenvalues areλ i = − i3hD∑a d s<strong>in</strong> θ id [4 − cos θ id ] , (79)d=122


Magnitude of Amplification FactorRelative Phase Speed10.99σ=1.00σ=0.75σ=0.50σ=0.2510.80.6|g|0.98α/a0.40.970.20.960 0.5 1θ/π00 0.5 1θ/πFig. 7. Variation of the magnitude of the amplification factor |g| and the relativephase speed α/a with phase angle θ for several values of σ. Note that as θ → ±π,the damp<strong>in</strong>g vanishes and the modes do not propagate. Furthermore, the phaseerror is effectively <strong>in</strong>dependent of σ.where the discrete phase angles are θ id = 2πi d /n, i d = 0, ±1, ±2, . . . , ±n/2.Because of the central spatial discretization, the eigenvalues are all pure imag<strong>in</strong>ary,that is, the spatial discretization contributes no numerical dissipation.The magnitude of the amplification factor as a function of cont<strong>in</strong>uous phaseangles is( )|g| = √ 1 − y61 − y2. (80)72 8For D = 1, this is plotted <strong>in</strong> Figure 7. Similarly, the relative phase speed ofthe one-dimensional scheme,α(θ)a= − 1 Im g(θ)σθ Re g(θ) , (81)where σ = a∆t/h, is also plotted <strong>in</strong> Figure 7. We see that the Runge Kuttascheme adds a small amount of dissipation and that, as θ → ±π, this dissipationvanishes. At the same time, we see that these high-wavenumber modes(grid modes) do not propagate. For variable-coefficient and nonl<strong>in</strong>ear problems,these undamped grid modes can pollute the solutions, if not cause <strong>in</strong>stability.4.3 Limit<strong>in</strong>gOne approach to stabilize a high-order, no- or low-dissipation scheme forvariable-coefficient or nonl<strong>in</strong>ear hyperbolic problems is to add artificial dis-23


sipation. For example, add<strong>in</strong>g an artificial dissipation of the formν(−1) r−1 h 2r−1 (T − 1) r (1 − T −1 ) r ū i , (82)to the discrete scheme <strong>in</strong> computational space gives a scheme dissipative oforder 2r <strong>in</strong> the sense of Kreiss [18,19]. However, for r > 1, the discrete higherorderderivatives will <strong>in</strong>troduce new numerical difficulties <strong>in</strong> the presence ofdiscont<strong>in</strong>uous solutions or poorly resolved gradients.An alternative approach from the shock-captur<strong>in</strong>g literature is to use a nonl<strong>in</strong>earlimit<strong>in</strong>g scheme. For l<strong>in</strong>ear, variable-coefficient problems, genu<strong>in</strong>ely nonl<strong>in</strong>eardiscont<strong>in</strong>uities (shocks) do not occur. However, velocity gradients cancause slopes <strong>in</strong> the solution to steepen, and <strong>in</strong>itial and boundary conditionscan <strong>in</strong>troduce l<strong>in</strong>ear discont<strong>in</strong>uities. We therefore will use nonl<strong>in</strong>ear flux limit<strong>in</strong>gfor robust handl<strong>in</strong>g of under-resolved gradients and discont<strong>in</strong>uities. Adisadvantage of this approach is that it locally reduces the order of convergenceof the scheme, but for smooth problems, this should only occur <strong>in</strong> avery small subset of cells, if at all. Thus, the maximum po<strong>in</strong>twise error maynot converge at fourth-order, but the errors should converge near fourth-orderalmost everywhere.In the mapped-grid formalism, we propose to apply a limiter scheme to thecell-averaged solution on the computational grid, ū i . As a specific example,we implement a method-of-l<strong>in</strong>es variant of the recently-improved, extremumpreserv<strong>in</strong>glimiter developed <strong>in</strong> [8]. In this implementation, the upw<strong>in</strong>d of thetwo limited face values at each face of the computational grid is chosen as thebasis state of the flux for each right-hand side evaluation of the time <strong>in</strong>tegrator.The only modification to the orig<strong>in</strong>al scheme specific to mapped grids is thatthe upw<strong>in</strong>d direction at each face is determ<strong>in</strong>ed us<strong>in</strong>g the normal velocity onthe computational mesh, that is, w = N T v. We use the recommended limitercoefficient C = 1.25.For the smooth-data <strong>in</strong>itial value problems considered <strong>in</strong> the next section, thislimit<strong>in</strong>g procedure achieves fourth-order convergence on mapped grids withsufficient resolution. However, we have identified some smooth problems forwhich this specific limiter fails to produce the optimal convergence rate as themesh is ref<strong>in</strong>ed. The cause of this sub-optimal convergence is not completelyunderstood. It does not appear that the issue is a reflection of the approachto limit<strong>in</strong>g with<strong>in</strong> the mapped grid framework but <strong>in</strong>stead is a result of thespecific comb<strong>in</strong>ation of the limiter and discretizations used. The subject of arobust limiter for the mapped grid formalism is still an open issue and is thesubject of ongo<strong>in</strong>g <strong>in</strong>vestigation.24


L ∞ Error Norm for Base SchemeN cells 16 32 64 128 256 512Cartesian 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00Deformed 0.00e+00 0.00e+00 0.00e+00 0.00e+00 4.44e-16 2.22e-16Table 2Maximum po<strong>in</strong>twise errors for freestream preservation test at six resolutions for thebase scheme.L ∞ Error Norm for Base Scheme with LimiterN cells 16 32 64 128 256 512Cartesian 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00Deformed 1.11e-16 2.22e-16 3.33e-16 6.66e-16 2.44e-15 4.13e-13Table 3Maximum po<strong>in</strong>twise errors for freestream preservation test at six resolutions for thebase scheme with limiter.4.4.1 Mapp<strong>in</strong>gsFor reference, we compute on a uniform, Cartesian mesh, which correspondsto the identity mapp<strong>in</strong>gx(ξ) = ξ. (83)This demonstrates that the metric computations reduce to the correct trivialrelationships and provides a basel<strong>in</strong>e aga<strong>in</strong>st which to compare the results ofsimulations with less trivial mapp<strong>in</strong>gs.The nonl<strong>in</strong>ear mapp<strong>in</strong>g we consider is a specialization of the mapp<strong>in</strong>g used<strong>in</strong> [20]. This mapp<strong>in</strong>g is generated by perturb<strong>in</strong>g a uniform Cartesian meshby a Cartesian s<strong>in</strong>usoidal product, specifically,x d = ξ d + α dD ∏p=1s<strong>in</strong>(2πξ p ), d = 1, . . . , D. (84)To ensure that the perturbed mesh does not tangle, it is sufficient to take ∀d,0 ≤ 2πα d ≤ 1. This mapp<strong>in</strong>g cannot be <strong>in</strong>verted analytically, however, not<strong>in</strong>gthatξ d = x d + α d(ξ d ′ − x d ′), d = 1, . . . , D, d ≠ d ′ , (85)α d ′for α d ′ ≠ 0, the mapp<strong>in</strong>g can be <strong>in</strong>verted numerically us<strong>in</strong>g a fixed-po<strong>in</strong>titeration on the scalar equation (84) for ξ d ′. Note that for this mapp<strong>in</strong>g, theJacobian is not constant. A depiction of the mapped grid for N = 64 <strong>in</strong> eachdirection is plotted <strong>in</strong> Figure (8).26


4.4.2 Uniform Advection of Constant DataWe consider uniform advection of constant <strong>in</strong>itial data on a periodic doma<strong>in</strong>x ∈ [0, 1) 2 . The <strong>in</strong>itial conditions areu 0 (x) = 1,(IC1)and the uniform velocity vector isv(x) = (1, 0.5). (86)The exact solution is u(x, t) = 1 at all times; we take a constant nom<strong>in</strong>al CFLnumber of σ = v 1 ∆tN = 0.32 and <strong>in</strong>tegrate to a f<strong>in</strong>al time of t = 2. Whilethis problem appears to be trivial, it is an important demonstration of thefreestream preservation capability of the discretization.Results of grid convergence studies are presented <strong>in</strong> Tables 2 and 3. Freestreampreservation is demonstrated by the fact that the maximum po<strong>in</strong>twise error <strong>in</strong>the computed solution <strong>in</strong> both cases is at most dom<strong>in</strong>ated by round-off error.Both with and without the limiter, the method is shown to be freestreampreserv<strong>in</strong>g.We note that the results differ with and without the limiter because the limiterscheme operates on data even when the solution is constant. The limiter neverreduces the order of the scheme <strong>in</strong> this case, but the method does a number off<strong>in</strong>ite-precision operations that can <strong>in</strong>troduce additional round-off error. Thisis particularly true on the deformed mesh (84); note that the non-constantJacobian for this mapp<strong>in</strong>g also contributes to round-off error. The magnitudeof round-off error <strong>in</strong>creases with the number of cells because more time steps,and hence more float<strong>in</strong>g-po<strong>in</strong>t operations, are required to reach the f<strong>in</strong>al time.If one were so <strong>in</strong>cl<strong>in</strong>ed, a small modification to the limiter algorithm can bemade to prohibit it from act<strong>in</strong>g on digits with dubious significance. Specifically,the first step <strong>in</strong> construct<strong>in</strong>g face values and <strong>in</strong> construct<strong>in</strong>g parabolic <strong>in</strong>terpolantsis to compute a pair of differences between face and cell values. If themaximum relative magnitude of the two differences is above some small value(say 10 −15 ), the limiter algorithm proceeds normally; otherwise, the limit<strong>in</strong>gprocess is skipped. In practice, this produces limited freestream-test resultsidentical to those for the base scheme (Table 2) with no apparent effect onlimiter performance for less trivial applications.27


10 0 Uniform Advection of S<strong>in</strong>usoidal Data (IC2)10 −110 −210 −3L 1Norm of Error10 −410 −510 −6Cartesian: Base10 −7Deformed: BaseCartesian: Limiter10 −8 Deformed: LimiterFirst−<strong>Order</strong>Fourth−<strong>Order</strong>10 −910 1 10 2 10 3Number of CellsL 1 Error Norm for Base SchemeN cells 16 32 64 128 256 512CartesianDeformederror 4.81e-03 3.07e-04 1.93e-05 1.21e-06 7.55e-08 4.72e-09rate - 3.97 3.99 4.00 4.00 4.00error 3.82e-02 2.45e-03 1.56e-04 9.79e-06 6.13e-07 3.83e-08rate - 3.96 3.97 3.99 4.00 4.00L 1 Error Norm for Base Scheme with limiterN cells 16 32 64 128 256 512CartesianDeformederror 4.75e-03 3.07e-04 1.93e-05 1.21e-06 7.55e-08 4.72e-09rate - 3.95 3.99 4.00 4.00 4.00error 5.49e-02 5.86e-03 1.31e-03 9.85e-06 6.21e-07 3.89e-08rate - 3.23 2.16 7.06 3.99 4.00Fig. 9. Convergence of maximum po<strong>in</strong>twise error with grid ref<strong>in</strong>ement for uniformadvection (86) of s<strong>in</strong>usoidal data (IC2) for both meshes.4.4.3 Uniform Advection of S<strong>in</strong>usoidal DataWe consider uniform advection of Cartesian-product s<strong>in</strong>usoidal <strong>in</strong>itial data ona periodic doma<strong>in</strong> x ∈ [0, 1) 2 . The <strong>in</strong>itial conditions areu 0 (x) = cos(2πx 1 ) cos(2πx 2 ),(IC2)and the uniform velocity vector is aga<strong>in</strong> (86). The exact solution isu(x, t) = u 0 (x − vt), (87)where u 0 is by def<strong>in</strong>ition periodic <strong>in</strong> each direction with unit period. Aga<strong>in</strong>,we take a constant CFL of σ = 0.32 and <strong>in</strong>tegrate to f<strong>in</strong>al time of t = 2.28


10 0 Uniform Advection of S<strong>in</strong>usoidal Data (IC2)10 −110 −210 −3Max Norm of Error10 −410 −510 −6Cartesian: Base10 −7Deformed: BaseCartesian: Limiter10 −8 Deformed: LimiterFirst−<strong>Order</strong>Fourth−<strong>Order</strong>10 −910 1 10 2 10 3Number of CellsL ∞ Error Norm for Base SchemeN cells 16 32 64 128 256 512CartesianDeformederror 9.59e-03 6.22e-04 3.92e-05 2.46e-06 1.54e-07 9.60e-09rate - 3.95 3.99 3.99 4.00 4.00error 6.97e-02 3.94e-03 2.49e-04 1.56e-05 9.77e-07 6.11e-08rate - 4.14 3.98 4.00 4.00 4.00L ∞ Error Norm for Base Scheme with limiterN cells 16 32 64 128 256 512CartesianDeformederror 9.70e-03 6.22e-04 3.92e-05 2.46e-06 1.54e-07 9.60e-09rate - 3.96 3.99 3.99 4.00 4.00error 1.61e-01 2.78e-02 2.23e-02 2.41e-05 1.57e-06 1.55e-07rate - 2.53 0.32 9.85 3.94 3.34Fig. 10. Convergence of maximum po<strong>in</strong>twise error with grid ref<strong>in</strong>ement for uniformadvection (86) of s<strong>in</strong>usoidal data (IC2) for both meshes.Results of grid convergence studies are plotted <strong>in</strong> Figures 9 and 10. For theunlimited scheme, fourth-order convergence is seen for both meshes. Fourthorderconvergence is also obta<strong>in</strong>ed by the limited scheme for the Cartesiangrid; <strong>in</strong> fact the errors are nearly identical to the unlimited scheme.However, on the deformed mesh (84), fourth-order convergence is not <strong>in</strong> generalseen for the limited scheme. At a resolution of N = 64, large isolated errorsoccur, as is <strong>in</strong>dicated by the large difference <strong>in</strong> L 1 and L ∞ norm behaviors.However, at f<strong>in</strong>er resolutions, near-fourth-order convergence is aga<strong>in</strong> obta<strong>in</strong>edfor this mapp<strong>in</strong>g. The isolated errors occur <strong>in</strong> the regions of most stronglystretched mesh, and the isolated behavior at N = 64 suggests a transition <strong>in</strong>the detail of the mapped grid that can be represented at f<strong>in</strong>ite resolution.29


Note that, <strong>in</strong> computational space, the problem is a variable-coefficient problemon a uniform mesh, where the solution is locally modified by the Jacobian.Around N = 64, enough detail of the mapp<strong>in</strong>g is represented such that, <strong>in</strong>isolated regions, some variations <strong>in</strong> the velocity and/or solution are identifiablebut under-resolved. Thus, the limiter attempts to control the solution <strong>in</strong>these regions, caus<strong>in</strong>g the scheme to drop order. As the mesh is ref<strong>in</strong>ed, thevariations are resolved, and the number of po<strong>in</strong>ts at which the limiter is activedrops. The good agreement between the limited and unlimited L 1 error normsat resolutions f<strong>in</strong>er than N = 64 supports this explanation.4.4.4 Uniform Advection of Compactly-Supported DataWe consider uniform advection of compactly-supported smooth <strong>in</strong>itial pulseon a periodic doma<strong>in</strong> x ∈ [0, 1) 2 . The <strong>in</strong>itial conditions are⎧ ( )⎪⎨ πrcos 8 , 0 ≤ r ≤ R,u 0 (x) = 2R⎪⎩ 0, otherwise,(IC3)r = |x − x ∗ |, and the uniform velocity vector is aga<strong>in</strong> (86). We take R =0.25 and x ∗ = (0.75, 0.5). The exact solution is aga<strong>in</strong> given by (87), withu(x + e d , t) = u(x, t) for d = 1, 2. We take a constant CFL of σ = 0.32 andtake the f<strong>in</strong>al time to be t = 2.Results of the grid convergence study for the base and the limited scheme areplotted <strong>in</strong> Figures 11 and 12. For both schemes and both meshes, the compactfunction is poorly represented at coarse resolutions; at N = 16, there are onlyfour cells <strong>in</strong> each direction across the non-zero portion of the function. Byaround N = 128, the error behavior beg<strong>in</strong>s to enter the asymptotic regime forboth norms, and the computed solution converges at a fourth-order rate forboth schemes and on both meshes.4.4.5 Circular Advection of a Slotted Cyl<strong>in</strong>derA standard problem used to test the multidimensional performance of limit<strong>in</strong>gschemes is the circular advection of a slotted cyl<strong>in</strong>der. The rotational velocityvector for rotation about x c = (0.5, 0.5) isv(x) = 2πω(−(x 2 − x c 2), (x 1 − x c 1)),(V3)where we take ω = 1. We def<strong>in</strong>e a slotted cyl<strong>in</strong>der of radius R = 0.15, slotwidth W = 0.05, and slot height H = 0.25 centered on x ∗ = (0.5, 0.75) for the30


10 0 Uniform Advection of Compact Data (IC3)10 −110 −210 −3L 1Norm of Error10 −410 −510 −6Cartesian: Base10 −7Deformed: BaseCartesian: Limiter10 −8 Deformed: LimiterFirst−<strong>Order</strong>Fourth−<strong>Order</strong>10 −910 1 10 2 10 3Number of CellsL 1 Error Norm for Base SchemeN cells 16 32 64 128 256 512CartesianDeformederror 4.95e-02 1.39e-02 1.01e-03 6.35e-05 4.00e-06 2.51e-07rate - 1.83 3.78 3.99 3.99 3.99error 5.38e-02 2.74e-02 2.45e-03 1.04e-04 6.52e-06 4.10e-07rate - 0.97 3.48 4.56 4.00 3.99L 1 Error Norm for Base Scheme with limiterN cells 16 32 64 128 256 512CartesianDeformederror 1.54e-02 4.15e-03 7.95e-04 6.38e-05 4.00e-06 2.51e-07rate - 1.89 2.38 3.64 4.00 3.99error 1.48e-02 5.22e-03 9.05e-04 1.01e-04 6.51e-06 4.10e-07rate - 1.50 2.53 3.16 3.96 3.99Fig. 11. Convergence of L 1 error norm with grid ref<strong>in</strong>ement for the base and limitedschemes for uniform advection (86) of compactly-supported data (IC3) for bothmeshes.<strong>in</strong>itial conditions:⎧⎪⎨0, 0 ≤ R < r,u 0 (x) = 0, |2z 1 | < W⎪⎩1, otherwise,and 0 < z 2 + R < H,(IC4)where z = x−x ∗ and r = |z|. We simulate on the truncated doma<strong>in</strong> x ∈ [0, 1] 2with N = 100 cells <strong>in</strong> each direction. The exact solution at time t = 1 is the<strong>in</strong>itial condition, and we use a fixed time step of ∆t = 1.59236 × 10 −3 .The <strong>in</strong>itial and f<strong>in</strong>al solution for simulation on a Cartesian mesh are plotted31


10 0 Uniform Advection of Compact Data (IC2)10 −110 −210 −3Max Norm of Error10 −410 −510 −6Cartesian: Base10 −7Deformed: BaseCartesian: Limiter10 −8 Deformed: LimiterFirst−<strong>Order</strong>Fourth−<strong>Order</strong>10 −910 1 10 2 10 3Number of CellsL ∞ Error Norm for Base SchemeN cells 16 32 64 128 256 512CartesianDeformederror 5.12e-01 2.81e-01 4.14e-02 2.81e-03 1.78e-04 1.12e-05rate - 0.87 2.76 3.88 3.98 4.00error 3.26e-01 3.11e-01 1.04e-01 7.38e-03 4.70e-04 2.96e-05rate - 0.07 1.59 3.81 3.97 3.99L ∞ Error Norm for Base Scheme with limiterN cells 16 32 64 128 256 512CartesianDeformederror 4.52e-01 2.38e-01 3.33e-02 2.82e-03 1.78e-04 1.12e-05rate - 0.93 2.84 3.56 3.98 4.00error 4.19e-01 3.77e-01 6.66e-02 7.44e-03 4.70e-04 2.96e-05rate - 0.15 2.50 3.16 3.98 3.99Fig. 12. Convergence of maximum po<strong>in</strong>twise error with grid ref<strong>in</strong>ement for the baseand limiter schemes for uniform advection (86) of compactly-supported data (IC3)on both meshes.<strong>in</strong> Figure 13. The basic shape of the cyl<strong>in</strong>der is preserved, albeit with somespread<strong>in</strong>g of the <strong>in</strong>itially sharp edges of the cyl<strong>in</strong>der. The slot has some fill-<strong>in</strong>,but the shape and size of the slot is fairly well preserved. This is a very goodapproximation for such a coarse resolution; note that there are only five cellsacross the slot.The <strong>in</strong>itial and f<strong>in</strong>al solution for simulation on the mapped grid (84) are plotted<strong>in</strong> Figure 14. Aga<strong>in</strong>, the basic shape of the cyl<strong>in</strong>der is preserved, althoughthere is more smear<strong>in</strong>g than for the Cartesian case. In addition, note thatthere are slightly larger overshoots (still only 1%) than for the Cartesian case.The symmetry of the cyl<strong>in</strong>der is still relatively good, despite the distortions32


Fig. 13. Circular advection of a slotted cyl<strong>in</strong>der on a 100 × 100 Cartesian grid. Theleft is the <strong>in</strong>itial condition (and reference solution), and the right is the computedsolution after one revolution. The slot and bridge do fill <strong>in</strong> and slump, respectively,but the overall agreement is good.<strong>in</strong> the mesh.5 SummaryWe have presented a strategy for the construction of high-order, f<strong>in</strong>ite-volumediscretizations of flux divergences <strong>in</strong> mapped coord<strong>in</strong>ates. The approach isbased on the systematic development of sufficiently accurate cell face averages,<strong>in</strong>clud<strong>in</strong>g the computation of product averages <strong>in</strong> terms of factor averagesFig. 14. Circular advection of a slotted cyl<strong>in</strong>der on a 100 × 100 deformed grid (84).The left is the <strong>in</strong>itial condition (and reference solution), and the right is the computedsolution after one revolution. The slot and bridge do fill <strong>in</strong> and slump, respectively,but the overall agreement is good.33


and/or face-centered values. Among the face averages to be computed arethose of the coord<strong>in</strong>ate mapp<strong>in</strong>g metric factors, whose calculation affects notonly the overall accuracy of the scheme but also freestream preservation. Thelatter is automatically achieved to mach<strong>in</strong>e roundoff by represent<strong>in</strong>g the metricfactors as exterior derivatives, whose face averages are <strong>in</strong> turn reduced toquadratures on face hyperedges. The quadratures can be performed by anyconvenient method of sufficient accuracy.To demonstrate the approach, we developed fourth-order discretizations ofprototypical elliptic and hyperbolic problems. In addition to test<strong>in</strong>g fourthorderaccuracy, the elliptic example displayed the use of an operator based ona second-order f<strong>in</strong>ite-volume discretization as a preconditioner <strong>in</strong> a conjugategradient iteration. Such strategies can be important <strong>in</strong> reduc<strong>in</strong>g the solver costof the larger stencils that <strong>in</strong>evitably accompany high-order discretizations. Inthe hyperbolic examples, we <strong>in</strong>cluded an improved nonl<strong>in</strong>ear limiter [8]. Ourresults <strong>in</strong>dicate that the limited method can achieve a fourth-order convergencerate for smooth data on mapped grids and can control oscillations fordiscont<strong>in</strong>uous data on mapped grids.Although we focused on fourth-order, f<strong>in</strong>ite-volume discretizations <strong>in</strong> this paper,higher-order discretizations are obta<strong>in</strong>able by a similar strategy. The essential<strong>in</strong>gredients are a generalization of the cell face average product formula(17), more accurate quadrature formulas for the <strong>in</strong>tegrals of metric factors overface hyperedges <strong>in</strong> (11), and a discretization of flux face averages to the desiredorder of accuracy. Further extensions <strong>in</strong>clude mov<strong>in</strong>g mapped grids, as well asgeneralization from doma<strong>in</strong>s describable by a smooth mapp<strong>in</strong>g from a s<strong>in</strong>gleCartesian computational grid to more complicated multiblock geometries.References[1] M. V<strong>in</strong>okur, An analysis of f<strong>in</strong>ite-difference and f<strong>in</strong>ite-volume formulations ofconservation laws, J. Comput. Phys. 81 (1989) 1–52.[2] D. Calhoun, R. J. LeVeque, An accuracy study of mesh ref<strong>in</strong>ement onmapped grids, <strong>in</strong>: T. Plewa (Ed.), Adaptive Mesh Ref<strong>in</strong>ement - TheoryAnd Applications: Proceed<strong>in</strong>gs of The Chicago Workshop On Adaptive MeshRef<strong>in</strong>ement <strong>Methods</strong>, Vol. 41 of Lecture Notes <strong>in</strong> Computational Science andEng<strong>in</strong>eer<strong>in</strong>g, Spr<strong>in</strong>ger Verlag, 2003, pp. 91–102.[3] D. A. Calhoun, C. Helzel, R. J. Leveque, Logically rectangular grids and f<strong>in</strong>itevolume methods for PDEs <strong>in</strong> circular and spherical doma<strong>in</strong>s, SIAM Rev. 50 (4)(2008) 723–752.[4] M. Barad, P. Colella, A fourth-order accurate local ref<strong>in</strong>ement method forPoisson’s equation, J. Comput. Phys. 209 (2005) 1–18.34


[5] P. D. Thomas, C. K. Lombard, Geometric conservation law and its applicationto flow computations on mov<strong>in</strong>g grids, AIAA J. 17 (10) (1979) 1030–1037.[6] D. A. Kopriva, Metric identities and the discont<strong>in</strong>uous spectral element methodon curvil<strong>in</strong>ear meshes, SIAM J. Sci. Comput. 26 (3) (2006) 301–327.[7] M. R. Visbal, D. V. Gaitonde, On the use of high-order f<strong>in</strong>ite-difference schemeson curvil<strong>in</strong>ear and deform<strong>in</strong>g meshes, J. Comput. Phys. 181 (1) (2002) 155–185.[8] P. Colella, M. D. Sekora, A limiter for PPM that preserves accuracy at smoothextrema, J. Comput. Phys. 227 (2008) 7069–7076.[9] M. Spivak, Calculus on Manifolds, W. A. Benjam<strong>in</strong>, Inc., New York, NY, 1965.[10] C. H. Evans, J. H. Hawley, Simulation of magnetohydrodynamic flows - aconstra<strong>in</strong>ed transport method, Astrophysical Journal 332 (1988) 659.[11] J. B. Bell, P. Colella, J. A. Trangenste<strong>in</strong>, M. Welcome, Adaptive meshref<strong>in</strong>ement on mov<strong>in</strong>g quadrilateral grids, <strong>in</strong>: Proceed<strong>in</strong>gs, 9th AIAAComputational Fluid Dynamics Conference, Buffalo, NY, 1989, pp. 471–479,aIAA-1989-1979.[12] R. L. Miller, M. S. Chu, J. M. Greene, Y. R. L<strong>in</strong>-Liu, R. E. Waltz, Noncircular,f<strong>in</strong>ite aspect ratio, local equilibrium model, Phys. Plasmas 5 (4) (1998) 973–978.[13] http://www.netlib.org/quadpack/.[14] P. Colella, D. T. Graves, T. J. Ligocki, D. F. Mart<strong>in</strong>, D. Modiano, D. B.Seraf<strong>in</strong>i, B. V. Straalen, Chombo Software Package for AMR Applications -Design Document, http://seesar.lbl.gov/anag/chombo.[15] http://computation.llnl.gov/casc/hypre.[16] P. Colella, P. R. Woodward, The Piecewise Parabolic Method (PPM) for gasdynamicalsimulations, J. Comput. Phys. 54 (1) (1984) 174–201.[17] J. D. Lambert, Numerical <strong>Methods</strong> for Ord<strong>in</strong>ary Differential Systems, JohnWiley & Sons, New York, 1991.[18] R. D. Richtmyer, K. W. Morton, Difference <strong>Methods</strong> for Initial-Value Problems,2nd Edition, John Wiley & Sons, New York, 1967.[19] B. Gustafsson, H.-O. Kreiss, J. Oliger, Time Dependent Problems andDifference <strong>Methods</strong>, Pure and Applied Mathematics, John Wiley & Sons, NewYork, 1995.[20] P.-O. Persson, J. Bonet, J. Peraire, Discont<strong>in</strong>uous Galerk<strong>in</strong> solution of theNavier-Stokes equations on deformable doma<strong>in</strong>s, Comput. <strong>Methods</strong> Appl. Mech.Eng. 198 (2009) 1585–1595.35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!