Particle Tracking for moving mesh can result in endless while iteration
Summary
I am doing a lagrangian particle simulation together with a moving mesh method. After a certain amount of simulations steps one particle gets caught in the while loop within the function of trackToFace. I analyzed some output. The Tet Face of the particle stays constant and the step fraction does not change anymore within the loop. Therefore the while loop is never exited. The variable nBehind_ that shall prevent such a behaviour stays as zero so the condition within the loop never gets false. Nevertheless the particle tracking does not change anymore and the simulation freezes at this position. If i restart the simulation or add another condition that is a maximum iter counter i can resolve this problem. In the next time step the particle movement works properly again. The error occurs in version of2206 but since the functions are not changed it should also appear in the current version.
Steps to reproduce
This is a tough one since the dynamic mesh code uses some own written boundary condition for the patch that is moving. The error occurs after 10 hours of computation and a total of 1.8 million computed parcels. Since the error does not occur after restart from the previously saved time step it is difficult to reproduce it.
Example case
Due to current development i can not simply upload the case and boundary condition.
What is the current bug behaviour?
The simulation does not continue since it is trapped in this loop.
What is the expected correct behavior?
Relevant logs and/or images
Environment information
- OpenFOAM version: v2206
- Operatin System: Ubuntu, CentOS
- Compiler: gcc
Possible fixes
In my case an iter counter that exits the loop after a certain amount of iteration solve the problem.