Skip to content

Time census#19

Open
yardasol wants to merge 80 commits intotd-adjointfrom
time-census
Open

Time census#19
yardasol wants to merge 80 commits intotd-adjointfrom
time-census

Conversation

@yardasol
Copy link
Copy Markdown
Owner

@yardasol yardasol commented Feb 14, 2026

Description

This PR adds the ability to run time-dependent Monte Carlo simulations. Rather than basing the approach off of a single paper, I used various different sources to pick the methods that would be the most straightforward to implement in OpenMC. The methods are as follows

  • Added a branchless_collision setting to enable branchless collision. This method comes from the "improved" branchless method first discussed in Sjenitzer and Hoogenboom (2013), with further modifications coming from Molnar et al. (2019)
  • Added a forced_decay setting to enable forced precursor decay, increasing the number of delayed neutrons sampled in the simulation. This feature relies on the addition of a new particle bank to store precursors as source sites for delayed neutrons. The precursor bank is filled via the method described in Molnar et al. (2019).
  • Added time census which is utilized when running Monte Carlo simulations with the kinetic_simulation settings on. This feature ensures the number of simulated particles does not exponentially grow or decay over time.
  • Added a time axis to the weight window machinery to enable use of time-dependent weight windows. These are particularly useful for time-dependent Monte Carlo with branchless collision, which can cause large variations in particle weight.

The forced decay and time census features required refactoring and generalization of the init_fission_bank, sort_fission_bank, and synchronize_bank functions, which now all live in bank.cpp.

Unsupported features

  • Restart run
  • Fixed source mode
  • Energy out filters (branchless collision only)

Fixes # (issue)

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)

yardasol added 13 commits April 27, 2026 17:25
- force all particle times to be zero at the beginning of a kinetic
  simulation
- immediatly bank particles if their time falls outside of the
  next time census boundary on birth
- advance precursor particle time after forced decay
- adjust how time_bin_idx is handled, removing the need to add and
  remove the first element simulation::time_census_boundaries
- force time_born for precursor particles to be zero (missing from
  previous commit) when starting timestepping
- decorrelation generations are treated as consecutive
- add some machinery to consistently track generations for decorrelation
  generations
- add machinery to avoid using decorrelation generations by setting
  `n_decorrelation_generations` to zero
- fix bank time not being zeroed when not decorrelating time batches
- alternate column output when not decorrelating time batches
- variable reading fixed for `n_decorrelate_generations`
@yardasol yardasol force-pushed the time-census branch 2 times, most recently from e225a96 to e08f400 Compare May 4, 2026 18:01
yardasol added 2 commits May 4, 2026 14:33
- fix indexing of precursor_progeny_per_particle to match simulated
  neutrons
- add a vars to track the combined (precursor + neutron) bank size, work
  per rank, and work index.
- fix particle ids for time censusing
@yardasol yardasol force-pushed the time-census branch 2 times, most recently from e0956e6 to b66efd8 Compare May 5, 2026 16:49
- move forced precursor decay to it's own function
- allow precursor particle to resample produced neutron energy and
  angle
- various syntax fixes and variable name improvements
- allow generation of precursor particles during non-branchless kinetic
  simulation
- Design decision: force fission-causing neutrons to die on the first
  fission, relying on their secondary particle bank to keep going
- force all secondary particles to have consistent time census indices
- some syntax fixes and improvments
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