Closed nicolastonello closed 5 years ago
To avoid this, computing a local hydraulic diameter should allow setting a limit on the extrusion distance, and is expected to solve this.
For example, given the following mesh (viewed as a cut in "crinkly" mode:
Inserting 2 layers with a relative thickness (and expansion factor 0.8) leads to the following issue:
Viewed in from another angle with transparency and negative-volume cells in red:
Using a fixed thickness of 0.05, results are even worse on this case:
Proposed solution
A solution (commit 726394e76) is to test for negative volumes while deforming the mesh, and locally limit the extrusion on adjacent boundaries (removing one extrusion layer at vertices of those cells). This is done iteratively until no negative volume cells are produced.
This method also allows flattening cells beyond a given threshold relative to their initial volume.
Using a volume ratio limit of 0.15, we obtain the following mesh using the relative boundary layer thickness:
With the fixed thickness:
Using a negative minimum volume factor, no limiter is used, and we revert to the previous behavior.
Depending on the geometry and the settings, the wall layer algorithm can create interpenetrating cells, resulting in meshes unsuitable for calculations.