Repository navigation
PLIC: mass and momentum fluxes consistent with the volume fluxes - #256
Open
ThomasHowarth wants to merge 1 commit into
Open
ThomasHowarth wants to merge 1 commit into
ThomasHowarth wants to merge 1 commit into
Conversation
ThomasHowarth
force-pushed
the
plic-5-momentum
branch
8 times, most recently
from
November 20, 2026 16:27
6dc5feb to
ba42085
Compare
Following Rudman (IJNMF), the Owkes & Desjardins flux volumes also give the mass and momentum fluxes of each face, from the cuts of the volume fraction with phase densities given as PhaseDensityArray or fields. - ComputeMassMomentumFluxes computes the volume, mass and momentum fluxes in one call, optionally with the face velocity; dt must be positive. - FarFieldMomentumFluxes fills the faces the cuts marked, away from the interface. far_field_mark is a quiet NaN, so that a face left unfilled shows up in the momentum update. - CorrectiveMassMomentumFluxes is the counterpart of CorrectiveFluxes: where a corrective u_flux differs from umac, the mass flux carries the corrected volume fraction flux at the phase densities of the upwind cell, so rho stays the mixture density of F. Both share corrective_fraction. - The mass and momentum entry points take check_courant, as ComputeEdgeStateAndFluxes does, for solvers that check the level once with CheckCourantNumber. - The cut kernels walk the pieces of a flux volume once, and skip the liquid lookup per piece in a flux volume of one phase. The liquid flux kernel captures no momentum arguments. - SharpFaceDensity reads its phase densities as PhaseDensityArray. - New test_momentum (inputs.momentum) with a Translate problem: checks the corrective fluxes, and that the momentum is conserved in every case, relative to one cell of liquid. Ported as one commit onto development after plic-4 (AMReX-Fluids#255) merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7EH6ZtZUnusy66tyAq5MH
ThomasHowarth
force-pushed
the
plic-5-momentum
branch
from
December 3, 2026 14:03
ba42085 to
480fbf6
Compare
ThomasHowarth
marked this pull request as ready for review
December 3, 2026 14:55
This branch has not been deployed
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.
This PR adds mass and momentum fluxes for momentum advected in conservative form at a large density ratio (Rudman 1998). They come from the same flux volumes as the volume fraction. With rho^n = PLIC::mixture(F^n, rho_l, rho_g), the rho^{n+1} from the mass fluxes is the mixture density of F^{n+1} to round-off, so a uniform velocity stays uniform across the interface whatever the density ratio.
New API
vel_facethe solver provides: an upwind value, or the edge state of the solver's velocity scheme.vel_face: every flux in one call.check_courant, as ComputeEdgeStateAndFluxes does: a GPU solver checks the level once with PLIC::CheckCourantNumber and skips the per-box check.The single-cut paths match the separate calls to the bit. All the flux functions share one implementation, and the mass and momentum terms are compiled in only where they're asked for.
Tests
Tests/PLIC/inputs.momentum runs a drop in a uniform flow and in a vortex flow, with a density ratio of 1000, with the phase densities as values and as fields. It checks, to round-off:
Docs/source/PLIC.rst and Tests/PLIC/README.md are updated. All the PLIC test inputs pass in 2D and 3D.
🤖 Generated with Claude Code