Skip to content

Conversation

@nuclearkevin
Copy link
Contributor

Description

This PR adds support for distributed cell densities (added in #3546) in the random ray solver to enable density feedback for multiphysics applications. A cell density multiplier is tracked in each source region (ratio of the cell density to the material density), and used to correct the macroscopic cross section where required. Two new tests are added for this capability, an eigenvalue calculation (to ensure all quantities are tallied correctly) and a fixed source calculation (to ensure the division of the external source by the total cross section is performed correctly). The gold files are generated by manually scaling the cross sections by the ratio of the cell density to the material density.

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)

@nuclearkevin nuclearkevin requested a review from jtramm as a code owner January 10, 2026 23:46
Copy link
Contributor

@jtramm jtramm 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 great @nuclearkevin -- thanks for submitting this PR! Just a few small questions/comments for your consideration, but otherwise this is in good shape.

@nuclearkevin nuclearkevin requested a review from jtramm January 13, 2026 17:23
Copy link
Contributor

@jtramm jtramm left a comment

Choose a reason for hiding this comment

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

Looks good -- thanks for updating the test!

@GuySten GuySten merged commit 5bce5ad into openmc-dev:develop Jan 14, 2026
25 of 27 checks passed
@nuclearkevin nuclearkevin deleted the rr_density_feedback branch January 14, 2026 18:41
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.

3 participants