Skip to content

Rescale bubbly volume fractions per cell in pre_process - #2002

Closed
sbryngelson wants to merge 3 commits into
MFlowCode:masterfrom
sbryngelson:fix/bubbles-mpp-lim-assign
Closed

sbryngelson wants to merge 3 commits into
MFlowCode:masterfrom
sbryngelson:fix/bubbles-mpp-lim-assign

Conversation

@sbryngelson

@sbryngelson sbryngelson commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

With mpp_lim and bubbles_euler, s_assign_patch_species_primitive_variables
rescaled the liquid volume fractions with whole-array operations on
alf_sum%sf (0:m,0:n,0:p) and the ghost-padded q_prim_vf fields from inside
a per-cell routine. The shapes differ, so this read and wrote out of
bounds (gfortran: "Array bound mismatch ... (308/300)"), and it rescaled
the entire domain once per cell.

Replace the five copies with s_scale_volume_fractions_to_void, which
rescales only cell (j,k,l) with a scalar sum, and drop the module-level
alf_sum array (which was never deallocated).

Add test E5ACA113 (1D -> Bubbles -> 2 Fluid(s) -> mpp_lim), which aborted
in pre_process before this change. The 64 existing Bubbles tests pass
unchanged.

With mpp_lim and bubbles_euler, s_assign_patch_species_primitive_variables
rescaled the liquid volume fractions with whole-array operations on
alf_sum%sf (0:m,0:n,0:p) and the ghost-padded q_prim_vf fields from inside
a per-cell routine. The shapes differ, so this read and wrote out of
bounds (gfortran: "Array bound mismatch ... (308/300)"), and it rescaled
the entire domain once per cell.

Replace the five copies with s_scale_volume_fractions_to_void, which
rescales only cell (j,k,l) with a scalar sum, and drop the module-level
alf_sum array (which was never deallocated).

Add test E5ACA113 (1D -> Bubbles -> 2 Fluid(s) -> mpp_lim), which aborted
in pre_process before this change. The 64 existing Bubbles tests pass
unchanged.
@github-actions

Copy link
Copy Markdown

Lines of Code

File Lines Diff
src/pre_process/m_assign_variables.fpp 358 -30
Directory Lines Diff
pre_process 5004 -30
total 47484 -30

@sbryngelson

Copy link
Copy Markdown
Member Author

Closing this for now to bring the number of open PRs from me down to four, so the ones that stay open get real review attention rather than being lost in a queue of 35.

No work is lost and nothing needs re-doing. The branch fix/bubbles-mpp-lim-assign remains on the fork at 6dacec272d, this PR's diff and discussion stay here, and the head commit is additionally archived in a local verified bundle. Reopening takes no force-push and no rebase:

gh pr reopen 2002 -R MFlowCode/MFC

I intend to reopen these in small batches as the open slots free up. Apologies for the notification noise.

Opened and closed with Claude Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant