Skip to content

snappyHexMesh: Layer addition process can destroy patch shape

Summary

snappyHexMesh:

Two patches are connected at an edge. Layers are to be generated at only on patch. The other patch is wrongly stretched over the thickness of the layers of the other patch, effectively blocking the flow.

Steps to reproduce

Run an example, where two patches are connected at an edge and layers are only requested for one patch. Check the geometry of both patches at the connection line.

Example case

Check the attached file. Unzip and run snappyHexMesh.

mesh1_explicitFeatures_BAD.zip

What is the current bug behaviour?

Check the middle plot of the attached image. Layers at the green patch cause an unwanted "extending" of the adjacent red patch.

What is the expected correct behavior?

Check the right plot of the attached image. Layers end correctly at the edge, the red patch is not extended. This can be triggered by explicitly specifying zero layers for the adjacent red patch.

Relevant logs and/or images

Layers_extend_patch_over_edge

Environment information

  • OpenFOAM version : v2406|v2312|v2212

Possible fixes

Within the layer process, all patches should be initialized as if they were mentioned in the "layers" directory, but with "nSurfaceLayers 0". After that, the specific entries of the "layers" dictionary should overwrite it.