Mesh Quality in CFD -- metrics, thresholds, and the checkMesh workflow
Introduction
In computational fluid dynamics, the mesh is the sole interface between mathematics and geometry. Every solver ingests a mesh. No solver can recover from a fundamentally bad mesh. A poor mesh cannot be rescued by clever numerics, refined boundary conditions, or a larger computing cluster. This note catalogues the objective quality metrics used to judge a mesh. It covers thresholds practitioners actually enforce. It also covers the diagnostic workflow using checkMesh in OpenFOAM and analogous tools in commercial codes.
The metrics below are platform-agnostic. Every finite-volume solver depends on them to some degree. What differs between platforms is the definition of skewness and the naming of boundary-layer quality checks. A mesh that passes Fluent metrics may fail checkMesh in OpenFOAM. This mismatch is the single most common cause of confusion when practitioners switch platforms.
Mesh quality metrics
Orthogonality
Orthogonality measures the angular deviation between the vector connecting two adjacent cell centers and the normal vector of their shared face. On a perfectly orthogonal mesh (a regular hexahedral grid aligned with coordinate axes), the two vectors are parallel at every interior face. The dot product of d and S divided by their magnitudes equals one.
High non-orthogonality has a direct numerical consequence. The diffusive flux is Gamma nabla phi dot S. The flux must be decomposed into an orthogonal component and a non-orthogonal correction. The orthogonal component is trivially computed from two cell-center values. The correction requires a reconstructed gradient. The correction is less stable. It adds to the matrix bandwidth. On severely non-orthogonal meshes, the correction can cause divergence. Multiple non-orthogonal correctors in the pressure equation help. The solver parameter nNonOrthogonalCorrectors controls this.
Typical thresholds used across platforms:
| Metric | Ideal | Acceptable | Problematic | Critical |
| -------- | ------- | ------------ | ------------- | ---------- |
| Min. orthogonal quality | 0.3 | 0.1 | 0.05 | Less than 0.05 |
| Max. non-orthogonality (degrees) | 0 | Less than 70 | 70 to 85 | Greater than 85 |
Orthogonal quality and non-orthogonality are complementary scales. OpenFOAM checkMesh reports non-orthogonality in degrees. Fluent reports orthogonal quality as a value between 0 and 1. The conversion is ortho equals cos theta for the non-orthogonality angle theta.
Skewness
Skewness measures how far the face interpolation point deviates from the midpoint of the line connecting the two cell centers. If d connects cell centers P and N, and e is the vector from P to the face center f, then the skewness error is e minus d divided by d magnitude.
Skewness affects convective interpolation. High skewness introduces interpolation error. The error manifests as artificial diffusion. This diffusion smears gradients. At extreme values, it produces oscillatory solutions.
OpenFOAM reports skewness on a 0-to-4 scale. A value of 4 means the cell is collapsed to a point. Fluent normalizes skewness to 0 to 1. The conversion is skew from Fluent equals skew from OpenFOAM divided by 4.
| Metric | Ideal | Good | Acceptable | Critical |
| -------- | ------- | ------ | ------------ | ---------- |
| OpenFOAM (0 to 4 scale) | 0 | Less than 1 | Less than 3 | Greater than 3 |
| Fluent (0 to 1 scale) | 0 | Less than 0.25 | Less than 0.75 | Greater than 0.9 |
Aspect Ratio
Aspect ratio is the ratio of the longest edge of a cell to its shortest edge. A perfect cube has aspect ratio 1. Thin prismatic boundary-layer cells achieve aspect ratio from 100 to 1000. They are deliberately stretched normal to the wall.
High aspect ratio is not inherently bad. It is necessary and expected in boundary-layer meshing. What matters is where the high aspect ratio is located. High aspect ratio in regions with cross-stream gradients is dangerous. In the wall-normal direction, it is exactly what you want.
| Context | Typical AR | Warning |
| --------- | ----------- | --------- |
| Internal flow (hex core) | 1 to 10 | Greater than 100 |
| Boundary-layer first cell | 100 to 1000 | Expected |
| External aero far-field | 5 to 50 | Greater than 500 |
| Polyhedral bulk mesh | 5 to 20 | Greater than 100 |
Smoothness (expansion ratio)
Smoothness defines the acceptable size transition between adjacent cells. A sudden jump in cell volume introduces interpolation error and numerical diffusion. The rule of thumb is that the volume ratio between adjacent cells should not exceed 1.2 to 1.3. Each cell should be at most 20 to 30% larger or smaller than its neighbor.
| Transition ratio | Severity |
| ----------------- | ---------- |
| Less than or equal to 1.2 | Excellent |
| 1.2 to 1.3 | Acceptable |
| 1.3 to 1.5 | Warning |
| Greater than 1.5 | Critical -- likely divergence |
Determinant (Jacobian) quality
Some platforms report determinant or Jacobian quality as a measure of whether a cell mapping from computational to physical space is invertible. A determinant quality of 0 indicates a collapsed cell with zero volume. This metric does not have a direct analogue in checkMesh. Zero-volume cells are caught by topology checks instead.
| Metric | Ideal | Acceptable | Invalid |
| -------- | ------- | ------------ | --------- |
| Determinant quality | 1.0 | Greater than 0.7 | Less than 0.3 |
Cell types and their quality implications
The cell type you use has an irreducible effect on truncation error, gradient accuracy, and tolerance for poor quality metrics.
Hexahedral meshes produce the most accurate solutions per cell count when aligned with flow. Tetrahedral meshes are geometrically flexible but carry the numerical diffusion of 2 to 3 times an equivalent hex mesh. Polyhedral meshes sit between these extremes. They approximate gradients better than tetrahedra because they have more faces. They suffer from higher skewness. Hybrid meshes (hex core plus poly or tet transition plus prism layers) are the modern industrial default in all major platforms.
Modern Fluent and Star-CCM+ both default to hybrid or tetrahedral meshing with auto-generated prism layers. OpenFOAM snappyHexMesh favors hex-dominant meshes with explicit boundary-layer inflation. cfMesh produces pure Cartesian or octree meshes. It sacrifices boundary-layer alignment for robustness.
The checkMesh workflow (OpenFOAM)
checkMesh is the canonical mesh diagnostic in OpenFOAM. It performs two classes of check:
1. Topology checks are binary. They must pass. The checks verify face vertex ordering, cell-face connectivity, boundary patch definitions, open edges, and duplicated faces. Fixes are mesher-side. No solver tweak can compensate. 2. Geometry checks produce metrics on continuous scales. The checks verify orthogonality, skewness, aspect ratio, volume, smoothness, and face concavity. Thresholds guide remediation.
The most useful invocation:
checkMesh -allTopology -allGeometry
Visualizing bad cells via checkMesh -writeAllFields and opening in ParaView lets you color-code by non-orthogonality, skewness, or volume ratio. You can then drill down to the exact geometry causing the problem. This feedback loop is the standard remediation workflow: checkMesh, writeAllFields, ParaView, mesher.
Parallel mesh quality
Mesh quality metrics computed in parallel with decomposePar and checkMesh -parallel may differ from single-processor results. The domain decomposition cuts through cells. A mesh that passes in serial can fail in parallel if decomposition faces introduce new non-orthogonality. Always validate mesh quality at the resolution you will actually simulate at. Also validate on the decomposition you will use.
Benchmarks by mesher type
| Mesh type | Max cells | Min. ortho | Max skew (OF) | Max AR | Mesher |
| ----------- | ----------- | ------------ | --------------- | -------- | ---------- |
| Structured hex (cavity) | 1M | 1.0 | 0 | 1 | blockMesh |
| Hybrid (car body) | 20M | 0.15 | 1.2 | 200 | snappyHexMesh |
| Cartesian (cylinder) | 5M | 0.25 | 0.5 | 50 | cfMesh |
| Polyhedral (industrial) | 50M | 0.30 | 2.0 | 300 | Fluent mesher |
| Tet from CAD import | 10M | 0.20 | 2.5 | 500 | Star-CCM+ |
Cross-references
- FVM Overview -- why mesh quality matters for discretisation
- Cell Types -- hex vs tet vs poly quality implications
- OpenFOAM Numerics -- non-orthogonal correction in fvSchemes
- OpenFOAM Mesh Generation -- snappyHexMesh and blockMesh workflow
- cfMesh Workflow -- cartesian mesh quality
- ANSYS vs OpenFOAM Meshing -- mesh quality thresholds across platforms
Further reading
- Moukalled, Mangani and Darwish. The Finite Volume Method in Computational Fluid Dynamics (Springer), Chapter 8.
- Moukalled, Mangani and Darwish. The Finite Volume Method in Computational Fluid Dynamics. Chapter 8 covers mesh generation fundamentals.
- Wolf Dynamics wiki, Meshing in OpenFOAM -- practical snappyHexMesh troubleshooting including layer addition failures and non-orthogonality remediation.
- J. D. Anderson. Computational Fluid Dynamics (McGraw-Hill), section 5.3.
- J. D. Anderson. Computational Fluid Dynamics (McGraw-Hill). Section 5.3 covers grid convergence and mesh quality effects on truncation error.
- H. K. Versteed and B. P. Kumar. A Numerical Study of the Effects of Low Order Dispersion and Numerical Diffusion Effects on the Accuracy of Simulated Turbulent Flow, AIChE J. 28(2), 1982.
- Cell Types in CFD -- hexahedra, tetrahedra, polyhedra, prismsCFD
- Numerical Anisotropy in Unstructured MeshesCFD
- Numerical Dispersion and Diffusion -- truncation error, artificial viscosityCFD
- Turbulence Models -- RANS, LES, DES, y+ disciplineCFD
- OpenFOAM Boundary ConditionsOpenFOAM
- cfMesh Workflow — Cartesian Background MeshingOpenFOAM
- OpenFOAM Mesh Generation — blockMesh and snappyHexMeshOpenFOAM