Skip to content

Fix rare bug related to TMS#215

Merged
ChasingNeutrons merged 14 commits into
CambridgeNuclear:mainfrom
valeriaRaffuzzi:main
May 1, 2026
Merged

Fix rare bug related to TMS#215
ChasingNeutrons merged 14 commits into
CambridgeNuclear:mainfrom
valeriaRaffuzzi:main

Conversation

@valeriaRaffuzzi

Copy link
Copy Markdown
Member

This fixes #214: there was an inconsistency in the energy used to sample a reaction and sample the outgoing state of a particle after scattering when using TMS.

When using TMS, a relative energy is sampled in 'ceNeutronMaterial % sampleNuclide' for each nuclide. That energy is that saved in collDat % E and subsequently used to retrieve all cross sections. However, during scattering, p % E was used to sample the outgoing particle.

This was now fixed in neutronCEstd and neutronCEimp.

@ChasingNeutrons ChasingNeutrons left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks very good to me. Thank you for finding this sneaky bug which may have been doing some subtle damage!

@ChasingNeutrons ChasingNeutrons merged commit aea3172 into CambridgeNuclear:main May 1, 2026
6 checks passed
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.

Failure to sample inelastic scattering correctly

2 participants