Angular flux tallying capabilities for Random Ray - #4072
Draft
j-fletcher wants to merge 6 commits into
Draft
Conversation
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
Introduces angular flux tallying capabilities in Random Ray mode.
This is accomplished by the addition of an$\vec{u}$ enters a source region where the angular flux will be accumulated, its bin index is determined by determining which quadrature direction $\vec{q}$ maximizes the dot product $[ \vec{q} \cdot \vec{u}]$ .
angular_flux_new_vector to eachSourceRegionwhich stores the groupwise angular flux from the current iteration. Rays are assigned to each angular bin according to the spherical Voronoi diagram of all angles in the "quadrature" set on the unit sphere. That is, when a ray with directionAs quadrature sets can easily number in the hundreds of angles, to prevent performing these operations on every region crossing, we instead store the angular bin index on the ray once calculated, only resetting once the ray changes direction at the problem boundary. Additionally, we may initialize the ray with no assigned angular bin, only performing the search when crossing a source region where angular flux tallies are located and during the ray's active length.
While this has the effect of imposing the requirement that only one angular discretization scheme be used throughout the problem, the approach taken in this PR also offers a key advantage in that the angular flux is only banked in source regions where the user has specified angular flux tallies. This avoids the potentially significant memory overhead from storing$N_\Omega$ flux values in $N_E$ energy bins in all $N_{SR}$ source regions of the problem, while still enabling the output of some angular data.
Additionally, tallying will be possible with any set of quadrature angles specified in the tally filter. For comparison to other discrete ordinates codes, and to provide a few approximately uniform distributions of unit-sphere directions, some point-set generator functions are also provided in the Python API. These include generators for level-symmetric and triangular Chebyshev-Legendre quadrature directions, as well as direction sets based on the vertices or face centroids of a geodesic icosahedron ("icosphere") subdivided at arbitrary integer frequency.
Fixes #4071
Checklist