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

Random Ray Void Accuracy Fix #3316

Merged
merged 2 commits into from
Feb 24, 2025
Merged

Random Ray Void Accuracy Fix #3316

merged 2 commits into from
Feb 24, 2025

Conversation

jtramm
Copy link
Contributor

@jtramm jtramm commented Feb 23, 2025

Description

This PR fixes an accuracy issue in the random ray solver stemming from PR #3299 affecting flux tallies in void cells with external source terms. More info is available in the writeup for issue #3315. This issue was originally missed in my testing as this error decayed away as the mesh resolution was refined, so seemed like a legitimate method bias for this use case rather than a logical error. With the new fix, a much coarser mesh is now sufficient to resolve flux tallies in void regions with external source terms.

Fixes #3315

Validation

To test this, I redid the analysis in #3299. This model is a modified 3D Kobayashi dog leg problem, where the fixed source area and duct work have been converted to pure void materials. Below is the flux tally in the void area that contains the external source term, using a 5x5x5 cm^3 mesh:

Flux Error vs. MGMC
MGMC 9.92E+00 0.00%
Flat Source (Old) 7.57E+00 -23.73%
Linear Source (Old) 7.68E+00 -22.57%
Flat Source (This PR) 9.80E+00 -1.22%
Linear Source (This PR) 9.91E+00 -0.06%

Formatting change

I also noticed there was an annoying loop index variable name that was causing a discrepancy in formatting between LLVM 15 vs. 19, so changed that variable name to a shorter one to stop triggering the condition that caused the formatting discrepancy.

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)

Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

Thanks @jtramm!

@paulromano paulromano merged commit 5306676 into openmc-dev:develop Feb 24, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Random Ray Void Accuracy Issue
2 participants