NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
cfMesh

Description

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.

Note
cfMesh depends on OpenFOAM, so before starting the compile process make sure to load OpenFOAM environment variables. Depending on the version, OpenFOAM can be loaded by sourcing the bashrc, or cshrc scripts provided in the OpenFoam-x.y/etc/. On a default installation, this can be done by executing the following command in the working terminal:
. /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

Examples

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"