-
Notifications
You must be signed in to change notification settings - Fork 66
Tally and Domain Filter Editor UOs #923
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
Conversation
|
Job Documentation on 107d06f wanted to post the following: View the site here This comment will be updated on new commits. |
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.
After going over the changes, I don't think there are any clashes between these userobjects and the tally system when xml tallies/filters are modified. I also don't believe this will cause any issues with the filter system coming in #951 since those are thin wrappers that return values stored in OpenMC filter objects.
I can see issues arising if the user attempts to modify tallies/filters added through the [Problem/Tallies] block since the changes made by these userobjects don't get propagated to either CellTally or MeshTally wrapper classes. It might be worth restricting the use of both userobjects so they only modify xml tallies or create new ones, unless you want to find a way to propagate changes in the filter/tallies to CellTally and MeshTally.
|
@aprilnovak I'm seeing similar Nek-related test failures on other PRs and the changes here don't seem relevant (correct me if I'm wront) so I'm not going to dig into that right away. |
|
You can ignore the container failures -- the Nek ones are all passing, the JIT seems to have gotten slower so there's just some timeouts but they are fine. @loganharbour, anything special we should be doing about the container failures? I believe this is also related to the failure on #952 |
|
Job Precheck on b25c149 wanted to post the following: Your code requires style changes. A patch was auto generated and copied here
Alternatively, with your repository up to date and in the top level of your repository:
|
|
@nuclearkevin @aprilnovak I believe I've addressed all outstanding issues at this point. I've added additional checks and tests that the tallies with editors aren't tallies generated by Cardinal for data mapping. I started to add this for filters as well, but I realized that it isn't really possible for filters to overlap because the filters currently supported by the tally editors are currently in the set of XML filter types that are not allowed for application with Cardinal tallies, so I think we're okay there. I'm happy to add the code to double-check this if it would make everyone more comfortable, but it wouldn't be straightforward to test really. I'm thinking that it's something to note for later. (I do have a proposal on how we might be able to unify these features with the nice work Kevin has done on the current tally system as a follow-on). @aprilnovak @loganharbour I'm not sure why CI isn't running on this PR. It seems it isn't happy with the SHA (not the one in the git history though I'll note). Thoughts? |
|
Thanks @pshriwise! I'll give this another round of review today. The CI isn't running because there's a merge conflict on the |
|
@pshriwise Thanks for addressing my concerns! I'll go over the changes again later today. |
|
I added a commit which makes |
|
Job Precheck, step Clang format on a745bbe wanted to post the following: Your code requires style changes. A patch was auto generated and copied here
Alternatively, with your repository up to date and in the top level of your repository:
|
|
Is this ready to go? |
|
As far as I'm concerned yep |
|
LGTM! |
This adds a
UserObjectfor editing OpenMC Tally and some Filter objects. The order of execution inOpenMCProblemBaseshould ensure they can be used in conjunction to create custom, controllable tallies in a Cardinal input file (for the set of filters supported, see below).OpenMCTallyEditor
This UO can be used to either edit an existing tally object or create a new one via the Cardinal input file. A tally's scores, nuclides, filters (set by ID) can all be specified in the input file. These parameters can also be controlled using the MOOSE control system. The tally's
multiply_densityattribute, governing whether or not tally results are multiplied by atom density, can be set as well, but as this is used less often it is set tofalseby default.multiply_densitycan also be controlled via the MOOSE control system. Other parameters are required.If the
create_tallyparameter of anOpenMCTallyEditorobject istrueand a tally already exists with the specified ID, a warning is shown. Ifcreate_tallyisfalseand a tally with the specified ID doesn't exist, an error is raised.The tally UO provides functionality that can replace the
OpenMCTallyNuclidesand I've done so in this PR. I'm not sure that deprecation of the existingOpenMCTallyNuclidesobject is necessary given its short lifetime, but I'm happy to provide that here.OpenMCDomainFilterEditor
The domain filter editor allows for the creation of tally filters and modification of their associated bins (by cell/material/universe/mesh ID). Like the tally properties above, filter bins can be set in the input file and modified between OpenMC executions as part of the MOOSE control system.
The supported filter types for this UO include:
CellFilter,MaterialFilter,UniverseFilter, andMeshFilter. These are all spatial/domain filters that have the same generic bin structure and are important for depletion/activation workflows that may be attached to Cardinal multiphysics problems.The filter editor UO is complicated by the necessity of a filter type. Additional checks have been added that ensure:
create_filteristrueand a tally filter with the specified ID already exists:filter_typeparameter is set, the specifiedfilter_typeis checked against the existingFilter's type and an error is raised on mismatchfilter_typeis not set or the types match, a warning is showncreate_filterisfalseand a filter with a matching ID exists:filter_typeparameter is set, the specifiedfilter_typeis checked against the existingFilter's type and an error is raised on mismatchfilter_typeis not set, no additional check is performed other than to check that the filter is in the set of types supported byOpenMCDomainFilterTODO:
Closes #837