Skip to content

Add setting to optionally disable atomic relaxation#3855

Open
amandalund wants to merge 4 commits intoopenmc-dev:developfrom
amandalund:toggle-atomic-relaxation
Open

Add setting to optionally disable atomic relaxation#3855
amandalund wants to merge 4 commits intoopenmc-dev:developfrom
amandalund:toggle-atomic-relaxation

Conversation

@amandalund
Copy link
Contributor

@amandalund amandalund commented Mar 5, 2026

Description

This adds a setting that allows users to optionally disable atomic relaxation in photon transport simulations. Atomic relaxation models the cascade of X-ray fluorescence photons and Auger electrons emitted when an inner-shell vacancy is filled. This option will be useful for performance benchmarking, and disabling relaxation may improve performance in simulations where detailed modeling of the secondary particle cascade is not needed.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 18) 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 @amandalund! Can you add a simple regression test to cover this case? Other than that, one comment on the documentation below:

Comment on lines +19 to +20
not of interest. When disabled, the energy of the secondary particles is
deposited locally at the collision site.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this statement is true. With atomic relaxation on, the binding energy of the vacant shell would be emitted via the relaxation cascade, but with it turned off no secondary particles are created so the binding energy is simply dropped. To be clear, I think that's fine (an approximation the user accepts) but the statement here should be corrected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, I see your point. I was considering disabling relaxation as being analogous to disabling the thick-target bremsstrahlung approximation for electrons: the binding energy or electron energy is no longer carried away by secondaries, and a heating tally would attribute all of that energy to the collision site via energy balance. But there's no general mechanism to record that the energy is deposited locally, and in the absence of a tally it is just dropped. I'll update the docs.

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