The accuracy of gradient reconstruction methods on unstructured meshes is analyzed both mathematically and numerically. Mathematical derivations reveal that, for gradient reconstruction based on the Green-Gauss theorem (the GG methods), if the summation of first-and-lower-order terms does not counterbalance in the discretized integral process, which rarely occurs, second-order accurate approximation of face midpoint value is necessary to produce at least first-order accurate gradient. However, gradient reconstruction based on the least-squares approach (the LSQ methods) is at least first-order on arbitrary unstructured grids. Verifications are performed on typical isotropic grid stencils by analyzing the relationship between the discretization error of gradient reconstruction and the discretization error of the face midpoint value approximation of a given analytic function. Meanwhile, the numerical accuracy of gradient reconstruction methods is examined with grid convergence study on typical isotropic grids. Results verify the phenomenon of accuracy degradation for the GG methods when the face midpoint value condition is not satisfied. The LSQ methods are proved to be at least first-order on all tested isotropic grids. To study gradient accuracy effects on inviscid flow simulation, solution errors are quantified using the Method of Manufactured Solutions (MMS) which was validated before adoption by comparing with an exact solution case, i.e., the 2-dimensional (2D) inviscid isentropic vortex. Numerical results demonstrate that the order of accuracy (OOA) of gradient reconstruction is crucial in determining the OOA of numerical solutions. Solution accuracy deteriorates seriously if gradient reconstruction does not reach first-order.

1 Introduction

In the last several decades, research and applications of unstructured grids in Computational Fluid Dynamics (CFD) numerical simulations had drawn much attention. Unstructured grids offer great flexibility in the treatment of complex geometries, and solution dependent grid adaptivity on unstructured grids can be easily implemented. Despite its advantages, unstructured grids also meet some challenges in improving computational efficiency and obtaining accurate unstructured finite-volume (FV) discretization schemes. Nowadays, nominally second-order accurate unstructured FV schemes are widely applied in industrial CFD applications. However, the actual numerical accuracy of unstructured FV schemes had long been a hot topic for CFD researchers.

Pioneering work had been done on mathematical and numerical accuracy study of cell-vertex schemes due to Jameson et al. [1] and Ni [2]. Relationship between the convergence of truncation error and convergence of discretization error had been studied and clarified that the solution error could be second-order even though the local truncation error is first order [3, 4]. Preliminary investigation on the influence of mesh types on solution accuracy had also been conducted [5] which proved that triangular schemes can perform as well as quadrilateral schemes under appropriate conditions. Ever since Barth and Jespersen [6] proposed the limited form of piecewise linear reconstruction, the upwind schemes based on gradient reconstruction became perhaps the most popular unstructured second-order FV schemes. For these upwind schemes, the first-order accurate gradient is necessary to achieve second-order accurate discretization. The accuracy of gradient reconstruction and gradient accuracy effects on the accuracy of FV schemes became key factors in analyzing the accuracy of FV numerical solution.

Generally, there are mainly two types of gradient reconstruction methods which can be readily implemented on unstructured second-order FV discretization of inviscid and viscous fluxes. One is the gradient reconstruction based on the Green-Gauss theorem (the GG methods); the other is based on the least-squares approach (the LSQ methods). Performances of these two types of reconstruction techniques on unstructured meshes are affected by a number of factors, such as mesh type, mesh quality, mesh regularity, formulation, etc.

On one hand, the comparison of these two types of gradient reconstruction methods was illustrated in earlier papers [7,8,9,10]. Valuable experiences were acquired such as these two types of methods produce similar results on regular quadrilateral and triangular meshes [7]; the GG method with either simple averaging or inverse distance weighted face averaging is inconsistent on irregular grids and fails to achieve the first-order accuracy and thus should not be preferred [8]; the LSQ methods are at least first-order accurate on arbitrary meshes [9], but accuracy deterioration occurs on highly stretched grids in the presence of surface curvature [10]. However, despite former analyses and comparisons, no definitive “best” gradient reconstruction method has emerged [8] and the fundamental reason for the accuracy degradation was not revealed comprehensively.

On the other hand, the relationship between mesh characteristics and gradient or solution accuracy were investigated [11,12,13,14,15,16]. Through studying gradient reconstruction methods on grids with a high aspect ratio, it was found that accuracy degradation occurs for solutions that vary predominately in the direction of large mesh spacing [11]. Apart from aspect ratio effects, other grid effects such as mesh stretching, curvature, skewness, and non-planar faces in 3D grids are also important parameters affecting gradient or solution accuracy. Previous studies had tried to identify schemes that yield the lowest level of solution error while maintaining stability over a wide range of mesh characteristics [14, 15]. Unfortunately, however, the relationship between mesh characteristics and solution accuracy are complicated [16] and are far from clear.

Meanwhile, preliminary but successful attempts in creating accurate and robust reconstruction of the gradient and eventually improving solution accuracy had been made [8, 17].

The focus of this study is analyzing gradient reconstruction methods both mathematically and numerically for cell-centered FV schemes, evaluating the gradient effects on solution accuracy of inviscid flow simulations. Cell-vertex schemes, while differing from cell-centered schemes in formulation details, can be analyzed in the same fashion; and they have been considered in previous works [12, 13, 15]. In this paper, the conditions to ensure at least first-order accurate gradient reconstruction are derived mathematically. Then, verifications are performed on typical isotropic grid stencils by analyzing the relationship between discretization error of gradient reconstruction and discretization error of the face midpoint value approximation of a given analytic function. Numerical accuracy of gradient reconstruction is examined with grid convergence study on typical isotropic grids such as quadrilateral grids, triangular grids, perturbed grids, skewed grids and grids over a cylinder with curve boundary. Since previous studies reported that poor gradient reconstruction accuracy does not necessarily imply large discretization error [13], solution errors have to be quantified to determine the impact of gradient accuracy. Quantification of solution errors require an exact solution and will be accomplished using the Method of Manufactured Solutions (MMS) [18]. Before the MMS method was adopted, validation of the method was performed by comparing results with an exact solution case, the 2D inviscid isentropic vortex. Grid convergence studies are carried out to determine the order of accuracy and the absolute magnitude of solution errors. Traditional mesh refinement instead of downscaling tests [19,20,21,22] is employed for grid convergence study since consistent refinement is easily carried out on currently considered isotropic grids. All the schemes are implemented within a second-order cell-centered finite volume CFD solver, HyperFLOW [23, 24].

This paper is organized as follows: in section II, we briefly introduce the second-order FV discretization schemes. A comprehensive description and mathematical analysis of gradient reconstruction methods are followed in section III. Mathematical gradient accuracy analyses are confirmed numerically in section IV. Next, we present principles of the method of manufactured solutions in section V and validate this method with an exact solution case. Finally, in section VI, gradient accuracy effects on solution accuracy of inviscid flows are investigated with a Euler manufactured solution.

2 Finite volume discretization schemes

In this paper, the discretization of the conservation law is implemented in an integral form [25]:

where W, F_{c}, F_{v}, Q are the conservative variables, the convective flux vector, the viscous flux vector, and the source term respectively. Eq. (1) is simplified to the Euler equations where no viscous term and source term exists (F_{v} = 0, Q = 0) for inviscid problems considered in this paper.

2.1 Spatial discretization

The convective flux is discretized with the well-known Roe’s flux-difference splitting scheme [26] as follows:

where (F_{c})_{ij} is the convective flux through the interface of the neighboring control volume i and j, F_{c}(W_{L}) and F_{c}(W_{R}) are convective fluxes evaluated with the face left state W_{L} and the face right state W_{R}, respectively. The way to obtain face left and right states is called ‘solution reconstruction’ which will be discussed below. \( \left|{\overline{\mathbf{A}}}_{\mathrm{Roe}}\right| \) denotes the so-called Roe’s averaged matrix which is identical to the convective flux Jacobian. Anyway, other Riemann solvers for the convective flux can be adopted here, such as Lax-Friedrichs, Steger-Warming, van Leer, HLLC, AUSM series schemes, and so on. No matter which Riemann solver is adopted to calculate the convective flux, the face states on the left and right sides of an interface, the primitive variables U_{L} and U_{R} in most cases (as shown in Fig. 1), should be reconstructed firstly. For simplicity, we will denote any one of the primitive variables as U in the following context.

2.2 Solution reconstruction

Roe’s flux-difference splitting scheme, as well as other Riemann solvers, requires flow states to be reconstructed on the left and the right sides of an interface of neighboring control volumes, as sketched in Fig. 1.

If we assume that the solution is constant in each cell, a constant reconstruction is obtained which leads to first-order spatial discretization.

where U_{L} and U_{R} are primitive variables at the left and right sides of a control volume interface. A second-order spatial discretization can be obtained by assuming a linear distribution of flow variables in each cell. With this assumption, the left and the right states are reconstructed through a piecewise linear interpolation as Eq. (4) [6]. Since low speed flows without discontinuity (such as shock wave) are currently studied, no limiter function is considered here.

where (∇U)_{i} is the gradient at cell center i, and r_{L} represents the vector from the left cell center of i to the face midpoint, and r_{R} represents the vector from the right cell center of j to the face midpoint.

At least first-order accurate gradient reconstruction is often required in Eq. (4) to achieve second-order accurate spatial discretization. Generally, there are mainly two types of gradient reconstruction methods which can be readily implemented in unstructured second-order finite volume discretization. One is the gradient reconstruction based on the Green-Gauss theorem (the GG methods); the other is based on the least-squares approach (the LSQ methods). These two types of methods are introduced and analyzed in the following section.

3 Gradient reconstruction methods

3.1 Green-gauss theorem based gradient reconstruction

The first type of gradient reconstruction methods is based on the Green-Gauss theorem expressed in Eq. (5).

where U stands for any one of the primitive variables or any scalar variable, n is the surface unit normal vector. Firstly, we would like to derive the discretized form of Eq. (5).

With the linear distribution assumption of flow variables in each cell, the gradient will be constant within cells; we simplify the left-hand side of Eq. (5) as follows:

where V_{i} is the volume of the control volume, (∇U)_{i} is the gradient at cell center i. Combining Eq. (5) with Eq. (6), and introducing the Taylor-series expansion, we derive the discretized gradient of cell i as follows:

in which N_{F} is the number of faces of the control volume, n_{ij}ΔS_{ij} is the area vector of face j of cell i.

In Eq. (7), we once again use the assumption that U varies linearly within each cell so that the second and higher-order derivatives in the Taylor expansion can be neglected. Besides, U_{ij} is the value at any point on face j up to now, if we introduce the midpoint quadrature which requires U_{ij} to be the value at the midpoint (centroid) of face j, we obtain:

Here, we would like to emphasize in Eq. (8) that U_{ij} is the value at the midpoint of face j, and at the current stage, the gradient of cell i is represented exactly by Eq. (8) under the linear distribution assumption. Examining Eq. (8) more carefully, we found that potential errors of gradient reconstruction by Eq. (8) can only be introduced by the approximation of face midpoint value U_{ij}.

How does the face midpoint value approximation influence the gradient accuracy? This question is answered by the following mathematical analysis. These derivations focus on the order of magnitude of gradient reconstruction error and face midpoint approximation error.

To find the necessary condition to obtain first-order gradient reconstruction of cell i, we need:

where O(h) is the order of magnitude of the mesh size. As mentioned earlier, the only contributor to gradient error is the approximation of face midpoint value. Here we assume the face midpoint value approximation to be expressed as follows:

where \( {\hat{U}}_{ij} \) is the exact value at the face midpoint, a_{ij}, b_{ij}, c_{ij} are constant coefficients. Substituting Eq. (10) into Eq. (9), we obtain:

On one hand, we notice that when \( \sum \limits_{j=1}^{N_F}\left({a}_{ij}+{b}_{ij}O(h)\right){\mathbf{n}}_{ij}\varDelta {S}_{ij}=0 \), in other words, the summation (integral) of first-and-lower-order terms in the approximation of face midpoint value counterbalances each other, gradient reconstruction achieves at least first-order accuracy.

On the other hand, we can see from Eq. (12) that in order to achieve at least first-order accurate gradient, constant coefficients a_{ij}, b_{ij} must be zero, which means the approximation of face midpoint value, i.e. Eq. (10), must be second-order accurate.

Consequently, if no counterbalance occurs for the first-and-lower-order terms, second-order accurate approximation of face midpoint value is necessary to achieve at least first-order gradient reconstruction.

As a supplement, we also prove that second-order accurate approximation of face midpoint value is sufficient to produce first-order accurate gradient.

Assuming that the second-order accurate approximation of the face midpoint value can be written as:

Therefore, in terms of GG gradient reconstruction methods, we conclude that when the summation of first-and-lower-order terms in the integral process does not counterbalance each other, second-order accurate approximation of face midpoint value is the necessary and sufficient condition for at least first-order accurate gradient reconstruction.

According to the approach for face midpoint value approximation, the GG methods can be categorized into:

(a)

cell-based GG methods (GG-Cell), using the simple average value of face neighboring cells as face midpoint value;

(b)

nodal-based GG methods (GG-Node), using the simple average value of node surrounding cells as face nodal value;

(c)

GG methods based on least-squares face interpolation (GG-LSQ), using LSQ interpolation to calculate face midpoint value;

(d)

GG methods based on weighted tri-linear face interpolation (GG-WTLI), using weighted tri-linear interpolation to calculate face midpoint value.

Readers may refer to Appendix 1 for details. Of course, other approaches [11,12,13, 27] can be adopted which are not included in this paper.

Whether these methods guarantee second-order face midpoint value approximation on arbitrary grids is essential in determining the order of accuracy of gradient reconstruction. Here we tabulate the properties in Table 1 and their verifications are left in later sections.

3.2 Least-squares approach based gradient reconstruction

The second type of gradient reconstruction methods is based on the least-squares (LSQ) approach. Applying the Taylor series expansion, we have:

where U_{i} is the variable at the center of cell i, and r_{ij} is the vector from cell center i to cell center j. If second-and-higher-order terms are neglected, Eq. (15) becomes

Applying Eq. (16) to certain stencil cells, for instance, basic stencils consisting of immediate neighboring cells of cell i as shown in Fig. 2, or extended stencils consisting of all neighboring cells sharing cell vertexes, as shown in Fig. 3, or other augment stencils [28], we obtain:

where Δx_{ij}, Δy_{ij}, Δz_{ij} are the components of vector r_{ij}, N denotes the number of stencil cells, and θ_{j} is weight coefficient for each component equation, which is usually defined as the reciprocal of the distance between cell center i and cell center j. Eq. (17) has less number of unknowns than the number of equations and could be solved with a least-squares approach.

The accuracy order of the least-squares approach can be easily determined. Since the numerical gradient is reconstructed by retaining only the linear terms as Eq. (18).

Therefore, Eq. (16) achieves first-order gradient reconstruction on arbitrary unstructured meshes regardless of mesh type and quality.

In the current study, both weighted and un-weighted LSQ with basic and extended stencils are considered. These methods will be denoted as LSQ-basic, WLSQ-basic, and WLSQ-extended in the following context.

4 Gradient accuracy analysis

4.1 Discretization error analysis

In this section, we will confirm the aforementioned relationship between the face midpoint value approximation and the gradient accuracy, and present a relatively fast and easy approach to determine the actual order of accuracy of gradient reconstruction methods.

All the analyses in this section are to determine the discretization errors of both gradient reconstruction and the face midpoint value approximation of the analytic function f(x, y) = sin x + sin y + cos xy by GG-Cell and LSQ method with basic stencils (LSQ-basic). More details about these two methods are supplemented in Appendix 1.

4.1.1 Flat mesh

First, we consider an isotropic regular quadrilateral grid (quads.) stencils with aspect ratio AR = 1 as shown in Fig. 4. The stencil only involves 5 points, i.e., point 0 – point 4; the coordinates of those points are readily determined and will not be listed below.

Exact face midpoint value and exact gradient at cell center 0 can be obtained by substituting the coordinates into the function f(x, y) and gradient ∇f respectively. The discretized face midpoint values are approximated as the average value of neighboring cell values for the GG-Cell method. The discretized gradients are reconstructed by the GG-Cell method and the LSQ method with basic stencils. Discretization errors are quantified by the difference between the discretized value and the exact value. Here, we directly present the discretization errors of both face midpoint value approximation and gradient reconstruction as follows.

In Table 2, both GG-Cell and LSQ-basic reconstructed gradients achieve second-order accuracy and the absolute values of discretization error are identical. Special attention should be focused on the second-order accurate GG-Cell method; it is obvious in this case that the second-order terms in the face midpoint value approximation will counterbalance each other in the discretized integral process which results in higher-than-first-order accurate GG gradient reconstruction. And the LSQ-basic method achieves second-order accuracy because it is equivalent to the central difference on Cartesian grids [29].

Following the analysis on regular quadrilateral grids, regular triangular grids (reg. tri.) and regular double-split triangular grids (reg. double-split tri.) can be considered in a similar way. Grid stencils are sketched in Figs. 5 and 6. Brief results on discretization errors of gradient reconstruction and face midpoint value approximation are shown in Table 3. Detailed results on discretization errors are provided in Appendix 2.

With reference to Table 3 and Table 8 in Appendix 2, it can be noted that on regular triangular grids, both GG-Cell and LSQ-basic reconstructed gradients achieve the first-order accuracy. However, on regular double split triangular grids, the GG-Cell method degrades to 0th order (O(1)) because the accuracy of face midpoint value approximation on two faces (face BC and face AC) degrades to first-order and no counterbalance occurs under this circumstance. This conclusion is different from those reported in previous works, for example, in Ref. [7], Green-Gauss method and least-squares gradient reconstruction were considered to produce similar results on regular meshes, and in Ref. [16], Green-Gauss methods were recognized insensitive to mesh regularity [16].

Further study on this problem shows that the accuracy degradation of GG-Cell method closely relates to mesh topology. If the face midpoint does not bisect the segment connecting the centers of two neighboring cells (as shown in Fig. 6), second-order accurate approximation of face midpoint value will be not achieved, and thus first-order gradient accuracy will not be maintained, as listed in Table 3.

Accuracy degradation was also predicted by Mavriplis [10] when the segments connecting neighboring cell centers do not bisect the shared mesh edge. Sozer et.al [8] confirmed that the Green-Gauss approach with either simple or IDW face averaging is 0th order accurate by numerical gradient accuracy tests. In this paper, a similar phenomenon of accuracy degradation is observed, and furthermore, the fundamental reason is located on the accuracy of face midpoint value approximation. However, we will show next on curved meshes that the conclusion by Mavriplis is not complete enough and there exists at least one special case that does not comply with his statement but can still be explained by the theory proposed in this paper.

4.1.2 Meshes on the curved surface (curved mesh)

For typical isotropic grids on curved surfaces, the accuracy of face midpoint value approximation and gradient reconstruction methods are analyzed with the stencil sketched in Fig. 7.

Firstly, following the definition of Diskin et al. [11], curvature induced mesh deformation is characterized by parameter Γ:

where y_{i} is the y coordinate of point i in the Cartesian coordinate system, R is the radius at cell center 0, h_{θ} and h_{r} are mesh size in the circumferential direction and the radial direction. AR = Rh_{θ}/h_{r} is the grid aspect ratio, for isotropic grids considered in this paper, AR~O(1). We can see that when Γ → 0, point 0 and point 1 lie on the horizontal line, thus no curvature exists. On the contrary, when Γ increases, the curvature induced mesh deformation increases as well. Particularly, when we refine the grids at a specified AR, Γ decreases with h_{θ} diminishing, and the curvature induced mesh deformation can be ignored when the mesh is refined to a certain scale.

Coordinates of the stencil points are determined as follows in Table 4:

in which r is the stretching ratio of the grids, for the isotropic grids considered in the paper, r = 1.

The gradient of function f(x, y) = sin x + sin y + cos xy at cell 0 is reconstructed by GG-Cell and LSQ-basic gradient reconstruction methods with AR = 1. The discretization errors are shown in Table 5.

From Table 5, face midpoint value approximations of face AB and face CD are first-order accurate which is not sufficient to produce first-order accurate gradient, however, we can still obtain the first-order gradient on isotropic quadrilateral grids on a curved surface. The reason is that the first-order terms counterbalance each other under this condition which can be seen from the discretization errors of face AB and face CD. Besides, Γ becomes a significant parameter in determining the true order of accuracy of gradient reconstruction methods. Second-order accurate gradient reconstruction can be obtained if Γ is so small that the first-order term O(Γh_{θ}) is even smaller than the second-order term \( O\left({h}_{\theta}^2\right) \) and thus it can be ignored during the evaluation of the order of accuracy. This conclusion will be validated in the next sub-section via numerical tests on curved quadrilateral meshes.

4.2 Numerical tests of gradient reconstruction

In order to verify the accuracy analysis of the gradient reconstruction methods, numerical tests on typical 2D isotropic grids are performed.

4.2.1 Grids and the approach of grid convergence study

Sketches of 9 typical grids are listed below in Fig. 8.

(a)

regular quadrilateral grids (quads.);

(b)

regular triangular grids (reg. tri.) derived from the regular quadrilateral grids by splitting the diagonal of each quadrangle in the same direction;

perturbed quadrilateral grids (perturbed quads.) with grid nodes shifting from their initial location by a random but limited fraction of local mesh size. Specifically, grid node perturbation in this paper is defined as rh/4, where r∈ [−1, 1] is a random number and h is the local mesh size [11,12,13];

(f)

random triangular grids (rand. tri.) derived from randomly splitting the diagonal of the regular quadrilateral grids (left diagonal and right diagonal appear with equal probability);

(g)

regular double-split triangular grids (reg. double-split tri.) derived from regular quadrilateral grids by double splitting the diagonal of each quadrangle in the same direction, i.e., splitting in the left and right diagonal respectively;

(h)

isotropic quadrilateral grids on a curved surface (curved quads.);

(i)

isotropic regular triangular grids on a curved surface (curved tri.);

Grid convergence studies are carried out on a series of consistently refined grids. Instead of shrinking the domain [19], mesh size is halved in a fixed domain by doubling the number of grid points on the boundary edges. The order of accuracy of gradient reconstruction is obtained asymptotically with the decrease of the mesh size. Here the mesh size is defined as [15]

where V_{total} is the total volume of all cells in the domain, n_{dof} is the number of degrees of freedom in the mesh, for cell-centered schemes, n_{dof} is set to the number of cells, and d denotes the spatial dimension.

The flow function for gradient numerical tests is chosen to be a scalar manufactured solution [15] with 8 constant coefficients ϕ_{0}, ϕ_{x}, ϕ_{y}, ϕ_{xy}, α_{ϕx}, α_{ϕy}, α_{ϕxy}, L:

$$ \phi \left(x,y\right)={\phi}_0+{\phi}_x\sin \left(\frac{\alpha_{\phi x}\pi x}{L}\right)+{\phi}_y\sin \left(\frac{\alpha_{\phi y}\pi y}{L}\right)+{\phi}_{xy}\cos \left(\frac{\alpha_{\phi x y}\pi x y}{L^2}\right) $$

(23)

Discretization errors are quantified by the difference between the exact gradient and the discretized one. The L_{1} norms, as shown in Eq. (24), of discretization error are calculated and plotted as a function of mesh size to study the convergence of discretization error. Here, the L_{2} and L_{∞} norms, as shown in Eqs. (25) and (26), can also be adopted since they have the same performance on self-similar grids and will not lead to essentially different results on currently considered grids which are generally self-similar. So only L_{1} norms are listed in the following context.

Figure 9 illustrates the grid convergence performance of x-direction gradient discretization error (L_{1} norm) for different meshes with different gradient reconstruction methods. Overall agreement is observed between mathematical analyses and numerical tests.

Numerical results in Fig. 9a-d show that all gradient reconstruction methods produce at least first-order gradient on regular quadrilateral grids and regular triangular grids and their skewed counterparts. Mesh skewness does not cause degradation of the order of accuracy since skewness alone does not lead to violation of the face midpoint value condition. However, it doesn’t necessarily imply that mesh skewness does not influence gradient or solution accuracy. Skewness, in fact, was demonstrated a key factor deteriorating the solution accuracy of inviscid flow simulation by the authors [30].

Figure 9e-g show that the GG-Cell gradient reconstruction method degrades to 0th order on perturbed quadrilateral grids, random triangular grids, and regular double split triangular grids. This confirms the analysis for the GG-Cell method in the previous section that accuracy degradation occurs when the face midpoint does not bisect the segment connecting the neighboring cells which are the cases on these three types of grids.

Besides, GG-Node gradient reconstruction method also suffers from accuracy degradation on random triangular grids and perturbed quadrilateral grids as shown in Fig. 9e and f. However, other GG methods that ensure second-order accurate face midpoint value approximation, such as GG-LSQ, GG-WTLI, maintain at least first-order gradient accuracy on all tested isotropic grids.

Meanwhile, as shown in Fig. 10h, gradient accuracy of GG-Cell method reaches second order on isotropic quadrilateral grids on a curved surface which is consistent with previous analysis on the curved mesh. And all methods produce at least first-order gradient on curved quadrilateral grids and curved triangular grids. This confirms that other parameters such as curvature induced mesh deformation also play an important role in determining the actual order of accuracy of gradient reconstruction. And the condition whether the face midpoint bisects the segment connecting the neighboring cells, as bisection fails on the curved mesh, is not necessary for GG-Cell methods to be at least first-order accurate.

These results verify the previous conclusion that the fundamental reason of accuracy degradation of GG methods is not achieving second-order accurate face midpoint value approximation.

Numerical tests of gradient reconstruction methods based on least-squares approach indicate that these methods are at least first-order accurate on all tested isotropic grids regardless of mesh type, mesh perturbation, surface curvature, and skewness.

In terms of absolute magnitude of gradient discretization error and comparison of these gradient reconstruction methods, WLSQ method with extended stencil exhibits the lowest level of error on all tested grids except isotropic quadrilateral grids on curved surface, while other methods exhibit erratic behaviors and it is hard to identify the best method for all grids which, in fact, is not the goal of the current study.

5 Method of manufactured solutions

In order to quantify solution errors, we need an exact solution for the governing equations. Common exact solutions for real physical flows are either too difficult to obtain, or if exist, they are often solutions of the simplified equations and do not exercise all terms in the complete equations.

Therefore, except for simple exact solutions, a more powerful tool, the Method of Manufactured Solutions (MMS) [18, 31], is adopted in this paper. In a general procedure of MMS, non-trivial but analytic solutions are manufactured without being concerned about its physical realism since accuracy analysis is a purely mathematical exercise, and the analytic solutions should be complex enough to exercise all terms in the governing equations being tested.

Instead of solving the original partial differential equation (PDE), we solve the equations added with an analytic source term. Considering an analytic solution Q_{m}, and substituting the solution into the governing PDE, then we can obtain an analytic source term S_{m}. It is obvious that the analytic solution Q_{m} is the exact solution of the modified equation, i.e., the original equation added with an analytic source term, as shown in Eq. (28). Solving the modified equation, we can get the discretized numerical solution. Thus the solution errors can be quantified by comparing the exact manufactured solution and the numerical solution.

In dealing with the analytic source term, two major approaches were presented in previous work. Katz [15] reported second-order accurate source term discretization, while Roache [18] suggested symbolic manipulation of the source term. In this paper, we adopt the symbolic manipulation to obtain the exact expression of the source term. Dirichlet boundary conditions are implemented.

5.1 Euler manufactured solution

Quantification of discretization error is accomplished by a vector Euler manufactured solution [15] for two-dimensional (2D) cases, and the manufactured solution Q_{m} has the following components:

$$ {\displaystyle \begin{array}{l}\rho \left(x,y\right)={\rho}_0+{\rho}_x\sin \left(\frac{\alpha_{\rho x}\pi x}{L}\right)+{\rho}_y\sin \left(\frac{\alpha_{\rho y}\pi y}{L}\right)+{\rho}_{xy}\cos \left(\frac{\alpha_{\rho x y}\pi x y}{L^2}\right)\\ {}u\left(x,y\right)={u}_0+{u}_x\sin \left(\frac{\alpha_{ux}\pi x}{L}\right)+{u}_y\sin \left(\frac{\alpha_{uy}\pi y}{L}\right)+{u}_{xy}\cos \left(\frac{\alpha_{ux y}\pi x y}{L^2}\right)\\ {}v\left(x,y\right)={v}_0+{v}_x\sin \left(\frac{\alpha_{vx}\pi x}{L}\right)+{v}_y\sin \left(\frac{\alpha_{vy}\pi y}{L}\right)+{v}_{xy}\cos \left(\frac{\alpha_{vx y}\pi x y}{L^2}\right)\\ {}P\left(x,y\right)={P}_0+{P}_x\sin \left(\frac{\alpha_{Px}\pi x}{L}\right)+{P}_y\sin \left(\frac{\alpha_{Py}\pi y}{L}\right)+{P}_{xy}\cos \left(\frac{\alpha_{Px y}\pi x y}{L^2}\right)\end{array}} $$

(29)

in which ρ_{0}, ρ_{x}, ρ_{y}, ρ_{xy}, α_{ρx}, α_{ρy}, α_{ρxy}, L and corresponding parameters in other component equations are constant coefficients. Analytic source terms are derived by Mathematica symbol manipulation. Modified Euler equation (added with an analytic source term) is solved to determine the discretized solutions. Initial density contours are plotted in Fig. 11.

5.2 Validation of MMS procedures

Validation of MMS procedures is performed by comparing the order of accuracy (OOA) obtained by the MMS procedure and an exact solution case. The exact solution adopted in this paper is a 2D inviscid isentropic vortex. Exact initial conditions are specified according to Ref. [8, 32] as

where \( r=\sqrt{{\left(x-{x}_0\right)}^2+{\left(y-{y}_0\right)}^2} \), the vortex strength is taken as ε = 5.0, and the vortex core is located at (x_{0}, y_{0}) = (0, 0). Eq. (30) is an exact solution for Euler equations thus can be adopted to verify and validate the MMS procedures. Initial density contour of a 2D inviscid vortex is plotted in Fig. 12.

Grid convergence studies on 4 types of grids, i.e., grids (a), (b), (e) and (f) in Fig. 8, are performed with same discretization scheme, and the OOA of the numerical solution is determined. Table 6 shows the L_{1} error and the OOA obtained by the inviscid vortex and by the MMS procedure with a Euler manufactured solution. It demonstrates that the Euler MMS procedure obtains the same OOA as the exact solution case.

6 Effects on the accuracy of inviscid flow simulation

Previous sections examined the accuracy of various gradient reconstruction methods, identified accuracy degradation for certain methods and verified former mathematical conclusions. However, poor gradient reconstruction accuracy does not necessarily imply large discretization error for the governing equations [10, 13]. The gradient accuracy and the FV discretization accuracy was thought to be unrelated. In this section, the effects of gradient accuracy on simulation of inviscid flows are considered. Solution errors are quantified by the validated Euler MMS procedure.

Results of grid convergence studies on grids (a)-(i) as shown in Fig. 8 are listed respectively in Fig. 13. It shows the convergence of L_{1} norm of density discretization error of the Euler MMS tests with different gradient reconstruction methods, in which ‘1st order’ implies the numerical schemes adopting a constant reconstruction (i.e., Eq. (3)), and ‘1^{st} order ref.’ and ‘2^{nd} order ref.’ are 1st order and 2nd order reference lines.

Figure 13a-d show that FV schemes on grids (a)-(d) are second-order for all gradient reconstruction methods and the solution accuracy (absolute value of density discretization error) are nearly the same even though the gradient reconstructions have different accuracy as shown in Fig. 9a-d.

Figure 13e-g indicate that the schemes employing GG-Cell gradient reconstruction method degrade to first-order on grids (e)-(g) (perturbed quadrilateral grids, random triangular grids, and regular double-split triangular grids). The schemes employing GG-Node method also suffer from accuracy deterioration on these grids except regular double-split triangular grids. It proves that first-order accurate gradient reconstruction is necessary to maintain second-order FV schemes. These results clearly show that 0th order GG methods will lead to first-order FV schemes and generate a much higher level of absolute error.

In Fig. 13e-g, we also notice that even though gradient reconstruction of GG methods degrades to 0th order and the corresponding FV schemes degrade to 1st order, these schemes still yield a lower level of absolute error than the pure first-order FV scheme with a constant reconstruction. In other words, 0th order gradient reconstruction is still better than constant reconstruction.

Figure 13h-i show that all FV schemes on curved quadrilateral grids and curved triangular grids are second-order which confirms again the conclusion that first-order gradient reconstruction is necessary to yield second-order FV discretization.

Besides, FV discretization employing LSQ methods (LSQ-basic, WLSQ-basic, and WLSQ-extended) is always second-order accurate since LSQ gradient reconstruction is always at least first-order on arbitrary unstructured grids. Meanwhile, we also notice again that when gradient reconstruction achieves the first-order accuracy as shown in Fig. 9, the absolute error of gradient reconstruction does not directly imply the absolute error of numerical solution accuracy.

Although not considered in this paper, the computational efficiency of these schemes differs very much from each other. Preliminary studies on the complexity and efficiency of FV schemes were reported in previous studies [12, 13], and we will further study these issues in future work.

7 Conclusions and future work

Gradient reconstruction based on the Green-Gauss theorem (the GG methods) and the least-squares approaches (the LSQ methods) are analyzed both mathematically and numerically. Mathematical derivations reveal that, for gradient reconstruction based on the Green-Gauss theorem (the GG methods), if the summation of first-and-lower-order terms does not counterbalance in the discretized integral process, which rarely occurs, second-order accurate approximation of face midpoint value is necessary to produce at least first-order accurate gradient. However, gradient reconstruction methods based on the least-squares approach (LSQ methods) are at least first-order on arbitrary unstructured grids. These conclusions are verified by discretization error analysis on typical grid stencils and numerical accuracy tests on various types of isotropic grids.

If the face midpoint value condition is not satisfied, GG methods, such as GG-Cell and GG-Node method on irregular or perturbed mesh, will degrade to 0th order. Numerical tests indicated that on all tested isotropic grids, LSQ methods maintain at least first-order accurate gradient reconstruction.

In terms of gradient accuracy effects on the accuracy of inviscid flow simulation, it demonstrates that first-order accurate gradient is necessary to yield second-order FV discretization. The GG methods that produce the 0th order gradient should not be preferred in terms of simulation accuracy for practical flow simulations since they yield first-order FV discretization and generate much higher solution error. While second-order FV discretizations are ensured for all LSQ methods on all types of grids.

For gradient methods that yield the first-order gradient, which is sufficient for second-order FV schemes, it demonstrates that the gradient accuracy does not directly imply the numerical solution accuracy.

Previous work reported that GG methods may be more robust than LSQ methods on anisotropic grids on the curved surface [10, 11, 26, 27]. Future work will focus on the performance of gradient reconstruction methods on anisotropic and stretched grids with high aspect ratio and surface curvature for viscous flow simulations. Attempts on possible modifications of GG methods according to the face midpoint value condition will be carried out to improve the gradient and solution accuracy. While for the LSQ methods, improving robustness on high aspect ratio grids with surface curvature is worthful work.

Availability of data and materials

All data generated or analyzed during this study are included in this published article.

References

Jameson A, Schmidt W, Turkel E (1981) Numerical solutions of the Euler equations by finite volume methods using Runge-Kutta time-marching schemes. 14th Fluid and Plasma Dynamics Conference, Palo Alto, pp 81–1259

Ni RH (1982) A multiple-grid scheme for solving the Euler equation. AIAA J 20(11):1565–1571

Roe PL (1987) Error estimates for cell-vertex solution of compressible Euler equations. NASA Contract Rep:178235

Giles MB (1989) Accuracy of node-based solutions on irregular meshes. In: 11th international conference on numerical methods in fluid dynamics, vol 323, pp 369–373

Lindquist DR (1988) A comparison of numerical schemes on triangular and quadrilateral meshes. Maters’ Thesis, Massachusetts Institute of Technology. Cambridge, Massachusetts.

Barth TJ, Jespersen DC (1989) The design and application of upwind schemes on unstructured meshes. 27th Aerospace Sciences Meeting, Reno, pp 89–0366

Aftosmis M, Gaitonde D, Tavares TS (1995) Behavior of linear reconstruction techniques on unstructured meshes. AIAA J 33(11):2038–2049

Sozer E, Brehm C, Kiris CC (2014) Gradient calculation methods on arbitrary polyhedral unstructured meshes for cell-centered CFD solvers. 52nd Aerospace Sciences Meeting, National Harbor, pp 2014–1440

Smith TM, Barone MF, Bond RB et al (2007) Comparison of reconstruction techniques for unstructured mesh vertex centered finite volume schemes. 18th AIAA Computational Fluid Dynamics Conference, Miami, pp 2007–3958

Mavriplis DJ (2003) Revisiting the least-squares procedure for gradient reconstruction on unstructured meshes. 16th AIAA Computational Fluid Dynamics Conference, Orlando, pp 2003–3986

Diskin B, Thomas JL (2008) Accuracy of gradient reconstruction on grids with high aspect ratio. NIA Rep 12. pp. 1–25

Diskin B, Thomas JL, Nielsen EJ et al (2009) Comparison of node-centered and cell-centered unstructured finite-volume discretizations: viscous fluxes. 47th AIAA Aerospace Sciences Meeting including The New Horizons Forum and Aerospace Exposition, Orlando, pp 2009–0597

Diskin B, Thomas JL (2010) Comparison of node-centered and cell-centered unstructured finite-volume discretizations: inviscid fluxes. 48th AIAA Aerospace Sciences Meeting Including the New Horizons Forum and Aerospace Exposition, Orlando, pp 2010–1079

Katz A, Sankaran V (2012) High aspect ratio grid effects on the accuracy of Navier-stokes solutions on unstructured meshes. Comput Fluids 65:66–79

Diskin B, Thomas JL (2012) Effects of mesh regularity on accuracy of finite-volume schemes. 50th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition, Nashville, pp 2012–0609

Betchen LJ, Stratman AG (2010) An accurate gradient and hessian reconstruction method for cell-centered finite volume discretizations on general unstructured grids. Int J Numer Methods Fluids 62:945–962

Herbert S, Honey EAL (2005) I shrunk the grids! A new approach to CFD verification studies. 43rd AIAA Aerospace Sciences Meeting and Exhibit, Reno, pp 2005–2685

Diskin B, Thomas JL (2007) Accuracy analysis for mixed-element finite-volume discretization schemes. NIA Tech Rep 8:2007

Thomas JL, Diskin B, Rumsey CL (2008) Towards verification of unstructured-grid solvers. 46th AIAA Aerospace Sciences Meeting and Exhibit, Reno, pp 2008–2666

Luke E, Hebert S, Thompson D (2008) Theoretical and practical evaluation of solver-specific mesh quality. 46th AIAA Aerospace Sciences Meeting and Exhibit, Reno, pp 2008–2934

He X, Zhang LP, Zhao Z et al (2013) Research and development of structured/unstructured hybrid CFD software. Trans Nanjing Univ Aeronaut Astronaut 30:116–120

He X, He XY, He L et al (2015) HyperFLOW: a structured/unstructured hybrid integrated computational environment for multi-purpose fluid simulation. Procedia Eng 126:645–649

Moukalled F, Mangani L, Darwish M (2016) The finite volume method in computational fluid dynamics: an advanced introduction with OpenFOAM and Matlab. Springer International Publishing, Switzerland

Wang NH, Zhang LP, Ma R, et al (2016) Mesh quality effects on the accuracy of gradient reconstruction and inviscid flow simulation on isotropic unstructured grids. Chinese J Comput Mech, 34(5):555–563

Roache PJ, Steinberg S (1984) Symbolic manipulation and computational fluid dynamics. AIAA J 22(10):1390–1394

Pulliam T (2011) High order accurate finite-difference methods: as seen in OVERFLOW. 20th AIAA Computational Fluid Dynamics Conference, Honolulu, pp 2011–3851

The authors declare that they have no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix 1

According to the approach for face midpoint value approximation, the GG methods can be categorized (but not limited) into the following types:

(a)

cell-based GG methods (GG-Cell), using a simple average value of face neighboring cells as face midpoint value;

(b)

nodal-based GG methods (GG-Node), using a simple average value of node surrounding cells as face nodal value;

(c)

inverse distance weighted GG methods (GG-IDW); (not considered in this paper)

(d)

GG methods based on least-squares face interpolation (GG-LSQ), using LSQ interpolation to calculate face midpoint value;

(e)

GG methods based on weighted tri-linear face interpolation (GG-WTLI), using weighted tri-linear interpolation to calculate face midpoint value.

Descriptions of these methods for cell-centered data structure are reviewed in the following text.

(1) GG-Cell

As shown in Fig. 14, GG-Cell method approximates face midpoint value by simply averaging cell values of direct neighbors.

$$ {U}_{ij}=\frac{U_i+{U}_j}{2} $$

(31)

Simple algebraic average in Eq. (31) can be replaced by distance or volume-weighted interpolation as

$$ {U}_{ij}={w}_i{U}_i+{w}_j{U}_j $$

(32)

where w_{i} and w_{j} are distance or volume weights. Neither weighted interpolation nor simple algebraic averaged interpolation guarantees second-order face midpoint approximation. GG-Cell method with a simple algebraic average is considered only in this paper.

(2) GG-Node

As shown in Fig. 15, GG-Node methods approximate face midpoint value by a simply algebraic average of nodal values, as shown in Eq. (33). Nodal values are obtained by weighted interpolation of surrounding cells, either equal-weighted, as Eq. (34) shows, or distance/volume-weighted.

where U_{A} and U_{B} are nodal values of the computed face, in this 2D case, a face/edge consists of two nodes. Similar to GG-Cell methods, neither weighted interpolation nor simple averaging interpolation guarantees second-order face midpoint value approximation. The GG-Node method with equal-weighted interpolation is considered in this paper.

where \( \mid \overset{\rightharpoonup }{r_i}\mid \) represents the distance between the current face midpoint f and the stencil cell point i. This method is similar to GG-Node with distance weighted nodal value interpolation where nodal values are obtained by inverse distance weighted interpolation. So this method is only introduced and no further consideration will be taken in this paper.

Also as shown in Fig. 16, GG-LSQ method approximates face midpoint value by weighted least square approach. Value at stencil point i can be obtained by value at face midpoint f with a gradient interpolation, as shown in Eq. (36).

where Δx_{i}, Δy_{i}, Δz_{i} are the components of the distance vector. With Eq. (36), interpolating all stencil points from face midpoint and neglecting the high order terms, we obtain an over-determined system, as shown in Eq. (37). Solving the over-determined system, we can get the face midpoint value with a minimum-error interpolation of each stencil point.

As shown in Fig. 17, GG-WTLI method approximates face midpoint value by weighted tri-linear interpolation. Specifically, face midpoint value at f is interpolated from three surrounding non-collinear stencil points with linear regression.

Monotone interpolation can be obtained if face midpoint f locates within the triangle composed by the three non-collinear stencil points. Some other possible triangles for tri-linear interpolation are shown Fig. 17b. The final approximation of face midpoint value can be obtained by weighting each triangle’s stencil coefficients with the inverse distance from the triangle center to the face midpoint.

Appendix 2

The detailed expressions of discretization errors of gradient reconstruction and face midpoint value approximation are given below.

Table 7 shows the discretization properties of regular triangular grids (reg. tri. as shown in Fig. 8b). For the GG-Cell method, the face value approximations for all faces are second-order accurate and thus the gradient reconstructions of both directions are first-order accurate. For the LSQ method with basic stencils, it produces the same error as the GG-Cell method.

Table 8 shows the discretization properties of regular double-split triangular grids (reg. double-split tri. as shown in Fig. 8g). It indicates that for the GG-Cell method, face midpoint value approximations on two faces (face BC and face AC) degrade to first-order which is not sufficient to yield first-order gradient reconstruction as the errors of gradient reconstruction in the table are 0th order. However, the LSQ method with basic stencils still achieves first-order gradient reconstruction.

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Wang, N., Li, M., Ma, R. et al. Accuracy analysis of gradient reconstruction on isotropic unstructured meshes and its effects on inviscid flow simulation.
Adv. Aerodyn.1, 18 (2019). https://doi.org/10.1186/s42774-019-0020-9