-
Notifications
You must be signed in to change notification settings - Fork 596
Description
Description
When an external fixed forward source
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
The second is by user specification of the adjoint source term itself, 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. Looking towards the future implementation of CADIS, the ability to designate a particular tally as a "target" response for variance reduction, and construct appropriate local adjoint sources automatically, could additionally be valuable. Therefore, this feature could also use geometric and energy constraints inferred from CellFilter and EnergyFilter instances on a tally to populate adjoint sources in flat source regions, as described in the first method above.
Compatibility
Checks will need to be implemented in openmc_run_random_ray() to determine not only whether an adjoint solve is needed, but whether an initial forward solve should also be performed to generate the adjoint source. This determination could be made automatically on the basis of whether the user has defined an adjoint_source within the settings.random_ray dictionary: if a openmc.SourceBase instance exists here and adjoint transport is requested, the forward solve is skipped; otherwise, a forward calculation is always performed if adjoint transport is requested, though additional input would be required on whether to generate a global adjoint source from settings.random_ray['adjoint_source'] with an openmc.Tallies instead of a openmc.SourceBase.