Skip to content

Conversation

@j-fletcher
Copy link
Contributor

@j-fletcher j-fletcher commented Jan 9, 2026

Description

Adds ability to specify fixed, localized adjoint sources for the random ray solver. This capability will ultimately be useful for the addition of automated CADIS weight-windowing using the adjoint random ray solver.

There are two possible methods of constructing local adjoint sources. The first is by the straightforward specification of a geometric region of interest and energy discretization desired for the adjoint source; the initial forward calculation proceeds as previously to set $Q^{\dagger} = 1/\phi$, but only within flat source regions in the region of interest. Elsewhere, the adjoint source simply remains 0. This approach, although still requiring an initial forward calculation, ensures that variance reduction is performed in all regions of phase space counted as part of the response (e.g., each individual detector and each energy group therein) uniformly. The user can designate a target openmc.Tallies object containing each tally on which variance reduction should be performed, then the weight windower will use geometric and energy constraints inferred from CellFilter, CellInstanceFilter, DistribcellFilter, UniverseFilter, MaterialFilter, and EnergyFilter instances on each tally to populate adjoint sources in flat source regions, as described in the first method above.

The second is by user specification of the adjoint source term directly, using the distribution objects already available for constructing forward openmc.SourceBase instances, for example when information is available about a certain detector's response function. This approach can potentially result in unequal variance across different detector responses if multiple such sources are used to generate weight window and source biasing parameters in CADIS, but removes the need to perform an initial forward solve when pursuing local variance reduction.

The feature proposed here includes both of these capabilities, with the original implementation of the forward-weighted method by @jtramm.

Fixes #3710

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)

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.

Local Adjoint Source for Random Ray

1 participant