Utility snappyHexMesh refines background mesh in direction to the surface model, reading set-up from system/snappyHexMeshDict. Create the mesh running snappyHexMesh utility: snappyHexMesh
Renumber mesh using renumberMesh utility: renumberMesh -latestTime
When finished, check the mesh running checkMesh and view the mesh in paraview: checkMesh -latestTime paraFoam
Figure: Solid mesh view.
The final mesh is located in the directory named by a number. Copy mesh to constant/polyMesh directory and remove unnecessary directories: cp -rf 3/polyMesh/* constant/polyMesh/ rm -rf 1 2 3 processor*