Skip to content
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

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open

Adding SIMPLEC #29865

wants to merge 1 commit into from

Conversation

tanoret
Copy link
Contributor

@tanoret tanoret commented Feb 12, 2025

Closes #29864

@tanoret
Copy link
Contributor Author

tanoret commented Feb 12, 2025

@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!

@moosebuild
Copy link
Contributor

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
You can directly apply the patch by running, in the top level of your repository:

curl -s https://mooseframework.inl.gov/docs/PRs/29865/clang_format/style.patch | git apply -v

Alternatively, with your repository up to date and in the top level of your repository:

git clang-format cd66266a7dec6c2ec22f5902dba3e2ab6eeb8b19

// Pressure projection
params.addParam<MooseEnum>(
"pressure_projection_method",
MooseEnum("SIMPLE SIMPLEC", "SIMPLE"),
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

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?

Copy link
Member

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

@moosebuild
Copy link
Contributor

moosebuild commented Feb 12, 2025

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.

@moosebuild
Copy link
Contributor

Job Coverage, step Generate coverage on fe10d3d wanted to post the following:

Framework coverage

cd6626 #29865 fe10d3
Total Total +/- New
Rate 85.29% 85.29% -0.00% -
Hits 108457 108456 -1 0
Misses 18702 18703 +1 0

Diff coverage report

Full coverage report

Modules coverage

Navier stokes

cd6626 #29865 fe10d3
Total Total +/- New
Rate 84.83% 84.85% +0.02% 96.67%
Hits 17777 17805 +28 29
Misses 3178 3179 +1 1

Diff coverage report

Full coverage report

Full coverage reports

Reports

This comment will be updated on new commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding SIMPLEC
3 participants