Skip to content

Add neutron inelastic scattering law unit tests#388

Open
massimolarsen wants to merge 1 commit intoCEMeNT-PSAAP:devfrom
massimolarsen:scattering_law_tests
Open

Add neutron inelastic scattering law unit tests#388
massimolarsen wants to merge 1 commit intoCEMeNT-PSAAP:devfrom
massimolarsen:scattering_law_tests

Conversation

@massimolarsen
Copy link
Copy Markdown
Collaborator

Adds basic unit tests for the neutron inelastic scattering laws from the MCNP 6.3.1 manual (https://mcnp.lanl.gov/manual.html) in transport/distribution.py.

Each test uses a set of test data with known distributions and deterministic rng sequences to compute expected analytic values of E and mu. The expected values are then compared with the sampled values from MCDC.

All the variable names and equations are pulled from the MCNP manual to hopefully keep it readable.

Currently includes:

  • Law 3: level scattering
  • Law 4: tabulated distribution
  • Law 4: multi-table distribution
  • Law 7: simple Maxwell fission spectrum
  • Law 9: evaporation spectrum
  • Law 44: Kalbach-87 correlated energy-angle scattering
  • Law 61: tabulated correlated energy-angle scattering
  • Law 66ish: reduced N-body sampling (just checks the current implementation)

Verify with:

pytest test/unit/transport/distributions

@massimolarsen massimolarsen requested a review from ilhamv March 24, 2026 19:37
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