flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
WyAdvector Class Reference

Weymouth-Yue split advection of a colour field on an extended (inner + ghost) block. More...

#include <advect_wy.hpp>

Classes

struct  Diagnostics
 Per-step census. More...
struct  Timing

Public Member Functions

void init (int nx, int ny, int nz, double h, int ghost=3)
I3 inner () const
I3 extent () const
int ghost () const
double h () const
long size () const
long index (int x, int y, int z) const
 Linear index of the inner-block cell (x,y,z), 0-based within the inner region.
SField colour () const
 Colour field on the extended block (x-fastest).
SField faceU () const
 Face velocity in direction d at the +d face of each cell: uf(i,j,k) sits at (i+1/2,j,k).
SField faceV () const
SField faceW () const
SField faceVel (int d) const
bool hasGeometry () const
void enableGeometry ()
 Allocate the geometry views. Idempotent; does not classify.
void disableGeometry ()
 Drop the geometry (back to the uncut kernels, byte-identically).
SField faceOpenness (int d) const
 Face openness of the +d face of each cell (the advector's own high-face convention — the SAME convention and the SAME one-cell shift the face velocity uses, colour_field.hpp).
SField epsFraction () const
 Fluid volume fraction of each cell (buildCellFraction, a multiple of 1/64).
SField kindDouble () const
 The cell classification as a DOUBLE (1 = solid), so it can ride the block's own halo exchange.
UCField cellKind () const
 The cell classification (VofCellKind).
long clampedFaces () const
 Faces the clamp had to bind, last advect().
double clippedVolume () const
 |liquid volume| the cut-cell clip moved during the last advect() (0 without geometry).
double clippedSigned () const
void classifyGeometry ()
 Classify every cell from eps and the six face openness values (cutcell.hpp rule 1) into kindDouble().
void finalizeGeometry ()
 kindDouble() (ghost-exchanged) -> the unsigned-char classification every kernel reads.
bool hasWetting () const
void enableWetting ()
void disableWetting ()
SField wallSdf () const
 The SDF on this block, in cells, > 0 in fluid (the solver embeds + exchanges it).
SField contactAngle () const
 The prescribed contact angle per cell, in RADIANS, measured through the liquid.
SField wettingNormal (int d) const
 The fluid-only Youngs normal of each fluid cell (buildWettingNormals, then exchanged).
void buildWettingNormals ()
 The fluid-only Youngs normal at every FLUID cell of the INNER region (the block's own ghost policy then puts the owner's value in every ghost layer — see the usage note above).
void wettingCensus (long counts[kVofWetCount], double &meanAppDeg, long &nApp) const
 Band-fill branch census over the INNER region (VofWettingBranch counts) and the mean APPARENT contact angle (degrees) over the cells that took the theta branch.
void wettingCensusGhost (long counts[kVofWetCount], double &meanAppDeg, long &nApp, int ghost) const
void solidBandFill ()
 The three-pass neutral (90 deg) solid-band fill of cutcell.hpp.
void setOutsideMask (UCField m)
 Install the OUT-OF-DOMAIN mask (vof/colour_bc.hpp::buildOutsideMask): 1 on every ghost cell outside the global domain on a non-periodic axis.
UCField outsideMask () const
bool hasOutsideMask () const
double bcFaceVolume (int f) const
 Signed liquid volume that crossed domain face f (0..5 = −x,+x,−y,+y,−z,+z) since the last resetBcFaceVolume(), in cell-volume units, POSITIVE for liquid entering the domain.
void resetBcFaceVolume ()
void setBcFaceOwned (int f, bool on)
 Which of the six BLOCK boundary faces are GLOBAL domain faces this block owns.
void resetTiming ()
const Timing & timing () const
double tick_ () const
void addT_ (double &acc, double t0)
template<class F>
void timedExchange (F &&fn)
 Run fn (a ghost exchange) under the exchange accumulator.
void exchangeTimed (SField f)
void syncGhosts ()
 Bring the colour ghosts up to date.
void advect (double dt, long step)
 One Weymouth-Yue step: freeze the dilation flag, then three sweeps in the permutation selected by step.
double lastCfl () const
long lastMixedCount () const
SField planeM (int d) const
 PLIC normal component d of the current reconstruction (valid on the inner region grown by 1, for mixed cells only — wyIsMixed is the contract, exactly as wyFaceFlux reads them).
SField planeAlpha () const
 PLIC plane offset of the current reconstruction.
UCField dilationFlag () const
 The frozen dilation indicator H(C^n - 1/2) of the current step (pressure cells).
SField faceFlux () const
 The geometric LIQUID volume flux of the sweep computeFluxes last ran, stored at the face's - side (so face i is the one between cells i and i + s_d).
double checkCourant (double dt)
 The interface-local (or global) Courant number for this dt, all-reduced, with the Weymouth-Yue boundedness cap enforced exactly as advect() enforces it — lastCfl_ is set the same way, so a WO-K step reports the same number a WO-J step would.
void enforceCfl (double cfl, double dt)
 Record cfl as this step's Courant number and enforce the Weymouth-Yue cap – the one guard advect(), checkCourant() and the block container's batched step (which measures the Courant numbers of all its blocks in one launch, vof/block_batch.hpp) share.
void noteBatchedStep ()
 Bookkeeping of a step the block container ran on this advector's views in its batched launches (VofBlockSet::advectBatched): the step counter advect() keeps.
bool bcFaceOwned (int f) const
 The WO-R boundary ledger, for the batched step: whether face f is a global domain face this block owns, and the per-step addition accumulateBcFaceVolume would have made.
void addBcFaceVolume (int f, double v)
Diagnostics diagnostics () const
 Local census over the inner region.
double maxCourant (double dth) const
 Max |uf| dt / h over this block's owned faces (the + face of every inner cell; the - face of the first inner cell is a neighbour's owned face, so a global max covers every face once).
double maxCourantInterface (double dth) const
 Max |uf| dt/h over the faces of INTERFACE-ADJACENT cells only.
double maxCourantInterfaceAuto (double dth) const
 The interface-local Courant number for this dt/h, using the CUT-CELL rule when geometry is attached (o_f |a_f| / max(eps_i, 0.1), cutcell.hpp rule 2) and the uncut one otherwise.
double maxDiscreteDivergence (double dth) const
 Max |discrete face divergence| * dt/h over inner cells — the exact quantity the conservation floor is set by (the dilation term contributes c_i times this to the global volume budget).
void requireExchange () const
void freezeDilationFlag ()
void reconstruct ()
 PLIC over the inner region grown by one cell in every direction: the donor of a face of an inner cell is at most one cell outside it.
void reconstructImpl ()
void computeFluxes (int d, double dth)
 One flux per d-face touched by an inner cell, stored at the cell on the face's - side.
void computeFluxesImpl (int d, double dth)
void accumulateBcFaceVolume (int d)
 Sum the just-computed d-fluxes on the two block-boundary d-faces into bcVol_, signed so that POSITIVE means liquid entering the domain.
void applySweep (int d, double dth)
 C_i += (F_{i-} - F_{i+}) + c_i (a_{i+} - a_{i-}), over inner cells.
void applySweepImpl (int d, double dth)
void computeFluxesCut (int d, double dth)
 F_f = o_f * wyFaceFlux(a_f, ...).
void applySweepCut (int d, double dth)
 eps_i C_i += (F_- - F_+) + c_i (o_+ a_+ - o_- a_-), then divide by eps_eff.
void clipCutCells ()
 Rule 3: clip C into [0,1] in CUT cells only (eps_eff < 1), accumulating the liquid volume the clip moved.
void clipCutCellsImpl ()
double maxCourantInterfaceCut (double dth) const
 Rule 2: the interface-local Courant number in cut cells is o_f |a_f| / max(eps_i, 0.1).
void solidBandFillPass (int k)
 One pass of the neutral solid-band fill.
void solidBandFillPassWetting ()
 Pass 1 of the band fill with the theta-consistent rule (WO-S).
void cutDiagnostics (Diagnostics &dg) const
 The cut-cell half of diagnostics() (zero-cost when no geometry is attached).

Static Public Member Functions

static double wallSeconds ()

Public Attributes

bool cutFluxClamp = true
 Weymouth's admissible-interval clamp on the openness-weighted flux (cutcell.hpp vofCutFluxClamp).
VofMetric metric
 Which VofWettingPivot anchors the theta-plane (a measured ablation; see wetting.hpp).
int wettingPivot = kVofPivotVolume
double wettingTangentEps = 1e-6
 Below |sin(theta_apparent)| = wettingTangentEps the interface is parallel to the wall and no rotation is defined.
double wettingPureEps = 1e-8
 A donor with C <= wettingPureEps or >= 1 - wettingPureEps is pure phase: the band gets the plain continuation C_s = C_f (there is no interface to make an angle with).
std::function< void(SField)> exchange
 Refresh EVERY ghost layer of the given cell field (MPI exchange + domain BC fill). Required.
std::function< double(double)> globalMax
 All-reduce max across ranks; identity when unset (single block).
bool timingOn = false
Timing tm
bool useWorklist = true
 Compaction of the reconstruction pass onto the mixed cells.
double cflLimit = 0.25
 Abort threshold on max |uf| dt / h.
bool interfaceLocalCfl = false
 Take the CFL over INTERFACE-ADJACENT cells only (mixed cells and their face neighbours) instead of over every owned face — see maxCourantInterface().
bool debugRecomputeDilation = false
 DIAGNOSTIC ONLY — recompute the dilation flag before every sweep instead of freezing it once.
double wispEps = 0.0
 WO-R2 item 4 — the wisp tolerance on the mixed-cell predicate (wyIsMixed(c, wispEps)), used by the reconstruction pass, every flux branch and the interface Courant band.

Detailed Description

Weymouth-Yue split advection of a colour field on an extended (inner + ghost) block.

Definition at line 208 of file advect_wy.hpp.

Member Function Documentation

◆ init()

void peclet::flow::vof::WyAdvector::init ( int nx,
int ny,
int nz,
double h,
int ghost = 3 )
inline
Parameters
nx,ny,nzinner cell counts of this block
huniform cell size
ghostghost width; >= 2 is required (donor-ring reconstruction reads a 3^3 stencil centred one cell outside the inner region), 3 is the plan's colour-field width (height-function columns at V3 need it).

Definition at line 242 of file advect_wy.hpp.

◆ inner()

Definition at line 267 of file advect_wy.hpp.

◆ extent()

Definition at line 268 of file advect_wy.hpp.

◆ ghost()

Definition at line 269 of file advect_wy.hpp.

◆ h()

double peclet::flow::vof::WyAdvector::h ( ) const
inline

◆ size()

long peclet::flow::vof::WyAdvector::size ( ) const
inline

Definition at line 271 of file advect_wy.hpp.

◆ index()

long peclet::flow::vof::WyAdvector::index ( int x,
int y,
int z ) const
inline

Linear index of the inner-block cell (x,y,z), 0-based within the inner region.

Definition at line 273 of file advect_wy.hpp.

◆ colour()

Colour field on the extended block (x-fastest).

Definition at line 276 of file advect_wy.hpp.

◆ faceU()

Face velocity in direction d at the +d face of each cell: uf(i,j,k) sits at (i+1/2,j,k).

The caller owns these (prescribed field at this rung) and must fill them on the ghost ring too — the -d face of the first inner cell is the +d face of a ghost cell.

Definition at line 280 of file advect_wy.hpp.

◆ faceV()

Definition at line 281 of file advect_wy.hpp.

◆ faceW()

Definition at line 282 of file advect_wy.hpp.

◆ faceVel()

Definition at line 283 of file advect_wy.hpp.

◆ hasGeometry()

Definition at line 299 of file advect_wy.hpp.

◆ enableGeometry()

Allocate the geometry views. Idempotent; does not classify.

Definition at line 301 of file advect_wy.hpp.

◆ disableGeometry()

Drop the geometry (back to the uncut kernels, byte-identically).

Definition at line 316 of file advect_wy.hpp.

◆ faceOpenness()

Face openness of the +d face of each cell (the advector's own high-face convention — the SAME convention and the SAME one-cell shift the face velocity uses, colour_field.hpp).

Definition at line 319 of file advect_wy.hpp.

◆ epsFraction()

Fluid volume fraction of each cell (buildCellFraction, a multiple of 1/64).

Definition at line 321 of file advect_wy.hpp.

◆ kindDouble()

The cell classification as a DOUBLE (1 = solid), so it can ride the block's own halo exchange.

Definition at line 323 of file advect_wy.hpp.

◆ cellKind()

UCField peclet::flow::vof::WyAdvector::cellKind ( ) const
inline

The cell classification (VofCellKind).

Definition at line 325 of file advect_wy.hpp.

◆ clampedFaces()

Faces the clamp had to bind, last advect().

Definition at line 331 of file advect_wy.hpp.

◆ clippedVolume()

|liquid volume| the cut-cell clip moved during the last advect() (0 without geometry).

Definition at line 333 of file advect_wy.hpp.

◆ clippedSigned()

Definition at line 334 of file advect_wy.hpp.

◆ classifyGeometry()

Classify every cell from eps and the six face openness values (cutcell.hpp rule 1) into kindDouble().

The -d face of a cell at index 0 on axis d lies outside the block, so the low plane of each axis is left FLUID here and is meant to be overwritten by the block's own ghost exchange (which puts the owner's classification there) before finalizeGeometry().

Definition at line 340 of file advect_wy.hpp.

◆ finalizeGeometry()

kindDouble() (ghost-exchanged) -> the unsigned-char classification every kernel reads.

Definition at line 361 of file advect_wy.hpp.

◆ hasWetting()

Definition at line 386 of file advect_wy.hpp.

◆ enableWetting()

Definition at line 387 of file advect_wy.hpp.

◆ disableWetting()

Definition at line 400 of file advect_wy.hpp.

◆ wallSdf()

The SDF on this block, in cells, > 0 in fluid (the solver embeds + exchanges it).

The wall normal n_w = grad(sdf)/|grad(sdf)| is formed from it by central differences in the pass.

Definition at line 403 of file advect_wy.hpp.

◆ contactAngle()

The prescribed contact angle per cell, in RADIANS, measured through the liquid.

Definition at line 405 of file advect_wy.hpp.

◆ wettingNormal()

The fluid-only Youngs normal of each fluid cell (buildWettingNormals, then exchanged).

Definition at line 407 of file advect_wy.hpp.

◆ buildWettingNormals()

The fluid-only Youngs normal at every FLUID cell of the INNER region (the block's own ghost policy then puts the owner's value in every ghost layer — see the usage note above).

Definition at line 427 of file advect_wy.hpp.

◆ wettingCensus()

void peclet::flow::vof::WyAdvector::wettingCensus ( long counts[kVofWetCount],
double & meanAppDeg,
long & nApp ) const
inline

Band-fill branch census over the INNER region (VofWettingBranch counts) and the mean APPARENT contact angle (degrees) over the cells that took the theta branch.

ghost widens the counted region by that many ghost layers (default 0 = the INNER region, which is where an immersed SDF solid's band lives). A wetting DOMAIN wall's band is entirely in the GHOST layers – the wall sits ON the boundary face – so the solver passes g there, or the census reads 0 and is exactly the tell the user is looking for (ISSUES sweep item 3).

Definition at line 470 of file advect_wy.hpp.

◆ wettingCensusGhost()

void peclet::flow::vof::WyAdvector::wettingCensusGhost ( long counts[kVofWetCount],
double & meanAppDeg,
long & nApp,
int ghost ) const
inline

Definition at line 473 of file advect_wy.hpp.

◆ solidBandFill()

The three-pass neutral (90 deg) solid-band fill of cutcell.hpp.

Call from the block's ghost policy AFTER the exchange + non-periodic clamp, and exchange once more afterwards so the outermost ghost layer holds its owner's filled value.

Definition at line 521 of file advect_wy.hpp.

◆ setOutsideMask()

Install the OUT-OF-DOMAIN mask (vof/colour_bc.hpp::buildOutsideMask): 1 on every ghost cell outside the global domain on a non-periodic axis.

While it is installed, computeFluxes takes wyFaceFluxBc — the algebraic C_donor·a for a donor that IS boundary data — and accumulates the per-face boundary liquid volume (bcFaceVolume). Pass an empty view to remove it and return to the validated V1 path bit for bit.

The mask is a property of the BLOCK, not of the step: the caller builds it once with the block (IbmSolver::buildVofBlock) and only installs it when a VoF boundary colour is actually set, so nothing changes for a periodic or a purely-wall configuration (gate G5).

Definition at line 564 of file advect_wy.hpp.

◆ outsideMask()

Definition at line 565 of file advect_wy.hpp.

◆ hasOutsideMask()

Definition at line 566 of file advect_wy.hpp.

◆ bcFaceVolume()

double peclet::flow::vof::WyAdvector::bcFaceVolume ( int f) const
inline

Signed liquid volume that crossed domain face f (0..5 = −x,+x,−y,+y,−z,+z) since the last resetBcFaceVolume(), in cell-volume units, POSITIVE for liquid entering the domain.

Only accumulated while the outside mask is installed; the value on an axis with no domain BC is the block-boundary flux and is meaningless (the caller reports only BC faces).

This is the boundary term of the exact colour budget: WY's flux is computed ONCE per face and enters exactly one inner cell's update with one sign, so Σ C(t) − Σ C(0) = Σ_faces bcFaceVolume holds to round-off whatever the interface does — which is what WO-R gate G1 measures.

Definition at line 577 of file advect_wy.hpp.

◆ resetBcFaceVolume()

Definition at line 578 of file advect_wy.hpp.

◆ setBcFaceOwned()

void peclet::flow::vof::WyAdvector::setBcFaceOwned ( int f,
bool on )
inline

Which of the six BLOCK boundary faces are GLOBAL domain faces this block owns.

Default: none. This is not cosmetic — a rank in the middle of a decomposition has a perfectly real flux through its own block boundary, and counting it would make the ledger a sum of interior fluxes that happen to cancel pairwise instead of the boundary term of the budget. The solver sets it from bc_[f] != 0 && touchesGlobalFace(f).

Definition at line 587 of file advect_wy.hpp.

◆ resetTiming()

Definition at line 611 of file advect_wy.hpp.

◆ timing()

Definition at line 612 of file advect_wy.hpp.

◆ wallSeconds()

Definition at line 613 of file advect_wy.hpp.

◆ tick_()

double peclet::flow::vof::WyAdvector::tick_ ( ) const
inline

Definition at line 617 of file advect_wy.hpp.

◆ addT_()

void peclet::flow::vof::WyAdvector::addT_ ( double & acc,
double t0 )
inline

Definition at line 623 of file advect_wy.hpp.

◆ timedExchange()

template<class F>
void peclet::flow::vof::WyAdvector::timedExchange ( F && fn)
inline

Run fn (a ghost exchange) under the exchange accumulator.

The sibling advectors (MomentumConsistentAdvector, VofEnergyAdvector) exchange their own fields through this so the g = 3 halo cost is one number whichever driver is running.

Definition at line 633 of file advect_wy.hpp.

◆ exchangeTimed()

Definition at line 638 of file advect_wy.hpp.

◆ syncGhosts()

Bring the colour ghosts up to date.

advect() assumes valid ghosts on entry and leaves them valid on exit, so this is only needed once after initialization.

Definition at line 667 of file advect_wy.hpp.

◆ advect()

void peclet::flow::vof::WyAdvector::advect ( double dt,
long step )
inline

One Weymouth-Yue step: freeze the dilation flag, then three sweeps in the permutation selected by step.

Throws if the CFL cap is violated.

Definition at line 674 of file advect_wy.hpp.

◆ lastCfl()

double peclet::flow::vof::WyAdvector::lastCfl ( ) const
inline

Definition at line 706 of file advect_wy.hpp.

◆ lastMixedCount()

Definition at line 707 of file advect_wy.hpp.

◆ planeM()

PLIC normal component d of the current reconstruction (valid on the inner region grown by 1, for mixed cells only — wyIsMixed is the contract, exactly as wyFaceFlux reads them).

Definition at line 722 of file advect_wy.hpp.

◆ planeAlpha()

PLIC plane offset of the current reconstruction.

Definition at line 724 of file advect_wy.hpp.

◆ dilationFlag()

The frozen dilation indicator H(C^n - 1/2) of the current step (pressure cells).

Definition at line 726 of file advect_wy.hpp.

◆ faceFlux()

The geometric LIQUID volume flux of the sweep computeFluxes last ran, stored at the face's - side (so face i is the one between cells i and i + s_d).

Read by the consistent rho c_p T transport (vof/energy_advect.hpp) between computeFluxes and applySweep, exactly as MomentumConsistentAdvector reads the planes: an accessor only, nothing here changes advect().

Definition at line 732 of file advect_wy.hpp.

◆ checkCourant()

double peclet::flow::vof::WyAdvector::checkCourant ( double dt)
inline

The interface-local (or global) Courant number for this dt, all-reduced, with the Weymouth-Yue boundedness cap enforced exactly as advect() enforces it — lastCfl_ is set the same way, so a WO-K step reports the same number a WO-J step would.

The cap itself is enforceCfl, shared with advect() and the block container's batched step (host code only; the kernels are untouched).

Definition at line 740 of file advect_wy.hpp.

◆ enforceCfl()

void peclet::flow::vof::WyAdvector::enforceCfl ( double cfl,
double dt )
inline

Record cfl as this step's Courant number and enforce the Weymouth-Yue cap – the one guard advect(), checkCourant() and the block container's batched step (which measures the Courant numbers of all its blocks in one launch, vof/block_batch.hpp) share.

Weymouth's bound is INCLUSIVE (thesis eq. A.33: |a| <= 1/(2(N-1))), so a step exactly at cflLimit is admissible and only a strictly larger one aborts. NaN propagates to an abort.

Definition at line 755 of file advect_wy.hpp.

◆ noteBatchedStep()

Bookkeeping of a step the block container ran on this advector's views in its batched launches (VofBlockSet::advectBatched): the step counter advect() keeps.

lastMixedCount() is NOT updated there – the worklist count stays on the device by design (C1) – so it keeps the value of the last per-block advect().

Definition at line 771 of file advect_wy.hpp.

◆ bcFaceOwned()

bool peclet::flow::vof::WyAdvector::bcFaceOwned ( int f) const
inline

The WO-R boundary ledger, for the batched step: whether face f is a global domain face this block owns, and the per-step addition accumulateBcFaceVolume would have made.

Definition at line 774 of file advect_wy.hpp.

◆ addBcFaceVolume()

void peclet::flow::vof::WyAdvector::addBcFaceVolume ( int f,
double v )
inline

Definition at line 775 of file advect_wy.hpp.

◆ diagnostics()

Local census over the inner region.

Definition at line 778 of file advect_wy.hpp.

◆ maxCourant()

double peclet::flow::vof::WyAdvector::maxCourant ( double dth) const
inline

Max |uf| dt / h over this block's owned faces (the + face of every inner cell; the - face of the first inner cell is a neighbour's owned face, so a global max covers every face once).

Definition at line 826 of file advect_wy.hpp.

◆ maxCourantInterface()

double peclet::flow::vof::WyAdvector::maxCourantInterface ( double dth) const
inline

Max |uf| dt/h over the faces of INTERFACE-ADJACENT cells only.

A cell is interface-adjacent when its colour is not locally constant: it is mixed (wyIsMixed — the same predicate the V1 worklist compacts on), or one of its six face neighbours carries a different colour.

Why not the global max (maxCourant). Weymouth's bound is a bound on each individual FLUX, and a flux only has something to bound where boundedness can be lost. A cell whose whole 1D neighbourhood is full (or empty) is EXACTLY stationary in floating point whatever its face Courant numbers are — the algebraic flux branch and the dilation term cancel bit for bit (see the file header) — so its faces cannot make it leave [0,1] and are irrelevant to the proof. Measured in V1: on Zalesak the domain-corner faces run at 0.314 while the interface never exceeds 0.157, so a global max throttles the step by 2x for nothing (VOF_PLAN.md §6).

The predicate is a colour DIFFERENCE, not merely mixed, and that difference matters: a perfectly sharp grid-aligned interface (…1,1,0,0…) has NO mixed cell at all, so a mixed-only band would be empty and the limiter toothless on exactly the configuration the hydrostatic acid test starts from. With the difference test that face is in the band, and for a resolved PLIC interface (which always has mixed cells) the two definitions coincide.

A pure reduction over inner cells with a ±1 predicate, so it is decomposition-independent under the global max the caller applies. Returns 0 for a uniform colour field (no interface, no constraint). Reads C at ±1, so the colour ghosts must be valid on entry (advect() requires that anyway).

Definition at line 866 of file advect_wy.hpp.

◆ maxCourantInterfaceAuto()

double peclet::flow::vof::WyAdvector::maxCourantInterfaceAuto ( double dth) const
inline

The interface-local Courant number for this dt/h, using the CUT-CELL rule when geometry is attached (o_f |a_f| / max(eps_i, 0.1), cutcell.hpp rule 2) and the uncut one otherwise.

This is what advect() gates on, so a caller sizing dt sees the same number.

Definition at line 902 of file advect_wy.hpp.

◆ maxDiscreteDivergence()

double peclet::flow::vof::WyAdvector::maxDiscreteDivergence ( double dth) const
inline

Max |discrete face divergence| * dt/h over inner cells — the exact quantity the conservation floor is set by (the dilation term contributes c_i times this to the global volume budget).

Definition at line 908 of file advect_wy.hpp.

◆ requireExchange()

Definition at line 931 of file advect_wy.hpp.

◆ freezeDilationFlag()

Definition at line 936 of file advect_wy.hpp.

◆ reconstruct()

PLIC over the inner region grown by one cell in every direction: the donor of a face of an inner cell is at most one cell outside it.

Non-mixed cells are left untouched — the flux never reads their (m, alpha), which is what keeps useWorklist bit-neutral.

Definition at line 951 of file advect_wy.hpp.

◆ reconstructImpl()

Definition at line 956 of file advect_wy.hpp.

◆ computeFluxes()

void peclet::flow::vof::WyAdvector::computeFluxes ( int d,
double dth )
inline

One flux per d-face touched by an inner cell, stored at the cell on the face's - side.

Computing the face once (rather than once per adjacent cell) is what makes the flux telescope bit-exactly, in-rank and across a rank boundary alike.

Definition at line 1004 of file advect_wy.hpp.

◆ computeFluxesImpl()

void peclet::flow::vof::WyAdvector::computeFluxesImpl ( int d,
double dth )
inline

Definition at line 1009 of file advect_wy.hpp.

◆ accumulateBcFaceVolume()

Sum the just-computed d-fluxes on the two block-boundary d-faces into bcVol_, signed so that POSITIVE means liquid entering the domain.

Storage convention (computeFluxes): the flux of a d-face is stored at the cell on the face's − side, so the low boundary face of the block sits at d-index g-1 and the high one at g + n_d - 1. Two reductions per sweep, and only on the WO-R path.

Definition at line 1053 of file advect_wy.hpp.

◆ applySweep()

void peclet::flow::vof::WyAdvector::applySweep ( int d,
double dth )
inline

C_i += (F_{i-} - F_{i+}) + c_i (a_{i+} - a_{i-}), over inner cells.

Definition at line 1082 of file advect_wy.hpp.

◆ applySweepImpl()

void peclet::flow::vof::WyAdvector::applySweepImpl ( int d,
double dth )
inline

Definition at line 1088 of file advect_wy.hpp.

◆ computeFluxesCut()

void peclet::flow::vof::WyAdvector::computeFluxesCut ( int d,
double dth )
inline

F_f = o_f * wyFaceFlux(a_f, ...).

One number per face, stored at the face's - side exactly as the uncut kernel stores it, so the flux sum telescopes bit-exactly whatever o is.

Definition at line 1118 of file advect_wy.hpp.

◆ applySweepCut()

void peclet::flow::vof::WyAdvector::applySweepCut ( int d,
double dth )
inline

eps_i C_i += (F_- - F_+) + c_i (o_+ a_+ - o_- a_-), then divide by eps_eff.

Solid cells (kVofSolid) are skipped entirely — their colour comes from solidBandFill().

Definition at line 1183 of file advect_wy.hpp.

◆ clipCutCells()

Rule 3: clip C into [0,1] in CUT cells only (eps_eff < 1), accumulating the liquid volume the clip moved.

A diagnostic first — if it is not negligible the flux approximation, not the clip, is what needs fixing.

Definition at line 1212 of file advect_wy.hpp.

◆ clipCutCellsImpl()

Definition at line 1217 of file advect_wy.hpp.

◆ maxCourantInterfaceCut()

double peclet::flow::vof::WyAdvector::maxCourantInterfaceCut ( double dth) const
inline

Rule 2: the interface-local Courant number in cut cells is o_f |a_f| / max(eps_i, 0.1).

Same interface band predicate as maxCourantInterface (a colour DIFFERENCE, not merely "mixed"), and solid cells are outside it by construction.

Definition at line 1249 of file advect_wy.hpp.

◆ solidBandFillPass()

One pass of the neutral solid-band fill.

Writes solid cells at ghost depth <= 3-k, reading only fluid cells and cells filled in an EARLIER pass — a cell being written in THIS pass still carries kVofFillNone, so it is never read and the pass is race-free without a second buffer.

Definition at line 1288 of file advect_wy.hpp.

◆ solidBandFillPassWetting()

Pass 1 of the band fill with the theta-consistent rule (WO-S).

Same write set and the same depth budget as solidBandFillPass(1); only the VALUE differs, and a cell for which the theta rule has no data (no wall normal, no fluid cell along it, no usable fluid-only normal) falls back to the neutral mean, so the pass is never worse-defined than WO-Q's.

Definition at line 1331 of file advect_wy.hpp.

◆ cutDiagnostics()

The cut-cell half of diagnostics() (zero-cost when no geometry is attached).

Definition at line 1454 of file advect_wy.hpp.

Member Data Documentation

◆ cutFluxClamp

Weymouth's admissible-interval clamp on the openness-weighted flux (cutcell.hpp vofCutFluxClamp).

ON by default; the ablation measures what the whole-cell-PLIC-times-open- area approximation costs in boundedness and hence in clipped volume.

Definition at line 329 of file advect_wy.hpp.

◆ metric

Which VofWettingPivot anchors the theta-plane (a measured ablation; see wetting.hpp).

The anisotropic cell metric (Phase 3, flow/doc/anisotropic_vof.md §6). {1,1,1} — the default and every isotropic run — reproduces the pre-Phase-3 arithmetic bit for bit. Solver::pushVofMetric() sets it. NOTE h_ above stays 1: the Weymouth-Yue sweeps run on the unit lattice and their Courant number v dt' IS the physical u dt/h_a, per axis (PHYSICAL_UNITS_PLAN deviation 1). Only the WETTING band fill, which rotates a normal and walks along a physical direction, reads this metric.

Definition at line 416 of file advect_wy.hpp.

◆ wettingPivot

Definition at line 417 of file advect_wy.hpp.

◆ wettingTangentEps

Below |sin(theta_apparent)| = wettingTangentEps the interface is parallel to the wall and no rotation is defined.

Definition at line 420 of file advect_wy.hpp.

◆ wettingPureEps

A donor with C <= wettingPureEps or >= 1 - wettingPureEps is pure phase: the band gets the plain continuation C_s = C_f (there is no interface to make an angle with).

Definition at line 423 of file advect_wy.hpp.

◆ exchange

Refresh EVERY ghost layer of the given cell field (MPI exchange + domain BC fill). Required.

Definition at line 550 of file advect_wy.hpp.

◆ globalMax

std::function<double(double)> peclet::flow::vof::WyAdvector::globalMax

All-reduce max across ranks; identity when unset (single block).

Definition at line 552 of file advect_wy.hpp.

◆ timingOn

Definition at line 609 of file advect_wy.hpp.

◆ tm

◆ useWorklist

Compaction of the reconstruction pass onto the mixed cells.

Pure optimization — switching it off must reproduce the same field bit for bit (gated in tests/kokkos/test_vof_advect.cpp).

Definition at line 644 of file advect_wy.hpp.

◆ cflLimit

Abort threshold on max |uf| dt / h.

Defaults to Weymouth's proven 3D boundedness bound 1/(2(N-1)) = 0.25 (thesis eq. A.33); the familiar 0.5 is the 2D value. Raise it only deliberately (2D work, or probing the gap) — see the file header.

Definition at line 648 of file advect_wy.hpp.

◆ interfaceLocalCfl

Take the CFL over INTERFACE-ADJACENT cells only (mixed cells and their face neighbours) instead of over every owned face — see maxCourantInterface().

Default OFF so the V1 standalone battery is byte-identical; IbmSolver turns it on (WO-J item 4).

Definition at line 652 of file advect_wy.hpp.

◆ debugRecomputeDilation

DIAGNOSTIC ONLY — recompute the dilation flag before every sweep instead of freezing it once.

This is the #1 documented trap of the method, kept switchable so the damage is a measured number rather than folklore (tests/kokkos/test_vof_advect.cpp gate G). Never enable it in production: it breaks the telescoping that gives exact conservation.

Definition at line 657 of file advect_wy.hpp.

◆ wispEps

WO-R2 item 4 — the wisp tolerance on the mixed-cell predicate (wyIsMixed(c, wispEps)), used by the reconstruction pass, every flux branch and the interface Courant band.

Default 0 = V1 verbatim, bit for bit; IbmSolver::enableVof sets it to 1e-8. See wyIsMixed(c, eps) for the drained-domain NaN it exists to stop, and maxCourantInterface for the second symptom (the band creeping along the interface's round-off wake).

Definition at line 663 of file advect_wy.hpp.


The documentation for this class was generated from the following file: