Repository navigation
PLIC: documentation of the algorithm, and advection with a non-zero divergence - #262
Draft
ThomasHowarth wants to merge 5 commits into
Draft
ThomasHowarth wants to merge 5 commits into
ThomasHowarth wants to merge 5 commits into
Conversation
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
Docs/source/PLIC.rst now describes the method as the Godunov, MOL and BDS pages do, with equations, citations and API references: - the VOF equation, the steps of a time step, notation and the plane representation; - reconstruction: the volume <-> plane constant relations, the Youngs, MYC and height-function normals, thin structures, ghost cells; - wall ghost cells: the three tiers of the plane search, the ghost value, edges and corners; - advection: node tracing, the flux volume as tetrahedra, the correction apex, cutting, fluxes and edge states, their properties and requirements, AMR, corrective velocities, HydroUtils; - the face density, and the mass and momentum fluxes with their formulas; - a time step in a solver, extending the library, verification results, and the limitations. refs.bib gains the ten papers cited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Split the volume formula over two lines, put the plane constant and the height function in display equations, define F_up for the cases, use upright subscripts and superscripts (flux, MAC), shorten the code blocks and make the main sections siblings of Notation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The flux volumes of a cell hold dt times the discrete divergence of the face velocities, whatever it is, so the scheme adds none of its own and needs no change for a low Mach solver: the liquid volume is conserved to round-off, an incompressible liquid needs no source term, and F stays in [0,1] where the flow expands. Where it is compressed in a cell that holds liquid, F can exceed 1. Document this (a new subsection, the requirements, the mass/momentum identity and the limitations), and verify it: the advection test takes a band of expanding gas, with inputs.2d.expand (a circle beside the band, 3 levels, shape error that of no band) and inputs.2d.dilate (both phases expanding, every cell mixed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Draft: stacked on #256. The first commit (480fbf6) is #256. Once that merges, this will be rebased onto
developmentand leave only the plic-6 commits.Documentation
Docs/source/PLIC.rstis rewritten as a full description of the algorithm, in the style of the Godunov, MOL and BDS pages:HydroUtils;New references are in
refs.bib, with DOIs. Each was checked against the published record.Non-zero divergence (low Mach solvers)
The flux volumes of a cell hold Δt times the discrete divergence of the face velocities, whatever that divergence is. So Owkes & Desjardins adds none of its own, and the fluxes need no change when ∇·u = S ≠ 0:
The library code is unchanged apart from two doc comments in
hydro_plic.H.Tests
The advection test can now add a band of expanding gas to the prescribed velocity: (U(x), 0, 0), with discrete divergence S in the band and exactly 0 elsewhere, on every level.
inputs.2d.expand: a circle beside the band, 3 levels, throughHydroUtils. Shape error 1.11e-5, against 1.17e-5 without the band. Volume change per step 6e-16.inputs.2d.dilate: both phases expanding, so every cell of the circle becomes mixed. Volume and bounds hold to round-off.All existing PLIC inputs pass in 2D and 3D with unchanged results. The docs build with no Sphinx warnings.
🤖 Generated with Claude Code