grokkingstuff Home Blog Projects Wiki Calculators About

Mesh Quality in CFD -- metrics, thresholds, and the checkMesh workflow

date2026-07-26tags:cfd: :mesh: :quality:

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:

MetricIdealAcceptableProblematicCritical
--------------------------------------------------
Min. orthogonal quality0.30.10.05Less than 0.05
Max. non-orthogonality (degrees)0Less than 7070 to 85Greater 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.

MetricIdealGoodAcceptableCritical
-------------------------------------------
OpenFOAM (0 to 4 scale)0Less than 1Less than 3Greater than 3
Fluent (0 to 1 scale)0Less than 0.25Less than 0.75Greater 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.

ContextTypical ARWarning
-----------------------------
Internal flow (hex core)1 to 10Greater than 100
Boundary-layer first cell100 to 1000Expected
External aero far-field5 to 50Greater than 500
Polyhedral bulk mesh5 to 20Greater 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 ratioSeverity
---------------------------
Less than or equal to 1.2Excellent
1.2 to 1.3Acceptable
1.3 to 1.5Warning
Greater than 1.5Critical -- 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.

MetricIdealAcceptableInvalid
------------------------------------
Determinant quality1.0Greater than 0.7Less 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 typeMax cellsMin. orthoMax skew (OF)Max ARMesher
-------------------------------------------------------------------
Structured hex (cavity)1M1.001blockMesh
Hybrid (car body)20M0.151.2200snappyHexMesh
Cartesian (cylinder)5M0.250.550cfMesh
Polyhedral (industrial)50M0.302.0300Fluent mesher
Tet from CAD import10M0.202.5500Star-CCM+

Cross-references

Further reading