Skip to content

snappyhexmesh simple multiregion test case meshes have very bad surface quality and broken patches

Summary

Steps to reproduce

Case attached, issue of bad patches happens on trivial and complex meshes where there's nesting or adjacency between the two regions.

Example case

attached, case was generated with freecad though problem has been scene with other stl generation methods like salome. I chose a tapered shape, a wedge - I've observed snappy having problems

multiregion contains a configuration geared towards conformal meshing of 2 regions in one meshing invocation. splitmesh is geared to one meshing per invocation. The snapped surface quality is substantially higher in the splitmesh version, though both have a oddly large repeating gap or trouble at the same points on the simple inner region.

meshing.tar

mycad.FCStd

What is the current bug behaviour?

I think there's at least 2 issues here. One is that the patches are very messed up. The second is that we get an odd behavior in both of these cases around the same region in space which is implicated into the patches being malformed. There's also a macro tear happening through the inner region which doesn't make much sense to me.

In similar or more advanced cases I've noted degenerate faces, near zero area at times or varying surface normals or alternate assignments of faces to differing patches. Flow would absolutely get mangled with these surfaces and the degenerate elements will drive courant numbers.

Here's a single pass multiregion output, note the very bad patches - the "inner" patch surface and "inner_to_outer" are disjoint and both incomplete. Makes downstream work impractical.

multiregion-no-facezones-bad-patches.png

multiregion-no-facezones.png

absolute nuttyness here:

multiregion-no-facezones-nuttyness.png

What is the expected correct behavior?

Here's a better though still a little odd mesh result for inner. This was meshed using separate invocations of snappyhexmesh so there's only one region at a time. It should be possible to get a conformal mesh result given there is only a single surface present at the interface which would give better topological information and allow skipping ami based interpolation without needing more advanced patch evaluation like https://cfd.direct/openfoam/free-software/non-conformal-coupling/

splitmesh-same-settings.png

one more level of refinement was allowed for this to see what would happen:

splitmesh-inner-edges-r3.png

Relevant logs and/or images

Environment information

  • OpenFOAM version : 2312
  • Operating system : linux opensuse 15.5
  • Hardware info :`
  • Compiler :

Possible fixes

Edited by monkeysee