## 4 Mesh Regularity: Geometric Quality and Gradient Reconstruction in MFAMs
### Gradient Reconstruction  
Gradient reconstruction (GR) is required in cell-centered (\"element-centered\") FVM schemes in order to obtain partial derivatives of the different flow variables at the element facets. These variables will appear in the discretized equation from the application of the Gauss theorem to the divergence terms in the conservative equation. For structured Cartesian meshes, such as the one employed in Section 2.2, central or upwind differencing schemes retain an acceptable order of accuracy; however, whenever dealing with non-structured meshes, such as the MFAM, higher order differencing schemes become necessary. Both [PERSON] [29] and [PERSON] [30] review the use of the Green-Gauss (GG) and the LSQR (both Weighted -WLSQR- and Unweighted -ULSQR-) methods in terms of order of accuracy for GR; [PERSON] also performs analysis on additional methods, showcasing that, while consistency in the GG and LSQR methods might vary with mesh regularity, other methods tend to have lower orders of accuracy. Recently several authors have developed hybrid Green-Gauss/Weighted-Least-Squares methods [30; 31], which might offer the best compromise between GR methods. However, for the sake of simplicity and since the objective here is to provide an insight to the issues arising in the GR due to low mesh quality, the following analysis is performed using a WLSQR method. In particular, a method equivalent to the WLSQR Face Interpolation -WLSQRFI- method described by [PERSON] [30] has been implemented because of the selection of a cell-centered FVM discretization, that requires gradients at the element facets. The method is based on the Taylor series expansion. The resulting set of equations determine the value of any variable \(\phi\) at the facet center, as well as derivatives and cross-derivatives, from the value of \(\phi\) at a chosen number of stencil points (the number will depend on the order of the method) and the set of weights assigned to them. Stencil points are chosen as the centers of the surrounding elements and weights are typically functions of the inverse distance, element areas, and other geometrical parameters. Note that if the weights are chosen to be equal to 1 the method applied is equivalent to the ULSQR. The WLSQR method offers a high level of flexibility to tune the quality of GR in a particular mesh: Since there is freedom for selecting the appropriate weights and order of the Taylor expansion. This can be done independently for interior and boundary elements in the MFAM. The following analysis shows that the selection of the parameters conferring the flexibility to the method affects greatly the accuracy achieved during the GR. Figure 11 shows errors committed by numerical GR, using inverse-distance weighting for 2 nd order development and using 9 stencil points. The method has been applied to the extended-exponential-stretching mesh of Figure 9b and for the following trial functions, \(\phi_{i}\left(\lambda,\sigma\right)\):  
\[\phi_{1}\sim \lambda^{2}+\sigma^{2} \tag{15}\] \[\phi_{2}\sim \lambda^{3}\times\sigma^{3}\] (16) \[\phi_{3}\sim \sin\lambda\times\cos\sigma \tag{17}\]  
where \(\lambda\) and \(\sigma\) are the previously defined magnetic coordinates. Figure 11: Gradient reconstruction (GR) errors for various functions: log10 of relative errors in the WLSQR method -9 stencil points, inverse-distance weighting for (a) \(\phi_{1}\sim\lambda^{2}+\sigma^{2}\); (b) \(\phi_{2}\sim\lambda^{3}\times\sigma^{3}\); (c) \(\phi_{3}\sim\sin\lambda\times\cos\sigma\) (elements are colored according to the worst GR error for their respective facets). Figure 11 shows a certain correlation between low geometric quality regions and large errors in gradient reconstruction, specifically in boundary elements (poor skewness and smoothness) and poor aspect ratio elements. Figure 12 shows variation in error statistics for different weights and Taylor expansion orders for the different trial functions.