Resolve conflict with weight windows and global russian roulette#3751
Resolve conflict with weight windows and global russian roulette#3751GuySten wants to merge 32 commits intoopenmc-dev:developfrom
Conversation
|
I've restructured the code to be more backwards compatible. |
|
I've further improved the code structure according to your suggestion. |
|
This PR is now ready for another review iteration. |
pshriwise
left a comment
There was a problem hiding this comment.
I think we're getting closer here. I made a suggestion for simplified logic in the collision functions.
There are also some checks on particle state inside get_mesh_bin that feel a little out of place. Not incorrect really, but the don't seem to fit into the purpose of that function. There might be some further refactoring we can to to make that a little cleaner.
|
@pshriwise, I've incorporated your suggestions and this PR is ready to review. |
|
After some testing, there's more work to be done here to clarify the difference between a weight window that is not found and the case where a weight window is found but unset. I'll add a post here with a solution later today. |
|
I tried applying this to a similar problem to the one presented in #2773. It's a block of Tungsten with an incident planar source of neutrons. All boundaries are reflective except the positive X plane, which is a vacuum boundary condition. These are short runs with 10k particles, 10 batches. When I tried it as of 57b5d27, the survival biasing was still limiting the effectiveness of the weight windows because unset weight windows (different from the search for a weight window failing) were also resulting in At any rate, what we need to separate here is the cases where a weight window is unset in the Weight windows, no survival biasing (same in 57b5d27 and a53c066)
Weight windows w/ survival biasing on 57b5d27
Weight windows w/ survival biasing on, a53c066
|
|
@pshriwise, can you add the last test (weight windows w/ survival biasing) as a regression test? |
Yeah that's good call. I'm hesitant to make it a regression test as it's going to be pretty sensitive to the prn stream. I'm thinking at least a coarse check that turning on survival biasing at least doesn't reduce the number of mesh bins with tallied results. I can't think of a reason that it would. I'll also look into the now-failing regression test. Something must be different with the control flow without survival biasing on now. |



Description
Currently the global neutron russian roulette (which is used when survival biasing is turned on) conflicts with the application of weight windows.
As suggested in #2773 (comment), this PR makes global neutron russian roulette apply only when neutrons are outside of the weight windows mesh boundaries.
Fixes #2773
Checklist
I have followed the style guidelines for Python source files (if applicable)I have made corresponding changes to the documentation (if applicable)