checkMesh Extension ∇ Mesh Quality
The OpenFOAM® application checkMesh is used to analyze the numerical mesh regarding parameters related to the quality, topology, and geometry. The ESI version of OpenFOAM® does already have such an extension included which allows one to analyze different fields such as cell volumes, non-orthogonality, skewness, aspect ratio and much more. Thus, Holzmann CFD developed a functionObject that can be used to calculate those fields using the known postProcess utility.
However, as these fields and parameters belong to a mesh check application rather than a post-process application, the object function code was ported into the checkMesh application. For that purpose, the application had to be rewritten a bit. It might be added to the OpenFOAM Foundation repository once, after different kinds of problems (regarding programming) can be resolved.
For those who are interested in the added functionality, please feel free to download the checkMesh extension and add it to your source code. In order to use the code, download the tar file, and extract it somewhere to your hard disc. The extracted folder structure has to be copied to your $WM_PROJECT_DIR folder. After that, you have to go to your checkMesh source code folder ($FOAM_UTILITIES/mesh/manipulation/checkMesh) and re-compile the application using wmake.
To use the additional functionality, you can easily use checkMesh with the argument -writeMeshFields. The help argument provides further information about the usage as well as the source and header file.
Mesh Analysis and Quality Parameter
The extension to checkMesh contains the following features (the face calculation is turned off by default as the fields are not well implemented yet):
- Write the cell volume as volScalarField::Internal
- Write the cell types as volScalarField::Internal
- Write the cell non-orthogonality as volScalarField::Internal
- Write the cell skewness as volScalarField::Internal
- Write the cell aspect ratio as volScalarField::Internal
- Write the face non-orthogonality as surfaceScalarField
- Write the face skewness as surfaceScalarField
- Write the face areas as surfaceScalarField
For the cell types, the cell values can have the integer ranging from 0 to 6 using the following definitions:
- 0 := hexahedral
- 1 := tetrahedral
- 2 := polyhedral
- 3 := prism
- 4 := pyramid
- 5 := wedge
- 6 := tet-wedge