WIP - Forced collisions variance reduction technique#407
Draft
nglaser3 wants to merge 56 commits intomcdc-project:devfrom
Draft
WIP - Forced collisions variance reduction technique#407nglaser3 wants to merge 56 commits intomcdc-project:devfrom
nglaser3 wants to merge 56 commits intomcdc-project:devfrom
Conversation
Co-authored-by: Ilham Variansyah <variansi@oregonstate.edu>
Member
Author
|
This PR is marked as a WIP because I still need to do the following:
Though I am unsure how to do the unit tests for the added technique methods at the moment, as they all rely on the geometry module in some way or another. Additionally, this PR loosely builds off of #394, only using the generalized weight roulette method. If need be, that dependency can be ripped out, and all weight window commits can be removed |
Member
Author
|
Brief demonstration of the technique, running the added regression test and printing the results: With and without: |
2cd661a to
0430bad
Compare
0430bad to
575f1e2
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.
Summary of changes
Forced collisions can be implemented in two ways: where a particle is forced to collide only once upon entering a region of interest, or where particles are repeatedly forced to collide within the region. This PR uses the latter, as it provides better VR and was simpler to integrate into the existing transport kernel. To prevent the simulation from running forever and tracking exceedingly tiny weighted particles, weight roulette is applied within forced-collision cells.
This technique works well at reducing variance for collision estimators, but can worsen variance for tracklength and surface estimators immediately surrounding the region of interest. This is because the particle splits into collided and transmitted components, which follow different transport paths and contribute differently to these estimators.
To enable this technique, I added a few tangentially related methods. The first was a
get_forced_collision_distancemethod to the physics interface. I also pulled out the tracklength tally scoring in simulation into a helper method and put this intally.scoreasscore_tracklength_tallies. Also, I made acopy_run_statehelper to theparticlemodule, as this was needed to falsify the transport step of the transmitted particle.Types of changes
Developer Checklist
Associated Issues and PRs
Associated Developers