-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mesh Source Class #2759
Mesh Source Class #2759
Conversation
…urce distributions
Now that we can apply an arbitrary source type in the mesh elements, should I attempt to add some tests for source types other than |
@pshriwise Yes, not necessary to truly test the functionality of having some weird source on a mesh element but more so to make sure that there are no implicit assumptions about it being an independent source that are still hanging around. |
This looks like a good addition for many general cases. I'd like to draw attention to a special case that falls in-between this solution and the previous case: mesh-based energy-dependent sources that share an energy group structure across all voxels/mesh elements. When this is true, the entire 4-D distribution can be setup with a single alias sampling scheme to accelerate the sampling. It makes me wonder whether, in general, there is a desire to identify when the voxel-dependent distributions are discrete, so that it allows us to form a single discrete distribution across all of phase space? |
Good point, @gonuke. Somewhat connected to this thought -- I think one thing that will help here is the ability for sources to share distributions in memory, so if multiple As for detecting whether or not voxel-dependent distributions are discrete, we're currently allowing each mesh element to contain an arbitrary source type. Determining distribution equivalence for different |
First, this wasn't meant to be a blocking comment. Second, I think my use case makes more sense as an alternative input scheme in a different PR. Rather than detect the same distributions, allow users to define a source in this way for convenience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pshriwise I made a few cosmetic updates here and there on your branch and think it's good to go now!
Co-authored-by: Paul Romano <paul.k.romano@gmail.com> Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
Description
This adds the ability to specify an
IndependentSource
term for each element in a mesh, allowing for independent angle, energy, and time source distributions and unique source particle types in each element. The domain rejection feature added by @paulromano in #2235 can be used as well to ensure that particles are sourced within the specified domain(s) in the element. TheMeshSource
's strength is the combination of the strengths of sources applied to the mesh, and elements will be sampled based on their relative strength in the same way theMeshSpatial
distribution handles this capability.Quick note on choosing between a source that uses the
MeshSpatial
distribution and aMeshSource
source.For uniform source properties in each element (angle, energy, time, particle), use an
IndependentSource
with aMeshSpatial
.For unique energy, angle, time, particle distributions in each element, use a
MeshSource
andIndependentSource
objects with distributions defined for each element as desired.Fixes # (issue)
https://github.com/orgs/openmc-dev/projects/1/views/1?filterQuery=Mesh&pane=issue&itemId=1459193
Checklist