CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] SnappyHexMesh: structured or unstructured mesher? (https://www.cfd-online.com/Forums/openfoam-meshing/216041-snappyhexmesh-structured-unstructured-mesher.html)

Pisdu March 26, 2019 06:46

SnappyHexMesh: structured or unstructured mesher?
 
1 Attachment(s)
Dear all,

I've been trying to understand if the meshing utilities of OF provide structured or unstructured meshes.

blockMesh:
There seems to be no doubt that the blockMesh utility provides structured meshes. This seems rather obvious to me as in the blockMesh dictionary I define the blocks and there has to be consistency in the topology of the mesh at the boundary between different blocks (i.e. the no of adjacent elements needs to be the same for any cell).
I could use cell shapes different from hexa and I would still get a structured mesh, as long as every cell in my mesh has the same shape. Is this right?

snappyHexMesh:
I found contradictory posts about the capability of SHM to generate un/structured meshes, both on CFD-online and other websites. As such, blog posts on the matter feel more like opinions rather than facts.

For some reason, I always thought the SHM generates unstructured meshes. However, the book "An Introduction to Computational Fluid Dynamics - the Finite Volume Method" by Versteeg & Malalasekra shows that a grid similar in all aspects to what I could generate with SHM is in fact structured (see attached Fig.).

From the book I understand that SHM can generate structured meshes. However, I know that the changes in grid refinement levels are incorporated using polyhedral elements, and if I have different cell shapes the mesh cannot be structured. I am confused.

Could anybody who's 100% sure of what he/she knows put a period to this long gone discussion please?

I also appreciate opinions, as long as they are clearly stated as such, not to confuse me more. Thanks

akidess March 26, 2019 06:53

I'd argue all meshes in OpenFOAM are unstructured, even the blockMeshes. Why? Because you cannot address cells as mesh(i,j,k), or that cells neighbor as e.g. mesh(i,j+1,k-1). Instead, you have a list of cells and their neighbors. Even in a blockMesh you'll need to work more to find a cell at a specific location compared to a real structured mesh.

Pisdu March 26, 2019 13:09

Thanks Anton.

I understand your point. This also tells me that it is impossible to understand if a mesh is structured or unstructured by simply looking at it.

This raises another question: what is the advantage of using a masher like blockMesh to generate grids that look structured but effectively are not? It seems like I'm taking on the disadvantages of structured grids (i.e. refinement is not strictly local) without really getting any advantage.

More generally, what are the main strengths of using blockMesh and snappyHexMesh?

akidess March 27, 2019 02:38

It is extremely easy and fast to make meshes with blockMesh. That's an advantage.

You can save weeks of work using snappyHexMesh for complex geometries compared to a structured mesher, if you can live with the quality compromise.


All times are GMT -4. The time now is 07:38.