CheckMesh

From OpenFOAMWiki

1 Name

checkMesh - Checks validity of a mesh.

Valid versions: OF Version 21.png

2 Synopsis

checkMesh [OPTIONS]

3 Description

Checks validity of a mesh

-allGeometry

Include bounding box checks

-allTopology

Include extra topology checks

-noTopology

Skip checking the mesh topology

-noZero

Exclude the 0 directory from the times list

-time RANGES

Select time steps. RANGES follows the time selection rules

-latestTime

Apply only on the latest time available

-constant

Include the constant directory in the times list

-parallel

Run the utility in parallel

-roots "(DIR1 [...DIRN])"

Directories through which the data are distributed

-region NAME

Specify a mesh region by its NAME

-case DIR

Execute the command on the case directory DIR. If not provided, use the current directory

-noFunctionObjects

Skip the execution of the functionObjects

-help

Display the help and exit

4 Output explanation

The output will be explained based on the checkMesh output for the tutorial $FOAM_TUTORIALS/incompressible/icoFoam/cavity.

1. Mesh statistics

   points:           882
   internal points:  0
   faces:            1640
   internal faces:   760
   cells:            400
   boundary patches: 3
   point zones:      0
   face zones:       0
   cell zones:       0

Overall number of cells of each type:
   hexahedra:     400
   prisms:        0
   wedges:        0
   pyramids:      0
   tet wedges:    0
   tetrahedra:    0
   polyhedra:     0

2. Checking topology...

   Boundary definition OK.
   Cell to face addressing OK.
   Point usage OK.
   Upper triangular ordering OK.
   Face vertices OK.
   Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
   Patch               Faces    Points   Surface topology                  
   movingWall          20       42       ok (non-closed singly connected)  
   fixedWalls          60       122      ok (non-closed singly connected)  
   frontAndBack        800      882      ok (non-closed singly connected)  

3. Checking geometry...

   Overall domain bounding box (0 0 0) (0.1 0.1 0.01)
   Mesh (non-empty, non-wedge) directions (1 1 0)
   Mesh (non-empty) directions (1 1 0)
   All edges aligned with or perpendicular to non-empty directions.
   Boundary openness (8.47033e-18 -8.47033e-18 -5.901e-17) OK.
   Max cell openness = 1.35525e-16 OK.
   Max aspect ratio = 1 OK.
   Minimum face area = 2.5e-05. Maximum face area = 5e-05.  Face area magnitudes OK.
   Min volume = 2.5e-07. Max volume = 2.5e-07.  Total volume = 0.0001.  Cell volumes OK.
   Mesh non-orthogonality Max: 0 average: 0
   Non-orthogonality check OK.
   Face pyramids OK.
   Max skewness = 1e-08 OK.
   Coupled point location match (average 0) OK.

4. Conclusion

Mesh OK.

Geometry tests:

Bounding box
The minimal box that can contain the mesh
Non-empty, non-wedge directions
(1 1 0) means x and y are not empty neither wedges. But z is empty or wedge.
Non-empty directions
(1 1 0) means x and y are not empty directions. But z is.
Aspect ratio
Face aspect ratio:
The ratio between the longest and the shortest length.
Cell aspect ratio:
If the mesh is pseudo-2D, then it's just the ratio between the biggest and the smallest areas of the cell's bounding box.
If 3D, then it's the largest between the previous ratio and the result of the following expression: \frac {1.0}{6.0} \times \frac {|ax|+|ay|+|az|}{v^{\frac {2.0}{3.0}}}
where:
  • ax, ay, az: are the areas of the bounding box of the cell
  • v: is the volume of the cell
Note: aspect ratio 1.0 is the best.
Cell volumes
The difference between min and max should be as small as possible (or the evolution should be as smooth as possible - not check for that)
Mesh non-orthogonality
Measure the angle between the line connecting two cell centres and the normal of their common face - 0.0 is the best.
Skewness
Measure the distance between the intersection of the line connecting two cell centres with their common face and the centre of that face - smaller is better.

4.1 Other Explanations