-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fixes PrecursorAction with velocity functions, and supports higher order precursor variable initialization #266
base: devel
Are you sure you want to change the base?
Conversation
… tests for time-varying flow
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.
This PR looks good! I've added a few small comments throughout.
[Postprocessors] | ||
[] |
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.
This Postprocessor block does not appear to be adding anything to this input file.
[Postprocessors] | ||
[] |
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.
This Postprocessor block does not appear to be adding to this input file.
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.
There does not appear to be a test added to the test suite to check this Postprocessor, should there be a test added for this? Or was this meant to be included in the sub_1st.i or sub_func.i tests in the empty Postprocessors block?
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.
Good catch. I'll add a test similar to the current tests for SideWeightedIntegralPostprocessor
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.
This file has a lot of repeated if statements checking the same parameters in each equation. Instead of having a series of if-else statements in each equation, would an overarching switch() statement on the _velocity_type Enum be possible to help with segregation of the three possible types? Or would that make this file absurdly long and unnecessarily separated?
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 think this is a valid requested change, @nglaser3! Also, should there be an “else” block? Are you sure all cases are covered? Perhaps adding one could help with debugging in the future (e.g. if a feature isn’t implemented yet). I noticed at least 1 missing else statement. Just some thoughts.
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.
This file has a lot of repeated if statements checking the same parameters in each equation.
I agree but it's with good reason. The functions in the file are currently separated by kernel type (e.g., addTimeDerivative
, addPrecursorDecay
). I think this separation by "physics" makes sense for understanding what each function does, albeit at the cost of having so many if statements to support 3 different velocity types. If we group the if
blocks together and refactor the code, each velocity-related "physics" will require a function for each velocity type. In that sense, @nglaser3 you're right that the file will become "absurdly long and unnecessarily separated" and more difficult to parse as a human.
I like the switch case statement syntax but it's annoying to use here because we'll need a separate Enum definition alongside the current MooseEnum. It's extra code without any programming/computational benefit.
Also, should there be an “else” block? Are you sure all cases are covered?
@samgdotson The velocity_type
input parameter only accepts one of the three MooseEnum values listed in velocity_type
. Otherwise MOOSE does not accept the input value and spits out an error. Moltres will never reach the else
block. At this point I can't think of any potential velocity type that doesn't fall under constant
, function
, or variable
@smpark7 , what's the status of this one? |
I need to address nathan's comments and rerequest reviews. I'll get on it this week |
Fixes #183. Fixes #265.
Description
PrecursorAction
allows users to define their velocity values for delayed neutron precursor advection using constants, mathematical functions, or MOOSE variables. However, using velocity functions had limited scope due to bugs described in #183. With this PR, PrecursorAction will fully support modeling precursor flow with velocity functions (in line with existing functionality with constant or coupled velocity values).This PR also extends support for modeling precursor variables with higher (>0) order discontinuous variables.
Changes
PrecursorAction
Enum input parametervelocity_type
to indicate whether the velocity components areconstant
,function
, orvariable
constant_velocity_values
bool-type parameterSideFunctionWeightedIntegralPostprocessor
to calculate precursor outflow at the outlet when using velocity functionsPrecursorAction
:PostprocessorVelocityFunctionInflowBC
,VelocityFunctionConservativeAdvection
, &PostprocessorPenaltyDirichletBC
objects required in this bugfix.moltres/problems/2021-cnrs-benchmark/phase-0
which were checking the wrong input fileImpact