-
Notifications
You must be signed in to change notification settings - Fork 0
Add target keff not equal to 1 #3
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
base: criticality-search
Are you sure you want to change the base?
Conversation
Co-authored-by: Kevin Sawatzky <[email protected]>
Co-authored-by: Paul Wilson <[email protected]>
| { | ||
| auto params = MooseObject::validParams(); | ||
| params += OpenMCBase::validParams(); | ||
| params.addParam<Real>( |
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.
| params.addParam<Real>( | |
| params.addRangeCheckedParam<Real>( |
| params.addParam<Real>( | ||
| "keff_target", | ||
| 1.0, | ||
| "Target value of k_eff for the criticality search."); |
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.
| "Target value of k_eff for the criticality search."); | |
| "keff_target > 0", "Target value of k_eff for the criticality search."); |
| _tolerance(getParam<Real>("tolerance")), | ||
| _estimator(getParam<MooseEnum>("estimator").getEnum<eigenvalue::EigenvalueEnum>()) | ||
| { | ||
| if (_keff_target <=0 ) |
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.
the addRangeCheckedParam will automatically enforce the same restriction, so that we wouldn't need a test case to cover the error message.
| requirement = 'The system shall error if a criticality search is not paired with the correct problem class.' | ||
| capabilities = 'openmc' | ||
| [] | ||
| [negative_keff_target] |
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.
For a test case, would you please add one that uses the keff_target feature and confirms the criticality search behaves as expected?
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.
@aprilnovak - it's not clear to me how to best get the gold reference results. I created this file with made up data just to get all the plumbing right.
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.
Probably easiest to use the inputs for the k=1 search tests in neams-th-coe#1184 and run it with Cardinal to de a search locally with your target value, which will create the gold csv below with the correct values
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.
I'm not sure that using keff=1 quite demonstrates the added capability.
Would it be in scope to change the way the tests are formatted for criticality so that we could include the OpenMC search code as well as the normal model building script? If we did that, it would be simple to change the value of keff that is used in the OpenMC search, using files that were committed to this repo.
In short, I would:
- reformat
https://github.com/aprilnovak/cardinal/blob/criticality-search/test/tests/criticality/material_density/make_openmc_model.pyto be mostly in a function that is called by some main function when use as a stand alone function and produce the XML, just as it does now - add a python script that implements the search for keff by calling this function, and takes a value of keff as a command-line option, defaulting to 1.0
- Commit all of those to the repo
- Run this for keff!=1 and add a gold result for that output
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.
Not sure if my suggestion was clear but I meant to use the files that already exist at test/tests/criticality/borated_water from neams-th-coe#1184 as a base and add the keff_target variable with some non-one value to the openmc.i's [CriticalitySearch] block (e.g. keff_target = 0.95) and then locally run cardinal-opt -i openmc.i, which should produce the correct csv you need for the gold directory.
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.
But I still need to confirm that it's sufficiently similar to what OpenMC would produce under the same circumstances....
|
I should get a chance to test the code from today later this week and confirm the gold file lines up with a local standalone OpenMC search |
ea3c7c9 to
ff0e44e
Compare
Adds an additional parameter to the criticality search base class that allows a user to specify an optional value for the target k_eff used in the search. A default of 1.0 is provided and it is required to be greater than 0 (including a test).