Moving EL Bubbles with MPI Decomposition#1290
Moving EL Bubbles with MPI Decomposition#1290wilfonba wants to merge 6 commits intoMFlowCode:masterfrom
Conversation
…and MPI communication Features: - Lagrangian bubble movement with projection-based void fraction smearing - Kahan summation for accurate void fraction boundary conditions - Extended MPI communication for moving EL bubbles - New 2D and 3D moving Lagrangian bubble examples - Updated test cases and golden files
Claude Code ReviewHead SHA: 54d388d Changed files (key):
Summary:
Findings🔴 Bug: Wrong argument passed to
|
Claude Code ReviewHead SHA: Summary
Findings1. Duplicate namelist variable in The modified namelist declaration ends with: & g0_ic, p0_ic, hyper_cleaning, hyper_cleaning
2. Missing Project convention (CLAUDE.md) requires explicit
3. subroutine s_mpi_reduce_int_sum(var_loc, sum)
integer, intent(in) :: var_loc
integer, intent(out) :: sum
#ifdef MFC_MPI
call MPI_REDUCE(...)
#endif
end subroutineIn non-MPI builds the 4. Fragile magic number in particle-buffer sizing nReal = 7 + 16*2 + 10*lag_num_tsThis hardcoded layout count must stay in exact sync with the pack/unpack loops in 5. Golden files regenerated only with nvfortran/GPU The updated metadata for all modified golden files ( 6.
Minor / Improvement Opportunities
Review generated by Claude Code (claude-sonnet-4-6). This is a draft PR — findings are intended as early-stage feedback. |
Claude Code ReviewHead SHA: Files reviewed (top 10 of 48)
Summary
FindingsBug — Lagrange 4th-order velocity interpolation formula incorrect Three of the five Lagrange basis polynomials are wrong. The correct Lagrange formula for node k is: L(k) = product_{j≠k}(pos - xi(j)) / product_{j≠k}(xi(k) - xi(j)). Issues:
This produces incorrect interpolated velocities for all moving-bubble simulations when Bug — The This will crash (or silently corrupt memory) for any Euler-Euler simulation using Bug — The new subroutine only assigns Add Hardcoded physical constants in hcid=304/305 cases The density ratios Example case files: "bub_pp%gam_v": gamma_g, # gamma_g assigned to gam_v
"bub_pp%gam_g": gamma_v, # gamma_v assigned to gam_g
"bub_pp%M_v": MW_g, # MW_g → M_v
"bub_pp%M_g": MW_v, # MW_v → M_g
"bub_pp%k_v": k_g * ..., # k_g → k_v
"bub_pp%k_g": k_v * ...Every vapor/gas subscript pair is swapped relative to the variable names. Please confirm whether this matches the convention used in the existing Binary file committed to examples directory Minor
🤖 Generated with Claude Code |
Description
This PR adds support for moving Euler-Lagrange bubbles and various force models. Tracer particles that simply follow the background flow are implemented, as are Newton's 2nd Law particles that respond to body forces, pressure gradients, and drag. This PR is marked as a draft for now as there are several things that I need to complete before a proper merge can occur, but I wanted these changes to be visible to other contributors working on related features.
Fixes #(issue)
Type of change
Testing
16 rank CPU versus 16 rank GPU
This test was ran using the
examples/3D_lagrange_bubblescreentest case and compares the results for a 16 rank CPU simulation to a 16 rank GPU simulation. The visualization shows the following things:test.mp4
Checklist
See the developer guide for full coding standards.
GPU changes (expand if you modified
src/simulation/)AI code reviews
Reviews are not triggered automatically. To request a review, comment on the PR:
@coderabbitai review— incremental review (new changes only)@coderabbitai full review— full review from scratch/review— Qodo review/improve— Qodo code suggestions