Skip to content

Let particle managers move particles around within cells to reduce particle clustering#7004

Open
JarettBakerDunn wants to merge 4 commits into
geodynamics:mainfrom
JarettBakerDunn:particle_redistribution
Open

Let particle managers move particles around within cells to reduce particle clustering#7004
JarettBakerDunn wants to merge 4 commits into
geodynamics:mainfrom
JarettBakerDunn:particle_redistribution

Conversation

@JarettBakerDunn

Copy link
Copy Markdown
Contributor

This pull request lets particle managers move particles around within cells in order to avoid excessive clustering within cells.

The idea behind it is that while some previous additions to the particle manager allowed the particle manager to add and remove particles according to particle density when there were too many or too few particles within cells, there could be cases where particles could cluster within cells because of the underlying flow and not because of the particle per cell bounds.

There are 4 commits in this pull request:

add ParticleHistogram class: this commit moves some code from the ParticleDistributionScore postprocessor into the new ParticleHistogram class. The ParticleHistogram class now contains the code which quantifies the degree to which particles are clustered within a cell.

let particle manager redistribute particles within cells: This commit adds the functions and parameters needed for the particle manager to use the new ParticleHistogram class to measure the level of clustering in each cell, and if the particles in that cell are clustered enough, to use the ParticlePDF class to find the most clustered particle to move and the least particle-dense location in the cell to move it to.

make ParticleDistributionScore use ParticleHistogram: in order to avoid duplicating code, I made the ParticleDistributionScore postprocessor create an instance of ParticleHistogram to score each cell

The last commit adds a test case and the documentation. I also added a benchmark which demonstrates that the new feature is working, but I am not sure if this is ideal because it is not a physically accurate setup, just a simple model that causes the particle to cluster with prescribed velocity.

@JarettBakerDunn JarettBakerDunn force-pushed the particle_redistribution branch from b2982fd to 1f725c8 Compare June 8, 2026 22:51
@JarettBakerDunn JarettBakerDunn force-pushed the particle_redistribution branch from 1f725c8 to aadab1e Compare June 8, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant