Skip to content

Velocity Projection Bug Fix#634

Merged
baperry2 merged 2 commits intoAMReX-Combustion:developmentfrom
baperry2:proj-bug-fix
Mar 4, 2026
Merged

Velocity Projection Bug Fix#634
baperry2 merged 2 commits intoAMReX-Combustion:developmentfrom
baperry2:proj-bug-fix

Conversation

@baperry2
Copy link
Copy Markdown
Collaborator

@baperry2 baperry2 commented Mar 3, 2026

Proposed fix for #633. Looks like old and new states got swapped during #556.

@baperry2 baperry2 marked this pull request as draft March 3, 2026 01:22
@baperry2 baperry2 changed the title Proj bug fix Velocity Projection Bug Fix Mar 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug introduced in #556 where the old and new state/gradient pressure (gp) arrays were swapped in the velocity projection step. The fix ensures velocity updates are applied to the new state using the old gradient pressure.

Changes:

  • Swapped state_old_ma/gp_new_ma to state_new_ma/gp_old_ma in the variable-density branch
  • Swapped the same arrays in the constant-density branch

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@EnnaDelfen EnnaDelfen left a comment

Choose a reason for hiding this comment

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

This seems to have solved the issue on my end and the log file for my runs are now similar to what I had in my previous November version (incl. flamesheet TC). Can't really comment on the appropriateness of the format of the coding but it seems fairly straightforward. Thanks for attending to this so quickly.

Copy link
Copy Markdown
Contributor

@ThomasHowarth ThomasHowarth left a comment

Choose a reason for hiding this comment

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

Thanks for catching this Bruce - not sure how this got lost in translation in the previous PR; apologies.

@baperry2 baperry2 marked this pull request as ready for review March 4, 2026 21:13
@baperry2 baperry2 merged commit 135d9a5 into AMReX-Combustion:development Mar 4, 2026
38 checks passed
@baperry2 baperry2 deleted the proj-bug-fix branch March 4, 2026 21:14
@baperry2
Copy link
Copy Markdown
Collaborator Author

baperry2 commented Mar 4, 2026

I'll release another minor version soon because this is a substantial change.

@baperry2 baperry2 mentioned this pull request Mar 9, 2026
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.

4 participants