{'fraction_non_alphanumeric': 0.03594554208866014, 'fraction_numerical': 0.012037190768719907, 'mean_word_length': 4.480891719745223, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Grid Quality Measures for Iterative Convergence

In this paper, we discuss two grid-quality measures, F- and G-measures, in relation to iterative convergence of an implicit unstructured-grid Navier-Stokes solver. The F-measure is a lower bound of a least-squares gradient, which is a purely geometrical quantity defined in each cell and thus can be computed for a given grid: faster convergence is expected for a grid with a lower value of the F-measure. The G-measure is a least-squares gradient of a specified function around each cell, with the minimum value of zero. Faster convergence is expected for a smaller value of the G-measure towards zero. In this paper, we investigate these measures for inviscid and viscous problems with unstructured grids in two dimensions.


Introduction
The quality of an unstructured grid has a significant impact on accuracy and robustness of practical computational fluid dynamics solvers [1,2,3,4,5,6,7,8]. Various measures are available to assess the grid quality: grid skewness, aspect ratio, stretching factor, face angles, etc., and each of them has some implications to accuracy and robustness of an unstructured-grid solver. For example, explicit schemes tend to become less accurate and can get unstable on skewed structured grids [3] while implicit solvers tend to slow down on highly skewed unstructured grids [9,10]. These grid-quality measures can be used to assess the quality of general unstructured grids, but they are usually too general to predict the performance of a particular discretization. In order to gain accurate indications for a given solver, we need measures closely related to the target solver. One such example is the grid skewness measure defined at a face shared by two adjacent cells, say, 1 and 2, as the dot product of the unit face normal vector pointing from 1 to 2 and the unit vector pointing from the centroid of the cell 1 to that of the cell 2. As discussed in Ref. [11], this particular skewness measure explicitly appears in the finite-volume discsretization of the viscous terms and thus has significant impact on the high-frequency damping property and implicit solver convergence. It was shown to have some impact on the inviscid schemes as well but it is difficult to show clearly how the grid skewness measure affects inviscid discretizations. In this paper, inspired by the novel least-squares (LSQ) gradient stencil techniques proposed in Ref. [11], we introduce grid-quality measures in relation to iterative convergence of an implicit Navier-Stokes solver, focusing on a finite-volume inviscid discretization.
In Ref. [11], novel gradient-stencil construction techniques are proposed for stable iterative convergence of an implicit finite-volume solver based on two observations: a solver is expected to be more stable (1) when a gradient stencil is symmetric (e.g., structured grids) and (2) when solution gradients are smaller in magnitude (e.g., a first-order scheme). In the latter, a lower bound of a LSQ gradient can be derived, which can be computed for a given grid. Ref. [11] suggests that it can be used to select extra neighbors and adde them to a gradient stencil that will reduce the lower bound. Numerical results show that the resulting gradient stencils successfully lead to more stable convergence. In this paper, we investigate the use of the lower bound as a grid-quality measure for robust iterative convergence. That is, we investigate whether the lower bound computed for a given grid can indicate the performance of the implicit finite-volume solver on that grid. The lower bound, however, is not bounded and thus the minimum value is not known. It is still useful as a smaller value indicates better iterative convergence, but it would be reasonable to consider an alternative measure that has the minimum (i.e., the best) value. For this purpose, we introduce the magnitude of the gradient of a known function, which should be zero on an isotropic or symmetric stencil.
Note that one could make fairly good prediction if a grid can be inspected beforehand. For example, see grids shown in Figure 1. Clearly, we would expect that a finite-volume solver would converge faster on the structured grid in Figure 1(a) and have difficulties on the irregular grid 1(c). However, such requires the visualization of grid in each practical application and the knowledge and experience of a user. It is highly desirable to remove such a process, especially in automated simulations with grid adaptation [12]. In this paper, we will focus on iterative convergence of an implicit finite-volume solver and investigate the use of the proposed measures as an indication of the iterative convergence. A cell-centered finite-volume method will be considered, but the proposed measures can be easily applied to node-centered methods.
The paper is organized as follows. In Section 2, we describe the lower bound, called the F-measure, and the magnitude of the gradient of a known function, called the G-measure. In Section 3, we present numerical results to investigate how these measures predict the iterative convergence of an implicit finite-volume solver. In Section 4, we conclude the paper with remarks.

Grid Quality Measures
We consider an implicit defect-correction solver, which uses the exact Jacobian of the low-order residual (i.e., zero LSQ gradients) for solving a system of second-order cell-centered finite-volume residual equations for the Navier-Stokes equations. See Ref. [11] for details of the solver and the discretization. The implicit solver becomes Newton's method, which is fast and robust for solving a system of low-order residual equations. It implies that the solver converges faster and is more robust if the LSQ gradients are closer to zero. Based on this observation, a gradient stencil augmentation technique was devised [11], where extra cells are added to a gradient stencil that reduce the lower bound of the LSQ gradient. The lower bound is given by the F-measure as described below.

F-Measure
Consider the normal equation for a linear LSQ gradient method for computing the gradient (∂ x u j , ∂ y u j ) for a variable u: where where {g j } denotes a set of neighbor cells of the cell j, N is the number of the neighbors, w k 's are weights, (x j , y j ) is the centroid coordinates of the cell j, and similarly for the neighbor cells. As derived in Ref. [11], the lower bound of the gradient is proportional to the following quantity: where p = 0 for the inviscid reconstruction and p = 1 for the viscous reconstruction [11,13]. Although it is merely the lower bound, it has been found useful for constructing a LSQ stencil for stable iterative convergence on distorted grids: i.e., more stable with gradient stencils of lower value of F [11]. The measure F is referred here to as the F-measure. Note that the value of p should be chosen in consistent with the value used in the actual residual calculation. In this study, we focus on the inviscid discretization, and therefore set p = 0. Another point to note about the F-measure is that its minimum value is not clearly known and thus it is difficult to assess a given grid without reference to other data.

G-Measure
To estimate the gradient magnitude more directly and with a known minimum value of a measure, we propose to compute the LSQ gradient of a known function, e.g., a Gaussian function, and use its magnitude as a grid-quality measure. To eliminate ambiguity as much as possible, we employ an isotropic function in normalized coordinates: where s max = x 2 max + y 2 max , (x max , y max ) is the centroid coordinates of the neighbor cell farthest from the target cell j, and compute the LSQ gradient: where (c x k , c y k ) are the LSQ gradient coefficients [11]. As a grid-quality measure, we define The exact gradient is (0, 0) at the target cell centroid, and therefore the ideal value of G is zero. Our expectation is that the implicit solver is more robust and converges faster if this measure is closer to zero. We call this measure the G-measure.

Remarks
In this study, we compute the minimum, maximum, and average of these measures over all cells, and investigate how they indicate the performance of iterative convergence of an implicit solver. Local values of the F-and G-measures may be used for grid adaptation (e.g., swap an edge if it will reduce the G-measures over the cells affected by the swapping). Such is left as future work.

Numerical Results
In all numerical results, the implicit defect-correction solver as described in Ref. [11] is employed for solving the Euler and Navier-Stokes equations in two dimensions. The objective is to investigate whether the implicit solver will converge faster for grids with smaller F-or G-measures as expected.

Viscous manufactured solution at M ∞ = 0.2 and Re ∞ = 40
We consider solving the Navier-Stokes equations for manufactured solutions [14] with T ∞ = 300[K] and the Prandtl number 0.72 on four different types of grids as shown in Figure 2: quadrilateral grid, quadrilateral grid with aspect ratio of 4, regular triangular grid, and irregular triangular gridd. Each grid has five levels: 16×16, 32×32, 48×48, 64×64, 80×80 nodes. As mentioned earlier, it may be easy to predict the performance of the solver by inspecting these grids, but our interest is to investigate whether the F-and G-measures can serve as accurate quantitative measure for the solver performance. The F-and G-measures computed on the finest grid are shown in Figure 3. It is noted that the G-measure is more consistent with our intuition that the solver converges well in the order for Grid00, Grid01, Grid 03, and then Grid10.
Iterative convergence results are shown for all grid levels in Figures 4-8. In all cases, as expected from the G-measure, the solver converges fast in the order for Grid00, Grid01, Grid 03, and then Grid10. Note that the CPU time is normalized by the average CPU time spent on one residual computation during the iteration, which is necessary since the grid size varies.
3.2 Viscous flow over a Joukowsky airfoil at M ∞ = 0.5 and Re ∞ = 1000 We consider solving a viscous flow over a Joukowsky airfoil at M ∞ = 0.5 and Re ∞ = 1000 with T ∞ = 300[K] and the Prandtl number 0.72, on the four different grids shown in Figure 9. The F-and G-measures for these grids are computed and compared in Figure 10. As can be seen, we have for the F-measure: and for the G-measure: The convergence results shown in Figure 11 indicate that the G-measure gives a more accurate indication for convergence behavior. See Figure 11(b). Note again that the CPU time is normalized by the average CPU time spent on one residual computation during the iteration, which is necessary since the grid size varies.  Figure 13. The F-and G-measures for these grids are computed and compared in Figure 14. As can be seen, we have for the F-measure: and for the G-measure: Again, the G-measure is consistent with the actual convergence results. See Figure 15.

Concluding Remarks
We have proposed two grid-quality measures, F-measure and G-measure, in relation to iterative convergence of an implicit finite-volume solver for unstructured grids. The F-measure is a lower bound of a LSQ gradient, that can be computed for a given grid. The G-measure is the magnitude of a LSQ gradient of a known function whose gradient is zero a cell centroid. These measures are defined specifically for unstructured-grid finite-volume solvers, employing LSQ gradient methods. Numerical results indicate that the G-measure more accurately the performance of the implicit solver: it converges faster on a grid with a smaller G-measure.
In future work, the G-measure should be tested for practical problems with three-dimensional unstructured grids and also for node-centered methods such as the edge-based discretization. Furthermore, it should be investigated whether a grid can be modified to minimize the G-measure. For example, a node may be removed/added or an edge may be swapped if it reduces the G-measure locally.