If you want to see, in the blueCFD OpenFoam checkmesh results, the same quality parameters (and at the same trigger levels for illegal cell determination) which appear in the SimScale meshing log of a Hex parametric mesh, like this:
Here is the procedure:
-
Place this text in file named ‘meshQuailtyDict’ (caps important and it can not have a file extension):
/------------- C++ --------------
|OpenFOAM:The Open Source CFD Toolbox|
| Version: 4.x DaleKramer V1.0 |
| Web: www.OpenFOAM.org |
*-----------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object meshQualityDict;
}
// ********************************** //
#includeEtc “caseDicts/meshQualityDict”
maxNonOrtho 70;
minVol 1e-13;
maxConcave 80;
maxInternalSkewness 4;
maxBoundarySkewness 20;
minFaceWeight 0.02;
minVolRatio 0.01;
minArea -1;
minTwist 0.01;
minDeterminant 0.001;
minTetQuality -1e+30;
minTriangleTwist -1;
nSmoothScale 4;
errorReduction 0.75;
minVolCollapseRatio 0.5;
minFaceFlatness -1;
relaxed
{
maxNonOrtho 0.75;
}
// ********************************** //
-
Place that file in the ‘system’ folder that is in the directory where the case.foam file is located.
-
Use the -meshQuality parameter for the checkmesh command.
NOTE with regard to trigger values in the above meshQaulityDict:
minVolCollapseRatio [scalar]
minVolCollapseRatio:
// if >0 : preserve single cells with all points on the surface if the
// resulting volume after snapping (by approximation) is larger than
// minVolCollapseRatio times old volume (i.e. not collapsed to flat cell).
// If <0 : delete always.
//minVolCollapseRatio 0.5;
That comes from here:
https://www.openfoam.com/documentation/guides/latest/doc/guide-meshing-snappyhexmesh-meshquality.html
SimScale does not allow us to change the minVolCollapseRatio value (or the optional minFaceFlatness parm).
SimScale allows us to set all those other quality trigger in the HEXpara algo parms, SimScale defaults seems to use tighter trigger for minFaceWeight (0.02 vs OpenFoam 0.05) and minTwist (0.01 vs OpenFoam 0.02) AND SimScale uses default -1e-30 for minTetQuality vs OpenFoam default of 1e-15…
All other default Quality triggers used by SimScale are the same as the OpenFoam defaults for them.
.
.
If you use the ‘-writeAllFields’ parameter with ‘checkmesh’, all the quality fields and there values for each cell will become available to view and filter in ParaView.
PLEASE NOTE THAT THE CURRENT VERSION OF OpenFoam supplied with blueCFD DOES NOT HAVE THE ‘-writeAllFields’ PARAMETER
.
.
.
.
If you want to create a .vtk file in the ‘postProcessing\constant\meshQualityFaces’ directory of the directory where the case.foam file is located (this .vtk file can be opened in ParaView so that you can see all the cells that failed the quality check):
NOTE: When using the -meshQuality -writeSets vtk parameters for checkMesh, AND there is a suitable meshQualityDict file in the system dir, a vtk file by the name of meshQualityFaces.vtk will be written in the postProcessing… dir which includes all faces that fail at their trigger points, of all items in the meshQualityDict file… Unfortunately, ParaView does not seem to be able to differentiate between what cells failed which tests, and again the only thing ParaView does is show you the face shape/size and where failed cells are in mesh. I do not see that this can help much in our mesh refinement process, but I presented the method above for completeness…
.
.
.
.
.
The ONLY way I have found so far to get non-ortho and skewness values for each cell in the mesh and then be able to view that ‘value’ data in ParaView, is to run the [‘writemeshquality’ OpenFoam command that needs to be loaded and built into blueCFD from its git repository].
You should be able to figure how to download and build ‘writeMeshQuality’ from this image:
That command puts gz files in the iteration 0 folder which can be viewed (including the parameter values ) in ParaView with the ‘reload’ trick AFTER the case.foam is loaded and the mesh is seen on the screen. I see these .gz files helping us quite a bit in our mesh refinement process🙂 (IF WE CAN FIGURE OUT WHY THEIR MAX/MIN/AVERAGE parameter values do NOT match the SimScale ‘mesh log’ and the OpenFoam ‘checkmesh’ MAX/MIN/AVERAGE parameter values )
On that last point, on a spreadsheet analysis of the text data in the .gz files with regard to MAX/MIN/AVERAGE values, the analysis does NOT match the results that a ‘checkmesk’ command reports: