Let particle managers move particles around within cells to reduce particle clustering#7004
Open
JarettBakerDunn wants to merge 4 commits into
Open
Let particle managers move particles around within cells to reduce particle clustering#7004JarettBakerDunn wants to merge 4 commits into
JarettBakerDunn wants to merge 4 commits into
Conversation
b2982fd to
1f725c8
Compare
1f725c8 to
aadab1e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.