 Research
 Open Access
 Published:
Accuracy analysis of gradient reconstruction on isotropic unstructured meshes and its effects on inviscid flow simulation
Advances in Aerodynamics volume 1, Article number: 18 (2019)
Abstract
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 GreenGauss theorem (the GG methods), if the summation of firstandlowerorder terms does not counterbalance in the discretized integral process, which rarely occurs, secondorder accurate approximation of face midpoint value is necessary to produce at least firstorder accurate gradient. However, gradient reconstruction based on the leastsquares approach (the LSQ methods) is at least firstorder 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 firstorder 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 2dimensional (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 firstorder.
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 finitevolume (FV) discretization schemes. Nowadays, nominally secondorder 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 cellvertex 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 secondorder 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 secondorder FV schemes. For these upwind schemes, the firstorder accurate gradient is necessary to achieve secondorder 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 secondorder FV discretization of inviscid and viscous fluxes. One is the gradient reconstruction based on the GreenGauss theorem (the GG methods); the other is based on the leastsquares 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 firstorder accuracy and thus should not be preferred [8]; the LSQ methods are at least firstorder 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 nonplanar 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 cellcentered FV schemes, evaluating the gradient effects on solution accuracy of inviscid flow simulations. Cellvertex schemes, while differing from cellcentered 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 firstorder 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 secondorder cellcentered finite volume CFD solver, HyperFLOW [23, 24].
This paper is organized as follows: in section II, we briefly introduce the secondorder 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.
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.
Spatial discretization
The convective flux is discretized with the wellknown Roe’s fluxdifference 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 socalled 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 LaxFriedrichs, StegerWarming, 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.
Solution reconstruction
Roe’s fluxdifference 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 firstorder spatial discretization.
where U_{L} and U_{R} are primitive variables at the left and right sides of a control volume interface. A secondorder 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 firstorder accurate gradient reconstruction is often required in Eq. (4) to achieve secondorder accurate spatial discretization. Generally, there are mainly two types of gradient reconstruction methods which can be readily implemented in unstructured secondorder finite volume discretization. One is the gradient reconstruction based on the GreenGauss theorem (the GG methods); the other is based on the leastsquares approach (the LSQ methods). These two types of methods are introduced and analyzed in the following section.
Gradient reconstruction methods
Greengauss theorem based gradient reconstruction
The first type of gradient reconstruction methods is based on the GreenGauss 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 lefthand 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 Taylorseries 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 higherorder 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 firstorder 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:
if \( \sum \limits_{j=1}^{N_F}\left({a}_{ij}+{b}_{ij}O(h)\right){\mathbf{n}}_{ij}\varDelta {S}_{ij}\ne 0 \), and \( \sum \limits_{j=1}^{N_F}\left({c}_{ij}O\left({h}^2\right)\right){\mathbf{n}}_{ij}\varDelta {S}_{ij}\ne 0 \), we have:
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 firstandlowerorder terms in the approximation of face midpoint value counterbalances each other, gradient reconstruction achieves at least firstorder accuracy.
On the other hand, we can see from Eq. (12) that in order to achieve at least firstorder 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 secondorder accurate.
Consequently, if no counterbalance occurs for the firstandlowerorder terms, secondorder accurate approximation of face midpoint value is necessary to achieve at least firstorder gradient reconstruction.
As a supplement, we also prove that secondorder accurate approximation of face midpoint value is sufficient to produce firstorder accurate gradient.
Assuming that the secondorder accurate approximation of the face midpoint value can be written as:
Substituting Eq. (13) into Eq. (8), we get:
Therefore, in terms of GG gradient reconstruction methods, we conclude that when the summation of firstandlowerorder terms in the integral process does not counterbalance each other, secondorder accurate approximation of face midpoint value is the necessary and sufficient condition for at least firstorder accurate gradient reconstruction.
According to the approach for face midpoint value approximation, the GG methods can be categorized into:

(a)
cellbased GG methods (GGCell), using the simple average value of face neighboring cells as face midpoint value;

(b)
nodalbased GG methods (GGNode), using the simple average value of node surrounding cells as face nodal value;

(c)
GG methods based on leastsquares face interpolation (GGLSQ), using LSQ interpolation to calculate face midpoint value;

(d)
GG methods based on weighted trilinear face interpolation (GGWTLI), using weighted trilinear 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 secondorder 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.
Leastsquares approach based gradient reconstruction
The second type of gradient reconstruction methods is based on the leastsquares (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 secondandhigherorder 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 leastsquares approach.
The accuracy order of the leastsquares approach can be easily determined. Since the numerical gradient is reconstructed by retaining only the linear terms as Eq. (18).
The exact expression is the Taylor series expansion as follows:
Combining Eq. (18) and Eq. (19), we have:
Therefore, Eq. (16) achieves firstorder gradient reconstruction on arbitrary unstructured meshes regardless of mesh type and quality.
In the current study, both weighted and unweighted LSQ with basic and extended stencils are considered. These methods will be denoted as LSQbasic, WLSQbasic, and WLSQextended in the following context.
Gradient accuracy analysis
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 GGCell and LSQ method with basic stencils (LSQbasic). More details about these two methods are supplemented in Appendix 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 GGCell method. The discretized gradients are reconstructed by the GGCell 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 GGCell and LSQbasic reconstructed gradients achieve secondorder accuracy and the absolute values of discretization error are identical. Special attention should be focused on the secondorder accurate GGCell method; it is obvious in this case that the secondorder terms in the face midpoint value approximation will counterbalance each other in the discretized integral process which results in higherthanfirstorder accurate GG gradient reconstruction. And the LSQbasic method achieves secondorder 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 doublesplit triangular grids (reg. doublesplit 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 GGCell and LSQbasic reconstructed gradients achieve the firstorder accuracy. However, on regular double split triangular grids, the GGCell 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 firstorder and no counterbalance occurs under this circumstance. This conclusion is different from those reported in previous works, for example, in Ref. [7], GreenGauss method and leastsquares gradient reconstruction were considered to produce similar results on regular meshes, and in Ref. [16], GreenGauss methods were recognized insensitive to mesh regularity [16].
Further study on this problem shows that the accuracy degradation of GGCell 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), secondorder accurate approximation of face midpoint value will be not achieved, and thus firstorder 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 GreenGauss 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.
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 GGCell and LSQbasic 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 firstorder accurate which is not sufficient to produce firstorder accurate gradient, however, we can still obtain the firstorder gradient on isotropic quadrilateral grids on a curved surface. The reason is that the firstorder 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. Secondorder accurate gradient reconstruction can be obtained if Γ is so small that the firstorder term O(Γh_{θ}) is even smaller than the secondorder 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 subsection via numerical tests on curved quadrilateral meshes.
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.
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;

(c)
skewed regular quadrilateral grids (skewed quads.);

(d)
skewed regular triangular grids (skewed reg. tri.);

(e)
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 doublesplit triangular grids (reg. doublesplit 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 cellcentered 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:
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 selfsimilar grids and will not lead to essentially different results on currently considered grids which are generally selfsimilar. So only L_{1} norms are listed in the following context.
The order of accuracy (OOA) p can be determined by comparing discretization errors between two consistently refined grids (E_{1} and E_{2}) as:
Numerical results
Figure 9 illustrates the grid convergence performance of xdirection 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. 9ad show that all gradient reconstruction methods produce at least firstorder 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 9eg show that the GGCell 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 GGCell 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, GGNode 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 secondorder accurate face midpoint value approximation, such as GGLSQ, GGWTLI, maintain at least firstorder gradient accuracy on all tested isotropic grids.
Meanwhile, as shown in Fig. 10h, gradient accuracy of GGCell 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 firstorder 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 GGCell methods to be at least firstorder accurate.
These results verify the previous conclusion that the fundamental reason of accuracy degradation of GG methods is not achieving secondorder accurate face midpoint value approximation.
Numerical tests of gradient reconstruction methods based on leastsquares approach indicate that these methods are at least firstorder 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.
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, nontrivial 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 secondorder 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.
Euler manufactured solution
Quantification of discretization error is accomplished by a vector Euler manufactured solution [15] for twodimensional (2D) cases, and the manufactured solution Q_{m} has the following components:
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.
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.
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 13ad show that FV schemes on grids (a)(d) are secondorder 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. 9ad.
Figure 13eg indicate that the schemes employing GGCell gradient reconstruction method degrade to firstorder on grids (e)(g) (perturbed quadrilateral grids, random triangular grids, and regular doublesplit triangular grids). The schemes employing GGNode method also suffer from accuracy deterioration on these grids except regular doublesplit triangular grids. It proves that firstorder accurate gradient reconstruction is necessary to maintain secondorder FV schemes. These results clearly show that 0th order GG methods will lead to firstorder FV schemes and generate a much higher level of absolute error.
In Fig. 13eg, 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 firstorder FV scheme with a constant reconstruction. In other words, 0th order gradient reconstruction is still better than constant reconstruction.
Figure 13hi show that all FV schemes on curved quadrilateral grids and curved triangular grids are secondorder which confirms again the conclusion that firstorder gradient reconstruction is necessary to yield secondorder FV discretization.
Besides, FV discretization employing LSQ methods (LSQbasic, WLSQbasic, and WLSQextended) is always secondorder accurate since LSQ gradient reconstruction is always at least firstorder on arbitrary unstructured grids. Meanwhile, we also notice again that when gradient reconstruction achieves the firstorder 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.
Conclusions and future work
Gradient reconstruction based on the GreenGauss theorem (the GG methods) and the leastsquares approaches (the LSQ methods) are analyzed both mathematically and numerically. Mathematical derivations reveal that, for gradient reconstruction based on the GreenGauss theorem (the GG methods), if the summation of firstandlowerorder terms does not counterbalance in the discretized integral process, which rarely occurs, secondorder accurate approximation of face midpoint value is necessary to produce at least firstorder accurate gradient. However, gradient reconstruction methods based on the leastsquares approach (LSQ methods) are at least firstorder 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 GGCell and GGNode 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 firstorder accurate gradient reconstruction.
In terms of gradient accuracy effects on the accuracy of inviscid flow simulation, it demonstrates that firstorder accurate gradient is necessary to yield secondorder 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 firstorder FV discretization and generate much higher solution error. While secondorder FV discretizations are ensured for all LSQ methods on all types of grids.
For gradient methods that yield the firstorder gradient, which is sufficient for secondorder 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
 1.
Jameson A, Schmidt W, Turkel E (1981) Numerical solutions of the Euler equations by finite volume methods using RungeKutta timemarching schemes. 14th Fluid and Plasma Dynamics Conference, Palo Alto, pp 81–1259
 2.
Ni RH (1982) A multiplegrid scheme for solving the Euler equation. AIAA J 20(11):1565–1571
 3.
Roe PL (1987) Error estimates for cellvertex solution of compressible Euler equations. NASA Contract Rep:178235
 4.
Giles MB (1989) Accuracy of nodebased solutions on irregular meshes. In: 11th international conference on numerical methods in fluid dynamics, vol 323, pp 369–373
 5.
Lindquist DR (1988) A comparison of numerical schemes on triangular and quadrilateral meshes. Maters’ Thesis, Massachusetts Institute of Technology. Cambridge, Massachusetts.
 6.
Barth TJ, Jespersen DC (1989) The design and application of upwind schemes on unstructured meshes. 27th Aerospace Sciences Meeting, Reno, pp 89–0366
 7.
Aftosmis M, Gaitonde D, Tavares TS (1995) Behavior of linear reconstruction techniques on unstructured meshes. AIAA J 33(11):2038–2049
 8.
Sozer E, Brehm C, Kiris CC (2014) Gradient calculation methods on arbitrary polyhedral unstructured meshes for cellcentered CFD solvers. 52nd Aerospace Sciences Meeting, National Harbor, pp 2014–1440
 9.
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
 10.
Mavriplis DJ (2003) Revisiting the leastsquares procedure for gradient reconstruction on unstructured meshes. 16th AIAA Computational Fluid Dynamics Conference, Orlando, pp 2003–3986
 11.
Diskin B, Thomas JL (2008) Accuracy of gradient reconstruction on grids with high aspect ratio. NIA Rep 12. pp. 1–25
 12.
Diskin B, Thomas JL, Nielsen EJ et al (2009) Comparison of nodecentered and cellcentered unstructured finitevolume discretizations: viscous fluxes. 47th AIAA Aerospace Sciences Meeting including The New Horizons Forum and Aerospace Exposition, Orlando, pp 2009–0597
 13.
Diskin B, Thomas JL (2010) Comparison of nodecentered and cellcentered unstructured finitevolume discretizations: inviscid fluxes. 48th AIAA Aerospace Sciences Meeting Including the New Horizons Forum and Aerospace Exposition, Orlando, pp 2010–1079
 14.
Katz A, Sankaran V (2012) High aspect ratio grid effects on the accuracy of Navierstokes solutions on unstructured meshes. Comput Fluids 65:66–79
 15.
Katz A, Sankaran V (2011) Mesh quality effects on the accuracy of CFD solutions on unstructured meshes. J Comput Phys 230:7670–7686
 16.
Diskin B, Thomas JL (2012) Effects of mesh regularity on accuracy of finitevolume schemes. 50th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition, Nashville, pp 2012–0609
 17.
Betchen LJ, Stratman AG (2010) An accurate gradient and hessian reconstruction method for cellcentered finite volume discretizations on general unstructured grids. Int J Numer Methods Fluids 62:945–962
 18.
Roache PJ (2002) Code verification by method of manufactured solutions. Trans ASME 124:4–10
 19.
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
 20.
Diskin B, Thomas JL (2007) Accuracy analysis for mixedelement finitevolume discretization schemes. NIA Tech Rep 8:2007
 21.
Thomas JL, Diskin B, Rumsey CL (2008) Towards verification of unstructuredgrid solvers. 46th AIAA Aerospace Sciences Meeting and Exhibit, Reno, pp 2008–2666
 22.
Luke E, Hebert S, Thompson D (2008) Theoretical and practical evaluation of solverspecific mesh quality. 46th AIAA Aerospace Sciences Meeting and Exhibit, Reno, pp 2008–2934
 23.
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
 24.
He X, He XY, He L et al (2015) HyperFLOW: a structured/unstructured hybrid integrated computational environment for multipurpose fluid simulation. Procedia Eng 126:645–649
 25.
Blazek J (2001) Computational fluid dynamics: principles and application. Elsevier, ButterworthHeinemann
 26.
Roe PL (1981) Approximate Riemann solvers, parameter vectors, and difference schemes. J Comput Phys 43:357–372
 27.
Shima E, Kitamura K, Haga T (2013) Green–gauss weightedleastsquares hybrid gradient reconstruction for arbitrary Polyhedra unstructured grids. AIAA J 51(11):2740–2747
 28.
Nishikawa H (2019) Efficient gradient stencils for robust implicit finitevolume solver convergence on distorted grids. J Comput Phys 386:486–501
 29.
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
 30.
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
 31.
Roache PJ, Steinberg S (1984) Symbolic manipulation and computational fluid dynamics. AIAA J 22(10):1390–1394
 32.
Pulliam T (2011) High order accurate finitedifference methods: as seen in OVERFLOW. 20th AIAA Computational Fluid Dynamics Conference, Honolulu, pp 2011–3851
Acknowledgments
This work is supported by National Natural Science Foundation of China [grant numbers 11532016, 91530325].
Funding
National Natural Science Foundation of China [grant numbers 11532016, 91530325].
Author information
Affiliations
Contributions
The contribution of the authors to the work is equivalent. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
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)
cellbased GG methods (GGCell), using a simple average value of face neighboring cells as face midpoint value;

(b)
nodalbased GG methods (GGNode), using a simple average value of node surrounding cells as face nodal value;

(c)
inverse distance weighted GG methods (GGIDW); (not considered in this paper)

(d)
GG methods based on leastsquares face interpolation (GGLSQ), using LSQ interpolation to calculate face midpoint value;

(e)
GG methods based on weighted trilinear face interpolation (GGWTLI), using weighted trilinear interpolation to calculate face midpoint value.
Descriptions of these methods for cellcentered data structure are reviewed in the following text.
(1) GGCell
As shown in Fig. 14, GGCell method approximates face midpoint value by simply averaging cell values of direct neighbors.
Simple algebraic average in Eq. (31) can be replaced by distance or volumeweighted interpolation as
where w_{i} and w_{j} are distance or volume weights. Neither weighted interpolation nor simple algebraic averaged interpolation guarantees secondorder face midpoint approximation. GGCell method with a simple algebraic average is considered only in this paper.
(2) GGNode
As shown in Fig. 15, GGNode 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 equalweighted, as Eq. (34) shows, or distance/volumeweighted.
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 GGCell methods, neither weighted interpolation nor simple averaging interpolation guarantees secondorder face midpoint value approximation. The GGNode method with equalweighted interpolation is considered in this paper.
(3) GGIDW [8]
As shown in Fig. 16, GGIDW method approximates face midpoint value by inverse distance weighted interpolation.
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 GGNode 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.
(4) GGLSQ [8]
Also as shown in Fig. 16, GGLSQ 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 overdetermined system, as shown in Eq. (37). Solving the overdetermined system, we can get the face midpoint value with a minimumerror interpolation of each stencil point.
(5) GGWTLI [8]
As shown in Fig. 17, GGWTLI method approximates face midpoint value by weighted trilinear interpolation. Specifically, face midpoint value at f is interpolated from three surrounding noncollinear stencil points with linear regression.
Monotone interpolation can be obtained if face midpoint f locates within the triangle composed by the three noncollinear stencil points. Some other possible triangles for trilinear 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 GGCell method, the face value approximations for all faces are secondorder accurate and thus the gradient reconstructions of both directions are firstorder accurate. For the LSQ method with basic stencils, it produces the same error as the GGCell method.
Table 8 shows the discretization properties of regular doublesplit triangular grids (reg. doublesplit tri. as shown in Fig. 8g). It indicates that for the GGCell method, face midpoint value approximations on two faces (face BC and face AC) degrade to firstorder which is not sufficient to yield firstorder gradient reconstruction as the errors of gradient reconstruction in the table are 0th order. However, the LSQ method with basic stencils still achieves firstorder 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.
About this article
Cite this article
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/s4277401900209
Received:
Accepted:
Published:
Keywords
 Finite volume discretization
 Unstructured grids
 Gradient reconstruction
 Accuracy analysis
 The method of manufactured solutions
 Grid convergence study