Fix multi-comp axisym HLL#800
Merged
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #800 +/- ##
=======================================
Coverage 43.74% 43.74%
=======================================
Files 65 65
Lines 19039 19039
Branches 2332 2332
=======================================
Hits 8328 8328
Misses 9303 9303
Partials 1408 1408 ☔ View full report in Codecov by Sentry. |
Closed
sbryngelson
added a commit
to sbryngelson/MFC
that referenced
this pull request
May 8, 2026
…#800 intent The previous commit incorrectly set flux_gsrc(adv) = 0 for HLL and LF, which would have reverted PR MFlowCode#800. Per the analysis in issue MFlowCode#1402 comment by ChrisZYJ: flux_rs(adv) in HLL/LF is the numerical diffusion component (not transport), and any face-flux in cylindrical coordinates requires the full geometric divergence (1/r)*d(rF)/dr = dF/dr + F/r. The flux_gsrc term provides the F/r correction for the diffusion. The transport half is handled separately via flux_src_rs (non-conservative source). PR MFlowCode#800 was correct. The comment is updated to document this so future readers do not repeat the mistake. The convergence test is unaffected: for num_fluids=1, alpha=1 everywhere so flux_rs(adv) = 0 at all faces regardless.
4 tasks
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
Fixes multi-component axisymmetric HLL solver.
PR #794 applied the same radial treatment as HLLC, which only fixed the single-component case but was completely unstable for multiple components. This is now fixed by adding the αv/r term for HLL to match the governing equations in cylindrical coordinates.
Also regenerates the test case.
Type of change
Scope
How Has This Been Tested?
Below are 2-components axisymmetric simulations, with a cylindrical fluid 2 at the center.
2mat_bot_HLLC_top_HLL_old.mp4
2mat_bot_HLLC_top_HLL_1st_change.mp4
2mat_bot_HLLC_top_HLL_fixed.mp4
Checklist
docs/)examples/that demonstrate my new feature performing as expected.They run to completion and demonstrate "interesting physics"
./mfc.sh formatbefore committing my codeIf your code changes any code source files (anything in
src/simulation)To make sure the code is performing as expected on GPU devices, I have:
nvtxranges so that they can be identified in profiles./mfc.sh run XXXX --gpu -t simulation --nsys, and have attached the output file (.nsys-rep) and plain text results to this PR./mfc.sh run XXXX --gpu -t simulation --omniperf, and have attached the output file and plain text results to this PR.