cfMesh is an open-source meshing engine implemented on top of OpenFOAM. Promesh comes with a fully integrated cfMesh-based meshing module. cfMesh can be used to refine specific objects within the mesh in multiple ways: through patches (user-defined groups of surface triangles), through objects (simple geometric shapes that contain the volume to be refined), or by applying refinement to all surfaces or edges in the mesh. cfMesh can also generate boundary layers, which are extruded from the surface toward the interior of the mesh.
To enable the capability, the Promesh should be compiled with ENABLE_CFMSH=ON
.
. /usr/lib/openfoam/openfoam2006/etc/bashrc
Refer to the OpenFOAM documentation for further instructions. After the OpenFOAM environment is loaded, enable cfMesh build by adding this line to the cmake command:
-DENABLE_CFMSH=ON
Generic code for cfMesh:
{ "Program Type": "Mesh Generation", "Mesh File Options": { "Input Geometry File": "geometry.stl" "Output Mesh File": "meshed_geometry.vtu" }, "Mesh Generation Options": { "Mesh Generation Engine": "cfmesh", "CFMesh Parameters": { "Generator": "<GENERATOR>" } } } }
Where "<GENERATOR>"
can be replaced with one of the four generators provided by cfMesh:
"cartesian2D"
"cartesian3D"
"tetMesh"
"polyMesh"