Require two fluids for phase change - #1743
Merged
sbryngelson merged 1 commit intoAug 20, 2026
Merged
Conversation
The phase-change operator uses fixed liquid and vapor indices 1 and 2 and writes both fields. Reject one-fluid cases before input generation so that the vapor index cannot alias x-momentum. Fixes MFlowCode#1738
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1743 +/- ##
=======================================
Coverage 61.59% 61.59%
=======================================
Files 84 84
Lines 21493 21493
Branches 3176 3176
=======================================
Hits 13239 13239
Misses 6078 6078
Partials 2176 2176 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sbryngelson
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Reject phase-change configurations with fewer than two carrier fluids.
The phase-change operator uses fixed liquid and vapor indices
lp = 1andvp = 2and writes both indexed fields. With one carrier fluid, the vaporindex aliases x-momentum.
This implements the narrow validation guard requested in Issue #1738. It
intentionally does not address the broader phase-change/Euler–Euler
compatibility question.
Fixes #1738.
Type of change
Testing
num_fluids;TestPhaseChangeFluidPairing: 5 passed.test_case_validator.py: 51 passed../mfc.sh lint: passed.validation stages.
2D_phasechange_bubblepositive control: passed all three stages.git diff --check: passed.No preprocessing or simulation of the unsafe one-fluid configuration was
performed.
Checklist