Skip to content
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

Add test for flux bias with weight windows in multigroup mode #3202

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

pshriwise
Copy link
Contributor

Description

@jtramm and I were applying some weight windows in multigroup mode yesterday and while variance was being reduced as expected, there was a bias being introduced when weight windows were applied.

It turned out this is caused by the apply_weight_windows function call occurring before sample_reaction in the collision_mg method (here). Once this was changed, the bias disappeared and the weight windows worked as expected.

When particles are split before the reaction is sampled not all of the weight is applied to the sampled reaction. In the case of an absorption, for example, some of the particle's original weight will go into split particles that are revived later before the reaction occurs and the particle weight is set to zero, removing that weight from the problem. The split particles in the secondary bank will then contribute to the flux upon revival with weight that should have been removed due to the absorption reaction. When this happens enough, the effect is a bias as though absorption reactions aren't occurring as often as they should.

I've added a test here that checks bias in a simple problem with generated weight windows. Without the fix in physics_mg.cpp here, the test fails due to a small bias in the total flux (evidence of failure here). This bias becomes more pronounced as more particles are run -- the test runs enough to make it measureable.

Thanks @jtramm for discovering this!

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

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