ENH: New gradient scheme iterativeGaussGrad
Summary
Aim:
Improvement of numerical fidelity only via improving gradient computations for meshes with nonzero face skewness.
(Theory) What is face skewness:
 Level of closeness of the following two spatial points:
 Face intersection of the PN vector between cell centres of an owner cell and a neighbour cell
 Face centre of the common face of the two cells
(Theory) Why is face skewness important:
 Prediction fidelity
 Any deviation from face centre as the face average centre reduces the secondorder accuracy (i.e. nonzero face skewness)
 Hence OpenFOAM has various skewness corrections for centretoface interpolations
 Numerical stability
 Reduces the diagonal dominance of the discrete Poisson operator which slows down convergence. ADI (i.e. alternatingdirection implicit) type preconditioners also become less effective.
(Theory) What is the technical challenge in face skewness:
 Omission wherever possible due to cost concerns rather than a true technical challenge
 Gradient computations are accounted for ~20% of a typical simulation
(Theory) Treatments in OpenFOAM:
 Many methods to quantify skewness
 OpenFOAM has its own definition
 Skewness formulations in
checkMesh
andsnappyHexMesh
are a bit different
 Various skewness corrections available

skewCorrectedSnGrad
surfacenormal gradient scheme 
skewCorrected
surface interpolation scheme  No corrections on boundary skewness
 No corrections in GaussGreen gradient computations
 Not needed for
leastSquares
andpointLinear
based gradient schemes

Resolved bugs
N/A
Methodology
Problem definition:
 Face skewness is not accounted during any GaussGreen gradient computations.
 Incorporation of face skewness into gradient computations may or may not improve the level of prediction fidelity.
A problem solution: Iterative Gauss gradient
 Add an outer loop around the gradient and skewcorrection vector computations
 Add an optional relaxation factor inside the gradient computation
Test case:
 Very difficult to design a test case where skewness is isolated from nonorthogonality
 Manufactured solution: A twodimensional trianglecell domain where theoretical gradient is squareroot of 2 in each coordinate direction
Metrics:
 Numerical stability
 Simulation crashes or not
 Prediction fidelity  Level of discrepancy between theoretical and numerical values:
 Arithmetic average of error field
 Coefficient of variation (CoV) of error field
 Relative standard deviation: std/mean
 Measure of amount of dispersion
 Low CoV: Values are close to mean
 High CoV: Values spread out over a wider range, potentially indicating outliers with respect to the mean
Control variable:
 Skewness is not the control variable since changing skewness also changes nonorthogonality in general
 Therefore:
 We fixed skewness and nonorthogonality with a fixedgeometry test case
 Control variable becomes the gradient scheme itself
 We quantified the performance of each gradient scheme with the chosen metric and compared them with each other
Results
Discussion
What happened?
 New iterative Gauss scheme
 Reduced errors in internal fields in comparison to other Gauss schemes
 Reduced errors in boundary fields in comparison to least square schemes
 Increasing number of iterations monotonically reduced errors
 Application of interpolationscheme limiters increased errors
What do the results mean in practise? (How will it change in how we do things?)
 The new scheme may be used to improve prediction fidelity for gradient computations on meshes with skewness and nonorthogonality
 More tests are needed for:
 Effects of extreme levels of face skewness
 Cost estimations
 The results do not suggest that the new scheme can improve numerical stability
Risks
 No changes in existing output.
 No changes in existing user input.
Constraints
 No finitearea
 Needs extensive tests to assume safe for singlephase, multiphase and overset finitevolume applications
 No boundary treatments for Dirichlet and Neumann conditions
Tests

Compilation (incl. submodules):

linux64ClangDPInt32Opt
(clang11) 
linux64GccDPInt32Opt

linux64GccSPDPInt64Debug

 Alltest: No change in output with respect to the develop HEAD + no error