Automated generation of FW-CADIS source biasing parameters via Random Ray - #4136
Draft
j-fletcher wants to merge 31 commits into
Draft
j-fletcher wants to merge 31 commits into
j-fletcher wants to merge 31 commits into
Conversation
…gular flux accumulation
…s in mesh triangularization
…erve probability mass
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is intended to be merged after #4135.
Adds the option within the FW-CADIS
WeightWindowGeneratorto bias forward fixed sources in the problem. The spatial mesh and energy groups used by the weight window structure are also used to discretize the source biasing parameters, along with an optional angular biasing "quadrature" which enables angular dependence.First, the strength of the forward source(s) are estimated for each phase space voxel in the spatial-angular-energy mesh using a
SourceBase.write_forward_source_mesh()method. This successively samples the problem's external source until one of the following convergence criteria is satisfied:min_avg_samples_per_voxeltimes.max_samplessource sites have been sampled.The probability mass associated with each phase space voxel is then written to$\hat{q}(\vec{r}, \vec{\Omega}, E) = \psi^{+}(\vec{r}, \vec{\Omega}, E)q(\vec{r}, \vec{\Omega}, E)$ . Accordingly, a weight inversely proportional to the adjoint flux is also assigned to each phase space voxel. These parameters are then written to
forward_source_mesh.h5and read by the weight window generator duringWeightWindowsGenerator::create_tally(). A new tally is created to track the scalar or angular flux during adjoint transport, and the elementwise strengths of the biased source are calculated assource_bias.h5.Finally, in the forward Monte Carlo run, an instance of a new
CorrelatedSourceclass can be instantiated from the source bias file. This action also performs an interpolation of the biasing parameters' angular dependence from theUnitSpherePointsetused for tallying onto aUnitSphereTriangularMeshthat enables sampling. TheCorrelatedSourceclass is similar toMeshSourcein that a single vector of probabilities governs the selection of a phase space voxel, from which uniform samples are then drawn. Sampling over the energy variable is performed uniformly in lethargy. This structure allows the source's angular, energy, and spatial distributions to vary in a correlated manner.One key advantage of pre-calculating the forward source strengths is that biasing parameters can be calculated for forward sources that are not normally compatible with the Random Ray solver, provided that a reasonable "lookalike" can be defined for the forward Random Ray simulation which then estimates the adjoint source. The adjoint Random ray solve then calculates the source biasing parameters on the same discretization used to mesh the original forward source.
Checklist