Series snappyHexMesh
- snappyHexMesh Tutorial
- snappyHexMesh Tutorial Part 2
- Snap edges with snappyHexMesh

Making use of snappyHexMesh for the mesh generation polarizes, some love it and some hate it. I personally switch between love and hate, depending on the efforts that need to be taken, to get a proper mesh. The major drawback of snappyHexMesh is that it does not respect sharp edges, but creates these jagged edges as shown in the picture above.
Up until today’s morning, I was pretty much convinced that there is no OpenSource tool for OpenFOAM, that enables snappyHexMesh to snap vertices to sharp edges. But then I’ve found this on the forum.
Niklas Nordin has written a tool called snapEdge, that provides exactly this missing functionality. He introduced his code with only a one sentence post.
I’ve written a little program that might help, I call it snapEdge.Niklas Nordin
Unfortunately, I’ve not had the time to try it, but from what I’ve read on the forum so far it looks pretty promising. As soon as I find the time to try it out, I’ll update this post.
Related posts:
Tags: OpenFOAM, snappyHexMesh