STFS-TUDa / blastAMR

Load-balanced adaptive mesh refinement libraries from blastFoam ported to ESI OpenFOAM
Other
37 stars 12 forks source link

blastAMR stuck in inifite loop #3

Open JanGaertner opened 7 months ago

JanGaertner commented 7 months ago

blastAMR gets stuck in an infinite loop in Foam::refinement::consistentRefinement() because nChanged never becomes zero. The edgeConsistentRefinement() always returns 1 for the same cell in an infinite loop.

In the case of the tested mesh it was due to cellJLevel > (cellILevel +1)

Note: this was tested with labelsize=64. However tested that the conversion to int for the const cellJLevel worked correctly.

Not sure what edgeConsistentRefinement() does and how to fix this issue. Also an interesting fact is that the problem can be avoided for some time if shortly before the time step is written. Then it runs a bit longer before it gets stuck again.

FoamScience commented 7 months ago

This is probably case-specific as some combinations of mesh settings and decomposition parameters may cause this. Experiment with the number of buffer layers between refinement levels nBufferLayers.

If all else fails, increase your initial mesh density and set maximum refinement level to 2 (so the edge consistency check is not performed).

I'd be interested in seeing the specific mesh which led to this behavior though. Might be a good idea to add it to unit tests

JanGaertner commented 7 months ago

I cannot upload the blockMesh dict here. Should I send it to you by e-mail?