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

Fix mass-consistent advection. #98

Merged
merged 17 commits into from
Mar 4, 2025
Merged

Fix mass-consistent advection. #98

merged 17 commits into from
Mar 4, 2025

Conversation

p-costa
Copy link
Collaborator

@p-costa p-costa commented Mar 3, 2025

This PR fixes and refactors the consistent advection implementation, which had issues in the calculation of the momentum and heat fluxes that led to stability problems. Other, unrelated minor updates have also been brought to this PR.

While unifying the conservative and non-conservative forms of the momentum equation, we have found some room for optimization and simplification of the implementation. Further steps could be taken that would lead to further simplification, but to keep things more efficient and avoid GPU register pressure, this is deemed to be enough for now.

Summary of changes:

  • Updated cuDecomp;
  • Updated minor change in the code block that computes the integrals of mass and energy;
  • Changed dtmin -> dtmax in the input file;
  • Skip operations when setting icheck/iout?d/isave to 0;
  • Changed CONSERVATIVE_MOMENTUM to CONSISTENT_ADVECTION;
  • Fixed mass--momentum-consistent advection discretization, and extended it for thermal energy (the latter is untested).

@p-costa p-costa requested a review from gianlupo March 3, 2025 10:18
Copy link
Collaborator

@gianlupo gianlupo left a comment

Choose a reason for hiding this comment

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

All looks good!

@p-costa p-costa merged commit ff75500 into main Mar 4, 2025
@p-costa p-costa deleted the fix-cons-mom branch March 4, 2025 12:11
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.

2 participants