snappyHexMesh : unwanted illimited refinement between curved triangulated surfaces
It has already been reported that snappyHexMesh creates small gaps between curved triangulated surfaces when the stl don't match exactly (#1528). It seems that it causes another problem when using the gapLevel refinement : these small gaps are seen as regions to be refined and since they are very small, the refinement will be "illimited" all around the curved interface.
Steps to reproduce
The issue can be reproduced by applying snappyHexMesh on a multiregions case with a curved interface between two regions and with the different regions specified by different stl files, and by putting a high enough maximum level of refinement into the gapLevel of either one of the regions.
Here is a case that illustrates the problem. A fluid with curved faces is inside a cubic solid and the triangulations don't match.
Then a maximum gap refinement of 4 is applied and we see the result on a clipped inside view :
The same with a maximum gap refinement of 5 :
The same as the last one but with nCellZoneIter = -1 :
What is the current bug behaviour?
While looking for gaps during the procedure, snappyHexMesh will regard these unwanted gaps as actual ones and refine the surrounding cells further. Even though we can close the gaps with nCellZoneErodeIter = -1, the refinement still takes place before.
What is the expected correct behavior?
The interface should be refined just as any non-curved interface. Therefore, one should be able to set an arbitrary high maximum level of refinement and not end up with cells being refined up to this level.
Relevant logs and/or images
OpenFOAM version : v2012
Operating system : centos 7