Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow,...

23
Completed Repeated Richardson Extrapolation for compressible fluid flows Nicholas Dicati Pereira da Silva a,* , Carlos Henrique Marchi a , Luciano Kiyoshi Araki a , Rafael Brand˜ ao de Rezende Borges b , Guilherme Bertoldo c , Chi-Wang Shu d,1 a Federal University of Paran´a, Laboratory of Numerical Experimentation, Department of Mechanical Engineering, Curitiba, Brazil b Rio de Janeiro State University, Mathematics and Estatistics Institute, Rio de Janeiro, Brazil c Federal University of Technology - Paran´a, Department of Physics, Statistics and Mathematics, Francisco Beltr˜ao, Brazil d Brown University, Division of Applied Mathematics, Providence, United States of America Abstract An approach in numerical analysis to reduce the numerical error is the Richardson Extrapolation. It was used in a variety of Computational Fluid Dynamics problems to reduce the numerical error of single variables and the entire solution, but mainly restricted for the Finite Difference Method and incompressible fluid flows with a coincident-nodes grid type. The pur- pose of this work is to present and test a Completed Repeated Richardson Extrapolation (CRRE) procedure for a more generic grid and compressible fluid flows in order to reduce the entire solution error. Three tests were per- formed in one- and quasi-one-dimensional Euler equations, e.g., (i) Rayleigh flow, (ii) isentropic and (iii) adiabatic flow through a nozzle. The last one presents a normal shock wave. These problems were solved with explicit Finite Difference Method. We also solved the normal shock wave problem with a Weighted Essentially Non-Oscillatory (WENO) scheme to compare with the CRRE procedure. The procedure we propose presented an optimal performance in the Rayleigh flow, where the error was reduced by a factor of 10 9 and the accuracy order was increased from 1 to 6.6 in a grid with * Corresponding author 1 Research of C.-W. Shu was partially supported by NSF grant DMS-1719410. Preprint submitted to Applied Numerical Mathematics August 14, 2018

Transcript of Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow,...

Page 1: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

Completed Repeated Richardson Extrapolation for

compressible fluid flows

Nicholas Dicati Pereira da Silvaa,∗, Carlos Henrique Marchia, LucianoKiyoshi Arakia, Rafael Brandao de Rezende Borgesb, Guilherme Bertoldoc,

Chi-Wang Shud,1

aFederal University of Parana, Laboratory of Numerical Experimentation, Department ofMechanical Engineering, Curitiba, Brazil

bRio de Janeiro State University, Mathematics and Estatistics Institute, Rio de Janeiro,Brazil

cFederal University of Technology - Parana, Department of Physics, Statistics andMathematics, Francisco Beltrao, Brazil

dBrown University, Division of Applied Mathematics, Providence, United States ofAmerica

Abstract

An approach in numerical analysis to reduce the numerical error is theRichardson Extrapolation. It was used in a variety of Computational FluidDynamics problems to reduce the numerical error of single variables andthe entire solution, but mainly restricted for the Finite Difference Methodand incompressible fluid flows with a coincident-nodes grid type. The pur-pose of this work is to present and test a Completed Repeated RichardsonExtrapolation (CRRE) procedure for a more generic grid and compressiblefluid flows in order to reduce the entire solution error. Three tests were per-formed in one- and quasi-one-dimensional Euler equations, e.g., (i) Rayleighflow, (ii) isentropic and (iii) adiabatic flow through a nozzle. The last onepresents a normal shock wave. These problems were solved with explicitFinite Difference Method. We also solved the normal shock wave problemwith a Weighted Essentially Non-Oscillatory (WENO) scheme to comparewith the CRRE procedure. The procedure we propose presented an optimalperformance in the Rayleigh flow, where the error was reduced by a factorof 109 and the accuracy order was increased from 1 to 6.6 in a grid with

∗Corresponding author1Research of C.-W. Shu was partially supported by NSF grant DMS-1719410.

Preprint submitted to Applied Numerical Mathematics August 14, 2018

Page 2: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

10240 nodes. The error was reduced by a factor of 2 · 109 and the accuracyorder was increased from 1 to 6.7 in an isentropic nozzle flow and a gridwith 10240 nodes. Finally, in the adiabatic flow with a normal shock wave,the procedure reduced the error upstream and downstream the shock, andwas computationally faster than the WENO scheme. However, the lattermethod has lower magnitude errors upstream the shock and a sharper shocktransition.

Keywords: Richardson Extrapolation, compressible fluid flow, Rayleighflow, quasi-one-dimensional flow

1. Introduction

In Fluid Mechanics, the set of equations describing an inviscid fluid floware known as Euler equations, which constitute a hyperbolic system of con-servation laws and are a particular case of the Navier–Stokes equations, bytaking zero viscosity and thermal conductivity [1]. The latter, together withturbulence models, describes a large variety of phenomena in ComputationalFluid Mechanics (CFD). Although more restrictive than Navier–Stokes, theEuler equations can model compressible fluid flows, or, in other words, high-speed internal and external flows. Since viscous effects plays only a major rolein the boundary layer, the Euler equations are an important model in CFD.Those equations are very important in modern engineering, but in generaltheir solution requires the use of numerical methods and, as a consequence,numerical errors arise. The most common approaches in numerical analysisto reduce the numerical error are the grid refinement and the use of higherorder numerical approximations, of which Richardson Extrapolation (RE) isan alternative.

RE has been used in distinct contexts, for example, step size control [2],convergence acceleration [3], error estimation [4] and error reduction. Sincethe Richardson work [5], the RE for error reduction was used repeatedly[6], in a completed manner (CRE) [7], completed with repetition [8], alongwith Runge-Kutta methods [9], and to compute eigenvalues of the Helmholtzequation [10]. RE applications to reduce numerical error range from simpleCFD problems to complex ones [11]. The most recent modifications on RE toreduce numerical errors were a single variable procedure, using polynomialsto achieve higher accuracy orders [12], and a derived CRE procedure, toachieve higher accuracy orders in the entire numerical solution [8].

2

Page 3: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

The first and last of these modification were made for the Finite DifferenceMethod (FD) and with the coincident-nodes grid, shown in Fig. 1, where gis the grid level and the refinement ratio (r) between grids is set as 2. Onecan note that the coarse grid (g = 1) nodes have coincident nodes with thefine grid (g = 2). A non-coincident-nodes grid, that is commonly used withFinite Volume Method, is presented in Fig. 2, where we can see that thereare no coincident nodes for r = 2.

g = 20 1 2 3 4 5 6

g = 10 1 2 3

Figure 1: Coincident-nodes grid.

g = 21 2 3 4 5 6

g = 11 2 3

Figure 2: Non-coincident-nodes grid.

Regarding that repeated RE and CRE with and without repetition havealready been applied in incompressible fluid flows and with the coincident-nodes grid (see for example [8], [12] and [13]), the purpose of this work isto present and test a more general CRRE procedure for the non-coincident-nodes grid and test it with compressible fluid flows. The tests will be madeon numerical solutions of one- (1D) and quasi-one-dimensional (Q1D) Eulerequations. To solve these equations, we will employ an explicit FD methodwith the upwind scheme, Lax–Friedrichs splitting and an optimal StrongStability Preserving (SSP) third-order Runge-Kutta for the time step inte-gration [14]. An important phenomenon that usually occurs on compressiblefluid flows is the emerge of shock waves in the solutions; as such, we will alsotest the CRRE procedure for solutions involving shocks. To assess the proce-dure performance, we will solve the same shock problem with the WENO-Zmethod [15].

3

Page 4: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

2. Mathematical model and numerical methods

The conservation law which we are interested have the general form

U t + F (U)x = S(U), (1)

where U is the vector of conservative variables, F is the flux and S is asource term.

The domain is discretized as follows (see Fig. 2)

x(i) = xl + h(i− 1/2), 1 ≤ i ≤ N and h = (xr − xl)/N,

where xr and xl are the right and left boundary positions, h is the node sizeand N is the number of nodes.

For the FD method, we approximate (1) as

d

dtU i = −1

h(F i+1/2 − F i−1/2) + S(U i), (2)

where F is the numerical flux. We use the Lax–Friedrichs splitting in acomponent-wise manner [14].

In order to approximate the corresponding components of the flux (g±i+1/2),

we use a upwind or a WENO-Z scheme from [15]

g±i+1/2 = ω0f0 + ω1f1 + ω2f2, (3)

where the ω are the nonlinear weights and the f0, f1 and f2 are the poly-nomial approximation at the substencils. One should note that they mustbe adjusted accordingly to obtain g−i+1/2 and g+i+1/2. Details on the nonlinear

weights and substencils can be found in [15].To integrate (2) in time we use a third-order SSP Runge-Kutta method

[14]

u(1) = un + ∆tL(un),

u(2) =3un + u(1) + ∆tL(u(1))

4,

un+1 =un + 2u(2) + 2∆tL(u(2))

3,

(4)

where u is a component of U and L(u) = ut. For the boundary conditions weuse the Inverse Lax–Wendroff (ILW) procedure of [16] and [17] to maintainhigher order at the boundaries.

4

Page 5: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

3. Verification

As stated in [18], verification assesses the code and solution correctnessand involves error evaluation and estimation in a systematic grid refinement.This analysis is done by means of the error itself, numerical error estimativeor accuracy orders. In order to get reliable results, the apparent order (alsoknown as observed order) must approach the asymptotic order (p0) mono-tonically in more than three grids [19, 18]. The p0 depends on the numericalscheme and approximations and it is obtained a priori, regardless the numer-ical solution [19, 20]. As we will be running problems with known analyticalor exact solutions, the effective order will be used instead of the apparentorder.

The error and accuracy order analysis will be performed in the wholesolution field by means of the L1 norm, that is

L1mg =

1

N

N∑i=1

|Emg,i| (5)

withEm

g,i = uanalyticali − umg,i, (6)

where u is the numerical solution, the superscripts “analytical” and m meanthe analytical or exact solution and the CRE level, and the subscripts g andi mean the grid levels and the node position. One should note that m = 0is the numerical solution without any CRE. Also, to avoid confusion, thenumerical solution without CRE will not have superscript.

The effective order can be computed as

pEmg =

log10 (L1mg−1/L

1mg )

log10 (r). (7)

4. Richardson extrapolation

4.1. Completed Richardson Extrapolation

The RE is based on the assumption that discrete solutions have a seriesrepresentation in terms of the node size h. For instance [20],

u = uanalytical + c1hp0 + c2h

p1 + c3hp2 +O(hp3), (8)

5

Page 6: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

where pv, with v = 0, . . ., is the true order and also depends on the numericalscheme and approximations. In our case, pv = 1, 2, 3, . . . for the upwind andpv = 5, 6, 7, . . . for the WENO-Z.

As the grid is refined (h → 0), the first term of h dominates and thenumerical solution can be expressed as

u = u∞ + c1hpv , (9)

where u∞ is an approximation to the analytical solution or the extrapolatedsolution.

If one has the numerical solution in two distinct grids, u∞ can be deter-mined as

u∞,g = ug +ug − ug−1rpv − 1

. (10)

From the RE, one can also obtain the Richardson error estimative (Uri)

u∞,g = ug + Uri. (11)

Roache and Knupp [7] devised a method based on (10) for the wholesolution field called CRE, using FD and a coincident-nodes grid. Since thegrid have coincident nodes they proposed that

u∞,g = ug + Ci, (12)

with a correction

Ci =ug − ug−1rpv − 1

, (13)

for coincident nodes and

Ci =Ci+1 + Ci−1

2, (14)

for the other nodes.

4.2. Assessment of Completed Richardson Extrapolation with repetition

Let us consider the CRE with repetition. Figure 3 shows three differentgrid levels with r = 2 and the numerical solution without CRE. The goal isto assess the accuracy order at the node i with two levels of CRE.

6

Page 7: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

g = 3u3,i−3/4 u3,i−1/2 u3,i−1/4 u3,i u3,i+1/4

g = 2u2,i−3/4 u2,i−1/4 u2,i+1/4

g = 1u1,i−3/4 u1,i+1/4

Figure 3: Coincident-nodes grid with three levels and r = 2.

The error for a first-order scheme at a generic node (e.g., i− 3/4, i− 1/4,i, and i + 1/4) can be assessed through the following Taylor expansions(h3 = h2/2 = h1/4 = h/4, since r = 2)

u3,i − uanalyticali = c1,ih

4+ c2,i

(h

4

)2

+ c3,i

(h

4

)3

+O(h4), (15)

u2,i − uanalyticali = c1,ih

2+ c2,i

(h

2

)2

+ c3,i

(h

2

)3

+O(h4), (16)

u1,i − uanalyticali = c1,ih+ c2,ih2 + c3,ih

3 +O(h4). (17)

For the first level, we have

u12,i−3/4 − uanalyticali−3/4 = −c2,i−3/4

h2

2− 3c3,i−3/4

h3

4+O(h4), (18)

u12,i+1/4 − uanalyticali+1/4 = −c2,i+1/4

h2

2− 3c3,i+1/4

h3

4+O(h4). (19)

Since the c1,i is a function of uanalyticali , it is also continuous or piecewisecontinuous. Then, one can expand c1,i−3/4 and c1,i+1/4 to get

c1,i−3/4 = c1,i−1/4 − c(1)1,i−1/4h

2+ c

(2)1,i−1/4

h2

8+O(h3), (20)

c1,i+1/4 = c1,i−1/4 + c(1)1,i−1/4

h

2+ c

(2)1,i−1/4

h2

8+O(h3), (21)

using the same idea to the other terms, we can write

u12,i−1/4 − uanalyticali−1/4 = −c2,i−1/4

h2

2− (c

(2)1,i−1/4 + 12c3,i−1/4)

h3

16+O(h4), (22)

7

Page 8: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

u13,i−1/4 − uanalyticali−1/4 = −c2,i−1/4

h2

8− 3c3,i−1/4

h3

32+O(h4), (23)

u13,i+1/4 − uanalyticali+1/4 = −c2,i+1/4

h2

8− 3c3,i+1/4

h3

32+O(h4), (24)

u13,i − uanalyticali = −c2,i

h2

8− (c

(2)1,i + 12c3,i)

h3

128+O(h4). (25)

Now, for the second level

u23,i−1/4 − uanalyticali−1/4 = (c

(2)1,i−1/4 + 6c3,i−1/4)

h3

48+O(h4), (26)

u23,i+1/4 − uanalyticali+1/4 = c3,i+1/4

h3

8+O(h4), (27)

u23,i − uanalyticali = c2,i

h2

4+ (c

(2)1,i + 72c3,i)

h3

128+O(h4), (28)

where we can see that the accuracy order at g = 3, second level of CRE, andnode i is 2. This is a problem because, after the first level, the CRE will notbe able to eliminate this second-order error term.

One can note that the Ci for non-coincident nodes are second-order ap-proximations, and one possible remedy to the order limitation would be theuse of higher order Ci computation. However, this must be done for eachnon-coincident Ci at every CRE level.

A cheaper remedy to achieve higher orders with CRE and repetition wouldbe the use of (10) at the coincident nodes only (e.g., nodes i−3/4 and i+1/4in Fig. 3), and then obtain higher order approximations at the other nodeswith a suitable interpolation. Unfortunately, this can not be used in the non-coincident-nodes grid. Therefore, an approach must be devised to increasethe accuracy order of the solution in this grid type.

4.3. Completed Repeated Richardson Extrapolation

As a first approach to increase the accuracy order in the non-coincident-nodes grid, one could combine three nodes and compute a correction in asimilar way as the original CRE. However, a fixed-order correction wouldimpose a low limit to the order of the procedure. Another approach wouldbe the combination of more than three nodes to achieve higher orders. Nev-ertheless, higher orders demand a large number of nodes and, therefore, alarge system to solve. We remark that this system may not be solvable. Theeasiest, and perhaps not the cheapest, approach is to use the repetition.

8

Page 9: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

First, we write

umg,i = um−1g,i +um−1g,i − um−1g−1,i

rpm−1 − 1, with m = 1, . . . , G− 1, and m < g, (29)

where G is the number of grids. Note that the first level (m = 1) of CREdepends on the numerical solution (m = 0).

To compute the CRE at level m one needs an equivalent node in thecoarse grid (g−1). That is, we need um−1g,i and an equivalent um−1g−1,i. This canbe done by a Newton polynomial pd(x) of degree d = l + r = pG−1 − 1 withl nodes to the left and r nodes to right of i, satisfying pd(xj) = um−1g−1,j withj = i− l, . . . , i+ r and i = 1, . . . , N . Now, all fine grid nodes have equivalentnodes in the coarse grid and the extrapolation can be computed with (29).The CRRE is a recursive application of CRE and it is summarized in Tab.1.

Table 1: Extrapolations to u.

grid level (g)CRE level (m)

0 1 2 3 41 u1,i - - - -2 u2,i u12,i - - -3 u3,i u13,i u23,i - -4 u4,i u14,i u24,i u34,i -5 u5,i u15,i u25,i u35,i u45,i

CRRE

The algorithm for computing the CRRE in smooth solutions at level mis summarized next. For g = m+ 1, . . . , G proceed as follows:

1 Obtain an equivalent node in the coarse mesh (um−1g−1,i) with a Newtonpolynomial of degree pG−1 − 1.

2 Compute CRE with (29).

The compressible fluid flow is subject to discontinuities and shocks, that isa challenging issue for numerical methods. One of the most popular numericalschemes used to capture shocks in conservation laws, such as Euler equations,is the WENO scheme. Through the weighted combination of approximations

9

Page 10: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

in different substencils, this scheme can maintain higher order sufficiently farfrom the shock. Considering this, we propose the use of WENO idea withCRRE to reduce the error in solution with shocks.

In order to reduce the numerical error, CRRE must be computed suf-ficiently far from the shock. To accomplish that, we will use the WENOsmoothness indicator idea and the Richardson error estimative as a predic-tor/corrector step, computed as in (30).

Urimg =

um−1g,i − um−1g−1,i

rpm−1 − 1(30)

The solution will be smooth if

P =βg

βf + ε≤ 2 + 2

1+ 1pv2 , (31)

where ε = 1E − 16.The smoothness indicators βf and βg can be computed through (32), the

only difference is the stencil used to obtain f , as shown in Fig. 4 for fg andff .

β =4∑i

∆x2i−1

(dif

dxi

)2

dx, (32)

withf = a4x

4 + a3x3 + a2x

2 + a1x+ a0. (33)

Since CRRE will be applied in converged numerical solutions, one will havepointwise values instead of average node values and, because of that, thereis no integral in (32).

fg

ff

i−4 i−2

i−2 i−1i

i i+1

i+2

i+2

i+4

Figure 4: Example of stencils for fg and ff .

Even with the restriction imposed by (31), CRRE could be computed ina node with high magnitude errors. To avoid that, we compute CRRE innodes where (31) is satisfied and the Richardson error estimative is lower

10

Page 11: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

than in the previous CRE level. Of course, when m = 0 there is no errorestimative. Therefore, we set U0

ri = 1.The algorithm for computing the CRRE at level m in solutions with

shocks and for g = G, . . . ,m+ 1 is:

1 Compute P with (31) in every node.

2 Find the beginning (b) and the ending (e) of the non-smooth region.

3 For i = 1, . . . , N proceed as follows:

a If i is between b and e, use the previous level value umg,i = um−1g,i

and exit.

b Obtain an equivalent node in the coarse mesh (um−1g−1,i) with a New-ton polynomial of degree pG−1 − 1 avoiding nodes inside the non-smooth region.

c Compute CRE with (29).

d If |Urimg | > |Uri

m−1g |, use the previous level value umg,i = um−1g,i .

5. Results

5.1. One-dimensional Euler

The first test for CRRE is a steady 1D compressible fluid flow. The flowis also known as Rayleigh flow or flow with heat addition. In our case, theinflow is supersonic and heat is being taken to maintain this condition. Theconservative variables, flux and source vectors are

U =

ρρvE

, F (U) =

ρvρv2

v(E + p)

and S(U) =

00

−∆qρv

h

,(34)

where ρ, v, E, and p are, respectively, the density, velocity, total energy, andpressure. ∆q ≡ q/N is the heat taken in each node and q is the total heatper unit mass taken from the flow. The equation of state is given by

E =p

γ − 1+ρv2

2, (35)

11

Page 12: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

where γ = 1.4 is the specific heat ratio for the air. One should note that weare using the perfect gas equation of state. The inflow conditions and q areshown in Tab. 2, where R, M and T are the gas constant, Mach number andtemperature.

Table 2: Inflow conditions and other parameters for the 1D flow.

R [J/(kgK)] 286.9 T [K] 400q [J/kg] 5 · 104 p [MPa] 0.20265xl [m] 0 ρ [kg/m3] p/(RT )

xr [m] 0.2 v [m/s] M√γp/ρ

M 1.3

We used the analytical solution as the initial condition (see [21] for detailson the analytical solution). The time integration stopped around two timesthe time step when the machine error was reached. Furthermore, we usedquadruple precision in all tests.

Since the inflow is supersonic, we need to impose u1, u2, and u3 at theboundary, and extrapolate them to the ghost node via a Taylor expansion.Because our scheme is first-order accurate, the ghost node U is the same asin the boundary.

The outflow is also supersonic and we need to extrapolate the character-istic variables to get U at the boundary and, then, at the ghost node (see [16]for details on ILW). Although our scheme is first-order accurate, tests showedthat a higher order polynomial, e.g. fifth-order accurate, is needed to main-tain the CRRE higher order at the outflow boundary. More investigation isneeded to determine the cause of this behavior.

The L1 norm of the error and its effective order for the density are pre-sented in Figs. 5 and 6, and in Tab. 3, where we can see the optimalperformance of CRRE in reducing the numerical error or in increasing theaccuracy order. The results to the other conservative variables will not beshown because they are qualitatively similar.

5.2. Quasi-one-dimensional Euler

The Q1D tests describe a steady compressible fluid flow in a convergent-divergent idealized nozzle, whose geometry is computed with (36).

A(x) = π[(x− xth)2 + rth]2, (36)

12

Page 13: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

10−14

10−12

10−10

10−8

10−6

10−4

10−2

10−4 10−3 10−2

L1

h [m]

CRE level 0CRE level 1CRE level 2CRE level 3CRE level 4CRE level 5CRE level 6CRE level 7CRE level 8CRE level 9

Figure 5: L1 norm of ρ at each grid and CRE level. 1D Euler flow.

0

1

2

3

4

5

6

7

10−4 10−3

p E

h [m]

CRE level 0CRE level 1CRE level 2CRE level 3CRE level 4CRE level 5CRE level 6CRE level 7CRE level 8

Figure 6: pE of ρ at each grid and CRE level. 1D Euler flow.

13

Page 14: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

Table 3: Orders and norms of ρ. 1D Euler flow.Node upwind CRRE

quantity L1 norm Order L1 norm Order20 9.15E − 03 - - -40 5.57E − 03 0.717 2.03E − 03 -80 3.16E − 03 0.819 3.45E − 04 1.41160 1.70E − 03 0.891 4.54E − 05 2.06320 8.87E − 04 0.939 4.31E − 06 2.72640 4.54E − 04 0.967 2.73E − 07 3.431280 2.30E − 04 0.983 1.10E − 08 4.182560 1.16E − 04 0.991 2.66E − 10 4.975120 5.79E − 05 0.995 3.80E − 12 5.7910240 2.90E − 05 0.998 3.11E − 14 6.62

where xth and rth are the position and throat radius.Depending on the inflow and outflow conditions, a smooth (isentropic)

or discontinuous (adiabatic) solution may be obtained. The conservativevariables and flux vectors are the same as in the 1D test. The source term ispresented in (37).

S(U) = −Ax

A

ρuρu2

u(E + p)

(37)

The flow parameters are presented in Tab. 4, where the subscript 0denotes the total or stagnation properties and pe is the pressure at the nozzleexit. If a certain pe is imposed at the outflow boundary, a normal shock wavecan stand at some position in the divergent region of the nozzle (more detailscan be seen in [21]).

Table 4: Q1D flow parameters.

xl [m] 0 p0 [MPa] 0.2xr [m] 0.5 T0 [K] 800xth [m] 0.25 ρ0 [kg/m3] p0/(RT0)rth [m] 0.05 pe [MPa] 0.101325

We used the exact solution as the initial condition (see [21] for detailson the exact solution to the Q1D flow), the time integration stopped aroundtwo times the time step when the machine error was reached.

The inflow is subsonic in both isentropic and adiabatic flows and weneed to impose two conservative variables and extrapolate one characteristic.

14

Page 15: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

With the exact solution, we impose u1 and u2 and extrapolate w1 at the leftboundary, then extrapolate U to the ghost nodes. Although our scheme isfirst-order accurate, tests showed that we need to use a fifth-order polynomialto maintain higher order with CRRE.

For the flow with a normal shock wave, the outflow is subsonic and weneed to impose one conservative variable and extrapolate two characteristicvariables. With the exact solution we impose u1 and extrapolate w2 and w3

at the right boundary, then extrapolate U to the ghost node. We remarkthat because the first three grids are very coarse and the method is first-order, the shock was causing oscillation problems near the outflow boundary,and we reduced the polynomial order on these grids to avoid these problems.These problems can also be avoided with a WENO type extrapolation [16,17]. However, this extrapolation caused order limitations with CRRE. Theisentropic outflow is supersonic and we treated it in a similar way as the 1Dtest.

The L1 norm of the error and its effective order for the density and theisentropic flow are presented in Figs. 7 and 8, and in Tab. 5, where theoptimal performance is not achieved because not all orders are convergingmonotonically. However, we can see that the error and its effective order arestabilizing. The results to the other conservative variables will not be shownbecause they are qualitatively similar.

Table 5: Orders and norms of ρ. Q1D isentropic flow.Node upwind CRRE

quantity L1 norm Order L1 norm Order20 1.63E − 02 - - -40 8.79E − 03 0.890 4.87E − 03 -80 5.07E − 03 0.794 2.63E − 04 0.609160 2.95E − 03 0.781 7.49E − 05 2.87320 1.62E − 03 0.869 9.98E − 06 2.67640 8.48E − 04 0.931 3.09E − 07 6.281280 4.35E − 04 0.965 1.80E − 08 3.772560 2.20E − 04 0.982 3.56E − 10 5.195120 1.11E − 04 0.991 4.10E − 12 6.0210240 5.55E − 05 0.996 3.07E − 14 6.73

For the flow with a normal shock wave, it is not convenient to use (5)to compute the L1 norm, since the error behavior is non-monotone in theshock region. Also, the downstream region of the shock is subject to errordegradation from the shock [22]. This does not happen with the upstreamregion of the shock because of the flow type, i.e., the flow is supersonic and

15

Page 16: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

10−14

10−12

10−10

10−8

10−6

10−4

10−2

100

10−4 10−3 10−2

L1

h [m]

CRE level 0CRE level 1CRE level 2CRE level 3CRE level 4CRE level 5CRE level 6CRE level 7CRE level 8CRE level 9

Figure 7: L1 norm of ρ at each grid and CRE level. Q1D isentropic flow.

0

1

2

3

4

5

6

7

10−4 10−3 10−2

p E

h [m]

CRE level 0CRE level 1CRE level 2CRE level 3CRE level 4CRE level 5CRE level 6CRE level 7CRE level 8

Figure 8: pE of ρ error at each grid and CRE level. Q1D isentropic flow.

16

Page 17: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

the information cannot propagate upstream the shock. Therefore, we willcompute the L1 in the smooth regions of the solution, identified by the sameprocedure as in CRRE. In this test, we also computed the shock problem withthe WENO-Z method. The boundary treatment was the same as isentropicflow with the exception that we used WENO type extrapolation [16, 17] atthe right boundary.

First, we present the error at every node and the solution field for thegrid with 5120 nodes in Figs. 9 and 10.

10−25

10−20

10−15

10−10

10−5

100

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

|Eg,i|[kg/m

3]

x [m]

First-orderCRRE with shock

WENO-Z

Figure 9: ρ absolute error at each node. Q1D flow with a normal shock wave, grid with5120 nodes.

One can note in Figs. 9 and 10 that the shock transition is sharper inWENO-Z than in the upwind and in CRRE, and that the WENO-Z accuracydecrease downstream the shock. Also, despite of higher magnitude errors, theCRRE procedure can reduce the error upstream and downstream the shock.The WENO-Z accuracy loss is a common behavior of higher order methods[22]. Furthermore, the Richardson smoother transition occurs because itcannot improve the smooth transition from upwind solutions.

The density L1 norm and its order for the Q1D flow with normal shockwave are summarized in Tab. 6, where “accumulated CPU time” means thesimulation time needed to compute all grids involved in the CRRE procedure,

17

Page 18: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.4 0.405 0.41 0.415 0.42 0.425 0.43 0.435 0.44

ρ9,i

[kg/m

3]

x [m]

First-orderCRRE with shock

WENO-Z

Figure 10: ρ solution magnified at shock region. Q1D flow with a normal shock wave, gridwith 5120 nodes.

the post-processing time of this last is negligible in all cases. In this analysis,the WENO-Z error magnitude and order limitation are due to the accuracyloss downstream the shock. In order to compare the CRRE and WENO-Zonly upstream the shock, the L1 norm and its order are presented in Tab. 7,where one can note that the WENO-Z has lower error magnitude. Because ofthe shock region, it is difficult to conclude on the convergence order. However,in both cases the error is being reduced.

6. Concluding remarks

The CRE initial procedure and its modifications where made mostly forincompressible fluid flows, and for coincident-nodes grids. Nonetheless, it isalso very often to solve CFD problems with non-coincident-nodes grids andcompressible fluid flows plays an important role in modern fluid flow. It wasshown that the original CRE procedure is not suitable for repetition, and wasproposed a remedy to this situation for the coincident-nodes grid. Insteadof testing this, we proposed and tested a general CRRE procedure based oninterpolation from coarse to the fine grid nodes at each level of CRE, that is

18

Page 19: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

Table 6: Orders, norms for ρ and CPU time. Q1D flow with a normal shock wave.WENO-Z CRRE with shock

NodeL1∗ norm Order CPU time L1∗ norm Order “Accumulated

quantity CPU time”20 9.12E − 03 - 5.51 s - - -40 9.35E − 04 3.29 16.0 s 2.32E − 02 - 9.40 s80 1.33E − 03 −0.51 45.8 s 6.74E − 03 1.71 36.4 s160 5.82E − 05 4.51 2.64 min 1.35E − 03 2.11 1.93 min320 1.42E − 05 2.03 9.26 min 2.03E − 04 2.72 6.44 min640 1.36E − 07 6.70 31.5 min 2.83E − 05 2.84 26.9 min1280 1.93E − 07 −0.5 2.01 h 1.20E − 06 4.55 1.64 h2560 1.87E − 07 0.04 8.72 h 1.18E − 07 3.35 6.20 h5120 6.33E − 08 1.56 32.0 h 4.72E − 09 4.64 24.6 h

∗ Computed in the smooth regions of the solution.

Table 7: Orders and norms for ρ computed in smooth regions upstream the shock.WENO-Z CRRE with shock

NodeL1∗ norm Order L1∗ norm Orderquantity

20 9.12E − 03 - - -40 9.35E − 04 3.29 1.89E − 02 -80 1.33E − 03 −0.51 7.42E − 03 1.27160 4.44E − 04 1.58 1.30E − 03 2.26320 1.01E − 04 2.14 1.69E − 04 2.92640 3.59E − 05 1.49 2.18E − 05 2.951280 6.54E − 08 9.10 6.32E − 07 5.102560 1.40E − 10 8.86 8.96E − 08 2.825120 1.31E − 12 6.74 4.90E − 09 4.19

∗ Upstream the shock.

suitable for compressible fluid flows.The CRRE procedure was successfully tested in Rayleigh flow, where one

can observe the optimal CRRE performance. The error was reduced almost109 times and the accuracy order was increased from 0.998 to 6.62 in the gridwith 10240 nodes.

For the isentropic flow, something prevented the optimal performanceand, despite of that, the error was reduced almost 2 · 109 times and theaccuracy order was increased from 0.996 to 6.73.

In the adiabatic flow with a normal shock wave, the CRRE reduced theerror downstream and upstream the shock. However, the WENO-Z presentsmaller magnitude errors upstream the shock and a sharper shock transition.In both cases, the error is reducing as the grid size decrease. The CRRE“accumulated CPU time” was smaller than the WENO-Z in all grids, alsothe CRRE procedure post-processing time is negligible.

19

Page 20: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

The procedure works in a fine way with compressible fluid flows withoutshock waves and can highly reduce the error or increase the accuracy order.Although the CRRE can work with shocks, it presented higher magnitudeerror and a smoother shock transition, because of that, more numerical testsand theoretical analysis are needed to improve its performance. For futureworks we plan to investigate the need of increasing the polynomial order toimpose the boundary conditions, the reason behind the non-optimal perfor-mance for the quasi-one-dimensional isentropic fluid flow, the CRRE withmore general equations, for example, other conservation laws and transientproblems, higher order numerical schemes, and the alternatives to improvethe CRRE with discontinuous solutions.

7. Acknowledgements

We would like to thank the Capes (Coordenacao de Aperfeicoamento dePessoal de Nıvel Superior, Brazil) and CNPq (National Council for Scientificand Technological Development, Brazil) for their financial support.

[1] C. Hirsch, Numerical computation of internal and exter-nal flows, Elsevier, 2 edn., ISBN 978-0-7506-6594-0, doi:https://doi.org/10.1016/B978-075066594-0/50049-7, 2007.

[2] P. Kaps, S. W. H. Poon, T. D. Bui, Rosenbrock methods for StiffODEs: A comparison of Richardson extrapolation and embeddingtechnique, Computing 34 (1) (1985) 17–40, ISSN 1436-5057, doi:10.1007/BF02242171.

[3] G. Han, R. Wang, Richardson extrapolation of iterated discrete Galerkinsolution for two-dimensional Fredholm integral equations, Journal ofComputational and Applied Mathematics 139 (1) (2002) 49–63, doi:https://doi.org/10.1016/S0377-0427(01)00390-9.

[4] J. Franke, W. Frank, Application of generalized Richardson ex-trapolation to the computation of the flow across an asymmet-ric street intersection, Journal of Wind Engineering and IndustrialAerodynamics 96 (10–11) (2008) 1616 – 1628, ISSN 0167-6105, doi:http://dx.doi.org/10.1016/j.jweia.2008.02.003, 4th International Sym-posium on Computational Wind Engineering (CWE2006).

20

Page 21: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

[5] L. F. Richardson, The approximate arithmetical solution by finite dif-fereces of physical problems involving differencial equations, with anapplication to the stresses in a masonry dam, Phylosophical Proceed-ings of the Royal Society of London Serial A 210 (1910) 307–357, doi:10.1098/rsta.1911.0009.

[6] L. F. Richardson, J. A. Gaunt, The Deferred Approach to the Limit.Part I. Single Lattice. Part II. Interpenetrating Lattices, PhilosophicalTransactions of the Royal Society of London. Series A, Containing Pa-pers of a Mathematical or Physical Character 226 (1927) 299–361, ISSN02643952, doi:10.1098/rsta.1927.0008.

[7] P. J. Roache, P. M. Knupp, Completed Richardson Extrapolation, Com-munications in Numerical Methods in Engineering 9 (1993) 365–374,doi:https://doi.org/10.1002/cnm.1640090502.

[8] C. Marchi, F. F. Giacomini, C. D. Santiago, Repeated Richardson ex-trapolation to reduce the field discretization error in computational fluiddynamics, Numerical Heat Transfer, part B 70 (4) (2016) 340–353, doi:https://doi.org/10.1080/10407790.2016.1215702.

[9] J. Martın-Vaquero, B. Kleefeld, Extrapolated stabilized ex-plicit Runge–Kutta methods, Journal of Computational Physics326 (Supplement C) (2016) 141 – 155, ISSN 0021-9991, doi:https://doi.org/10.1016/j.jcp.2016.08.042.

[10] P. Amore, J. P. Boyd, F. M. Fernandez, B. Rosler, High order eigenvaluesfor the Helmholtz equation in complicated non-tensor domains throughRichardson extrapolation of second order finite differences, Journal ofComputational Physics 312 (Supplement C) (2016) 252 – 271, ISSN0021-9991, doi:https://doi.org/10.1016/j.jcp.2015.12.059.

[11] A. Dang, H. Kehtarnavaz, D. Coats, The use of Richardson extrapola-tion in PNs solutions of rocket nozzle flow, in: 25th Joint PropulsionConference, American Institute of Aeronautics and Astronautics, Mon-terey, California, doi:https://doi.org/10.2514/6.1989-2895, 1989.

[12] C. H. Marchi, M. A. Martins, L. A. Novak, L. K. Araki,M. A. V. Pinto, S. de F. T. Goncalves, D. F. Moro, I. da S. Fre-itas, Polynomial interpolation with repeated Richardson extrapola-tion to reduce discretization error in CFD, Applied Mathematical

21

Page 22: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

Modelling 40 (21–22) (2016) 8872 – 8885, ISSN 0307-904X, doi:http://dx.doi.org/10.1016/j.apm.2016.05.029.

[13] C. H. Marchi, L. A. Novak, C. D. Santiago, A. P. da Silveira Var-gas, Highly accurate numerical solutions with repeated Richard-son extrapolation for 2D laplace equation, Applied MathematicalModelling 37 (12–13) (2013) 7386 – 7397, ISSN 0307-904X, doi:http://dx.doi.org/10.1016/j.apm.2013.02.043.

[14] C.-W. Shu, Essentially non-oscillatory and weighted essentially non-oscillatory schemes for hyperbolic conservation laws, Springer BerlinHeidelberg, Berlin, Heidelberg, ISBN 978-3-540-49804-9, 325–432, doi:10.1007/BFb0096355, 1998.

[15] R. Borges, M. Carmona, B. Costa, W. S. Don, An improvedWeighted Essentially Non-Oscillatory scheme for hyperbolic conserva-tion laws, Journal of Computational Physics 227 (2008) 3191–3211, doi:https://doi.org/10.1016/j.jcp.2007.11.038.

[16] S. Tan, C.-W. Shu, Inverse Lax-Wendroff procedure for nu-merical boundary conditions of conservation laws, Jour-nal of Computational Physics 229 (2010) 8144–8166, doi:https://doi.org/10.1016/j.jcp.2010.07.014.

[17] S. Tan, C. Wang, C.-W. Shu, J. Ning, Efficient implementation ofhigh order inverse Lax–Wendroff boundary treatment for conservationlaws, Journal of Computational Physics 231 (2012) 2510–2527, doi:https://doi.org/10.1016/j.jcp.2011.11.037.

[18] Standard for Verification and Validation in Computational Fluid Dy-namics and Heat Transfer, American Society of Mechanical Engineers,New York, ISBN 9780791832097, 2009.

[19] C. H. Marchi, A. F. C. da Silva, Unidimensional numerical solution errorestimation for convergent apparent order, Numerical Heat Transfer 42(2002) 167–188, doi:https://doi.org/10.1080/10407790190053888.

[20] P. J. Roache, Fundamentals of verification and validation, Hermosa Pub-lishers, New Mexico, ISBN 9780913478127, 2009.

22

Page 23: Completed Repeated Richardson Extrapolation for compressible … · 2018. 8. 14. · ow, quasi-one-dimensional ow 1. Introduction In Fluid Mechanics, the set of equations describing

[21] J. D. Anderson, Modern Compressible Flow: With Historical Perspec-tive, McGraw-Hill, New York, 3 edn., ISBN 0072424435, 2003.

[22] S. Gottlieb, D. Gottlieb, C.-W. Shu, Recovering High-Order Accuracyin WENO Computations of Steady-State Hyperbolic Systems, Journalof Scientific Computing 28 (2) (2006) 307–318, ISSN 1573-7691, doi:https://doi.org/10.1007/s10915-006-9078-8.

23