OpenFOAM 4.x
This tutorial cannot be run on Ubuntu 14.04 LTS version of OpenFOAM, you need to use Ubuntu 16.04 LTS version of OpenFOAM or build foamyHexMesh by yourself.

Case directory



We use foamyHexMesh to create the mesh. The original geometry is defined in the file constant/triSurface/flange.stl.gz and the mesh settings are defined in the file system/foamyHexMeshDict.

The original geometry The original geometry

The meshes are as follows, and the number of mesh is 217710.

Mesh Meshes
Mesh in XZ plane Mesh in XZ plane
Mesh in YZ plane Mesh in YZ plane


cp -r $FOAM_TUTORIALS/mesh/foamyHexMesh/flange flange
cd flange

cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/

collapseEdges -latestTime -collapseFaces
collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
checkMesh -latestTime -allGeometry -allTopology


Calculation time

6分34.49 seconds *Single, Inter(R) Core(TM) i7-2600 CPU @ 3.40GHz 3.40GHz