Utility snappyHexMesh reads set-up from system/snappyHexMeshDict and refines background mesh in direction to the surface model. 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 paraFoam
Figure: Stator mesh view.
The final mesh is located in the directory named by a number. Copy mesh to constant/polyMesh directory and remove unnecessary mesh directories: