Skip to content

Conversation

@cfichtlscherer
Copy link
Contributor

Description

This feature adds the settings.activity_based_timing feature to OpenMC. When enabled, each source's strength is interpreted as its activity in Bq, and each particle is assigned a birth timestamp sampled from an independent per-source Poisson process.

This intentionally reuses source.strength rather than introducing a separate source.activity parameter, since both control "how much" a source contributes (having both leads to ambiguous semantics and redundant logic).

The motivation is that, combined with #3785, this gives OpenMC the capability to model coincidence gamma detector simulations: simulate coincident sources with activity_based_timing and tally heating with a fine TimeFilter in the detector's active volumes.

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)

@GuySten
Copy link
Contributor

GuySten commented Feb 11, 2026

I suggest implementing the activity based timing in the following way:

  1. Implement PoissonProcess as a new stochastic process in openmc.stats.
  2. Implement saving and loading from xml for this PoissonProcess.
  3. Make openmc source accept stochastic processes in the time variable
  4. Add functionality in the python api to auto generate PoissonProcess from the strength of the source. You can use something like source.set_time_based_on_strength_as_activity(). Maybe something shorter 😀.

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