Skip to content

Mesh-type Angular Distributions - #4135

Draft
j-fletcher wants to merge 18 commits into
openmc-dev:developfrom
j-fletcher:angular_distributions
Draft

j-fletcher wants to merge 18 commits into
openmc-dev:developfrom
j-fletcher:angular_distributions

Conversation

@j-fletcher

Copy link
Copy Markdown
Contributor

Description

This PR is intended to be merged after #4072.

Adds ability to sample over a mesh defined on the unit sphere. This is accomplished via a new angular mesh type, UnitSphereTriangularMesh, which discretizes the unit sphere into triangular cells. A straightforward sampling algorithm from [Arvo 1995] provides a means of uniformly sampling a point that lies within any given spherical triangular mesh cell, which is called by the new MeshAngular multivariate distribution type. Additionally, given information tallied on a UnitSpherePointset mesh (via the MeshAngularFilter), a utility function is provided to triangularize the Voronoi diagram (i.e. the angular tally bins) corresponding to the UnitSpherePointset and the corresponding data into a form which can be used to construct a MeshAngular distribution.

This will ultimately be useful for the automated generation (and use) of source biasing parameters, aided by adjoint flux information supplied by the Random Ray solver.

Reference

Arvo, James, “Analytic Methods for Simulated Light Transport.” PhD Thesis, Yale University, December 1995.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 18) 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.

1 participant