Skip to content

Conversation

@pshriwise
Copy link
Collaborator

@pshriwise pshriwise commented Oct 29, 2025

This change makes an exit of a particle from the mesh more robust.

During tally operations when a particle is declared to be exiting the mesh we then perform a ray tracing operation on all faces on the boundary of the mesh to determine if the ray passed will re-enter the mesh in a new location. By nature of the the updated ray position being exactly on the face of the boundary element, it's possible that a zero or near-zero intersection will be returned for that face.

Update: I didn't complete my thought as to the specific as to the pathology this addresses in the original post. When we encounter these zero or near-zero distances with the current surface the particle will become stuck, intersecting that same face over and over again.

In DAGMC geometry, we handle this by recording previously hit faces (triangles) and masking them out in subsequent hits until it's appropriate to clear the record. This changeset applies the same logic when rays are on the boundary of the mesh attempting to re-enter.

I'll note that it's very well possible that this is caused by inconsistent normals on the boundary of the mesh. In the previous version, we were using orientation filtering to avoid entering hits and as such this situation should not occur in theory. Without embedded geometry, it's possible that elements do not provide consistent canonical connectivity ordering at the boundary of mesh to guarantee that normals of the faces face outward from the boundary element. This approach should remove the restriction for outward facing normals and allow these operations to succeed.

@Waqar-ukaea
Copy link
Collaborator

The changes look good to me, I just had one change I wanted clarification on.

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.

2 participants