Skip to content

Fix how the species fluxes are summed#607

Merged
baperry2 merged 2 commits intoAMReX-Combustion:developmentfrom
d-montgomery:patch-mfr-fix
Dec 19, 2025
Merged

Fix how the species fluxes are summed#607
baperry2 merged 2 commits intoAMReX-Combustion:developmentfrom
d-montgomery:patch-mfr-fix

Conversation

@d-montgomery
Copy link
Copy Markdown
Contributor

@d-montgomery d-montgomery commented Dec 16, 2025

This PR fixes how the species fluxes are summed for each group in speciesBalancePatch().

The old code was using j = 0, 1, 2... directly to index speciesFlux, but it needed to:

  1. Get the mechanism species index from speciesinGroup[i]
  2. Find which local index k
  3. Use that k to get the correct flux from speciesFlux[k]

This fix ensures that fluxes are correctly summed for all group definitions, including multiple groups like {Air:O2,N2} {Fuel:POSF10264}

Copy link
Copy Markdown
Collaborator

@baperry2 baperry2 left a comment

Choose a reason for hiding this comment

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

Looks good to me but @SreejithNREL please confirm that this is consistent with what you intended for the bpatches before we merge.

@baperry2 baperry2 merged commit 019098b into AMReX-Combustion:development Dec 19, 2025
24 checks passed
@d-montgomery d-montgomery deleted the patch-mfr-fix branch December 19, 2025 18:53
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.

3 participants