Skip to content

Avoid negative heating values during pair production and bremsstrahlung#3426

Merged
paulromano merged 4 commits intoopenmc-dev:developfrom
paulromano:fix-negative-heating
Jun 5, 2025
Merged

Avoid negative heating values during pair production and bremsstrahlung#3426
paulromano merged 4 commits intoopenmc-dev:developfrom
paulromano:fix-negative-heating

Conversation

@paulromano
Copy link
Copy Markdown
Contributor

@paulromano paulromano commented Jun 4, 2025

Description

There are two situations in which negative heating can occur during photon transport. One is described in #2300, wherein because of the way we treat the thick-target bremsstrahlung approximation, it's possible to generate bremsstrahlung photons with more energy than the original incident electron/positron. As I was looking into a fix for that, I realized that another possible (and more likely) cause of negative heating is due to the fact that rest mass energies are not accounted for properly in computing heating from pair production and positron annihilation. Because heating is computed as (incident energy) - (sum of outgoing energies), if you don't account for the rest mass energies of the electron/positron, you end up with photon heating for pair production that is too high and positron heating that is too low (and often negative) for annihilation. The fix is to add $2m_e c^2$ of banked secondary energy in pair production and subtract an equal amount during positron annihilation to compute the correct heating values.

Separately, I've added a constraint in thick_target_bremsstrahlung that forces the total energy of bremsstrahlung photons to be no more than the incident particle energy, which should avoid negative heating from that.

Fixes #2300

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)

@paulromano paulromano requested a review from amandalund as a code owner June 4, 2025 02:28
@GuySten
Copy link
Copy Markdown
Contributor

GuySten commented Jun 4, 2025

I think that the rest mass difference in the theory of heating should be included through the Q value. For example, pair production should have negative Q value of -1.02MeV. I suppose I was wrong and photon heating is more similar to neutron heating than I thought. I think we should store the last collision Q value and add it during calculation of heat score.

Your thoughts?

Edit:
I am suggesting the following changes here.

Copy link
Copy Markdown
Contributor

@amandalund amandalund left a comment

Choose a reason for hiding this comment

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

Nice catch on accounting for the rest mass energy @paulromano, and I think clamping the sum of the bremsstrahlung photon energies makes sense. I suppose it will bias the distribution a bit, but that seems preferable to generating unphysical secondaries.

suggested changes: heating according to reaction q value
@paulromano
Copy link
Copy Markdown
Contributor Author

@GuySten Thanks for your comments and suggested changes (just incorporated). Your version definitely helped make it a lot more obvious why it works!

@paulromano paulromano merged commit 4943fa3 into openmc-dev:develop Jun 5, 2025
15 checks passed
@paulromano paulromano deleted the fix-negative-heating branch June 5, 2025 15:46
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.

Negative values positron heating and neutron-photon transport simulations

3 participants