-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Adding SIMPLEC #29865
base: next
Are you sure you want to change the base?
Adding SIMPLEC #29865
Conversation
@grmnptr added a couple of tests showing that we can converge fine with pressure equation relaxation equal 1.0. Tried to add minimal changes to your architecture @freiler don't think a technical review is needed at this point as this is mostly a step towards VOF. However, I leave this to your technical reviewer judgement. Thanks! |
Job Precheck, step Clang format on a594e5e 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:
|
// Pressure projection | ||
params.addParam<MooseEnum>( | ||
"pressure_projection_method", | ||
MooseEnum("SIMPLE SIMPLEC", "SIMPLE"), |
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.
Given the benefits espoused on the associated issue, why not make SIMPLEC the default?
if (_pressure_projection_method == "SIMPLEC") | ||
{ | ||
|
||
// Consistent Corrections to Simple |
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.
// Consistent Corrections to Simple | |
// Consistent Corrections to SIMPLE |
sum_vector.zero(); | ||
|
||
// Local row size | ||
const unsigned int local_size = mmat->row_stop() - mmat->row_start(); |
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.
const unsigned int local_size = mmat->row_stop() - mmat->row_start(); | |
const auto local_size = mmat->local_m(); |
for (const auto row_i : make_range(local_size)) | ||
{ | ||
// Get all non-zero components of the row of the matrix | ||
const unsigned int global_index = mmat->row_start() + row_i; |
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.
const unsigned int global_index = mmat->row_start() + row_i; | |
const auto global_index = mmat->row_start() + row_i; |
|
||
// Create vector with new inverse projection matrix | ||
auto Ainv_full = current_local_solution.zero_clone(); | ||
PetscVector<Number> * Ainv_full_vec = dynamic_cast<PetscVector<Number> *>(Ainv_full.get()); |
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.
PetscVector<Number> * Ainv_full_vec = dynamic_cast<PetscVector<Number> *>(Ainv_full.get()); | |
PetscVector<Number> * Ainv_full_vec = cast_ptr<PetscVector<Number> *>(Ainv_full.get()); |
[] | ||
|
||
[Executioner] | ||
type = SIMPLE |
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.
It would be kind of nice to not have a discrepancy between the executioner name and pressure projection method, but maybe experienced CFD users wouldn't find this confusing?
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.
Maybe this discrepancy wouldn't appear when using Physics
? Then it would be much less a concern to me
Job Documentation, step Docs: sync website on fe10d3d wanted to post the following: View the site here This comment will be updated on new commits. |
Job Coverage, step Generate coverage on fe10d3d wanted to post the following: Framework coverage
Modules coverageNavier stokes
Full coverage reportsReports
This comment will be updated on new commits. |
Closes #29864