The behavior of the checkMesh utility can be changed to output additional mesh errors by adding a dictionary and running the utilitiy with the -meshQuality option.

Step-by-step guide

1. Create the meshQuality dictionary file in the ‘system’ folder.
2. Call checkMesh with the -meshQuality option.

Mesh quality dictionary file

There is a global configuration file for the mesh quality that can be simply included and modified if needed.

Inside ‘system’ create a meshQuality dictionary, or find a meshQuality dictionary on your system that has this content:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  plus                                  |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
version     2.0;
format      ascii;
class       dictionary;
object      meshQualityDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Include defaults parameters from master dictionary
#includeEtc "caseDicts/meshQualityDict"

maxInternalSkewness 0.2;
maxBoundarySkewness 0.2;
maxNonOrtho 10;

// ************************************************************************* //


The global meshQuality dictionary file contains a list of quality measurement variables that can be changed. In the above example, I’ve changed the ‘maxInternalSkewness’, ‘maxBoundarySkewness’ and ‘maxNonOrtho’ variable thresholds.

Executing

?> checkMesh -meshQuality


Checking faces in error :
non-orthogonality > 10  degrees                        : 167
faces with face pyramid volume < 1e-13                 : 0
faces with face-decomposition tet quality < 1e-15      : 0
faces with concavity > 80  degrees                     : 0
faces with skewness > 0.2 (internal) or 0.2 (boundary) : 420
faces with interpolation weights (0..1)  < 0.05        : 0
faces with volume ratio of neighbour cells < 0.01      : 0
faces with face twist < 0.02                           : 0
faces on cells with determinant < 0.001                : 0
<<Writing 587 faces in error to set meshQualityFaces

Failed 1 mesh checks.


You can see the skewness and non-orthogonality parameters changed in the meshQuality dictionary being used by the checkMesh utility.