New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Randomly disappearing particles in non-trivial geometries (hyper_ball) since the merge of #13202 #13246
Comments
My hypothesis would be this: I am not sure if searching all cell neighbours of the closest vertex is the best idea. I am pretty sure there are some edge cases that are missed by that. |
@blaisb Can you provide a minimal test that reproduces the issue? Independent of the solution to the problem, it would be good to have it in the deal.II testsuite to prevent it from recurring in the future. |
@marcfehling , |
@marcfehling Here is a small application that is a very very very minimal step-68. I also added paraview output as this may help getting a visual on the problem. |
Hi @blaisb, first of all sorry that my change affected more than intended. I agree that the behavior could be slightly different after the change, but I am not sure it is for the reason you suggested (but I could be convinced of course). The reason I do not think it is the simpler search option is that this option only triggers if particles move to a cell that is not a neighbor of the old cell. But in your model the particles move only very small amounts of space, so they should always end up in a cell that is a neighbor of the old cell. The only other case if this fallback is triggered is if they move out of the domain (for example if you use a forward euler integration scheme this could easily happen because of integration errors, but also for other integration schemes, just less often). Can you clarify if the disappearing particles are very close to the boundary of the domain? Because in this case what is different would not be the selection of which cells to search, but the actual check if a particle is in a cell. I saw that I agree that maybe a different search scheme could help (like checking not only all cells that use the closest vertex, but also all neighbor cells of these cells, or we could also check all cells whose bounding boxes overlap with the particle), but maybe the simpler test would be to add that tolerance to the check, i.e. change dealii/source/particles/particle_handler.cc Line 1412 in 040e788
into
|
@gassmoeller Please don't be sorry. It happens to the best of us and this is part of working with a community code right. These things are bound to happen :)! If The particle that is disappearing is not in a cell which has a boundary, it is one layer above. They are also quite far from the outer wall of the domain. I think the issue is more related to the curvature of the cell, because this issue does not appear for meshes which do not have a curved manifold. I don't have any good hypothesis, but this is not a good behaviour. I will gladly test what you gave me and report back the results. This small unit test reproduces the bug easily. |
@gassmoeller I tested setting line 1412 to : And the particle still disappear. Looking at it very closely, the particle is not in the last layer of cell before disappearing.. I am trying to debug this, but I'm not exactly sure where to look. Take care :) |
Dear all, I hope you are well.
The merge of #13202 has caused some significant issue on our DEM code base. I am having difficulties identifying what is the exact issue, but we have found that particles are starting to disappear randomly when simulations are carried out in an unstructured grid in which the topology is complicated (e.g. an hyperball). Everything seems to go as normal, but at random time-steps, particles will be erased from the simulation. As such, all of our unit tests that take place in such geometries have been "broken" and the simulations don't make much sense anymore. I presume something is going on with the sort_particles_into_subdomain_and_cells. So far I have managed to reproduce the bug on a single core with very very few particles (20ish).
The following two images higlight this:
This is at a time-step, particles are moving down
Next time-step (e.g a few 0.00001m further)
One particle has magically disappeared.
@gassmoeller or @kronbichler maybe one of you would have an idea of what's happening?
Maybe it is because we are not using the mapping correctly at one place and it means we had a lying bug in our code base, but I would just like to figure out how to fix this :).
Take care and be safe all :)
Bruno
The text was updated successfully, but these errors were encountered: