Skip to content

Handle the different cases for tallying nuclear heating in OpenMC - #552

Open
alexvalentine94 wants to merge 2 commits into
developingfrom
openmc_photon_heating_combination
Open

alexvalentine94 wants to merge 2 commits into
developingfrom
openmc_photon_heating_combination

Conversation

@alexvalentine94

@alexvalentine94 alexvalentine94 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

As detailed in #550, changes to 0.16.0 moved to not requiring explicit positron and electron tallies. These tallies will be zero so backwards compatibility is maintained.

This also now handles the several methods for tallying the heating that were not previously covered.

Summary by CodeRabbit

  • Bug Fixes
    • Heating results now include electron and positron contributions in photon tally rows, while avoiding duplicate charged-particle entries.
    • Charged-particle heating is matched with photon heating across differing filter configurations. Tallies without particle filters continue to be handled, and unrelated scores remain unchanged.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 70eee34a-928f-489b-a6a1-2cb4a8494f19
Commits

Reviewing files that changed from the base of the PR and between 7ff62c3 and 5fba22c.

Files selected for processing: 1
  • src/jade/helper/openmc.py

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c081e555-78ff-46a6-9488-ce26be4da7d5
Commits

Reviewing files that changed from the base of the PR and between 76442ea and 7ff62c3.

Files selected for processing: 2
  • src/jade/helper/openmc.py
  • tests/helper/test_openmc.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

OpenMC heating tally combination now folds electron and positron heating contributions into matching photon rows. The code matches tallies by non-particle filters and nuclides, avoids duplicate charged-particle contributions, and combines standard deviations in quadrature.

Changes

Heating tally combination

Layer / File(s) Summary
Charged-particle row folding
src/jade/helper/openmc.py, tests/helper/test_openmc.py
Helpers identify electron and positron bins and fold their heating means and uncertainties into photon rows. Tests cover folding behavior and unchanged data.
Tally matching and integration
src/jade/helper/openmc.py, tests/helper/test_openmc.py
The combination method matches charged-only tallies to photon tallies by non-particle filters and nuclides. Tests cover duplicate contributions, filter mismatches, and statepoint results.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: Minimal · previous review 7ff62

The heating-tally change is mergeable after normal checks; no actionable issue was established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 26.32% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surv… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: handling different OpenMC nuclear-heating tally cases.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 26.32% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 19 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 3
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
⚔️ Resolve merge conflicts: 💡
  • Resolve merge conflict in branch openmc_photon_heating_combination
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the tally rows,
Then folds the charged heat where photon flows.
Means add up, uncertainties align,
No doubled paws cross the line.
The finished rows hop into view.

Comment @coderabbitai help to get the list of available commands.

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.

1 participant