Skip to content

Conversation

pshriwise
Copy link
Contributor

Description

A particle's DAGMC history should be reset when particles are being sourced from the secondary bank. A history from a previous particle can cause incorrect intersection determination in DAGMC as any previously intersected faces in the history at the time of sourcing from the secondary bank may cause surface intersections to be erroneously ignored.

A hypothtcial related to #3600 would be the following:

  1. A primary particle undergoes splitting near a vacuum boundary (or exterior surface of the DAGMC model.
  2. As its next event, the primary particle then exits the problem through the boundary . During this process the DAGMC triangle through which it exits is stored in the particle's DAGMC history.
  3. A new particle is sourced from the secondary bank with the primary particles position at the split and direction. As a result of this identical position and direction the same triangle on the vacuum boundary is struck but ignored by nature of being in the particle's DAGMC history. Thus, an intersection is not found and the particle is considered lost.

This probably hasn't occurred very often because more splitting occurs in materials with higher collision density and collision events reset the particle history. That said, a MWE wasn't terribly difficult to construct and I'm glad to be able to address the problem.

Fixes #3600

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 made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@connoramoreno
Copy link
Contributor

Happy to report that this fixed my issue, including on a rebased branch with transformation BC support (#3402). Tally results seem to agree within uncertainty compared to what I saw previously. The minor discrepancy may be due to new features/bug fixes with the way weights are now handled in conjunction with source sampling. Thanks for this quick fix @pshriwise!

Copy link
Contributor

@gonuke gonuke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it definitely makes sense and should fix the problem.

Thanks for the quick solution @pshriwise

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.

Lost particles when transporting on DAGMC geometry with weight windows

3 participants