-
Notifications
You must be signed in to change notification settings - Fork 569
Criticality search method on the Model class #3569
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: develop
Are you sure you want to change the base?
Conversation
Wow, beautiful. This is the criticality search I've always dreamed of. I have two pieces of feedback on this. For one, the paper is not open access, so I think it would be better to not refer to Eq. 8 in the docs without saying what it actually is. Maybe some small amount of additional documentation would obviate the need to refer back to the paper? Secondly, I see no reason why different values for And lastly, just a question for you: can this be turned on in the course of a depletion calculation? And if so, do you have any thoughts about the steps this would be ran at? Should it be run at every substep? Or perhaps just correctors or predictors for example? There are many ways to implement this. |
@church89 Note that I've just updated the PR to support the use of @gridley Thanks for your comments. I've added a little more documentation so it doesn't require a user to go dig through the paper to find that equation. I've also removed b1 as you suggested. As far as use during depletion, that is exactly what @church89 has been working on (via #2693), and in fact this PR is supposed to be in support of that feature. The plan is once this is merged to refactor #2693 to use the new search method here. |
func(x, **func_kwargs) | ||
|
||
# Change the number of batches and run the model | ||
batches = self.settings.inactive + batches |
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.
batches += self.settings.inactive
Hi @paulromano, this looks indeed very good and neat. Just a consideration to use this with a depletion calculation and with #2693. In a depletion calculation the openmc.lib model is initialized and therefore the |
Description
This PR introduces a new criticality search capability as the
Model.keff_search
method. This method makes several improvements over the existingsearch_for_keff
function:Model
class, thekeff_search
method requires passing a function that makes some change to a mutable object. As the example below shows, it can be as simple as a one-line function.Fixes #1656
Submitting in draft status to get some community feedback (pinging @church89 @gridley)
Example
Here is a very small example that shows how the new method works:
This produces the following output when I run it:
Checklist