flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
peclet::flow::Solver< Grid > Class Template Reference

#include <flow_ibm.hpp>

Inheritance diagram for peclet::flow::Solver< Grid >:
BoundSolver< Grid >

Classes

struct  ContactAngleDiagnostics
 
struct  CsfDiagnostics
 
struct  MarchState
 
struct  OutflowBackflow
 OUTFLOW REVERSAL CENSUS – the regime in which the zero-gradient (do-nothing) outflow is only conditionally energy-stable. More...
 
struct  PhaseChangeBudget
 WO-P3f — the ENERGY BUDGET of the phase-change energy solve. More...
 
struct  PhaseChangeDiagnostics
 
struct  ScalarCutBudget
 diagnostics.scalar_budget (§8.2), physical; collective under MPI. More...
 
struct  ScalarCutFacets
 diagnostics.scalar_facets (§8.2): this rank's facets, physical; per facet 3 values for the centroid and the normal. More...
 
struct  ScalarFaceFlux
 The ONE predicate for the cut-cell scalar's advective face flux (doc/scalar_ibm_design.md §6.1, D5): the face field the projection in force made discretely divergence-free and the openness ITS divergence kernel weights it with, so that F_a/V = open * vel through the low a-face of cell i. More...
 
struct  SceneMap
 The map between the solver's INDEX coordinates and the coordinate system the analytic scene is written in. More...
 
struct  UnitScales
 
struct  VofOverlapCensus
 
struct  VofStepLimits
 
struct  VofTiming
 

Public Types

using FV = Kokkos::View< MReal *, CCMem >
 

Public Member Functions

 Solver (int nx, int ny, int nz)
 
SceneMap sceneMap () const
 
 Solver (int nx, int ny, int nz, const std::array< double, 3 > &extent, const std::array< double, 3 > &origin, const std::array< long, 3 > &globalCells)
 Physical-domain constructor (plan §3.3).
 
void setPhysicalDomain (const std::array< double, 3 > &extent, const std::array< double, 3 > &origin, const std::array< long, 3 > &globalCells)
 Arm the physical domain.
 
void requireIsotropic (const char *what) const
 Phase 2 §7 — refuse an ANISOTROPIC domain in a consumer this phase does not carry.
 
bool hasPhysicalDomain () const
 
const UnitScales & unitScales () const
 
std::array< double, 3 > spacing () const
 Cell size per axis (equal on every axis unless the Phase 2 anisotropic path is armed – see unitScales().aniso).
 
std::array< double, 3 > domainOrigin () const
 Physical lower corner of the GLOBAL inner grid.
 
std::array< double, 3 > domainExtent () const
 Physical extent of the GLOBAL inner grid (cell counts without a physical domain).
 
std::array< long, 3 > globalCells () const
 The GLOBAL cell counts (this rank's block single-rank).
 
std::vector< double > cellCentres (int axis) const
 Physical cell-centre coordinates of THIS rank's inner block along axis (nx/ny/nz values).
 
void refreshUnitDerived ()
 Re-derive every internal (index-unit) quantity from the stored physical inputs.
 
void pushVofMetric ()
 Hand the anisotropic cell metric to every VoF driver that exists (Phase 3).
 
void allocateBlock (int nx, int ny, int nz)
 
void setRho (double r)
 Fluid density, in the caller's units.
 
void setMu (double m)
 Dynamic viscosity, in the caller's units.
 
void setDt (double d)
 
void setBodyForce (double fx, double fy, double fz)
 Body force per unit volume, in the caller's units (e.g. a mean pressure gradient, or rho*g).
 
void setSuperficialVelocity (bool on, int axis, double velocity)
 Hold the SUPERFICIAL velocity along a periodic axis: at the end of every step() one uniform shift is added to every inner face velocity of component axis so that its volume mean equals velocity (the caller's units).
 
double lastSuperficialVelocityShift () const
 The shift the last step() applied (caller's velocity units; 0 when off).
 
void setVelocityIterations (int it)
 
void setVelocityTolerance (double rtol, int minIters)
 
long lastMomentumSweeps () const
 
void setVelocityResidualTolerance (double rtol)
 
void setVelocityMultigridAuto (long cellsPerRank, long minGlobalCells=-1, int minBlockExtent=-1)
 
void setVelocityChebyshev (bool on, int maxit=400)
 
void setVelocitySolverAuto ()
 
bool velocityChebyshevActive () const
 
void setVelocityMgChebyshev (bool on, int degree=0, double eig_ratio=10.0)
 
bool velocityMgChebyshev () const
 
double velocityResidualTolerance () const
 
double lastMomentumResidual () const
 
void setPressureMeanRemoval (bool all)
 
void setPressureIterations (int it)
 
void setAdvection (bool on)
 
void setAdvectionScheme (int s)
 
void setImplicitAdvection (bool on)
 
void setOuterIterations (int iters)
 
void setOuterTolerance (double tol)
 
long lastOuterIterations () const
 
void setVelocityMultigrid (bool on, int levels, int vcycles)
 
void throwVelocityMgVariableMu (const char *who) const
 
bool velocityMultigridActive () const
 
void setPressureBottomMode (int mode)
 
void setPressureBottomSolver (int engine)
 
void setPressureTelescope (bool on)
 
bool pressureTelescope () const
 
void setPressureTelescopeForceLevel (int level)
 
int pressureTelescopeCount () const
 
void setPressureGraphAmg (bool on)
 
void setPressureLevels (int levels)
 
void setBackflowStab (double beta)
 
void setDeferredCorrection (bool on)
 
void setPressureChebyshev (bool on, int maxit, double rtol)
 
void setPressurePcg (bool on, int maxit, double rtol)
 
void setPressureFcg (bool on, int maxit, double rtol)
 
void setGhostProjection (bool on, int matrixOrder=2, int rhsOrder=2)
 
void setExactCrossings (const std::vector< double > &t)
 
void setOpennessOverride (const std::vector< double > &ox, const std::vector< double > &oy, const std::vector< double > &oz)
 
void setIncrementalPressure (bool on)
 
void setBalancedForceProjection (bool enabled)
 
bool balancedForceProjection () const
 
long lastBalancedForceIterations () const
 
bool lastBalancedForceFailed () const
 
long balancedForceFailures () const
 
void setPressureWarmstart (bool on)
 
void setFaceInterp (int mode)
 
int faceInterp () const
 
void setCollocatedScheme (const std::string &name)
 
void setRotationalPressure (bool on)
 
void setRotationalWeight (double w)
 
void setRotationalWallWeight (double w0)
 
void setApertureOrder (int order)
 
int apertureOrder () const
 
void setAdvectionWallVelocity (bool on)
 A0 — wall velocity (not zeros) in the advection inputs' masked rows. DEFAULT true.
 
bool advectionWallVelocity () const
 
void setUfAdvection (bool on)
 Advect the collocated momentum with the PROJECTED, divergence-free MAC face field uf_/vf_/wf_ (DEFAULT true) rather than the un-projected cell->face average 1/2(u_i+u_j).
 
bool ufAdvection () const
 
void setCommAvoiding (int mask)
 Communication-avoiding red-black smoothing: kCaMomentum | kCaMg.
 
int commAvoiding () const
 
void setMultigridAspectThreshold (double theta)
 The anisotropic-coarsening aspect threshold theta shared by the pressure and velocity multigrids (doc/anisotropic_metric.md §5.1).
 
double multigridAspectThreshold () const
 
void setPressureStrict (bool on)
 Throw instead of reporting when the pressure preconditioner returns a non-finite correction (ISSUES sweep item 6).
 
bool pressureStrict () const
 
void setPressureCoarseGhost (bool on)
 Neumann (zero-gradient) coarse ghost on wall/inflow faces before the pressure MG's prolongation — the WO-H symmetry repair.
 
bool pressureCoarseGhost () const
 
void setPressureBottomExtent (int cells)
 The set_pressure_bottom("auto") criterion: agglomerate once the coarsest GLOBAL grid exceeds this many cells on any axis.
 
int pressureBottomExtent () const
 
void setDecomposition (int levels, double maxImbalance=1.05)
 How the shared level-0 MPI decomposition is built.
 
int decompositionLevels () const
 
double decompositionMaxImbalance () const
 
void setFluidOnlyConstraint (int mode)
 
void setRotationalFilter (bool on, double eps=0.05)
 
void seedFaceFieldFromCells ()
 
void uploadVelocity (const std::vector< double > &uu, const std::vector< double > &vv, const std::vector< double > &ww)
 Upload an initial velocity field in the caller's PHYSICAL units (converted per component to the index velocity the kernels carry; the conversion is the identity in cell units).
 
void setDomainBc (int face, int type, double vx, double vy, double vz)
 
void setDomainBcProfile (int face, const std::vector< double > &prof, int nb, int nc)
 
void resampleBcProfile (int face)
 
void setPressureGeometry (const std::vector< double > &sdfInner)
 
void setScene (const std::vector< int > &nodeInts, const std::vector< double > &nodeReals, const std::vector< int > &instInts, const std::vector< double > &instReals, bool periodic=false)
 Install an analytic scene from core's flat node/instance encoding (peclet/core/geom/scene_builder.hpp: 3 ints + 16 reals per node, 2 ints + 17 reals per instance), held as a core SceneQueryDevice: mode selection (sphere-union fast path vs general tree walk), candidate-grid acceleration and min-image periodicity all live in CORE now — flow briefly hand-rolled the decode+upload+eval, which was the wrong layer for it.
 
std::array< double, 3 > instanceCenter (int i) const
 The resolved centre of rotation of instance i and whether it is pinned (explicit) or follows the body's translation.
 
bool instanceCenterPinned (int i) const
 
void setInstanceMotion (int i, const std::array< double, 3 > &lin, const std::array< double, 3 > &ang, const double *center=nullptr)
 Rigid-body motion of one scene instance (Layer 3 rung 2).
 
void setInstanceTransform (int i, const std::array< double, 3 > &translation, const std::array< double, 4 > &quat)
 Move one instance (Layer 3 rung 4).
 
void rebuildGeometry ()
 Re-derive ALL geometry from the current instance transforms (Layer 3 rung 4): rebuild the accelerated scene query, re-sample the SDF, rebuild the cut-cell overlay / apertures / pressure operator, and re-derive the exact crossings if they were in use.
 
void seedFreshCells (CCField mOld[3])
 FRESH CELLS: the points a moving body has just uncovered.
 
void setFreshCellSeed (bool on)
 Fresh-cell policy for moving geometry.
 
bool freshCellSeed () const
 
void refreshWallVelocity ()
 Re-derive ONLY the wall-velocity fields and the momentum operator that folds them in.
 
bool hasMovingInstance () const
 True when at least one instance carries a nonzero velocity – i.e.
 
int sceneInstanceCount () const
 
void setWallFluxDivergence (bool on)
 Rung 3 on/off.
 
bool wallFluxDivergence () const
 
bool hasScene () const
 
std::vector< int > getCutOwner () const
 Per-inner-cell owning instance (Layer 3 rung 1), x-fastest, -1 where no scene has been sampled yet.
 
void setSolidFromScene (bool cutcellPressure)
 Sample the scene onto this rank's inner grid and install it as the solid, entirely on device – no nx*ny*nz float64 host round trip, and correct on every rank.
 
void checkMovingInstancesAreCut ()
 A MOVING instance whose surface produces no fractional face aperture has no path for its wall velocity into the momentum operator: the no-slip datum enters ONLY through the cut-cell fold, so a box face sitting exactly on a grid plane (or a body smaller than a cell) behaves as a STATIONARY wall and set_instance_motion is silently inert – the shear-driving plates of the Jeffery-orbit page at y = 16.0 produced max|u| = 0 (peclet-examples ISSUES.md).
 
std::vector< long > movingInstanceCutCells () const
 Per instance: cut rows of the momentum operator (all three components) at inner points this rank owns for it, recounted by set_solid_from_scene / rebuild_geometry when any instance moves (global under MPI; empty when nothing moves).
 
std::vector< long > movingInstanceDegeneratePoints () const
 Per instance: staggered points where the sampled sdf is exactly zero (see the warning).
 
long periodicImageOverlapCells () const
 Cells on this rank whose solid/fluid sign was set by a periodic IMAGE of an instance wider than the box (see setSolidFromScene); 0 when no instance is that wide or the images agree.
 
void setExactCrossingsFromScene ()
 EXACT wall crossings straight from the scene, on device, on every rank – the in-solver replacement for set_exact_crossings + scripts/exact_apertures_spheres.py.
 
void setSolid (const std::vector< double > &sdfInner, bool cutcellPressure)
 Host entry point: upload the inner SDF once and delegate.
 
void buildVelocityOverlays (bool resetU)
 Build the three per-component Robust-Scaled cut-cell overlays + solid masks from the CURRENT sdf_ (extracted verbatim from setSolidDevice so that a wall-slip change can rebuild the closure without re-running the whole geometry setup).
 
void extendSdfDomainGhosts (CCField f)
 Repair a cell-centred geometry field's ghost band on every rank-owned NON-PERIODIC domain face, which the periodic/halo fill filled from the opposite side of the domain: type 4 (free-slip) takes the mirror the symmetry plane asserts, types 1/2/3 (wall / inflow / outflow) the constant normal extension.
 
void setSolidDevice (CCField din, bool cutcellPressure)
 Device entry point (Layer 2): the inner SDF is ALREADY on device, so geometry never round-trips through the host.
 
void setSolidSelectScheme ()
 
void setSolidUploadSdf (CCField din)
 
void setSolidBuildOverlaysAndStencils ()
 
void setSolidVelocityMgAuto ()
 
void initVelocityMg ()
 
void setSolidBuildOpenness ()
 
void checkSealedInflowCells ()
 Reject geometry that seals fluid cells against a prescribed INFLOW face off from the rest of the domain – an inconsistent pressure row that no solve can satisfy.
 
void bridgeOutflowFacePlanes ()
 Bridge the HIGH-side boundary-face openness plane of every rank-owned outflow axis from the g=2 block to the g=1 MG block (copyInner reaches only the inner cells, and that plane is a ghost index).
 
void setSolidStarOverlay ()
 
void setSolidGhostProjectionOverlay (CCField din)
 
void setSolidInitPressureMg ()
 
bool geometryBuilt () const
 
void requireNoGeometry (const char *who) const
 
void step ()
 
OutflowBackflow outflowBackflow ()
 
std::vector< double > getVelocity (int c)
 
void setVelocity (int c, const std::vector< double > &v)
 Write a component's inner velocity from a host vector (x-fastest, inner region) and re-impose the solid mask.
 
std::vector< double > getFaceVelocity (int c)
 
std::vector< double > getOpenness (int c)
 
std::vector< double > getMomentumDiagonal (int c)
 
std::vector< double > getOpennessProj (int c)
 
std::vector< double > getPressure ()
 
double maxOpenDivergenceProjected ()
 
double maxOpenDivergenceProjectedInternal ()
 The same diagnostic in INDEX units (per tRef), which is what the solver's own guards read.
 
double maxOpenDivergence ()
 
double maxOpenDivergenceInternal ()
 The same diagnostic in INDEX units (per tRef), which is what the solver's own guards read.
 
double maxPorousResidual ()
 
long lastPressureIterations () const
 
long numPressureChebyshevRestarts () const
 
std::vector< std::array< int, 3 > > pressureMgLevelRatios () const
 
bool pressureSolveFailed () const
 
MarchState marchState ()
 
double lastStepSeconds () const
 
double lastPredictorSeconds () const
 
double lastMomentumSeconds () const
 
double lastProjectionSeconds () const
 
void setVofTiming (bool on)
 
bool vofTiming () const
 
void resetVofTiming ()
 
const VofTiming & vofTimingReport () const
 
const vof::WyAdvector::Timing & vofKernelTiming () const
 
const vof::VofCurvature::Timing & vofCurvatureTiming () const
 
void setVofCurvatureWorklist (bool on)
 VofCurvature::useWorklist — run the height-function cascade and the PV fallback over a COMPACTED list of the interfacial cells instead of over the whole inner region.
 
bool vofCurvatureWorklist () const
 
double vofTimingStepSeconds () const
 
double vofTimingPredictorSeconds () const
 
double vofTimingMomentumSeconds () const
 
double vofTimingProjectionSeconds () const
 
void setVofWorklist (bool on)
 WyAdvector::useWorklist — the compaction of the PLIC reconstruction pass onto the mixed cells.
 
bool vofWorklist () const
 
double lastPressureAllreduceSeconds () const
 
long lastPressureAllreduceCount () const
 
int nx () const
 
int ny () const
 
int nz () const
 
bool implicitAdv () const
 
bool bcStencilPath () const
 
bool mixedVelocityMg () const
 
void fillPropGhosts (CCField f, bool edges=false)
 
void fillMuGhosts ()
 
void fillCellForceGhosts ()
 
void fillDragBetaGhosts ()
 
void fillPorousEpsGhosts ()
 
void buildVofBlock ()
 
int vofWetWallMask () const
 
void buildVofGeometry ()
 
void applyDomainWallGeometry (int mask)
 
void imposeDomainWallKind (int mask)
 
void vofExtendWallBand (CCField f, int mask)
 
void zeroSolidColour ()
 
bool vofAxisPeriodic (int a) const
 
void vofFillGhosts (CCField f)
 
void vofExchangeRaw (CCField f)
 
I3 vofGlobalSize () const
 
I3 vofOrigin () const
 
void bridgeVelocityToVof ()
 
std::vector< vof::VofBox > vofBlockRankBoxes (int size) const
 
void bindVofBlockPatch ()
 
void harvestVofBlockUnion ()
 
void bridgeColourToVof ()
 
long strideOf (int c) const
 
bool effVarRho () const
 
CCField effRhoField ()
 
bool colocatedFaceForce () const
 
void collocatedV8AutoFallback (const char *why)
 
void ensureFaceAcc ()
 
void requireCollocatedFaceForceScope (const char *who)
 
bool balancedForceActive () const
 
bool hasOpenDomainFace () const
 
void requireBalancedForceScope (const char *who, bool atStep) const
 
void buildBalancedFaceForce (int c)
 
void registerBalancedForceState ()
 
void applyBalancedForceProjection ()
 
long solveBalancedForceSystem (double bref, double r0)
 
void updateEpsRho ()
 
VarFaceProps makeFaceProps (int c)
 
void buildSceneQuery ()
 
void refreshMotionFlag ()
 
void uploadMotion ()
 
peclet::core::geom::InstanceMotionView< double > motionView () const
 
void buildWallVelocity ()
 
void exchangeExtRaw (CCField f)
 Raw ghost fill of an extended-block field: the rank halo exchange under MPI, the periodic wrap single-rank.
 
void addWallFluxDivergence (CCField d)
 
void scaleForceTorque (std::vector< double > &out, std::size_t m) const
 Hydrodynamic force and torque on each scene instance (Layer 4 rung 2) – the resolved CFD-DEM feedback.
 
std::vector< double > hydroForceTorque ()
 PHASE 2 (anisotropic cells), doc/anisotropic_metric.md §4.4 — ADMITTED since commit C4.
 
std::vector< double > hydroForceTorqueReaction ()
 Hydrodynamic force and torque per instance from the DISCRETE REACTION (route (b) of the design note's OPEN FOR REVIEW 1) – the recommended source of the resolved CFD-DEM feedback.
 
std::array< long, 3 > fluidMomentumCells ()
 The number of unmasked (fluid) staggered momentum cells per component – the exact discrete datum the reaction identity is stated against: at steady state, sum_bodies F_c = f_c * N_c.
 
std::vector< double > reactionBudgetTerms ()
 R0 DECOMPOSITION PROBE.
 
std::array< double, 3 > wallAreaProbe ()
 A_wall EXACTNESS PROBE (diagnostic for the Layer-4 force integral).
 
double wallFluxImbalance ()
 Net wall flux this rank injects, sum over inner cells of u_w .
 
CCConst wallVelView (int c) const
 
void rebuildStencils ()
 
void copyInner (CCField dst, C3 de, int dg, CCConst src, C3 se, int sg)
 
void copyBlockShifted (CCField dst, C3 de, CCConst src, C3 se, int off)
 
void fillGhosts (CCField f)
 
void fillGhostsFaces (CCField f)
 
void fillAxis (CCField f, int axis)
 
void fillPeriodicAxes (CCField f, int axes)
 
void fillDomainPeriodic (CCField f)
 
void computeDivAdv ()
 
bool advWallInputs () const
 R0 helper: allocate (once) and arm the per-component advective-term stash the reaction-force budget consumes.
 
void buildAdvInputs ()
 
CCConst advVelView (int c) const
 The velocity view the advection operators must read for component c: the wall-corrected scratch while an instance is moving, the live field (byte-identical) otherwise.
 
CCConst advFaceView (int c) const
 Component c of the collocated MAC face field (uf_/vf_/wf_), flow's low-face convention: entry i is the velocity at the -axis face of cell i.
 
CCConst openFaceView (int c) const
 Component c of the face field AS THE ADVECTION AND THE DIVERGENCE DIAGNOSTIC MUST READ IT: advFaceView(c) everywhere except an OPEN (outflow) domain face, where the zero-gradient extrapolation of the interior face replaces the projection's mass-balance closure (buildOpenFaceField).
 
void buildOpenFaceField ()
 Build ufOpen_ = the face field with each open (outflow) domain face overwritten by its zero-gradient extrapolation.
 
bool ufAdvVelocity () const
 Are the advection operators reading the projected face field this step? Collocated grid, setUfAdvection on, and a face field actually built.
 
bool ensureAdvStash (int c, bool adv)
 
void buildRhs (int c)
 
void buildRhsForced (int c)
 
void buildRhsVar (int c)
 
void buildRhsVarMom (int c)
 
void buildRhsColoVar (int c)
 
void addCsfRhs (int c, CCField dst, bool rowScaled, bool faceRange=false)
 
void addCsfRhsCellInterp (int c, CCField dst, bool rowScaled, bool faceRange=false)
 
void addCsfRhsBlocks (int c)
 
CsfDiagnostics csfDiagnostics ()
 
void buildAdvStencil (int c)
 
void buildAdvStencilVar (int c)
 
void applyBackflowStab (int c)
 
double maxAbsDiffInner (CCConst a, CCConst b)
 
template<class Fill , class Color , class ColorDu >
void velSweepLoop (Fill &&fill, Color &&sweepColor, ColorDu &&sweepColorDu, std::function< double()> resid=nullptr, double bnorm=0.0)
 
VelocityMG::Comm vmgComm () const
 
double finishResidual (int c)
 
std::function< double()> stencilResidual (int c, bool exchange=false)
 
std::function< double()> constCoeffResidual (int c, double bx, double by, double bz, double Ac)
 
double stencilBnorm (int c)
 
void smoothComp (int c)
 
void chebSolveComp (int c)
 
void pressureBcGhost ()
 
void fillVelGhosts (int comp, int fold)
 
void applyVelocityBcComp (int comp, int fold, bool doOutflow)
 
void fillVelGhostsTo (CCField f, int comp, int fold, bool doOutflow=true)
 
void applyVelocityBcCompTo (CCField f, int comp, int fold, bool doOutflow)
 
void applyVelocityBcFace (CCField f, int comp, int a, int s, int fold, bool doOutflow)
 
bool bcVelFacePair (int a) const
 
void applyVelocityBcAll (int fold, bool doOutflow)
 
void setupBcDiffusion ()
 
void filterCellField (CCField f, int axis)
 
void project ()
 
void projectAssembleDivergence ()
 
void projectBuildCoefficients ()
 
void projectSolve ()
 
long solvePressureSystem (CCField rhs1, CCField x1)
 
void constraintDivergence (CCConst fx, CCConst fy, CCConst fz, CCField out)
 
void projectCorrectVelocities ()
 
void projectPressureUpdate ()
 
void maskVelocity (int c)
 
double minMuInner ()
 
double reduceMaxAbsInner (CCConst f)
 
std::vector< double > gatherInner (CCField fld)
 
void scatterInner (CCField fld, const std::vector< double > &in)
 
CCField addField (const std::string &name)
 
bool hasField (const std::string &name) const
 
CCField fieldView (const std::string &name)
 
std::vector< std::string > fieldNames () const
 
void exchangeField (const std::string &name)
 
void exchangeFieldAdd (const std::string &name)
 
std::vector< double > getField (const std::string &name)
 
void setField (const std::string &name, const std::vector< double > &v)
 
std::array< int, 3 > blockShape () const
 
int ghostWidth () const
 
std::array< int, 3 > globalResolution () const
 
std::array< int, 3 > blockOrigin () const
 
void addScalar (const std::string &name, double D, int scheme, int iters, bool cutcell=false)
 
bool hasScalar (const std::string &name) const
 
void setScalarBc (const std::string &name, int face, int type, double value)
 
void advanceScalars ()
 
void invalidateScalarCutGeometry ()
 
void ensureScalarCutGeometry ()
 
const scg::ScalarCutGeometry & scalarCutGeometry ()
 
std::vector< double > scalarGeometryField (int which)
 
scg::ScalarCutCensus scalarCutCensus ()
 
bool isCutcellScalar (const std::string &name) const
 
void setScalarWall (const std::string &name, int type, double value, double coefficient, int instance)
 
void setScalarSolid (const std::string &name, double D, double capacity, double partition, double contactResistance, int instance)
 
std::vector< double > getScalarSolid (const std::string &name)
 
std::vector< double > scalarSolidGeometryField (const std::string &name, int which)
 
void setScalarSource (const std::string &name, double S)
 
void setScalarSourceField (const std::string &name, const std::vector< double > &S)
 
void setScalarTolerance (const std::string &name, double rtol)
 
void setScalarMaxIterations (const std::string &name, int maxit)
 
void setScalarMeanGradient (const std::string &name, const std::array< double, 3 > &G)
 
std::array< double, 3 > scalarMeanFlux (const std::string &name)
 
sco::MeanGradPosition scalarMeanGradPosition (const double Gphys[3]) const
 
void setScalarBcProfile (const std::string &name, int face, const std::vector< double > &prof, int n1, int n2)
 
void solveScalarSteady (const std::string &name)
 
int scalarNumBodies () const
 
std::vector< double > scalarWallFlux (const std::string &name)
 
ScalarCutBudget scalarBudget (const std::string &name)
 
ScalarCutFacets scalarFacets (const std::string &name)
 
ScalarField & cutcellScalar (const std::string &name, const char *who)
 
void advanceScalarCutCell (ScalarField &sc)
 
void scalarCutRefusals (const ScalarField &sc) const
 
void scalarCutAssembleSolve (ScalarField &sc, bool steady)
 
void scalarCutWarnings (ScalarField &sc)
 
bool scalarRootRank () const
 rank 0 (or not distributed): the one that prints a warning
 
void scalarCutMatvec (ScalarField &sc, CCField y, CCField x)
 
void scalarCutMatvecTwo (ScalarField &sc, CCField yf, CCField ys, CCField xf, CCField xs)
 
void ensureScalarSolidRecord (ScalarField &sc, const std::vector< char > &conj)
 
sco::MaterialTable scalarMaterialTable (ScalarField &sc, std::vector< char > &conj)
 
ScalarFaceFlux scalarFaceFlux (int a) const
 
void scalarCaptureOpenFaceFlux ()
 
void scalarCutAdvection (ScalarField &sc, bool steady)
 
void applySuperficialVelocity ()
 
void superficialVelocityPrecheck () const
 
void enableVof ()
 
void setVofWispEps (double eps)
 WO-R2 item 4 — the wisp threshold on the advector's mixed-cell predicate and on the interface Courant band.
 
double vofWispEps () const
 
bool vofEnabled () const
 
void setVof (const std::vector< double > &c)
 
std::vector< double > getVof ()
 
vof::WyAdvector::Diagnostics vofDiagnostics ()
 
double vofSolidColourSum ()
 
double vofMaxCourant ()
 
double vofLastCourant () const
 
void setVofCflLimit (double v)
 
double vofCflLimit () const
 
void requireVofGeometry (const char *who)
 
bool vofHasGeometry () const
 
void setVofCutFluxClamp (bool on)
 
bool vofCutFluxClamp () const
 
void setVofSolidColourZero (bool on)
 
bool vofSolidColourZero () const
 
std::vector< double > getVofFilledColour ()
 
std::vector< double > getVofGeometry (int which)
 
void setContactAngle (double thetaDeg)
 
void requireWettingWall () const
 
void setContactAngleField (const std::vector< double > &thetaDeg)
 
bool contactAngleSet () const
 
double contactAngle () const
 
void setContactAnglePivot (int mode)
 
int contactAnglePivot () const
 
void setContactAngleDynamic (double thetaEDeg, double slipCells, double muLiquid, double sigma=0.0)
 
void setWallSlipLength (double lambdaCells)
 WO-V6b – the VELOCITY half of the dynamic contact line.
 
double wallSlipLength () const
 The Navier slip length in the caller's units (0 = no-slip).
 
std::array< int, 3 > wallSlipSandwichCells () const
 Cut-cell axes at which a one-cell fluid gap kept the no-slip closure (per component).
 
void setContactAngleHysteresis (double thetaADeg, double thetaRDeg)
 
void setContactAngleDynamicOff ()
 
bool contactAngleDynamic () const
 
bool contactAngleHysteresis () const
 
double contactAngleSlip () const
 
void setContactAngleSmoothing (bool on)
 
void setContactAngleClamp (double loDeg, double hiDeg)
 
double effectiveContactSigma () const
 
std::vector< double > getVofDynamicField (int which)
 
ContactAngleDiagnostics contactAngleDiagnostics ()
 
void applyContactAngle ()
 
void buildVofCellVelocity ()
 
const vof::WyAdvector & vofAdvector () const
 
void setVofStepParity (long n)
 
long vofStepParity () const
 
void advectVofKinematic (double dtPhysArg)
 dt is in the caller's time unit.
 
void enableVofBlocks (const std::vector< std::array< double, 4 > > &seeds)
 
void prepareVofBlocks ()
 
void finishVofBlocks ()
 
bool vofBlocksEnabled () const
 
void disableVofBlocks ()
 
void advectVofBlocks (double dtPhysArg, bool requireSolenoidal=true)
 dt is in the caller's time unit.
 
std::vector< vof::VofBlockStats > vofBlockStats () const
 
double vofBlockImbalance () const
 
void vofBlockCensus (std::vector< long > &masters, std::vector< long > &cells) const
 
void setVofBlockAssign (int mode, long every)
 
int vofBlockAssign () const
 
double vofBlockImbalanceOf (int mode) const
 
void setVofBlockDeviceStaging (bool on)
 
void setVofBlockPool (bool on)
 
std::array< long, 2 > vofBlockPoolStats () const
 
void enableVofBlocksFromField (const std::vector< std::array< int, 6 > > &boxes)
 
std::vector< double > vofBlockColour (long id)
 
std::vector< double > vofBlockKappa (long id)
 
const vof::VofBlockSet * vofBlockSet () const
 The block container itself, read-only (tests: the metric and tunables its cascades carry).
 
void enableVofBlocksFromColours (const std::vector< std::array< int, 6 > > &boxes, const std::vector< std::vector< double > > &colours)
 
void enableVofBlockCsf ()
 
void computeVofBlockCsf ()
 
VofOverlapCensus vofBlockOverlapCensus () const
 
void updateVofBlockOverlap ()
 
void setVofBlockOverlapDensity (bool enabled)
 
void setVofBlockDebris (bool enabled)
 
void setVofPhantomCapillaryBound (bool enabled)
 
std::vector< double > getVofBlockForce (int c)
 
vof::VofCurvature::Stats vofBlockCurvatureStats () const
 
void setRhoFaceHarmonic (bool on)
 
void setPressureExactResidual (bool on)
 WO-R2 item 3 — the exact (matrix-free, double, flux-form) level-0 operator apply in the residual and the Krylov matvec.
 
void setOutflowOperatorCoefficient (bool on)
 WO-R2 item 1 ABLATION: set_outflow_operator_coefficient(False) restores the pre-WO-R2 operator, whose Dirichlet domain-face rows carried the literal openness 1.0 instead of the variable-density coefficient open_f*rho0/rho_f.
 
bool outflowOperatorCoefficient () const
 
bool pressureExactResidual () const
 
bool rhoFaceHarmonic () const
 
void setOutflowRhoCorrection (bool on)
 
bool outflowRhoCorrection () const
 
void setVofInflow (int f, double value)
 Colour of the fluid entering through inflow face f (0..5 = -x,+x,-y,+y,-z,+z), in [0,1].
 
void setVofInflowProfile (int f, const std::vector< double > &prof, int nb, int nc)
 Per-position inflow colour on face f: prof is (nb, nc) on the INNER grid of the face's two perpendicular axes (the same layout and the same clamp resampling set_domain_bc_profile uses for the velocity).
 
void setVofBackflow (int f, double value)
 inletOutlet backflow colour on outflow face f (default 0 = gas): where the boundary face velocity points back INTO the domain, the colour ghost carries this value instead of the zero-gradient copy (Rusche 2002 thesis section 4; OpenFOAM inletOutletFvPatchField).
 
bool vofBcActive () const
 
std::vector< double > vofBcVolumes () const
 Signed liquid volume that crossed each of the six domain faces during the LAST colour advection, in cell-volume units, POSITIVE for liquid entering the domain.
 
std::vector< double > vofBcVolumesTotal () const
 The same, accumulated since enable_vof() (or the last resetVofBcVolumes()).
 
void resetVofBcVolumes ()
 
void vofApplyColourBc (CCField f)
 The colour field's boundary rules, applied at the END of vofFillGhosts — i.e.
 
void vofBcPropGhosts (CCField f)
 WO-R item 5 — the Neumann property policy at an inflow face.
 
void vofRebuildBcBlock ()
 (Re)build everything that lives on the g=3 block for this rung: the out-of-domain mask and the resampled boundary-colour profiles.
 
CCField resampleFaceScalar (const std::vector< double > &prof, int nb, int nc, int face, C3 ext, int g, int &outNc)
 Clamp-resample a per-position face scalar from the user's (nb, nc) INNER grid onto the ghost-inclusive (b, c) plane of an extended block, so the fill kernel indexes it directly by face position.
 
void checkVofBcFace (int f, int wantType, const char *who)
 A VoF boundary colour is only meaningful on a face that already carries the matching domain BC, and getting that wrong is silent (the ghost band would be written and then never read as boundary data).
 
void vofBcArm ()
 Arm the rung: install the mask, rebuild the profiles, and zero the boundary volume ledger.
 
void vofHarvestBcVolumes ()
 Move the advector's per-face boundary volume ledger into the solver's, once per advection.
 
void computeVofCurvature ()
 
vof::VofCurvature::Stats vofCurvatureStats () const
 
std::vector< double > getVofCurvature ()
 The interface curvature kappa = 2H in the caller's units, i.e.
 
std::vector< double > getVofCurvatureBranch ()
 
void setVofCurvatureWeightWidth (double d)
 
double vofCurvatureWeightWidth () const
 
void setVofCurvatureMixedHeightFit (bool on)
 
bool vofCurvatureMixedHeightFit () const
 
void setSurfaceTension (double sigma)
 
double surfaceTension () const
 The surface tension in the caller's units (what set_surface_tension was given).
 
void setVofInterfaceEps (double eps)
 
double vofInterfaceEps () const
 
void setVofBlockKappaClip (bool enabled, double kappaMaxPhys=-1.0)
 
void setCsfMode (int m)
 
int csfMode () const
 
bool vofBlockCsf () const
 
bool csfActive () const
 
void setVofKappaFrozen (bool on)
 
bool vofKappaFrozen () const
 
void setVofKappaConstant (double kappa)
 kappa is a PHYSICAL curvature, 1/length (the internal field is 1/h; see vof_curvature()).
 
double capillaryDt ()
 The Brackbill capillary limit in the CALLER's time unit.
 
double capillaryDtInternal ()
 The same limit in the solver's index time (per tRef) — what the step's own guards compare to.
 
void setCapillaryCfl (double f)
 
double capillaryCfl () const
 
VofStepLimits vofStepLimits ()
 Both limits at the current state, in the CALLER's time unit (courant is dimensionless).
 
double phaseDensitySum ()
 
void phaseDensityRange (double &lo, double &hi)
 
double stepAdaptive (double cflTarget, double capillaryCflTarget, double dtMax)
 
void vofStepPrecheck ()
 
std::string capillaryThrowMessage (double cap) const
 
void updateVofCurvature ()
 
void advectVof ()
 
void enableVofMomentum (double rhoGasPhys, double rhoLiquidPhys)
 rhoGas / rhoLiquid are PHYSICAL densities, the same numbers the rho closure is given.
 
bool vofMomentumEnabled () const
 
void setVofRhoFloorFrac (double f)
 
double vofRhoFloorFrac () const
 
double vofRhoFloor () const
 
void setVofMomentumMuscl (bool on)
 
void setVofMomentumCellFlag (bool on)
 
void setVofFluxClamp (bool on)
 
vof::MomentumConsistentAdvector::Diagnostics vofMomentumDiagnostics ()
 
std::vector< double > getVofAdvectedVelocity (int c)
 
void advectVofMomentum ()
 
void enablePhaseChange (double rhoG, double rhoL, double hlv)
 Turn on phase change.
 
bool phaseChangeEnabled () const
 
void setMassFluxUniform (double v)
 Prescribe a UNIFORM mass flux (P0), in mass per area per time.
 
void setMassFlux (const std::vector< double > &v)
 Prescribe a per-cell mass flux (P0), x-fastest over the inner region; units and call-order rule as setMassFluxUniform.
 
void setPhaseChangeThermal (const std::string &tname, double Tsat, double kg, double kl, double Rint)
 P1: compute mdot each step from the registered scalar tname by the one-sided pure-cell weighted least-squares gradients of vof/phase_change.hpp.
 
void setPhaseChangeThermalOff ()
 
void setPhaseChangePlaneDirichlet (bool on)
 The PLANE-ANCHORED (ghost-fluid) Dirichlet condition, ON by default.
 
bool phaseChangePlaneDirichlet () const
 
void setPhaseChangeQuadraticFit (bool on)
 The QUADRATIC one-sided gradient fit (T - T_G = G phi + Q phi^2) instead of the linear one.
 
bool phaseChangeQuadraticFit () const
 
void setPhaseChangeArea (int mode)
 WO-P3c — which geometry the interfacial AREA comes from.
 
int phaseChangeArea () const
 
double vofInterfaceArea ()
 The summed interfacial area over the inner region, PHYSICAL (globally reduced under MPI) — the E7 gallery's vof_interface_area().
 
vof::VofInterfaceArea::Stats pcAreaCascadeCompute ()
 Run the cascade area driver on the (already bridged) g = 3 colour block.
 
SField pcAreaCascadeField () const
 The area field the last pcAreaCascadeCompute filled (either driver).
 
void setPhaseChangeEnergy (double rcpGas, double rcpLiquid)
 Turn on the CONSISTENT energy transport (VOF_PLAN §9 item 6) for the scalar set_phase_change_thermal names: rho c_p T is advected with the colour advection's OWN geometric fluxes (vof/energy_advect.hpp) instead of the scalar module's Koren TVD flux, and the implicit solve carries per-cell k(C) (the k_gas/k_liquid of set_phase_change_thermal) and a rho c_p(C) time term instead of a constant diffusivity.
 
void setPhaseChangeEnergyMuscl (bool on)
 MinMod-limited donor reconstruction of the face temperature in the consistent energy flux (vof/energy_advect.hpp).
 
bool phaseChangeEnergyMuscl () const
 
void setPhaseChangeEnergyOff ()
 
bool phaseChangeEnergy () const
 
void setPhaseChangeBudget (bool on)
 WO-P3f: turn the ENERGY BUDGET instrument on.
 
bool phaseChangeBudget () const
 
void setPhaseChangeCarryConserve (bool on)
 WO-P3f: make the per-cell Dirichlet overwrite ENTHALPY-CONSERVING.
 
bool phaseChangeCarryConserve () const
 
void setPhaseChangeFitCurvature (double kappa)
 WO-P3f INSTRUMENT: prescribe the interface curvature kappa = div(n) the one-sided fits use to correct their sample distances (vof::pcCurvedDistance).
 
double phaseChangeFitCurvature () const
 
void setPhaseChangeEnergyOrder (int order)
 WO-P3g — the SECOND-ORDER interfacial energy operator, as one package.
 
int phaseChangeEnergyOrder () const
 
void setPhaseChangeMdotOperator (bool on)
 WO-P3g item 1: take mdot from the energy operator's own interfacial flux instead of the one-sided least-squares fit.
 
bool phaseChangeMdotOperator () const
 
void setPhaseChangeGfmOrder (int order)
 WO-P3g item 2: the order of the one-sided (ghost-fluid) Dirichlet row.
 
int phaseChangeGfmOrder () const
 
void setPhaseChangeCurvatureDistance (bool on)
 WO-P3g item 3: measure the GFM row's theta and the one-sided fits' sample distances to the CURVED interface, with the mean curvature taken per cell from the V3 cascade.
 
bool phaseChangeCurvatureDistance () const
 
void setPhaseChangeDepositFallback (bool on)
 WO-P3f open item 6 / WO-P3g — the divergence source's 5^3 fallback target, as a setter (it was only reachable through set_phase_change_deposit_fallback).
 
bool phaseChangeDepositFallback () const
 
double phaseChangeQOperator () const
 The operator's interfacial heat (power), physical.
 
double phaseChangeQOrphan () const
 
double phaseChangeCarryDeposited () const
 The carry ledger, physical: an energy with the consistent transport on, and a temperature times a volume without it (the constant-diffusivity scalar carries no heat capacity).
 
double phaseChangeCarryLost () const
 
PhaseChangeBudget phaseChangeBudgetValues () const
 The budget, physical: energies and powers with the consistent transport on, temperature x volume (and per time) without it — see phaseChangeCarryDeposited.
 
double pcBandDivergence ()
 The BAND-EXTENDED LIQUID VELOCITY of VOF_PLAN §9 item 3, as a MEASUREMENT rather than a switch.
 
void pcUpdateEnergyProps ()
 Refresh k(C) and (rho c_p)(C) on the G=2 block from the current colour.
 
void pcRefreshUnits ()
 Re-derive the INTERNAL phase-change constants (pcRhoG_ ... pcRcpL_) from the caller's physical ones (pc*Phys_) with the current reference scales, and push them to the consumers that cache them (the energy advector, the k(C)/rho c_p(C) fields).
 
void requireScalesPinned (const char *who, bool needRho) const
 Under an armed extent, refuse a call that writes a dimensional value into a FIELD before the reference scales it converts with are pinned (rho: the first set_rho, dt: the first set_dt).
 
double closureTargetToInt (const std::string &target) const
 The internal-per-physical factor of a closure TARGET: rho, mu, force_x/y/z; 0.0 for any other field (its units are not known — the caller writes it in internal units).
 
void closureRefreshUnits (Closure &cl)
 Re-derive a closure's internal p / tabY from its physical pPhys / tabYPhys with the current reference scales (setPropertyModel/Table, and refreshUnitDerived for all of them).
 
void closureUnitsNotice (const std::string &target) const
 Under a physical domain, say on stderr that a closure on a target of unknown dimension takes its parameters in internal units (once, at registration).
 
double pcLedgerEnergyToPhys () const
 The factor from an internal phase-change ledger entry (a per-cell sum of rcp' dT) to the caller's units: joules with the consistent transport on, temperature x volume without it.
 
void vofExchangeScalar (CCField f)
 The colour block's ghost policy WITHOUT the colour-specific rules (no solid-band fill, no VoF boundary colour): the halo/periodic exchange plus the non-periodic zero-gradient clamp.
 
void setDivergenceSource (const std::vector< double > &v)
 A PRESCRIBED extra divergence source (1/time, physical; set_dt must precede it under an extent, requireScalesPinned), x-fastest over the inner region, added to the Poisson RHS exactly like the phase-change deposit: the projection then solves for div(open u) = S_pc + S_user.
 
void clearDivergenceSource ()
 
void setDivergenceSink (const std::vector< double > &w)
 WO-P23: an AUTO-BALANCED sink region for the phase-change divergence source.
 
void clearDivergenceSink ()
 
void applyPhaseChange (double dtPhysArg)
 Kinematic entry point (the P0a/P1 driver): build mdot/A_G/n from the current colour and temperature, deposit the divergence source (for the census only — nothing is projected here) and apply the interface regression.
 
void phaseChangeStep ()
 The in-step driver: everything applyPhaseChange does, at the head of step().
 
PhaseChangeDiagnostics phaseChangeDiagnostics ()
 
void pcBuildInterface ()
 (1) The interface build: for every inner interfacial cell reconstruct the PLIC plane from the canonical G=2 colour, store its area and unit normal, evaluate mdot (thermal or prescribed), and decide which pure gas cell will receive the divergence source.
 
void pcScatterSource ()
 (2) Deposit each interfacial cell's source into its chosen pure-gas cell, as a GATHER (each receiving cell scans the 5^3 box for donors that named it).
 
void pcRegress (double dt)
 (3) The regression: two Jacobi passes over the exchanged per-cell data, so the clip deficit is redistributed with a FIXED summation order (bitwise across decompositions).
 
void pcUpdateCurvature ()
 The per-cell Dirichlet mask of the energy scalar: T = T_sat + mdot R_int in every interfacial cell, released everywhere else.
 
void pcBuildInDomain ()
 WO-P3g — 1 on every cell that CARRIES A ROW in the energy solve, 0 otherwise.
 
void pcUpdateThermalMask ()
 
void pcZeroDomainGhosts (CCField f)
 Zero the two ghost layers on every NON-periodic domain face this rank owns.
 
void pcCarryDeposit (ScalarField &sc)
 WO-P3f — the enthalpy the per-cell Dirichlet overwrite destroys, returned to the phase it came from.
 
void pcCarryApply (ScalarField &sc)
 WO-P3f: consume pcCarrySrc_ into the energy solve's time base.
 
void pcBudgetPre (ScalarField &sc)
 WO-P3f, the energy-budget instrument, part 1: the state BEFORE the energy solve, and the class-change accounting against the previous step.
 
void pcBudgetPost (ScalarField &sc)
 WO-P3f, part 2: the state AFTER the energy solve, the heat the plane-anchored rows actually delivered across the interface, and the class snapshot the NEXT step compares against.
 
void pcApplyDivergenceSource (CCField div)
 Subtract the phase-change (and any prescribed) divergence source from div_ so the deflated pressure solve delivers div(open u) = S.
 
double pcEffInterfaceEps () const
 The colour tolerance that decides which cells are INTERFACIAL, and it has to be at least the colour advector's own wisp tolerance.
 
double pcEffPureEps () const
 …and the mirror statement: a cell the ADVECTOR treats as a pure phase is a pure phase here too, or the source deposit's "find a pure gas cell" walk rejects exactly the cells the colour field has already emptied and the source is left in an interfacial cell (measured: band_div 2.2e+02 on the P2 sucking gate with only the interfacial tolerance raised).
 
void requirePhaseChange (const char *who) const
 
ScalarField & scalarField (const std::string &name)
 
void scalarDirichletMask (const std::string &name)
 Allocate (idempotently) the per-cell Dirichlet mask + value of a registered scalar.
 
void setPropertyModel (const std::string &target, ClosureKind kind, const std::string &in0, const std::string &in1, const std::vector< double > &params)
 
void setDensityMode (bool variable)
 
bool hasCutcellPressure () const
 
void setPorousContinuity (bool on)
 
void syncPorousPrev ()
 
void setPorousDepsDt (bool on)
 
void setPorousConservative (bool on)
 
void setPressureUnderRelax (double w)
 
void setPropertyMode (bool variable, bool harmonic)
 
void setVariableRotational (int mode, double chi)
 
void setPropertyTable (const std::string &target, const std::string &in0, const std::vector< double > &xs, const std::vector< double > &ys)
 
void updateProperties ()
 
void enableCellForce ()
 
void enableDrag ()
 
void configurePorousDragSolver ()
 
void addDragDiagonal (int c)
 
void patchScalarDirichletFaceVar (CCField AC, CCField band, CCField kc, int a, int side)
 
void patchScalarDirichletFace (CCField AC, CCField band, double Din, int a, int side)
 
void applyScalarBcFace (CCField c, int a, int side, int type, double val, bool edges=false)
 

Static Public Member Functions

static double vofWallPlaneSdf (int gx, int gy, int gz, I3 gs, int mask)
 
static constexpr double defaultVofWispEps ()
 The value enableVof starts from.
 

Static Public Attributes

static constexpr int G = 2
 
static constexpr int kVofG = 3
 

Detailed Description

template<class Grid>
class peclet::flow::Solver< Grid >

Definition at line 77 of file flow_ibm.hpp.

Member Typedef Documentation

◆ FV

template<class Grid >
using peclet::flow::Solver< Grid >::FV = Kokkos::View<MReal*, CCMem>

Definition at line 79 of file flow_ibm.hpp.

Constructor & Destructor Documentation

◆ Solver() [1/2]

◆ Solver() [2/2]

template<class Grid >
peclet::flow::Solver< Grid >::Solver ( int  nx,
int  ny,
int  nz,
const std::array< double, 3 > &  extent,
const std::array< double, 3 > &  origin,
const std::array< long, 3 > &  globalCells 
)

Physical-domain constructor (plan §3.3).

nx,ny,nz is this rank's block exactly as in the cell-unit constructor; extent/origin describe the GLOBAL domain and globalCells the global cell counts the extent spans (equal to nx,ny,nz single-rank — pass the global grid under MPI, the same numbers init_mpi gets).

Definition at line 35 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::allocateBlock(), peclet::flow::Solver< Grid >::globalCells(), peclet::flow::Solver< Grid >::nx(), peclet::flow::Solver< Grid >::ny(), peclet::flow::Solver< Grid >::nz(), and peclet::flow::Solver< Grid >::setPhysicalDomain().

Referenced by mg_advection.Case::flux().

Member Function Documentation

◆ sceneMap()

◆ setPhysicalDomain()

◆ requireIsotropic()

template<class Grid >
void peclet::flow::Solver< Grid >::requireIsotropic ( const char *  what) const

Phase 2 §7 — refuse an ANISOTROPIC domain in a consumer this phase does not carry.

what names the entry point AND the phase/commit that lifts the refusal; this appends the three spacings and the metric they give, so the message is actionable without a debugger. A no-op (and never even formats a string) on the isotropic path, which is every cell-unit run.

ADMITTED on an anisotropic domain after commit C4 (doc/anisotropic_metric.md §7): the staggered Solver AND SolverColocated with sampled or scene geometry, constant or variable properties, variable density, porous continuity with or without implicit drag, every domain-BC type, every pressure driver and bottom, the velocity multigrid, scalar transport, the collocated face-interpolation modes, hydro_force_torque, hydro_force_torque_reaction (moving geometry included, since C4b resolved E3), and MPI. Phase 3 then admitted enable_vof too (flow/doc/anisotropic_vof.md), so nothing in the solver refuses an anisotropic domain today; this helper stays for the next consumer that needs to.

Definition at line 100 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::UnitScales::aniso, peclet::flow::Solver< Grid >::UnitScales::h, peclet::flow::Solver< Grid >::UnitScales::hp, and peclet::flow::Solver< Grid >::UnitScales::hRef.

◆ hasPhysicalDomain()

template<class Grid >
bool peclet::flow::Solver< Grid >::hasPhysicalDomain ( ) const

◆ unitScales()

template<class Grid >
const Solver< Grid >::UnitScales & peclet::flow::Solver< Grid >::unitScales ( ) const

Definition at line 117 of file flow_ibm_core.hpp.

◆ spacing()

template<class Grid >
std::array< double, 3 > peclet::flow::Solver< Grid >::spacing ( ) const

Cell size per axis (equal on every axis unless the Phase 2 anisotropic path is armed – see unitScales().aniso).

1,1,1 without a physical domain.

Definition at line 122 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::UnitScales::h.

◆ domainOrigin()

template<class Grid >
std::array< double, 3 > peclet::flow::Solver< Grid >::domainOrigin ( ) const

Physical lower corner of the GLOBAL inner grid.

Definition at line 127 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::UnitScales::org.

◆ domainExtent()

template<class Grid >
std::array< double, 3 > peclet::flow::Solver< Grid >::domainExtent ( ) const

Physical extent of the GLOBAL inner grid (cell counts without a physical domain).

Definition at line 132 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::UnitScales::ext, peclet::flow::Solver< Grid >::globalCells(), and peclet::flow::Solver< Grid >::UnitScales::physical.

◆ globalCells()

◆ cellCentres()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::cellCentres ( int  axis) const

Physical cell-centre coordinates of THIS rank's inner block along axis (nx/ny/nz values).

The grid set_solid expects an SDF sampled on: meshgrid these three and evaluate.

Definition at line 151 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::UnitScales::h, peclet::flow::Solver< Grid >::UnitScales::org, peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

◆ refreshUnitDerived()

◆ pushVofMetric()

template<class Grid >
void peclet::flow::Solver< Grid >::pushVofMetric ( )

Hand the anisotropic cell metric to every VoF driver that exists (Phase 3).

The drivers are created lazily (enableVof, enableVofBlocks, setPhaseChangeArea, ...), so this is called from refreshUnitDerived() — whenever a scale moves — and a lazily created driver takes u_.vofMetric() at its own creation (the block set: prepareVofBlocks). Every driver defaults to the unit metric, so a driver that is never reached behaves exactly as before.

Definition at line 198 of file flow_ibm_core.hpp.

References peclet::flow::vof::WyAdvector::metric, peclet::flow::vof::VofCurvature::metric, peclet::flow::vof::VofInterfaceArea::metric, peclet::flow::vof::VofMcArea::metric, peclet::flow::vof::VofDynamicWetting::metric, and peclet::flow::Solver< Grid >::UnitScales::vofMetric().

Referenced by peclet::flow::Solver< Grid >::refreshUnitDerived().

◆ allocateBlock()

◆ setRho()

◆ setMu()

◆ setDt()

◆ setBodyForce()

template<class Grid >
void peclet::flow::Solver< Grid >::setBodyForce ( double  fx,
double  fy,
double  fz 
)

Body force per unit volume, in the caller's units (e.g. a mean pressure gradient, or rho*g).

Definition at line 337 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::UnitScales::forceToInt().

Referenced by configure(), configure(), configure(), configure(), configure(), configure(), configure(), configure(), configure(), configure(), and configure().

◆ setSuperficialVelocity()

template<class Grid >
void peclet::flow::Solver< Grid >::setSuperficialVelocity ( bool  on,
int  axis,
double  velocity 
)

Hold the SUPERFICIAL velocity along a periodic axis: at the end of every step() one uniform shift is added to every inner face velocity of component axis so that its volume mean equals velocity (the caller's units).

This is the MIXTURE superficial velocity – the volume flux through a cross-section divided by the cross-section's FULL area – not an interstitial (per-phase) velocity, which in multiphase flow "velocity" alone would leave ambiguous. A uniform shift of the normal velocity on an axis with no boundary leaves every cell divergence unchanged, so the field stays discretely solenoidal. A closed (batch) column is velocity = 0. The mean is a device reduction (global under MPI); single-rank the shift never leaves the device. Staggered, all-fluid (no immersed solid), periodic axis only – the step raises otherwise. on = false turns it off.

Definition at line 344 of file flow_ibm_core.hpp.

Referenced by main().

◆ lastSuperficialVelocityShift()

template<class Grid >
double peclet::flow::Solver< Grid >::lastSuperficialVelocityShift ( ) const

The shift the last step() applied (caller's velocity units; 0 when off).

Reading it synchronises with the device.

Definition at line 363 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::UnitScales::velToPhys().

Referenced by main().

◆ setVelocityIterations()

◆ setVelocityTolerance()

template<class Grid >
void peclet::flow::Solver< Grid >::setVelocityTolerance ( double  rtol,
int  minIters 
)

Definition at line 377 of file flow_ibm_core.hpp.

◆ lastMomentumSweeps()

template<class Grid >
long peclet::flow::Solver< Grid >::lastMomentumSweeps ( ) const

Definition at line 383 of file flow_ibm_core.hpp.

Referenced by main().

◆ setVelocityResidualTolerance()

template<class Grid >
void peclet::flow::Solver< Grid >::setVelocityResidualTolerance ( double  rtol)

Definition at line 388 of file flow_ibm_core.hpp.

Referenced by configure(), and configure().

◆ setVelocityMultigridAuto()

template<class Grid >
void peclet::flow::Solver< Grid >::setVelocityMultigridAuto ( long  cellsPerRank,
long  minGlobalCells = -1,
int  minBlockExtent = -1 
)

Definition at line 393 of file flow_ibm_core.hpp.

◆ setVelocityChebyshev()

template<class Grid >
void peclet::flow::Solver< Grid >::setVelocityChebyshev ( bool  on,
int  maxit = 400 
)

Definition at line 403 of file flow_ibm_core.hpp.

◆ setVelocitySolverAuto()

template<class Grid >
void peclet::flow::Solver< Grid >::setVelocitySolverAuto ( )

Definition at line 409 of file flow_ibm_core.hpp.

◆ velocityChebyshevActive()

template<class Grid >
bool peclet::flow::Solver< Grid >::velocityChebyshevActive ( ) const

Definition at line 417 of file flow_ibm_core.hpp.

◆ setVelocityMgChebyshev()

template<class Grid >
void peclet::flow::Solver< Grid >::setVelocityMgChebyshev ( bool  on,
int  degree = 0,
double  eig_ratio = 10.0 
)

◆ velocityMgChebyshev()

template<class Grid >
bool peclet::flow::Solver< Grid >::velocityMgChebyshev ( ) const

Definition at line 430 of file flow_ibm_core.hpp.

◆ velocityResidualTolerance()

◆ lastMomentumResidual()

template<class Grid >
double peclet::flow::Solver< Grid >::lastMomentumResidual ( ) const

Definition at line 443 of file flow_ibm_core.hpp.

◆ setPressureMeanRemoval()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureMeanRemoval ( bool  all)

Definition at line 448 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::setMeanRemovalScope().

◆ setPressureIterations()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureIterations ( int  it)

Definition at line 453 of file flow_ibm_core.hpp.

Referenced by configureColoJet(), configurePacking(), and configurePacking().

◆ setAdvection()

◆ setAdvectionScheme()

template<class Grid >
void peclet::flow::Solver< Grid >::setAdvectionScheme ( int  s)

Definition at line 463 of file flow_ibm_core.hpp.

Referenced by configure().

◆ setImplicitAdvection()

template<class Grid >
void peclet::flow::Solver< Grid >::setImplicitAdvection ( bool  on)

Definition at line 468 of file flow_ibm_core.hpp.

◆ setOuterIterations()

template<class Grid >
void peclet::flow::Solver< Grid >::setOuterIterations ( int  iters)

Definition at line 473 of file flow_ibm_core.hpp.

◆ setOuterTolerance()

template<class Grid >
void peclet::flow::Solver< Grid >::setOuterTolerance ( double  tol)

Definition at line 478 of file flow_ibm_core.hpp.

◆ lastOuterIterations()

template<class Grid >
long peclet::flow::Solver< Grid >::lastOuterIterations ( ) const

Definition at line 483 of file flow_ibm_core.hpp.

◆ setVelocityMultigrid()

template<class Grid >
void peclet::flow::Solver< Grid >::setVelocityMultigrid ( bool  on,
int  levels,
int  vcycles 
)

◆ throwVelocityMgVariableMu()

◆ velocityMultigridActive()

template<class Grid >
bool peclet::flow::Solver< Grid >::velocityMultigridActive ( ) const

Definition at line 508 of file flow_ibm_core.hpp.

◆ setPressureBottomMode()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureBottomMode ( int  mode)

◆ setPressureBottomSolver()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureBottomSolver ( int  engine)

Definition at line 520 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::setBottomSolver().

◆ setPressureTelescope()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureTelescope ( bool  on)

Definition at line 525 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::setTelescope().

◆ pressureTelescope()

template<class Grid >
bool peclet::flow::Solver< Grid >::pressureTelescope ( ) const

Definition at line 530 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::telescope().

◆ setPressureTelescopeForceLevel()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureTelescopeForceLevel ( int  level)

◆ pressureTelescopeCount()

template<class Grid >
int peclet::flow::Solver< Grid >::pressureTelescopeCount ( ) const

Definition at line 540 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::telescopeCount().

◆ setPressureGraphAmg()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureGraphAmg ( bool  on)

Definition at line 545 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::setGraphAmgBottom().

Referenced by configure().

◆ setPressureLevels()

◆ setBackflowStab()

template<class Grid >
void peclet::flow::Solver< Grid >::setBackflowStab ( double  beta)

Definition at line 558 of file flow_ibm_core.hpp.

◆ setDeferredCorrection()

template<class Grid >
void peclet::flow::Solver< Grid >::setDeferredCorrection ( bool  on)

Definition at line 563 of file flow_ibm_core.hpp.

◆ setPressureChebyshev()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureChebyshev ( bool  on,
int  maxit,
double  rtol 
)

Definition at line 568 of file flow_ibm_core.hpp.

Referenced by configure(), configure(), and configure().

◆ setPressurePcg()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressurePcg ( bool  on,
int  maxit,
double  rtol 
)

◆ setPressureFcg()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureFcg ( bool  on,
int  maxit,
double  rtol 
)

Definition at line 596 of file flow_ibm_core.hpp.

Referenced by configureJet(), and main().

◆ setGhostProjection()

template<class Grid >
void peclet::flow::Solver< Grid >::setGhostProjection ( bool  on,
int  matrixOrder = 2,
int  rhsOrder = 2 
)

◆ setExactCrossings()

template<class Grid >
void peclet::flow::Solver< Grid >::setExactCrossings ( const std::vector< double > &  t)

◆ setOpennessOverride()

template<class Grid >
void peclet::flow::Solver< Grid >::setOpennessOverride ( const std::vector< double > &  ox,
const std::vector< double > &  oy,
const std::vector< double > &  oz 
)

◆ setIncrementalPressure()

template<class Grid >
void peclet::flow::Solver< Grid >::setIncrementalPressure ( bool  on)

Definition at line 687 of file flow_ibm_core.hpp.

◆ setBalancedForceProjection()

◆ balancedForceProjection()

template<class Grid >
bool peclet::flow::Solver< Grid >::balancedForceProjection ( ) const

◆ lastBalancedForceIterations()

template<class Grid >
long peclet::flow::Solver< Grid >::lastBalancedForceIterations ( ) const

Definition at line 468 of file flow_ibm_project.hpp.

◆ lastBalancedForceFailed()

template<class Grid >
bool peclet::flow::Solver< Grid >::lastBalancedForceFailed ( ) const

Definition at line 473 of file flow_ibm_project.hpp.

◆ balancedForceFailures()

template<class Grid >
long peclet::flow::Solver< Grid >::balancedForceFailures ( ) const

Definition at line 478 of file flow_ibm_project.hpp.

◆ setPressureWarmstart()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureWarmstart ( bool  on)

Definition at line 692 of file flow_ibm_core.hpp.

◆ setFaceInterp()

template<class Grid >
void peclet::flow::Solver< Grid >::setFaceInterp ( int  mode)

◆ faceInterp()

template<class Grid >
int peclet::flow::Solver< Grid >::faceInterp ( ) const

Definition at line 712 of file flow_ibm_core.hpp.

◆ setCollocatedScheme()

template<class Grid >
void peclet::flow::Solver< Grid >::setCollocatedScheme ( const std::string &  name)

◆ setRotationalPressure()

template<class Grid >
void peclet::flow::Solver< Grid >::setRotationalPressure ( bool  on)

Definition at line 744 of file flow_ibm_core.hpp.

◆ setRotationalWeight()

template<class Grid >
void peclet::flow::Solver< Grid >::setRotationalWeight ( double  w)

Definition at line 749 of file flow_ibm_core.hpp.

◆ setRotationalWallWeight()

template<class Grid >
void peclet::flow::Solver< Grid >::setRotationalWallWeight ( double  w0)

Definition at line 754 of file flow_ibm_core.hpp.

◆ setApertureOrder()

template<class Grid >
void peclet::flow::Solver< Grid >::setApertureOrder ( int  order)

◆ apertureOrder()

template<class Grid >
int peclet::flow::Solver< Grid >::apertureOrder ( ) const

Definition at line 767 of file flow_ibm_core.hpp.

◆ setAdvectionWallVelocity()

template<class Grid >
void peclet::flow::Solver< Grid >::setAdvectionWallVelocity ( bool  on)

A0 — wall velocity (not zeros) in the advection inputs' masked rows. DEFAULT true.

Definition at line 772 of file flow_ibm_core.hpp.

◆ advectionWallVelocity()

template<class Grid >
bool peclet::flow::Solver< Grid >::advectionWallVelocity ( ) const

Definition at line 777 of file flow_ibm_core.hpp.

◆ setUfAdvection()

template<class Grid >
void peclet::flow::Solver< Grid >::setUfAdvection ( bool  on)

Advect the collocated momentum with the PROJECTED, divergence-free MAC face field uf_/vf_/wf_ (DEFAULT true) rather than the un-projected cell->face average 1/2(u_i+u_j).

doc/uf_advection.md; doc/flow_colocated_plan.md §1 step 3 ("these u_f become the advecting velocities for the next step's advection") and the Almgren–Bell–Colella prescription: the field the projection just made solenoidal IS the conservative advective flux, and it is the one the FOU operator's conservative row-sum identity needs (../docs/decisions/flow.md:977). false is the developer-tier ablation that restores the phase-2 average. A no-op on the staggered grid (the stored velocity already IS the projected face velocity) and before the first projection/set_velocity has built a face field (faceFieldValid_), where the average is the only field there is.

Definition at line 1280 of file flow_ibm_core.hpp.

◆ ufAdvection()

template<class Grid >
bool peclet::flow::Solver< Grid >::ufAdvection ( ) const

Definition at line 1285 of file flow_ibm_core.hpp.

◆ setCommAvoiding()

template<class Grid >
void peclet::flow::Solver< Grid >::setCommAvoiding ( int  mask)

Communication-avoiding red-black smoothing: kCaMomentum | kCaMg.

DEFAULT both. Must be set BEFORE init_mpi (the momentum half is latched with the halo topology).

Definition at line 782 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::setCommAvoiding().

◆ commAvoiding()

template<class Grid >
int peclet::flow::Solver< Grid >::commAvoiding ( ) const

Definition at line 792 of file flow_ibm_core.hpp.

◆ setMultigridAspectThreshold()

template<class Grid >
void peclet::flow::Solver< Grid >::setMultigridAspectThreshold ( double  theta)

The anisotropic-coarsening aspect threshold theta shared by the pressure and velocity multigrids (doc/anisotropic_metric.md §5.1).

DEFAULT 2.0; only read on an anisotropic metric.

Definition at line 797 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::setAspectThreshold(), and peclet::flow::VelocityMG::setAspectThreshold().

◆ multigridAspectThreshold()

template<class Grid >
double peclet::flow::Solver< Grid >::multigridAspectThreshold ( ) const

Definition at line 806 of file flow_ibm_core.hpp.

◆ setPressureStrict()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureStrict ( bool  on)

Throw instead of reporting when the pressure preconditioner returns a non-finite correction (ISSUES sweep item 6).

DEFAULT false.

Definition at line 811 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::setStrictPressure().

◆ pressureStrict()

template<class Grid >
bool peclet::flow::Solver< Grid >::pressureStrict ( ) const

Definition at line 816 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::strictPressure().

◆ setPressureCoarseGhost()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureCoarseGhost ( bool  on)

Neumann (zero-gradient) coarse ghost on wall/inflow faces before the pressure MG's prolongation — the WO-H symmetry repair.

DEFAULT true; false is a measurement ablation.

Definition at line 821 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::setCoarseGhost().

◆ pressureCoarseGhost()

template<class Grid >
bool peclet::flow::Solver< Grid >::pressureCoarseGhost ( ) const

Definition at line 826 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::coarseGhost().

◆ setPressureBottomExtent()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureBottomExtent ( int  cells)

The set_pressure_bottom("auto") criterion: agglomerate once the coarsest GLOBAL grid exceeds this many cells on any axis.

DEFAULT 4.

Definition at line 831 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::setAgglomerationExtent().

◆ pressureBottomExtent()

template<class Grid >
int peclet::flow::Solver< Grid >::pressureBottomExtent ( ) const

◆ setDecomposition()

template<class Grid >
void peclet::flow::Solver< Grid >::setDecomposition ( int  levels,
double  maxImbalance = 1.05 
)

How the shared level-0 MPI decomposition is built.

MUST be set before init_mpi, and the same values must be handed to flow.mpi_block — both derive the same partition.

Definition at line 841 of file flow_ibm_core.hpp.

◆ decompositionLevels()

template<class Grid >
int peclet::flow::Solver< Grid >::decompositionLevels ( ) const

Definition at line 850 of file flow_ibm_core.hpp.

◆ decompositionMaxImbalance()

template<class Grid >
double peclet::flow::Solver< Grid >::decompositionMaxImbalance ( ) const

Definition at line 855 of file flow_ibm_core.hpp.

◆ setFluidOnlyConstraint()

template<class Grid >
void peclet::flow::Solver< Grid >::setFluidOnlyConstraint ( int  mode)

◆ setRotationalFilter()

template<class Grid >
void peclet::flow::Solver< Grid >::setRotationalFilter ( bool  on,
double  eps = 0.05 
)

Definition at line 870 of file flow_ibm_core.hpp.

◆ seedFaceFieldFromCells()

◆ uploadVelocity()

template<class Grid >
void peclet::flow::Solver< Grid >::uploadVelocity ( const std::vector< double > &  uu,
const std::vector< double > &  vv,
const std::vector< double > &  ww 
)

Upload an initial velocity field in the caller's PHYSICAL units (converted per component to the index velocity the kernels carry; the conversion is the identity in cell units).

Definition at line 892 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::fillGhosts(), peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::nx(), peclet::flow::Solver< Grid >::ny(), peclet::flow::Solver< Grid >::nz(), peclet::flow::Solver< Grid >::seedFaceFieldFromCells(), peclet::flow::Solver< Grid >::UnitScales::velToInt(), peclet::flow::C3::x, and peclet::flow::C3::y.

Referenced by configure().

◆ setDomainBc()

◆ setDomainBcProfile()

template<class Grid >
void peclet::flow::Solver< Grid >::setDomainBcProfile ( int  face,
const std::vector< double > &  prof,
int  nb,
int  nc 
)

Definition at line 60 of file flow_ibm_bc.hpp.

References peclet::flow::Solver< Grid >::resampleBcProfile().

◆ resampleBcProfile()

◆ setPressureGeometry()

◆ setScene()

template<class Grid >
void peclet::flow::Solver< Grid >::setScene ( const std::vector< int > &  nodeInts,
const std::vector< double > &  nodeReals,
const std::vector< int > &  instInts,
const std::vector< double > &  instReals,
bool  periodic = false 
)

Install an analytic scene from core's flat node/instance encoding (peclet/core/geom/scene_builder.hpp: 3 ints + 16 reals per node, 2 ints + 17 reals per instance), held as a core SceneQueryDevice: mode selection (sphere-union fast path vs general tree walk), candidate-grid acceleration and min-image periodicity all live in CORE now — flow briefly hand-rolled the decode+upload+eval, which was the wrong layer for it.

Call before set_solid_from_scene().

periodic = true treats the scene as min-image periodic over the GLOBAL inner grid, so a periodic packing needs ONE instance per body — no 27-image instantiation. periodic = false keeps the open-scene semantics (images are the caller's).

Definition at line 14 of file flow_ibm_scene.hpp.

References peclet::flow::Solver< Grid >::buildSceneQuery(), peclet::flow::Solver< Grid >::UnitScales::cells, peclet::flow::Solver< Grid >::UnitScales::ext, peclet::flow::Solver< Grid >::UnitScales::org, peclet::flow::Solver< Grid >::UnitScales::physical, peclet::flow::Solver< Grid >::refreshMotionFlag(), and peclet::flow::Solver< Grid >::uploadMotion().

Referenced by configure().

◆ instanceCenter()

template<class Grid >
std::array< double, 3 > peclet::flow::Solver< Grid >::instanceCenter ( int  i) const

The resolved centre of rotation of instance i and whether it is pinned (explicit) or follows the body's translation.

Definition at line 94 of file flow_ibm_scene.hpp.

◆ instanceCenterPinned()

template<class Grid >
bool peclet::flow::Solver< Grid >::instanceCenterPinned ( int  i) const

Definition at line 102 of file flow_ibm_scene.hpp.

◆ setInstanceMotion()

template<class Grid >
void peclet::flow::Solver< Grid >::setInstanceMotion ( int  i,
const std::array< double, 3 > &  lin,
const std::array< double, 3 > &  ang,
const double *  center = nullptr 
)

Rigid-body motion of one scene instance (Layer 3 rung 2).

lin is the body's linear velocity, ang its angular velocity about its own centre – both in CELL UNITS PER TIME, the same units the velocity field carries, since the scene lives on the global inner grid.

Setting any nonzero component switches the solver onto the moving-geometry path: the momentum operator's no-slip datum becomes the local wall velocity instead of zero (rung 2) and the cut-cell projection gains the wall's own volume flux (rung 3). With every component zero the solver stays on the static path, bit for bit.

Definition at line 109 of file flow_ibm_scene.hpp.

References peclet::flow::Solver< Grid >::refreshMotionFlag(), and peclet::flow::Solver< Grid >::uploadMotion().

Referenced by configure(), and towStep().

◆ setInstanceTransform()

template<class Grid >
void peclet::flow::Solver< Grid >::setInstanceTransform ( int  i,
const std::array< double, 3 > &  translation,
const std::array< double, 4 > &  quat 
)

Move one instance (Layer 3 rung 4).

Takes effect at the next rebuild_geometry() – the SDF field, the cut-cell overlay, the apertures and the pressure operator are ALL derived from the instance transforms, so a transform change without a rebuild would leave the solver running on the old geometry with a new wall velocity, which is worse than either.

The centre of rotation FOLLOWS the body: it is re-anchored to the new translation unless the caller pinned one explicitly through set_instance_motion.

Definition at line 134 of file flow_ibm_scene.hpp.

Referenced by towStep().

◆ rebuildGeometry()

template<class Grid >
void peclet::flow::Solver< Grid >::rebuildGeometry ( )

Re-derive ALL geometry from the current instance transforms (Layer 3 rung 4): rebuild the accelerated scene query, re-sample the SDF, rebuild the cut-cell overlay / apertures / pressure operator, and re-derive the exact crossings if they were in use.

The velocity and pressure fields are PRESERVED across the rebuild. set_solid zeroes u, phi and P by design (it is a setup entry point), which would reset the flow on every step of a moving-geometry march – so they are saved and restored around it. That is a full rebuild by design: the measured 128^3 cost is ~65% momentum/IBM stencils and ~35% pressure/MG, with scene sampling in the noise, so an incremental path must attack BOTH sides and is deferred.

FRESH CELLS: a cell uncovered by the body's motion this step inherits the zero the solid held there, not an extrapolated fluid value. That is the conservative v1 choice (bounded, and the momentum solve relaxes it within a step at small per-step motion); extrapolation is an open question recorded in the design note.

Definition at line 157 of file flow_ibm_scene.hpp.

References peclet::flow::Solver< Grid >::buildSceneQuery(), peclet::flow::Solver< Grid >::seedFreshCells(), peclet::flow::Solver< Grid >::setExactCrossingsFromScene(), and peclet::flow::Solver< Grid >::setSolidFromScene().

Referenced by towStep().

◆ seedFreshCells()

template<class Grid >
void peclet::flow::Solver< Grid >::seedFreshCells ( CCField  mOld[3])

FRESH CELLS: the points a moving body has just uncovered.

Restoring u across the rebuild hands such a point whatever the SOLID held there – zero, or a stale masked value – rather than a fluid state. The momentum solve relaxes it within a step, but until it does, a point that should be moving with the wall reads as stopped, and the discrete reaction charges the body for the difference. That is one of the two textbook mechanisms behind spurious force oscillations in a moving-boundary IBM (the other being the abrupt stencil change as the interface crosses a face), and it is why a body translating through a fixed grid produces a force spike every time it uncovers a row of cells.

Seeding with the LOCAL WALL VELOCITY is the cheapest defensible choice: uBc_ already holds the rigid-body velocity of the owning instance evaluated at the wall point nearest each staggered point, so a just-uncovered point starts moving with the surface that released it rather than at rest. It is bounded (no extrapolation), needs no new field, and reduces to the old behaviour exactly when the wall is not moving.

Definition at line 188 of file flow_ibm_scene.hpp.

Referenced by peclet::flow::Solver< Grid >::rebuildGeometry().

◆ setFreshCellSeed()

template<class Grid >
void peclet::flow::Solver< Grid >::setFreshCellSeed ( bool  on)

Fresh-cell policy for moving geometry.

true (DEFAULT) = seed with the local wall velocity; false = inherit whatever the solid held, which is what shipped before 2026-08-30. Inert when nothing moves, so a static run is bit-identical either way. See seedFreshCells.

Definition at line 209 of file flow_ibm_scene.hpp.

◆ freshCellSeed()

template<class Grid >
bool peclet::flow::Solver< Grid >::freshCellSeed ( ) const

Definition at line 214 of file flow_ibm_scene.hpp.

◆ refreshWallVelocity()

template<class Grid >
void peclet::flow::Solver< Grid >::refreshWallVelocity ( )

Re-derive ONLY the wall-velocity fields and the momentum operator that folds them in.

The linearised moving-boundary problems – an oscillating body at vanishing amplitude, a shear cell driven by counter-moving plates – change the wall VELOCITY every step while the geometry never moves. set_instance_motion alone does not reach them: uBc_ (the momentum operator's no-slip datum) and uwCell_ (the cut-cell projection's wall flux) are built in set_solid_from_scene, so before this existed such a driver had to call rebuild_geometry() every step and pay a full geometry re-derivation to update a boundary condition.

SCOPE: the instance TRANSFORMS must be unchanged. Nothing here re-samples the SDF, the apertures, the ownership field or the pressure operator, so if a body has actually moved this is silently wrong – call rebuild_geometry() instead. Velocity and pressure are untouched.

Definition at line 219 of file flow_ibm_scene.hpp.

References peclet::flow::Solver< Grid >::buildWallVelocity(), and peclet::flow::Solver< Grid >::rebuildStencils().

◆ hasMovingInstance()

template<class Grid >
bool peclet::flow::Solver< Grid >::hasMovingInstance ( ) const

True when at least one instance carries a nonzero velocity – i.e.

the moving-geometry paths are live. Everything downstream keys off this, so a driver can assert it.

Definition at line 232 of file flow_ibm_scene.hpp.

Referenced by main(), and peclet::flow::Solver< Grid >::scalarCutRefusals().

◆ sceneInstanceCount()

template<class Grid >
int peclet::flow::Solver< Grid >::sceneInstanceCount ( ) const

Definition at line 237 of file flow_ibm_scene.hpp.

◆ setWallFluxDivergence()

template<class Grid >
void peclet::flow::Solver< Grid >::setWallFluxDivergence ( bool  on)

Rung 3 on/off.

ON (the default) is the correct physics: a rigid body sweeping through a cut cell injects a wall flux the projection must balance. The switch exists so the Galilean gate can EXHIBIT the failure the term fixes rather than assert it – turning it off leaves rung 2's wall velocity in the momentum operator and a projection that wrongly forces div_open(u) = 0.

Definition at line 242 of file flow_ibm_scene.hpp.

◆ wallFluxDivergence()

template<class Grid >
bool peclet::flow::Solver< Grid >::wallFluxDivergence ( ) const

Definition at line 247 of file flow_ibm_scene.hpp.

◆ hasScene()

template<class Grid >
bool peclet::flow::Solver< Grid >::hasScene ( ) const

Definition at line 252 of file flow_ibm_scene.hpp.

◆ getCutOwner()

template<class Grid >
std::vector< int > peclet::flow::Solver< Grid >::getCutOwner ( ) const

Per-inner-cell owning instance (Layer 3 rung 1), x-fastest, -1 where no scene has been sampled yet.

Host copy; the device field is what the solver kernels read.

Definition at line 257 of file flow_ibm_scene.hpp.

◆ setSolidFromScene()

template<class Grid >
void peclet::flow::Solver< Grid >::setSolidFromScene ( bool  cutcellPressure)

Sample the scene onto this rank's inner grid and install it as the solid, entirely on device – no nx*ny*nz float64 host round trip, and correct on every rank.

Definition at line 268 of file flow_ibm_scene.hpp.

References peclet::flow::Solver< Grid >::checkMovingInstancesAreCut(), peclet::flow::Solver< Grid >::nx(), peclet::flow::Solver< Grid >::ny(), peclet::flow::Solver< Grid >::nz(), peclet::flow::Solver< Grid >::sceneMap(), and peclet::flow::Solver< Grid >::setSolidDevice().

Referenced by configure(), and peclet::flow::Solver< Grid >::rebuildGeometry().

◆ checkMovingInstancesAreCut()

template<class Grid >
void peclet::flow::Solver< Grid >::checkMovingInstancesAreCut ( )

A MOVING instance whose surface produces no fractional face aperture has no path for its wall velocity into the momentum operator: the no-slip datum enters ONLY through the cut-cell fold, so a box face sitting exactly on a grid plane (or a body smaller than a cell) behaves as a STATIONARY wall and set_instance_motion is silently inert – the shear-driving plates of the Jeffery-orbit page at y = 16.0 produced max|u| = 0 (peclet-examples ISSUES.md).

Count, per moving instance, the inner cells it owns that touch a fractional aperture; warn on zero.

Definition at line 352 of file flow_ibm_scene.hpp.

References peclet::flow::ccSampleExt(), peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::nx(), peclet::flow::Solver< Grid >::ny(), and peclet::flow::Solver< Grid >::nz().

Referenced by peclet::flow::Solver< Grid >::setSolidFromScene().

◆ movingInstanceCutCells()

template<class Grid >
std::vector< long > peclet::flow::Solver< Grid >::movingInstanceCutCells ( ) const

Per instance: cut rows of the momentum operator (all three components) at inner points this rank owns for it, recounted by set_solid_from_scene / rebuild_geometry when any instance moves (global under MPI; empty when nothing moves).

Zero for a moving instance = its wall velocity is silently inert.

Definition at line 452 of file flow_ibm_scene.hpp.

◆ movingInstanceDegeneratePoints()

template<class Grid >
std::vector< long > peclet::flow::Solver< Grid >::movingInstanceDegeneratePoints ( ) const

Per instance: staggered points where the sampled sdf is exactly zero (see the warning).

Definition at line 457 of file flow_ibm_scene.hpp.

◆ periodicImageOverlapCells()

template<class Grid >
long peclet::flow::Solver< Grid >::periodicImageOverlapCells ( ) const

Cells on this rank whose solid/fluid sign was set by a periodic IMAGE of an instance wider than the box (see setSolidFromScene); 0 when no instance is that wide or the images agree.

Definition at line 462 of file flow_ibm_scene.hpp.

◆ setExactCrossingsFromScene()

template<class Grid >
void peclet::flow::Solver< Grid >::setExactCrossingsFromScene ( )

EXACT wall crossings straight from the scene, on device, on every rank – the in-solver replacement for set_exact_crossings + scripts/exact_apertures_spheres.py.

t[c][a](i) = the fraction in (0,1) along the unit segment from component c's staggered point at inner cell i toward i + e_a at which the scene's SDF changes sign; NaN where the segment does not cross (the consumer falls back to the linear-interpolated theta). Bisection, NOT Newton: contract 2 of the design note only guarantees SIGN correctness for the bound-only leaves (ellipsoid, superquadric, CSG seams), and a Newton step on a non-distance field can leave the bracket entirely.

Definition at line 467 of file flow_ibm_scene.hpp.

References peclet::flow::Solver< Grid >::nx(), peclet::flow::Solver< Grid >::ny(), peclet::flow::Solver< Grid >::nz(), and peclet::flow::Solver< Grid >::sceneMap().

Referenced by peclet::flow::Solver< Grid >::rebuildGeometry().

◆ setSolid()

template<class Grid >
void peclet::flow::Solver< Grid >::setSolid ( const std::vector< double > &  sdfInner,
bool  cutcellPressure 
)

Host entry point: upload the inner SDF once and delegate.

Kept so every existing caller and the Python binding are unchanged.

Definition at line 19 of file flow_ibm_geometry.hpp.

References peclet::flow::Solver< Grid >::UnitScales::lenToInt(), and peclet::flow::Solver< Grid >::setSolidDevice().

Referenced by compare(), configure(), configure(), configure(), configurePacking(), configurePacking(), main(), perm(), runCase(), and peclet::flow::Solver< Grid >::setPressureGeometry().

◆ buildVelocityOverlays()

template<class Grid >
void peclet::flow::Solver< Grid >::buildVelocityOverlays ( bool  resetU)

Build the three per-component Robust-Scaled cut-cell overlays + solid masks from the CURRENT sdf_ (extracted verbatim from setSolidDevice so that a wall-slip change can rebuild the closure without re-running the whole geometry setup).

resetU zeroes the velocity, which the geometry path wants and a pure closure change must NOT do.

Definition at line 43 of file flow_ibm_geometry.hpp.

References peclet::flow::Solver< Grid >::exchangeExtRaw(), peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::UnitScales::hp, and peclet::flow::ibmSolidMask().

Referenced by peclet::flow::Solver< Grid >::setContactAngleDynamic(), peclet::flow::Solver< Grid >::setSolidBuildOverlaysAndStencils(), and peclet::flow::Solver< Grid >::setWallSlipLength().

◆ extendSdfDomainGhosts()

template<class Grid >
void peclet::flow::Solver< Grid >::extendSdfDomainGhosts ( CCField  f)

Repair a cell-centred geometry field's ghost band on every rank-owned NON-PERIODIC domain face, which the periodic/halo fill filled from the opposite side of the domain: type 4 (free-slip) takes the mirror the symmetry plane asserts, types 1/2/3 (wall / inflow / outflow) the constant normal extension.

Decides the BOUNDARY-FACE APERTURE, since ccFaceOpen samples the SDF at the face. No-op without a non-periodic face.

Definition at line 95 of file flow_ibm_geometry.hpp.

References peclet::flow::bcMirrorGhost(), peclet::flow::bcNeumannGhost(), peclet::flow::Solver< Grid >::G, peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

Referenced by peclet::flow::Solver< Grid >::setSolidBuildOverlaysAndStencils().

◆ setSolidDevice()

◆ setSolidSelectScheme()

template<class Grid >
void peclet::flow::Solver< Grid >::setSolidSelectScheme ( )

Definition at line 137 of file flow_ibm_geometry.hpp.

Referenced by peclet::flow::Solver< Grid >::setSolidDevice().

◆ setSolidUploadSdf()

◆ setSolidBuildOverlaysAndStencils()

◆ setSolidVelocityMgAuto()

◆ initVelocityMg()

◆ setSolidBuildOpenness()

◆ checkSealedInflowCells()

template<class Grid >
void peclet::flow::Solver< Grid >::checkSealedInflowCells ( )

Reject geometry that seals fluid cells against a prescribed INFLOW face off from the rest of the domain – an inconsistent pressure row that no solve can satisfy.

SCALING_ISSUES #3.

Definition at line 518 of file flow_ibm_geometry.hpp.

References peclet::flow::Solver< Grid >::G, peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

Referenced by peclet::flow::Solver< Grid >::setSolidBuildOpenness().

◆ bridgeOutflowFacePlanes()

template<class Grid >
void peclet::flow::Solver< Grid >::bridgeOutflowFacePlanes ( )

Bridge the HIGH-side boundary-face openness plane of every rank-owned outflow axis from the g=2 block to the g=1 MG block (copyInner reaches only the inner cells, and that plane is a ghost index).

SCALING_ISSUES #3.

Definition at line 477 of file flow_ibm_geometry.hpp.

References peclet::flow::Solver< Grid >::G, peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

Referenced by peclet::flow::Solver< Grid >::setSolidInitPressureMg().

◆ setSolidStarOverlay()

◆ setSolidGhostProjectionOverlay()

◆ setSolidInitPressureMg()

◆ geometryBuilt()

template<class Grid >
bool peclet::flow::Solver< Grid >::geometryBuilt ( ) const

Definition at line 888 of file flow_ibm_geometry.hpp.

◆ requireNoGeometry()

◆ step()

template<class Grid >
void peclet::flow::Solver< Grid >::step ( )

Definition at line 14 of file flow_ibm_project.hpp.

References peclet::flow::Solver< Grid >::addCsfRhs(), peclet::flow::Solver< Grid >::addCsfRhsBlocks(), peclet::flow::Solver< Grid >::addCsfRhsCellInterp(), peclet::flow::Solver< Grid >::advanceScalars(), peclet::flow::Solver< Grid >::advectVof(), peclet::flow::Solver< Grid >::advectVofMomentum(), peclet::flow::Solver< Grid >::advVelView(), peclet::flow::Solver< Grid >::applyBackflowStab(), peclet::flow::Solver< Grid >::applyBalancedForceProjection(), peclet::flow::Solver< Grid >::applySuperficialVelocity(), peclet::flow::Solver< Grid >::applyVelocityBcAll(), peclet::flow::Solver< Grid >::balancedForceActive(), peclet::flow::Solver< Grid >::bcStencilPath(), peclet::flow::Solver< Grid >::buildAdvInputs(), peclet::flow::Solver< Grid >::buildAdvStencil(), peclet::flow::Solver< Grid >::buildAdvStencilVar(), peclet::flow::Solver< Grid >::buildRhs(), peclet::flow::Solver< Grid >::buildRhsColoVar(), peclet::flow::Solver< Grid >::buildRhsForced(), peclet::flow::Solver< Grid >::buildRhsVar(), peclet::flow::Solver< Grid >::buildRhsVarMom(), peclet::flow::Solver< Grid >::colocatedFaceForce(), peclet::flow::Solver< Grid >::computeDivAdv(), peclet::flow::Solver< Grid >::VofTiming::csf, peclet::flow::Solver< Grid >::csfActive(), peclet::flow::Solver< Grid >::VofTiming::curvature, peclet::flow::Solver< Grid >::effRhoField(), peclet::flow::Solver< Grid >::effVarRho(), peclet::flow::Solver< Grid >::fillCellForceGhosts(), peclet::flow::Solver< Grid >::fillDragBetaGhosts(), peclet::flow::Solver< Grid >::fillGhosts(), peclet::flow::Solver< Grid >::fillPropGhosts(), peclet::flow::Solver< Grid >::fillVelGhosts(), peclet::flow::Solver< Grid >::hasOpenDomainFace(), peclet::flow::Solver< Grid >::implicitAdv(), peclet::flow::Solver< Grid >::initVelocityMg(), peclet::flow::Solver< Grid >::maxAbsDiffInner(), peclet::flow::Solver< Grid >::mixedVelocityMg(), peclet::flow::Solver< Grid >::openFaceView(), peclet::flow::Solver< Grid >::outflowBackflow(), peclet::flow::Solver< Grid >::pcUpdateEnergyProps(), peclet::flow::Solver< Grid >::pcUpdateThermalMask(), peclet::flow::Solver< Grid >::VofTiming::phaseChange, peclet::flow::Solver< Grid >::phaseChangeStep(), peclet::flow::Solver< Grid >::pressureBcGhost(), peclet::flow::Solver< Grid >::project(), peclet::flow::Solver< Grid >::rebuildStencils(), peclet::flow::Solver< Grid >::requireBalancedForceScope(), peclet::flow::Solver< Grid >::requireCollocatedFaceForceScope(), peclet::flow::CutcellMG::resetAllreduceCounters(), peclet::flow::VelocityMG::restrictAdvVelocities(), peclet::flow::Solver< Grid >::scalarCaptureOpenFaceFlux(), peclet::flow::Solver< Grid >::setSolidVelocityMgAuto(), peclet::flow::Solver< Grid >::smoothComp(), peclet::flow::Solver< Grid >::VofTiming::steps, peclet::flow::Solver< Grid >::superficialVelocityPrecheck(), peclet::flow::Solver< Grid >::ufAdvVelocity(), peclet::flow::Solver< Grid >::updateEpsRho(), peclet::flow::Solver< Grid >::updateProperties(), peclet::flow::Solver< Grid >::updateVofCurvature(), peclet::flow::Solver< Grid >::vofBlockCsf(), and peclet::flow::Solver< Grid >::vofStepPrecheck().

Referenced by main(), peclet::flow::Solver< Grid >::pcRegress(), perm(), peclet::flow::Solver< Grid >::stepAdaptive(), and towStep().

◆ outflowBackflow()

◆ getVelocity()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getVelocity ( int  c)

◆ setVelocity()

template<class Grid >
void peclet::flow::Solver< Grid >::setVelocity ( int  c,
const std::vector< double > &  v 
)

Write a component's inner velocity from a host vector (x-fastest, inner region) and re-impose the solid mask.

An initial-condition hook (e.g. a uniform stream around a fixed body — the Galilean twin of a towed one); u^n is taken from the live field at step start.

Definition at line 93 of file flow_ibm_diagnostics.hpp.

References peclet::flow::Solver< Grid >::maskVelocity(), peclet::flow::Solver< Grid >::scatterInner(), peclet::flow::Solver< Grid >::seedFaceFieldFromCells(), and peclet::flow::Solver< Grid >::UnitScales::velToInt().

Referenced by configure(), configureWall(), and main().

◆ getFaceVelocity()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getFaceVelocity ( int  c)

◆ getOpenness()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getOpenness ( int  c)

Definition at line 124 of file flow_ibm_diagnostics.hpp.

References peclet::flow::Solver< Grid >::gatherInner().

Referenced by main().

◆ getMomentumDiagonal()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getMomentumDiagonal ( int  c)

Definition at line 130 of file flow_ibm_diagnostics.hpp.

References AC, peclet::flow::Solver< Grid >::G, peclet::flow::C3::x, and peclet::flow::C3::y.

Referenced by main().

◆ getOpennessProj()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getOpennessProj ( int  c)

◆ getPressure()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getPressure ( )

◆ maxOpenDivergenceProjected()

◆ maxOpenDivergenceProjectedInternal()

◆ maxOpenDivergence()

◆ maxOpenDivergenceInternal()

◆ maxPorousResidual()

◆ lastPressureIterations()

template<class Grid >
long peclet::flow::Solver< Grid >::lastPressureIterations ( ) const

Definition at line 291 of file flow_ibm_diagnostics.hpp.

Referenced by main().

◆ numPressureChebyshevRestarts()

template<class Grid >
long peclet::flow::Solver< Grid >::numPressureChebyshevRestarts ( ) const
inline

Definition at line 1334 of file flow_ibm.hpp.

◆ pressureMgLevelRatios()

template<class Grid >
std::vector< std::array< int, 3 > > peclet::flow::Solver< Grid >::pressureMgLevelRatios ( ) const

Definition at line 296 of file flow_ibm_diagnostics.hpp.

References peclet::flow::CutcellMG::levelRatios().

◆ pressureSolveFailed()

template<class Grid >
bool peclet::flow::Solver< Grid >::pressureSolveFailed ( ) const

Definition at line 304 of file flow_ibm_diagnostics.hpp.

◆ marchState()

◆ lastStepSeconds()

template<class Grid >
double peclet::flow::Solver< Grid >::lastStepSeconds ( ) const

Definition at line 386 of file flow_ibm_diagnostics.hpp.

◆ lastPredictorSeconds()

template<class Grid >
double peclet::flow::Solver< Grid >::lastPredictorSeconds ( ) const

Definition at line 391 of file flow_ibm_diagnostics.hpp.

◆ lastMomentumSeconds()

template<class Grid >
double peclet::flow::Solver< Grid >::lastMomentumSeconds ( ) const

Definition at line 396 of file flow_ibm_diagnostics.hpp.

◆ lastProjectionSeconds()

template<class Grid >
double peclet::flow::Solver< Grid >::lastProjectionSeconds ( ) const

Definition at line 401 of file flow_ibm_diagnostics.hpp.

◆ setVofTiming()

◆ vofTiming()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofTiming ( ) const

Definition at line 37 of file flow_ibm_vof.hpp.

◆ resetVofTiming()

◆ vofTimingReport()

template<class Grid >
const Solver< Grid >::VofTiming & peclet::flow::Solver< Grid >::vofTimingReport ( ) const

Definition at line 54 of file flow_ibm_vof.hpp.

◆ vofKernelTiming()

template<class Grid >
const vof::WyAdvector::Timing & peclet::flow::Solver< Grid >::vofKernelTiming ( ) const

Definition at line 59 of file flow_ibm_vof.hpp.

References peclet::flow::vof::WyAdvector::timing().

◆ vofCurvatureTiming()

template<class Grid >
const vof::VofCurvature::Timing & peclet::flow::Solver< Grid >::vofCurvatureTiming ( ) const

Definition at line 64 of file flow_ibm_vof.hpp.

References peclet::flow::vof::VofCurvature::timing().

◆ setVofCurvatureWorklist()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofCurvatureWorklist ( bool  on)

VofCurvature::useWorklist — run the height-function cascade and the PV fallback over a COMPACTED list of the interfacial cells instead of over the whole inner region.

See the binding docstring and the WO-V9 findings for what it is worth and why.

Definition at line 69 of file flow_ibm_vof.hpp.

References peclet::flow::vof::VofCurvature::useWorklist.

◆ vofCurvatureWorklist()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofCurvatureWorklist ( ) const

Definition at line 74 of file flow_ibm_vof.hpp.

References peclet::flow::vof::VofCurvature::useWorklist.

◆ vofTimingStepSeconds()

template<class Grid >
double peclet::flow::Solver< Grid >::vofTimingStepSeconds ( ) const

Definition at line 79 of file flow_ibm_vof.hpp.

◆ vofTimingPredictorSeconds()

template<class Grid >
double peclet::flow::Solver< Grid >::vofTimingPredictorSeconds ( ) const

Definition at line 84 of file flow_ibm_vof.hpp.

◆ vofTimingMomentumSeconds()

template<class Grid >
double peclet::flow::Solver< Grid >::vofTimingMomentumSeconds ( ) const

Definition at line 89 of file flow_ibm_vof.hpp.

◆ vofTimingProjectionSeconds()

template<class Grid >
double peclet::flow::Solver< Grid >::vofTimingProjectionSeconds ( ) const

Definition at line 94 of file flow_ibm_vof.hpp.

◆ setVofWorklist()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofWorklist ( bool  on)

WyAdvector::useWorklist — the compaction of the PLIC reconstruction pass onto the mixed cells.

Pure optimization: off must reproduce the same field bit for bit.

Definition at line 99 of file flow_ibm_vof.hpp.

References peclet::flow::vof::WyAdvector::useWorklist.

◆ vofWorklist()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofWorklist ( ) const

Definition at line 104 of file flow_ibm_vof.hpp.

References peclet::flow::vof::WyAdvector::useWorklist.

◆ lastPressureAllreduceSeconds()

template<class Grid >
double peclet::flow::Solver< Grid >::lastPressureAllreduceSeconds ( ) const

Definition at line 406 of file flow_ibm_diagnostics.hpp.

◆ lastPressureAllreduceCount()

template<class Grid >
long peclet::flow::Solver< Grid >::lastPressureAllreduceCount ( ) const

Definition at line 411 of file flow_ibm_diagnostics.hpp.

◆ nx()

◆ ny()

◆ nz()

◆ implicitAdv()

◆ bcStencilPath()

◆ mixedVelocityMg()

template<class Grid >
bool peclet::flow::Solver< Grid >::mixedVelocityMg ( ) const

◆ fillPropGhosts()

◆ fillMuGhosts()

◆ fillCellForceGhosts()

template<class Grid >
void peclet::flow::Solver< Grid >::fillCellForceGhosts ( )

◆ fillDragBetaGhosts()

template<class Grid >
void peclet::flow::Solver< Grid >::fillDragBetaGhosts ( )

◆ fillPorousEpsGhosts()

◆ buildVofBlock()

◆ vofWetWallMask()

◆ vofWallPlaneSdf()

template<class Grid >
double peclet::flow::Solver< Grid >::vofWallPlaneSdf ( int  gx,
int  gy,
int  gz,
I3  gs,
int  mask 
)
static

Definition at line 178 of file flow_ibm_vof.hpp.

Referenced by peclet::flow::Solver< Grid >::applyContactAngle().

◆ buildVofGeometry()

◆ applyDomainWallGeometry()

◆ imposeDomainWallKind()

◆ vofExtendWallBand()

◆ zeroSolidColour()

◆ vofAxisPeriodic()

◆ vofFillGhosts()

◆ vofExchangeRaw()

◆ vofGlobalSize()

◆ vofOrigin()

◆ bridgeVelocityToVof()

◆ vofBlockRankBoxes()

template<class Grid >
std::vector< vof::VofBox > peclet::flow::Solver< Grid >::vofBlockRankBoxes ( int  size) const

◆ bindVofBlockPatch()

◆ harvestVofBlockUnion()

◆ bridgeColourToVof()

◆ strideOf()

◆ effVarRho()

◆ effRhoField()

◆ colocatedFaceForce()

◆ collocatedV8AutoFallback()

template<class Grid >
void peclet::flow::Solver< Grid >::collocatedV8AutoFallback ( const char *  why)

◆ ensureFaceAcc()

◆ requireCollocatedFaceForceScope()

template<class Grid >
void peclet::flow::Solver< Grid >::requireCollocatedFaceForceScope ( const char *  who)

◆ balancedForceActive()

◆ hasOpenDomainFace()

template<class Grid >
bool peclet::flow::Solver< Grid >::hasOpenDomainFace ( ) const

◆ requireBalancedForceScope()

◆ buildBalancedFaceForce()

◆ registerBalancedForceState()

◆ applyBalancedForceProjection()

◆ solveBalancedForceSystem()

◆ updateEpsRho()

◆ makeFaceProps()

◆ buildSceneQuery()

◆ refreshMotionFlag()

◆ uploadMotion()

◆ motionView()

template<class Grid >
peclet::core::geom::InstanceMotionView< double > peclet::flow::Solver< Grid >::motionView ( ) const

Definition at line 562 of file flow_ibm_scene.hpp.

Referenced by peclet::flow::Solver< Grid >::buildWallVelocity().

◆ buildWallVelocity()

◆ exchangeExtRaw()

template<class Grid >
void peclet::flow::Solver< Grid >::exchangeExtRaw ( CCField  f)

Raw ghost fill of an extended-block field: the rank halo exchange under MPI, the periodic wrap single-rank.

No boundary-condition fold is applied (this is for GEOMETRIC data such as the wall velocity, not a velocity iterate); non-periodic single-rank ghosts are left as the kernel computed them.

Definition at line 674 of file flow_ibm_scene.hpp.

References peclet::flow::Solver< Grid >::fillDomainPeriodic().

Referenced by peclet::flow::Solver< Grid >::buildVelocityOverlays(), and peclet::flow::Solver< Grid >::buildWallVelocity().

◆ addWallFluxDivergence()

◆ scaleForceTorque()

template<class Grid >
void peclet::flow::Solver< Grid >::scaleForceTorque ( std::vector< double > &  out,
std::size_t  m 
) const

Hydrodynamic force and torque on each scene instance (Layer 4 rung 2) – the resolved CFD-DEM feedback.

Returns four 3*nInst blocks: force, torque, and the force split into its PRESSURE and VISCOUS parts (force == pressure + viscous), because the two carry different discretisation error and a deficit that sits in one of them localises itself.

THE SURFACE INTEGRAL, cut cell by cut cell. Over the wall patch inside a cell, sigma = -p I + mu (grad u + grad u^T), dF_body = -(sigma . A_wall) with A_wall = -(oE-oW, oN-oS, oT-oB) the FLUID-outward wall area vector from the aperture identity (the same one rung 3's wall flux uses). The minus sign converts it to the BODY's outward normal, which is the one the traction on the body is taken against. Cells with A_wall = 0 – fully open or fully solid – contribute nothing, so no cut-cell list is needed: the geometry selects the surface.

Torque is about the owning instance's centre with the lever arm MIN-IMAGED, for the same reason instanceVelocity min-images it: a body can own wall cells across a periodic seam.

NOT bit-reproducible. The accumulation is by atomics over an unordered cell traversal, like the coupling deposits; expect tolerance-level run-to-run variation, not bitwise equality.

ACCURACY. Cut-cell force integration is O(h)-noisy: the aperture differences are exact but the traction is evaluated from a cell-centred pressure and a central-differenced velocity gradient whose stencil reaches into solid cells near the wall. Measure it (the Zick-Homsy self-consistency gate does) rather than assuming a tolerance. Convert an interleaved result of 3*nInst blocks (force, TORQUE, then further force blocks — the layout both hydro getters use) from the solver's index units to the caller's. Exactly the identity in cell units.

Definition at line 14 of file flow_ibm_hydro.hpp.

References peclet::flow::Solver< Grid >::UnitScales::forceTotalToPhys(), and peclet::flow::Solver< Grid >::UnitScales::torqueToPhys().

Referenced by peclet::flow::Solver< Grid >::hydroForceTorque(), and peclet::flow::Solver< Grid >::hydroForceTorqueReaction().

◆ hydroForceTorque()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::hydroForceTorque ( )

PHASE 2 (anisotropic cells), doc/anisotropic_metric.md §4.4 — ADMITTED since commit C4.

With ‘A_a = W_a V’/h_a'the PHYSICAL fragment area vector in hRef^2 (W_a = o_{a-} - o_{a+}, which is whatA[a]below holds) andgu[a][b]‘ the index-velocity central difference:

dFp_a = p&rsquo; W_a V'/h_a'
dFv_a = - mu' sum_b W_b (V'/h_b') [ (h_a'/h_b') gu[a][b] + (h_b'/h_a') gu[b][a] ]

– the ‘h_a’/h_b'pair being the physical strain rate du_a/dx_b + du_b/dx_a written in index velocities. Both factors multiply the EXISTING expressions from outside, in the same association order, so atV' = h_a' = 1they are exact 1.0 multiplications and the arithmetic is bit-identical. The lever armr = rp*sm.dToIntis already a physical displacement in hRef units on every axis, andtorqueToPhys` is unchanged.

Definition at line 26 of file flow_ibm_hydro.hpp.

References F, peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::UnitScales::hp, peclet::flow::Solver< Grid >::nx(), peclet::flow::Solver< Grid >::ny(), peclet::flow::Solver< Grid >::scaleForceTorque(), peclet::flow::Solver< Grid >::sceneMap(), U, and peclet::flow::Solver< Grid >::UnitScales::vol.

◆ hydroForceTorqueReaction()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::hydroForceTorqueReaction ( )

Hydrodynamic force and torque per instance from the DISCRETE REACTION (route (b) of the design note's OPEN FOR REVIEW 1) – the recommended source of the resolved CFD-DEM feedback.

Returns two 3*nInst blocks: force, torque about the instance centre.

THE BUDGET. The composed step at any unmasked staggered face i is, exactly, rho/dt (u^{n+1}_i - u^n_i) = sum_nb mu (u*_nb - u*_i) + f_c - grad(pi)_i + F_wall_i with u* the last momentum solve's iterate (the implicit viscous operator acted on u*, which is why it is stashed) and pi the effective pressure (P^n predictor + (rho/dt) phi). Define R_i = rho/dt (u_i - u^n_i) - f_c - sum_{FLUID nbrs} mu (u*_nb - u*_i) – deliberately NOT subtracting the pressure. Then R_i = -grad(pi)_i + F_wall_i, and summed over the owner region of a body the grad(pi) parts TELESCOPE: interior faces cancel pairwise, leaving exactly the region-boundary pressure flux plus the wall pressure force – the control-volume budget, with pressure counted once and in the right place without this function ever reading a pressure field. F_body(k) = -sum_{owner k} R_i.

WHY THIS IS THE ACCURATE FORCE, not just the conservative one: the modified cut rows do not derive from symmetric fluxes, so ANY reconstruction of "the traction" is a choice; the reaction is the momentum the fluid actually lost, and its accuracy is the (independently validated, 2nd-order) accuracy of the flow solution it sustains. The traction integral (hydroForceTorque above) under-reads by a resolution-INDEPENDENT ~29% and is kept as a diagnostic only.

EXACTNESS: at steady state, sum over bodies = f_c * N_fluid-momentum-cells per component, to the momentum solver's residual (the only approximation in the budget; everything else is identity). Per-body attribution is the control-volume one over the owner partition; the region-boundary fluxes are counted symmetrically, so they cancel exactly in the total.

ADVECTION (R0). The explicit high-order advection adds one more RHS term to the same composed step, +A_i with A_i = rho*(FOU_i - HO_i) exactly as buildRhs assembled it, so the budget subtracts A_i alongside f_c. It is STASHED rather than recomputed: recomputing would read the projected u^{n+1} while the RHS used the Picard iterate u^k, and the two differ by the projection – a silent O(1) attribution error. The IMPLICIT upwind path (implicit_fou / the domain-BC stencil path) instead folds advection into the MATRIX, so the reaction is no longer of this form; it stays refused.

THE TORQUE (v3, 2026-08-31): the reaction alone is NOT the physical torque, and the gap is closed here in closed form. The discrete momentum budget measures the LAPLACIAN-form wall flux (the operator discretises mu*lap(u) = div(mu grad u)); the physical traction adds the transposed term mu*(grad u)^T . n. In the interior the two agree for constant mu and a solenoidal field (div(grad u)^T = grad(div u) = 0), but not as a boundary traction – and for an incompressible no-slip flow on a rigid wall moving with angular velocity Omega the missing traction is computable from WALL DATA ALONE:

(grad u)^T . n  =  n x Omega        (pointwise on the wall, exactly)

Derivation: split grad u on the surface into tangential derivatives – which equal the rigid-body field's, grad u_w = [Omega x] – plus the normal derivative; continuity kills the n(du/dn . n) piece (n . du/dn = -trace of the tangential part = 0 since [Omega x] is antisymmetric); what survives is the tangential projection of (n x Omega), which is n x Omega itself. Verified against the analytic rotlet to 3e-11 pointwise. Its FORCE integral vanishes over any closed surface (oint n dA = 0), which is why the force identity above never saw it; its TORQUE integral carries exactly ONE THIRD of the Stokes torque on a rotating sphere (oint r x (n x Omega) dA = -(8pi/3) a^3 Omega), which is exactly the resolution-independent -31% the rotating-sphere gate measured before this term (predicted -33.3%; Maitri et al., Comput. Fluids 175 (2018) 111-128, measured the same 33-34% plateau on an IBM omitting the same term). The correction below integrates mu * r x (n dA x Omega) over the cut cells with the EXACT aperture wall-area vectors – no interior reconstruction, no near-wall gradient, and identically zero when nothing rotates.

PER-BODY ATTRIBUTION (v4, 2026-08-31): the owner-boundary pressure flux is now REMOVED from each body's share. The telescoping of grad(pi) over an owner region leaves the wall pressure force (physical – kept) PLUS the flux through the region's boundary against OTHER owners' regions. Those boundary terms cancel pairwise in the total – which is why the identity gate never saw them – but they are NOT zero per body: they transfer force between attributions across the owner partition's mid-surfaces. A single instance owns all fluid and has no such boundary (bit-identical, the settling gate's case); a symmetric array cancels them per body (the 4-sphere gate's case); an ASYMMETRIC pair does neither. Measured on a sphere translating through a closed analytic tank – the ten Cate configuration – the sphere's attributed drag was HALF the physical value (lambda 0.62 against a physical floor of 1.36; the identical sphere in a single-instance periodic box reads 1.42), because the part of the pressure force transmitted beyond the sphere/tank mid-surface was booked to the tank. The correction subtracts, for every fluid-fluid staggered face whose two momentum points have different owners, the face's pi-flux from the side that owned it and adds it to the other – pairwise, so the total is untouched to round-off, and exactly nothing changes with fewer than two instances. pi is read from the accumulated P_ (incremental scheme; the rotational -mu*div(u*) deviation is the projection residual). Faces are visited once via the +s convention (each inner momentum point checks only its +s neighbour), which also makes the pass MPI-clean. The torque uses each side's own lever about its own centre.

v2 SCOPE, refused loudly: staggered only; implicit advection, porous, variable properties, domain BCs, ghost projection, drag diagonal, fluid-only star modes all put terms in the update this budget does not carry, and a missing term here is a silently mis-attributed force. PHASE 2 (anisotropic cells), doc/anisotropic_metric.md §4.4 — ADMITTED since commit C4. The momentum row of component a is a force DENSITY in the component-a normalisation (rhoRef h_a/tRef^2), so the total force on the body in forceTotalToPhys units is ‘F_a = - sum_owner R_a h_a’ V'(isotropich_a' V' = 1, so the factor below is an exact 1.0 multiplication and the arithmetic is bit-identical). The lever arm is already physical. The v3 transposed-stress WALL TORQUE below carries the metric on its AREA VECTOR, not on its force component (E3 ofdoc/units_escalation.md, RESOLVED): it is a TRACTION, F' = mu' (A' x Omega')withA'_b = a_b V'/h_b'the same physical area vector in hRef^2 the traction paragraph of §4.4 uses, so the per-axis factor belongs to the area component the cross product consumes. The "component-a normalisation" that putsh_a' V'onF_a` above is an argument about MOMENTUM ROWS, and this term is not one.

Definition at line 164 of file flow_ibm_hydro.hpp.

References F, peclet::flow::Solver< Grid >::fillGhosts(), peclet::flow::Solver< Grid >::fillVelGhostsTo(), peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::UnitScales::hp, peclet::flow::Solver< Grid >::implicitAdv(), peclet::flow::Solver< Grid >::scaleForceTorque(), peclet::flow::Solver< Grid >::sceneMap(), peclet::flow::Solver< Grid >::UnitScales::vol, peclet::flow::C3::x, and peclet::flow::C3::y.

Referenced by main().

◆ fluidMomentumCells()

template<class Grid >
std::array< long, 3 > peclet::flow::Solver< Grid >::fluidMomentumCells ( )

The number of unmasked (fluid) staggered momentum cells per component – the exact discrete datum the reaction identity is stated against: at steady state, sum_bodies F_c = f_c * N_c.

Definition at line 411 of file flow_ibm_hydro.hpp.

References peclet::flow::Solver< Grid >::G.

◆ reactionBudgetTerms()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::reactionBudgetTerms ( )

R0 DECOMPOSITION PROBE.

The reaction identity in its full discrete form is sum_bodies F_c = f_c*N_c + sum_i fb_i + sum_i A_i - sum_i (rho/dt)(u_i - u^n_i) (every RHS term of the composed step, summed over the FLUID momentum cells; the viscous fluxes and grad(pi) telescope to zero over the whole fluid region). The Stokes gate drops the last two terms because they vanish at steady state and A is absent; with advection on they do not, so this returns them and the identity can be checked term by term instead of being quietly absorbed. Returns 6 doubles: the three unsteady sums, then the three advective sums.

sum_i A_i is NOT zero in general and that is a property of the ADVECTION OPERATOR, not of the budget: the flux form telescopes over the interior, leaving the advective momentum flux through the fluid region's boundary, which at a cut wall is reconstructed from stencils that read the masked (wall-velocity) value one or two cells inside the solid. It is an O(h) wall term and converges away under refinement – measure it, do not assume it.

Definition at line 441 of file flow_ibm_hydro.hpp.

References peclet::flow::Solver< Grid >::G.

◆ wallAreaProbe()

template<class Grid >
std::array< double, 3 > peclet::flow::Solver< Grid >::wallAreaProbe ( )

A_wall EXACTNESS PROBE (diagnostic for the Layer-4 force integral).

For any smooth field q, sum_cells q(x_c) * A_wall,cell -> integral over the wall of q n_fluid dA and taking q = x_a turns that, by the divergence theorem applied to the SOLID interior, into exactly -V_solid along axis a and 0 on the others. So this returns [ sum_c x_c*Ax , sum_c y_c*Ay , sum_c z_c*Az ] (per axis, summed over all instances) which must equal -V_solid componentwise if the aperture wall-area vectors are right. It isolates the GEOMETRY from the traction: a force deficit that shows up here is A_wall's, and one that does not is the pressure / velocity-gradient reconstruction's.

Definition at line 477 of file flow_ibm_hydro.hpp.

References peclet::flow::Solver< Grid >::G.

◆ wallFluxImbalance()

template<class Grid >
double peclet::flow::Solver< Grid >::wallFluxImbalance ( )

Net wall flux this rank injects, sum over inner cells of u_w .

A_wall – the compatibility datum of the singular pressure problem. Exactly zero for a translating body in a periodic box (the aperture differences telescope); small but nonzero for rotation and for a body crossing a non-periodic boundary. Reported, not corrected.

Definition at line 509 of file flow_ibm_hydro.hpp.

References peclet::flow::Solver< Grid >::G.

◆ wallVelView()

◆ rebuildStencils()

◆ copyInner()

◆ copyBlockShifted()

template<class Grid >
void peclet::flow::Solver< Grid >::copyBlockShifted ( CCField  dst,
C3  de,
CCConst  src,
C3  se,
int  off 
)

◆ fillGhosts()

template<class Grid >
void peclet::flow::Solver< Grid >::fillGhosts ( CCField  f)

◆ fillGhostsFaces()

◆ fillAxis()

◆ fillPeriodicAxes()

◆ fillDomainPeriodic()

◆ computeDivAdv()

template<class Grid >
void peclet::flow::Solver< Grid >::computeDivAdv ( )

Definition at line 105 of file flow_ibm_closures.hpp.

References peclet::flow::Solver< Grid >::G, and U.

Referenced by peclet::flow::Solver< Grid >::step().

◆ advWallInputs()

template<class Grid >
bool peclet::flow::Solver< Grid >::advWallInputs ( ) const

R0 helper: allocate (once) and arm the per-component advective-term stash the reaction-force budget consumes.

Returns whether the RHS kernel should write it. Off (and untouched) unless a scene is installed on the staggered grid with explicit advection on, so every other path is byte-identical and pays no memory.

Definition at line 1214 of file flow_ibm_core.hpp.

Referenced by peclet::flow::Solver< Grid >::advVelView(), and peclet::flow::Solver< Grid >::buildAdvInputs().

◆ buildAdvInputs()

template<class Grid >
void peclet::flow::Solver< Grid >::buildAdvInputs ( )

◆ advVelView()

template<class Grid >
CCConst peclet::flow::Solver< Grid >::advVelView ( int  c) const

◆ advFaceView()

template<class Grid >
CCConst peclet::flow::Solver< Grid >::advFaceView ( int  c) const

Component c of the collocated MAC face field (uf_/vf_/wf_), flow's low-face convention: entry i is the velocity at the -axis face of cell i.

Empty on the staggered grid, where nothing calls it.

Definition at line 1247 of file flow_ibm_core.hpp.

Referenced by peclet::flow::Solver< Grid >::openFaceView().

◆ openFaceView()

template<class Grid >
CCConst peclet::flow::Solver< Grid >::openFaceView ( int  c) const

Component c of the face field AS THE ADVECTION AND THE DIVERGENCE DIAGNOSTIC MUST READ IT: advFaceView(c) everywhere except an OPEN (outflow) domain face, where the zero-gradient extrapolation of the interior face replaces the projection's mass-balance closure (buildOpenFaceField).

Identical to advFaceView(c) when there is no outflow.

Definition at line 1252 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::advFaceView().

Referenced by peclet::flow::Solver< Grid >::buildAdvStencil(), peclet::flow::Solver< Grid >::buildAdvStencilVar(), peclet::flow::Solver< Grid >::buildRhs(), peclet::flow::Solver< Grid >::buildRhsColoVar(), peclet::flow::Solver< Grid >::buildRhsForced(), peclet::flow::Solver< Grid >::buildRhsVar(), peclet::flow::Solver< Grid >::maxOpenDivergenceInternal(), and peclet::flow::Solver< Grid >::step().

◆ buildOpenFaceField()

template<class Grid >
void peclet::flow::Solver< Grid >::buildOpenFaceField ( )

Build ufOpen_ = the face field with each open (outflow) domain face overwritten by its zero-gradient extrapolation.

A no-op on the staggered grid and without an outflow.

WHY the advecting velocity cannot be the raw projected face there. At an outflow bcCorrectOutflow writes onto that ONE face the correction that makes the discrete mass balance close (the operator's Dirichlet-p row owns it), so its value is set by GLOBAL continuity, not by the fluid next to it. Feeding that into the upwind advective flux of the last cell – and, on the domain-BC path, into the implicit-FOU operator's diagonal there – closes a positive feedback loop: measured on the collocated developing channel (H=16, L=112, Re=100, dt=0.5), the outflow column gains mass from step 2 (mean u 1.009 against an inflow of 0.998), max|u| reaches 4.5e+02 by step 50 and the pressure PCG loses its preconditioner at step 69. The zero-gradient value is what momentum advection at an open boundary has always used (it is what the cell->face average of the outflow-filled cell ghosts came to) and it is local, so the loop does not close. verify_colocated_channel and verify_colocated_bfs are the gates.

The COLOUR and SCALAR transport keep reading the raw uf_: their flux at the outlet SHOULD be the mass-conserving one, which is the whole point of bcCorrectOutflow for them. That is why this is a separate field and not an in-place fix-up.

Definition at line 1257 of file flow_ibm_core.hpp.

References peclet::flow::bcNeumannGhost(), peclet::flow::Solver< Grid >::G, peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

Referenced by peclet::flow::Solver< Grid >::projectCorrectVelocities(), and peclet::flow::Solver< Grid >::seedFaceFieldFromCells().

◆ ufAdvVelocity()

template<class Grid >
bool peclet::flow::Solver< Grid >::ufAdvVelocity ( ) const

Are the advection operators reading the projected face field this step? Collocated grid, setUfAdvection on, and a face field actually built.

The SAME answer must reach the implicit-FOU operator (fou_operator) and the explicit high-order/FOU terms (advect_sou/advect/advect_fou) or the deferred correction stops cancelling at steady state, so every call site reads this one predicate.

Definition at line 1275 of file flow_ibm_core.hpp.

Referenced by peclet::flow::Solver< Grid >::buildAdvStencil(), peclet::flow::Solver< Grid >::buildAdvStencilVar(), peclet::flow::Solver< Grid >::buildRhs(), peclet::flow::Solver< Grid >::buildRhsColoVar(), peclet::flow::Solver< Grid >::buildRhsForced(), peclet::flow::Solver< Grid >::buildRhsVar(), and peclet::flow::Solver< Grid >::step().

◆ ensureAdvStash()

template<class Grid >
bool peclet::flow::Solver< Grid >::ensureAdvStash ( int  c,
bool  adv 
)

◆ buildRhs()

◆ buildRhsForced()

◆ buildRhsVar()

◆ buildRhsVarMom()

◆ buildRhsColoVar()

◆ addCsfRhs()

◆ addCsfRhsCellInterp()

◆ addCsfRhsBlocks()

template<class Grid >
void peclet::flow::Solver< Grid >::addCsfRhsBlocks ( int  c)

Definition at line 699 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::G.

Referenced by peclet::flow::Solver< Grid >::step().

◆ csfDiagnostics()

◆ buildAdvStencil()

◆ buildAdvStencilVar()

◆ applyBackflowStab()

template<class Grid >
void peclet::flow::Solver< Grid >::applyBackflowStab ( int  c)

Definition at line 106 of file flow_ibm_bc.hpp.

References AC, and peclet::flow::Solver< Grid >::G.

Referenced by peclet::flow::Solver< Grid >::step().

◆ maxAbsDiffInner()

template<class Grid >
double peclet::flow::Solver< Grid >::maxAbsDiffInner ( CCConst  a,
CCConst  b 
)

Definition at line 1396 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::G.

Referenced by peclet::flow::Solver< Grid >::step().

◆ velSweepLoop()

template<class Grid >
template<class Fill , class Color , class ColorDu >
void peclet::flow::Solver< Grid >::velSweepLoop ( Fill &&  fill,
Color &&  sweepColor,
ColorDu &&  sweepColorDu,
std::function< double()>  resid = nullptr,
double  bnorm = 0.0 
)

◆ vmgComm()

template<class Grid >
VelocityMG::Comm peclet::flow::Solver< Grid >::vmgComm ( ) const

Definition at line 1486 of file flow_ibm_core.hpp.

Referenced by peclet::flow::Solver< Grid >::smoothComp().

◆ finishResidual()

◆ stencilResidual()

◆ constCoeffResidual()

◆ stencilBnorm()

◆ smoothComp()

template<class Grid >
void peclet::flow::Solver< Grid >::smoothComp ( int  c)

Definition at line 1635 of file flow_ibm_core.hpp.

References AC, peclet::flow::Solver< Grid >::UnitScales::aniso, peclet::flow::Solver< Grid >::applyVelocityBcCompTo(), peclet::flow::Solver< Grid >::bcStencilPath(), peclet::flow::VelocityMG::buildUpwindCoarse(), peclet::flow::Solver< Grid >::chebSolveComp(), peclet::flow::Solver< Grid >::constCoeffResidual(), peclet::flow::diffSmoothColor(), peclet::flow::diffSmoothColorDu(), peclet::flow::Solver< Grid >::effVarRho(), peclet::flow::Solver< Grid >::fillGhostsFaces(), peclet::flow::Solver< Grid >::fillVelGhosts(), peclet::flow::Solver< Grid >::fillVelGhostsTo(), peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::UnitScales::hp, peclet::flow::ibmCleanFluidMask(), peclet::flow::ibmRbgsStencilColor(), peclet::flow::ibmRbgsStencilColorBox(), peclet::flow::ibmRbgsStencilColorDu(), peclet::flow::ibmRbgsStencilColorDuBox(), peclet::flow::ibmVolfrac(), peclet::flow::Solver< Grid >::implicitAdv(), peclet::flow::VelocityMG::lastResidualRatio(), peclet::flow::Solver< Grid >::maskVelocity(), peclet::flow::Solver< Grid >::mixedVelocityMg(), peclet::flow::VelocityMG::setBcApplyL0(), peclet::flow::VelocityMG::setDomainBcOp(), peclet::flow::VelocityMG::setFineStencil(), peclet::flow::VelocityMG::setStaircase(), peclet::flow::VelocityMG::setStaircaseBc(), peclet::flow::VelocityMG::solve(), peclet::flow::Solver< Grid >::stencilBnorm(), peclet::flow::Solver< Grid >::stencilResidual(), peclet::flow::Solver< Grid >::velocityResidualTolerance(), peclet::flow::Solver< Grid >::velSweepLoop(), peclet::flow::Solver< Grid >::vmgComm(), peclet::flow::Solver< Grid >::UnitScales::w, peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

Referenced by peclet::flow::Solver< Grid >::chebSolveComp(), and peclet::flow::Solver< Grid >::step().

◆ chebSolveComp()

◆ pressureBcGhost()

◆ fillVelGhosts()

◆ applyVelocityBcComp()

template<class Grid >
void peclet::flow::Solver< Grid >::applyVelocityBcComp ( int  comp,
int  fold,
bool  doOutflow 
)

◆ fillVelGhostsTo()

◆ applyVelocityBcCompTo()

◆ applyVelocityBcFace()

◆ bcVelFacePair()

◆ applyVelocityBcAll()

◆ setupBcDiffusion()

◆ filterCellField()

◆ project()

◆ projectAssembleDivergence()

◆ projectBuildCoefficients()

◆ projectSolve()

◆ solvePressureSystem()

◆ constraintDivergence()

◆ projectCorrectVelocities()

◆ projectPressureUpdate()

◆ maskVelocity()

◆ minMuInner()

◆ reduceMaxAbsInner()

◆ gatherInner()

◆ scatterInner()

◆ addField()

◆ hasField()

template<class Grid >
bool peclet::flow::Solver< Grid >::hasField ( const std::string &  name) const

Definition at line 1978 of file flow_ibm_core.hpp.

◆ fieldView()

template<class Grid >
CCField peclet::flow::Solver< Grid >::fieldView ( const std::string &  name)

Definition at line 1983 of file flow_ibm_core.hpp.

Referenced by main().

◆ fieldNames()

template<class Grid >
std::vector< std::string > peclet::flow::Solver< Grid >::fieldNames ( ) const

Definition at line 1988 of file flow_ibm_core.hpp.

Referenced by main().

◆ exchangeField()

template<class Grid >
void peclet::flow::Solver< Grid >::exchangeField ( const std::string &  name)

◆ exchangeFieldAdd()

template<class Grid >
void peclet::flow::Solver< Grid >::exchangeFieldAdd ( const std::string &  name)

Definition at line 1998 of file flow_ibm_core.hpp.

◆ getField()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getField ( const std::string &  name)

Definition at line 2014 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::gatherInner().

Referenced by main().

◆ setField()

◆ blockShape()

template<class Grid >
std::array< int, 3 > peclet::flow::Solver< Grid >::blockShape ( ) const

Definition at line 2030 of file flow_ibm_core.hpp.

References peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

Referenced by main().

◆ ghostWidth()

template<class Grid >
int peclet::flow::Solver< Grid >::ghostWidth ( ) const

Definition at line 2035 of file flow_ibm_core.hpp.

References peclet::flow::Solver< Grid >::G.

Referenced by main().

◆ globalResolution()

template<class Grid >
std::array< int, 3 > peclet::flow::Solver< Grid >::globalResolution ( ) const

Definition at line 2040 of file flow_ibm_core.hpp.

◆ blockOrigin()

template<class Grid >
std::array< int, 3 > peclet::flow::Solver< Grid >::blockOrigin ( ) const

Definition at line 2049 of file flow_ibm_core.hpp.

References peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

◆ addScalar()

template<class Grid >
void peclet::flow::Solver< Grid >::addScalar ( const std::string &  name,
double  D,
int  scheme,
int  iters,
bool  cutcell = false 
)

◆ hasScalar()

◆ setScalarBc()

template<class Grid >
void peclet::flow::Solver< Grid >::setScalarBc ( const std::string &  name,
int  face,
int  type,
double  value 
)

Definition at line 52 of file flow_ibm_scalars.hpp.

Referenced by configure(), and main().

◆ advanceScalars()

◆ invalidateScalarCutGeometry()

template<class Grid >
void peclet::flow::Solver< Grid >::invalidateScalarCutGeometry ( )

◆ ensureScalarCutGeometry()

◆ scalarCutGeometry()

◆ scalarGeometryField()

◆ scalarCutCensus()

◆ isCutcellScalar()

template<class Grid >
bool peclet::flow::Solver< Grid >::isCutcellScalar ( const std::string &  name) const

◆ setScalarWall()

template<class Grid >
void peclet::flow::Solver< Grid >::setScalarWall ( const std::string &  name,
int  type,
double  value,
double  coefficient,
int  instance 
)

◆ setScalarSolid()

template<class Grid >
void peclet::flow::Solver< Grid >::setScalarSolid ( const std::string &  name,
double  D,
double  capacity,
double  partition,
double  contactResistance,
int  instance 
)

◆ getScalarSolid()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getScalarSolid ( const std::string &  name)

◆ scalarSolidGeometryField()

◆ setScalarSource()

template<class Grid >
void peclet::flow::Solver< Grid >::setScalarSource ( const std::string &  name,
double  S 
)

◆ setScalarSourceField()

template<class Grid >
void peclet::flow::Solver< Grid >::setScalarSourceField ( const std::string &  name,
const std::vector< double > &  S 
)

◆ setScalarTolerance()

template<class Grid >
void peclet::flow::Solver< Grid >::setScalarTolerance ( const std::string &  name,
double  rtol 
)

◆ setScalarMaxIterations()

template<class Grid >
void peclet::flow::Solver< Grid >::setScalarMaxIterations ( const std::string &  name,
int  maxit 
)

◆ setScalarMeanGradient()

template<class Grid >
void peclet::flow::Solver< Grid >::setScalarMeanGradient ( const std::string &  name,
const std::array< double, 3 > &  G 
)

◆ scalarMeanFlux()

◆ scalarMeanGradPosition()

◆ setScalarBcProfile()

template<class Grid >
void peclet::flow::Solver< Grid >::setScalarBcProfile ( const std::string &  name,
int  face,
const std::vector< double > &  prof,
int  n1,
int  n2 
)

◆ solveScalarSteady()

◆ scalarNumBodies()

◆ scalarWallFlux()

◆ scalarBudget()

◆ scalarFacets()

◆ cutcellScalar()

◆ advanceScalarCutCell()

◆ scalarCutRefusals()

◆ scalarCutAssembleSolve()

template<class Grid >
void peclet::flow::Solver< Grid >::scalarCutAssembleSolve ( ScalarField &  sc,
bool  steady 
)

Definition at line 910 of file flow_ibm_scalars_cutcell.hpp.

References peclet::flow::sco::addOnUnknown(), peclet::flow::sco::advectionBands(), peclet::flow::sco::buildBands(), peclet::flow::sco::buildRhs(), peclet::flow::sco::cellVelocitySumLocal(), peclet::flow::scg::ScalarCutGeometry::census, peclet::flow::sco::clampNonNegative(), peclet::flow::sco::conjMeanGradientShift(), peclet::flow::sco::conjSurrogate(), peclet::flow::sco::conjugateCoefficients(), peclet::flow::ScalarKrylovResult::converged, peclet::flow::Solver< Grid >::UnitScales::diffToInt(), peclet::flow::sco::dirichletFaceFold(), peclet::flow::Solver< Grid >::UnitScales::divToInt(), peclet::flow::sco::dot2Local(), peclet::flow::sco::dot2Reduce(), peclet::flow::sco::dot2TwoLocal(), peclet::flow::sco::dot2TwoReduce(), peclet::flow::sco::dotLocal(), peclet::flow::sco::dotReduce(), peclet::flow::sco::dotTwoLocal(), peclet::flow::sco::dotTwoReduce(), peclet::flow::Solver< Grid >::ensureScalarCutGeometry(), peclet::flow::Solver< Grid >::ensureScalarSolidRecord(), peclet::flow::sco::explicitAdvectionRhs(), peclet::flow::sco::explicitFaceFluxes(), peclet::flow::scg::ScalarCutGeometry::fac, peclet::flow::sco::faceTangents(), peclet::flow::sco::facetCoefficients(), peclet::flow::Solver< Grid >::fillGhosts(), peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::UnitScales::h, peclet::flow::Solver< Grid >::UnitScales::hp, peclet::flow::ScalarKrylovResult::iterations, peclet::flow::scg::ScalarCutGeometry::kappa, peclet::flow::sco::kappaMomentsLocal(), peclet::flow::ScalarMG::kFullTableKappa, peclet::flow::Solver< Grid >::UnitScales::lenToPhys(), peclet::flow::sco::maxabsLocal(), peclet::flow::sco::maxabsReduce(), peclet::flow::sco::maxFacetLocal(), peclet::flow::sco::meanGradientAdvectionRhs(), peclet::flow::sco::meanGradientFaceRhs(), peclet::flow::sco::meanGradientProbeShift(), peclet::flow::scg::ScalarFacetOverlay::n, peclet::flow::scg::ScalarCutCensus::numUnknowns, peclet::flow::sco::openFaceAdvection(), peclet::flow::Solver< Grid >::UnitScales::org, peclet::flow::sco::overlayRhs(), peclet::flow::Solver< Grid >::pressureBottomExtent(), peclet::flow::ScalarKrylovResult::ref, peclet::flow::residentKrylov(), peclet::flow::skr::residualFrom(), peclet::flow::scg::ScalarCutGeometry::sax, peclet::flow::scg::ScalarCutGeometry::say, peclet::flow::scg::ScalarCutGeometry::saz, peclet::flow::scalarBiCGStab(), peclet::flow::Solver< Grid >::scalarCutAdvection(), peclet::flow::Solver< Grid >::scalarCutMatvec(), peclet::flow::Solver< Grid >::scalarCutMatvecTwo(), peclet::flow::Solver< Grid >::scalarCutRefusals(), peclet::flow::Solver< Grid >::scalarCutWarnings(), peclet::flow::Solver< Grid >::scalarMaterialTable(), peclet::flow::Solver< Grid >::scalarMeanGradPosition(), peclet::flow::Solver< Grid >::scalarNumBodies(), peclet::flow::Solver< Grid >::scalarRootRank(), peclet::flow::sco::solidBands(), peclet::flow::sco::solidFaceProducts(), peclet::flow::sco::solidMass(), peclet::flow::sco::solidMeanGradientFaceRhs(), peclet::flow::sco::solidMomentsLocal(), peclet::flow::sco::solidRhs(), peclet::flow::Solver< Grid >::UnitScales::speedToInt(), peclet::flow::sco::sumUnknownLocal(), peclet::flow::sco::surrogateDiagonal(), peclet::flow::ScalarKrylovResult::trueRes, peclet::flow::scg::ScalarCutGeometry::unknown, peclet::flow::scg::ScalarCutGeometry::version, peclet::flow::Solver< Grid >::UnitScales::w, peclet::flow::C3::x, peclet::flow::C3::y, peclet::flow::C3::z, and peclet::flow::sco::zeroNonUnknown().

Referenced by peclet::flow::Solver< Grid >::advanceScalarCutCell(), and peclet::flow::Solver< Grid >::solveScalarSteady().

◆ scalarCutWarnings()

◆ scalarRootRank()

template<class Grid >
bool peclet::flow::Solver< Grid >::scalarRootRank ( ) const

rank 0 (or not distributed): the one that prints a warning

Definition at line 1599 of file flow_ibm_scalars_cutcell.hpp.

Referenced by peclet::flow::Solver< Grid >::scalarCutAdvection(), and peclet::flow::Solver< Grid >::scalarCutAssembleSolve().

◆ scalarCutMatvec()

◆ scalarCutMatvecTwo()

◆ ensureScalarSolidRecord()

◆ scalarMaterialTable()

◆ scalarFaceFlux()

template<class Grid >
Solver< Grid >::ScalarFaceFlux peclet::flow::Solver< Grid >::scalarFaceFlux ( int  a) const

◆ scalarCaptureOpenFaceFlux()

◆ scalarCutAdvection()

◆ applySuperficialVelocity()

◆ superficialVelocityPrecheck()

template<class Grid >
void peclet::flow::Solver< Grid >::superficialVelocityPrecheck ( ) const

Definition at line 331 of file flow_ibm_project.hpp.

Referenced by peclet::flow::Solver< Grid >::step().

◆ enableVof()

◆ setVofWispEps()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofWispEps ( double  eps)

WO-R2 item 4 — the wisp threshold on the advector's mixed-cell predicate and on the interface Courant band.

Default 1e-8 once VoF is enabled; 0 restores the V1 predicate bit for bit. See vof::wyIsMixed(c, eps) and vof::wyColourJump.

Definition at line 798 of file flow_ibm_vof.hpp.

References peclet::flow::vof::WyAdvector::wispEps.

Referenced by configurePacking(), and peclet::flow::Solver< Grid >::enablePhaseChange().

◆ vofWispEps()

template<class Grid >
double peclet::flow::Solver< Grid >::vofWispEps ( ) const

Definition at line 808 of file flow_ibm_vof.hpp.

◆ defaultVofWispEps()

template<class Grid >
constexpr double peclet::flow::Solver< Grid >::defaultVofWispEps ( )
staticconstexpr

The value enableVof starts from.

A standalone WyAdvector that a test compares the solver against must be given the SAME value; set_vof_wisp_eps(0) is the "V1 verbatim" ablation.

Definition at line 813 of file flow_ibm_vof.hpp.

◆ vofEnabled()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofEnabled ( ) const

Definition at line 818 of file flow_ibm_vof.hpp.

◆ setVof()

◆ getVof()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getVof ( )

Definition at line 832 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::gatherInner().

Referenced by main().

◆ vofDiagnostics()

◆ vofSolidColourSum()

◆ vofMaxCourant()

◆ vofLastCourant()

template<class Grid >
double peclet::flow::Solver< Grid >::vofLastCourant ( ) const

Definition at line 879 of file flow_ibm_vof.hpp.

References peclet::flow::vof::WyAdvector::lastCfl().

◆ setVofCflLimit()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofCflLimit ( double  v)

Definition at line 884 of file flow_ibm_vof.hpp.

References peclet::flow::vof::WyAdvector::cflLimit.

◆ vofCflLimit()

template<class Grid >
double peclet::flow::Solver< Grid >::vofCflLimit ( ) const

Definition at line 891 of file flow_ibm_vof.hpp.

◆ requireVofGeometry()

◆ vofHasGeometry()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofHasGeometry ( ) const

Definition at line 915 of file flow_ibm_vof.hpp.

References peclet::flow::vof::WyAdvector::hasGeometry().

◆ setVofCutFluxClamp()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofCutFluxClamp ( bool  on)

Definition at line 920 of file flow_ibm_vof.hpp.

References peclet::flow::vof::WyAdvector::cutFluxClamp.

◆ vofCutFluxClamp()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofCutFluxClamp ( ) const

Definition at line 925 of file flow_ibm_vof.hpp.

References peclet::flow::vof::WyAdvector::cutFluxClamp.

◆ setVofSolidColourZero()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofSolidColourZero ( bool  on)

Definition at line 930 of file flow_ibm_vof.hpp.

◆ vofSolidColourZero()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofSolidColourZero ( ) const

Definition at line 935 of file flow_ibm_vof.hpp.

◆ getVofFilledColour()

◆ getVofGeometry()

◆ setContactAngle()

◆ requireWettingWall()

◆ setContactAngleField()

◆ contactAngleSet()

template<class Grid >
bool peclet::flow::Solver< Grid >::contactAngleSet ( ) const

Definition at line 1010 of file flow_ibm_vof.hpp.

◆ contactAngle()

template<class Grid >
double peclet::flow::Solver< Grid >::contactAngle ( ) const

Definition at line 1015 of file flow_ibm_vof.hpp.

◆ setContactAnglePivot()

template<class Grid >
void peclet::flow::Solver< Grid >::setContactAnglePivot ( int  mode)

Definition at line 1020 of file flow_ibm_vof.hpp.

References peclet::flow::vof::WyAdvector::wettingPivot.

◆ contactAnglePivot()

template<class Grid >
int peclet::flow::Solver< Grid >::contactAnglePivot ( ) const

Definition at line 1028 of file flow_ibm_vof.hpp.

◆ setContactAngleDynamic()

◆ setWallSlipLength()

template<class Grid >
void peclet::flow::Solver< Grid >::setWallSlipLength ( double  lambdaCells)

WO-V6b – the VELOCITY half of the dynamic contact line.

Replaces the TANGENTIAL no-slip Dirichlet datum of the Robust-Scaled cut-cell closure by the Navier condition u_t(wall) = lambda du_t/dn; the wall-NORMAL component stays impermeable (the moving-body datum if any). lambdaCells is lambda/Delta; 0 restores the validated no-slip closure bit-identically. Shares its value with set_contact_angle_dynamic's cut-off.

Definition at line 1062 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::buildVelocityOverlays(), peclet::flow::vof::VofDynamicWetting::dynamic, peclet::flow::Solver< Grid >::UnitScales::lenToInt(), peclet::flow::Solver< Grid >::rebuildStencils(), and peclet::flow::vof::VofDynamicWetting::slip.

Referenced by configure().

◆ wallSlipLength()

template<class Grid >
double peclet::flow::Solver< Grid >::wallSlipLength ( ) const

The Navier slip length in the caller's units (0 = no-slip).

Definition at line 1082 of file flow_ibm_vof.hpp.

◆ wallSlipSandwichCells()

template<class Grid >
std::array< int, 3 > peclet::flow::Solver< Grid >::wallSlipSandwichCells ( ) const

Cut-cell axes at which a one-cell fluid gap kept the no-slip closure (per component).

Definition at line 1087 of file flow_ibm_vof.hpp.

◆ setContactAngleHysteresis()

◆ setContactAngleDynamicOff()

◆ contactAngleDynamic()

template<class Grid >
bool peclet::flow::Solver< Grid >::contactAngleDynamic ( ) const

Definition at line 1115 of file flow_ibm_vof.hpp.

References peclet::flow::vof::VofDynamicWetting::dynamic.

◆ contactAngleHysteresis()

template<class Grid >
bool peclet::flow::Solver< Grid >::contactAngleHysteresis ( ) const

◆ contactAngleSlip()

template<class Grid >
double peclet::flow::Solver< Grid >::contactAngleSlip ( ) const

Definition at line 1125 of file flow_ibm_vof.hpp.

References peclet::flow::vof::VofDynamicWetting::slip.

◆ setContactAngleSmoothing()

template<class Grid >
void peclet::flow::Solver< Grid >::setContactAngleSmoothing ( bool  on)

Definition at line 1130 of file flow_ibm_vof.hpp.

References peclet::flow::vof::VofDynamicWetting::smooth.

◆ setContactAngleClamp()

template<class Grid >
void peclet::flow::Solver< Grid >::setContactAngleClamp ( double  loDeg,
double  hiDeg 
)

◆ effectiveContactSigma()

template<class Grid >
double peclet::flow::Solver< Grid >::effectiveContactSigma ( ) const

Definition at line 1144 of file flow_ibm_vof.hpp.

Referenced by peclet::flow::Solver< Grid >::vofFillGhosts().

◆ getVofDynamicField()

◆ contactAngleDiagnostics()

◆ applyContactAngle()

◆ buildVofCellVelocity()

◆ vofAdvector()

template<class Grid >
const vof::WyAdvector & peclet::flow::Solver< Grid >::vofAdvector ( ) const

Definition at line 1300 of file flow_ibm_vof.hpp.

◆ setVofStepParity()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofStepParity ( long  n)

Definition at line 1305 of file flow_ibm_vof.hpp.

◆ vofStepParity()

template<class Grid >
long peclet::flow::Solver< Grid >::vofStepParity ( ) const

Definition at line 1312 of file flow_ibm_vof.hpp.

◆ advectVofKinematic()

◆ enableVofBlocks()

template<class Grid >
void peclet::flow::Solver< Grid >::enableVofBlocks ( const std::vector< std::array< double, 4 > > &  seeds)

◆ prepareVofBlocks()

◆ finishVofBlocks()

◆ vofBlocksEnabled()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofBlocksEnabled ( ) const

Definition at line 1436 of file flow_ibm_vof.hpp.

◆ disableVofBlocks()

template<class Grid >
void peclet::flow::Solver< Grid >::disableVofBlocks ( )

Definition at line 1441 of file flow_ibm_vof.hpp.

◆ advectVofBlocks()

◆ vofBlockStats()

template<class Grid >
std::vector< vof::VofBlockStats > peclet::flow::Solver< Grid >::vofBlockStats ( ) const

Definition at line 1475 of file flow_ibm_vof.hpp.

Referenced by ledger(), and main().

◆ vofBlockImbalance()

template<class Grid >
double peclet::flow::Solver< Grid >::vofBlockImbalance ( ) const

Definition at line 1482 of file flow_ibm_vof.hpp.

◆ vofBlockCensus()

template<class Grid >
void peclet::flow::Solver< Grid >::vofBlockCensus ( std::vector< long > &  masters,
std::vector< long > &  cells 
) const

Definition at line 1489 of file flow_ibm_vof.hpp.

◆ setVofBlockAssign()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofBlockAssign ( int  mode,
long  every 
)

Definition at line 1496 of file flow_ibm_vof.hpp.

◆ vofBlockAssign()

template<class Grid >
int peclet::flow::Solver< Grid >::vofBlockAssign ( ) const

Definition at line 1505 of file flow_ibm_vof.hpp.

◆ vofBlockImbalanceOf()

template<class Grid >
double peclet::flow::Solver< Grid >::vofBlockImbalanceOf ( int  mode) const

Definition at line 1512 of file flow_ibm_vof.hpp.

◆ setVofBlockDeviceStaging()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofBlockDeviceStaging ( bool  on)

Definition at line 1533 of file flow_ibm_vof.hpp.

◆ setVofBlockPool()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofBlockPool ( bool  on)

Definition at line 1540 of file flow_ibm_vof.hpp.

◆ vofBlockPoolStats()

template<class Grid >
std::array< long, 2 > peclet::flow::Solver< Grid >::vofBlockPoolStats ( ) const

Definition at line 1549 of file flow_ibm_vof.hpp.

◆ enableVofBlocksFromField()

◆ vofBlockColour()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::vofBlockColour ( long  id)

Definition at line 1572 of file flow_ibm_vof.hpp.

◆ vofBlockKappa()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::vofBlockKappa ( long  id)

Definition at line 1581 of file flow_ibm_vof.hpp.

◆ vofBlockSet()

template<class Grid >
const vof::VofBlockSet * peclet::flow::Solver< Grid >::vofBlockSet ( ) const
inline

The block container itself, read-only (tests: the metric and tunables its cascades carry).

Definition at line 3282 of file flow_ibm.hpp.

◆ enableVofBlocksFromColours()

template<class Grid >
void peclet::flow::Solver< Grid >::enableVofBlocksFromColours ( const std::vector< std::array< int, 6 > > &  boxes,
const std::vector< std::vector< double > > &  colours 
)

◆ enableVofBlockCsf()

◆ computeVofBlockCsf()

◆ vofBlockOverlapCensus()

template<class Grid >
VofOverlapCensus peclet::flow::Solver< Grid >::vofBlockOverlapCensus ( ) const
inline

Definition at line 3318 of file flow_ibm.hpp.

Referenced by main().

◆ updateVofBlockOverlap()

◆ setVofBlockOverlapDensity()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofBlockOverlapDensity ( bool  enabled)

◆ setVofBlockDebris()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofBlockDebris ( bool  enabled)

Definition at line 618 of file flow_ibm_vof.hpp.

◆ setVofPhantomCapillaryBound()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofPhantomCapillaryBound ( bool  enabled)

Definition at line 612 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::VofOverlapCensus::active.

Referenced by configurePair().

◆ getVofBlockForce()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getVofBlockForce ( int  c)

Definition at line 1652 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::gatherInner().

Referenced by main().

◆ vofBlockCurvatureStats()

template<class Grid >
vof::VofCurvature::Stats peclet::flow::Solver< Grid >::vofBlockCurvatureStats ( ) const

Definition at line 1659 of file flow_ibm_vof.hpp.

Referenced by main().

◆ setRhoFaceHarmonic()

template<class Grid >
void peclet::flow::Solver< Grid >::setRhoFaceHarmonic ( bool  on)

Definition at line 2054 of file flow_ibm_core.hpp.

◆ setPressureExactResidual()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureExactResidual ( bool  on)

WO-R2 item 3 — the exact (matrix-free, double, flux-form) level-0 operator apply in the residual and the Krylov matvec.

Per solver; enableVof turns it on, and this is the ablation switch.

Definition at line 2060 of file flow_ibm_core.hpp.

References peclet::flow::CutcellMG::setExactResidual().

Referenced by peclet::flow::Solver< Grid >::enableVof().

◆ setOutflowOperatorCoefficient()

template<class Grid >
void peclet::flow::Solver< Grid >::setOutflowOperatorCoefficient ( bool  on)

WO-R2 item 1 ABLATION: set_outflow_operator_coefficient(False) restores the pre-WO-R2 operator, whose Dirichlet domain-face rows carried the literal openness 1.0 instead of the variable-density coefficient open_f*rho0/rho_f.

It exists so the before/after of the Nusselt film and the outflow divergence stays measurable; there is no reason to set it in production. ON by default.

Definition at line 2066 of file flow_ibm_core.hpp.

◆ outflowOperatorCoefficient()

template<class Grid >
bool peclet::flow::Solver< Grid >::outflowOperatorCoefficient ( ) const

Definition at line 2071 of file flow_ibm_core.hpp.

◆ pressureExactResidual()

template<class Grid >
bool peclet::flow::Solver< Grid >::pressureExactResidual ( ) const

Definition at line 2076 of file flow_ibm_core.hpp.

◆ rhoFaceHarmonic()

template<class Grid >
bool peclet::flow::Solver< Grid >::rhoFaceHarmonic ( ) const

Definition at line 2081 of file flow_ibm_core.hpp.

◆ setOutflowRhoCorrection()

template<class Grid >
void peclet::flow::Solver< Grid >::setOutflowRhoCorrection ( bool  on)

Definition at line 2086 of file flow_ibm_core.hpp.

◆ outflowRhoCorrection()

template<class Grid >
bool peclet::flow::Solver< Grid >::outflowRhoCorrection ( ) const

Definition at line 2091 of file flow_ibm_core.hpp.

◆ setVofInflow()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofInflow ( int  f,
double  value 
)

Colour of the fluid entering through inflow face f (0..5 = -x,+x,-y,+y,-z,+z), in [0,1].

The face must already be an inflow (set_domain_bc(f, 2, ...)).

Definition at line 1666 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::checkVofBcFace(), and peclet::flow::Solver< Grid >::vofBcArm().

Referenced by configureColoJet(), configureJet(), configurePacking(), configurePacking(), configureSlug(), and main().

◆ setVofInflowProfile()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofInflowProfile ( int  f,
const std::vector< double > &  prof,
int  nb,
int  nc 
)

Per-position inflow colour on face f: prof is (nb, nc) on the INNER grid of the face's two perpendicular axes (the same layout and the same clamp resampling set_domain_bc_profile uses for the velocity).

Definition at line 1675 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::checkVofBcFace(), and peclet::flow::Solver< Grid >::vofBcArm().

◆ setVofBackflow()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofBackflow ( int  f,
double  value 
)

inletOutlet backflow colour on outflow face f (default 0 = gas): where the boundary face velocity points back INTO the domain, the colour ghost carries this value instead of the zero-gradient copy (Rusche 2002 thesis section 4; OpenFOAM inletOutletFvPatchField).

Where the fluid leaves, zero-gradient is kept and what leaves is what is inside.

Definition at line 1687 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::checkVofBcFace(), and peclet::flow::Solver< Grid >::vofBcArm().

Referenced by configureColoJet(), configureJet(), configurePacking(), configurePacking(), and configureSlug().

◆ vofBcActive()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofBcActive ( ) const

Definition at line 1695 of file flow_ibm_vof.hpp.

◆ vofBcVolumes()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::vofBcVolumes ( ) const

Signed liquid volume that crossed each of the six domain faces during the LAST colour advection, in cell-volume units, POSITIVE for liquid entering the domain.

Local to this rank (a distributed caller sums them, as it does for every other VoF diagnostic).

Definition at line 1700 of file flow_ibm_vof.hpp.

Referenced by main().

◆ vofBcVolumesTotal()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::vofBcVolumesTotal ( ) const

The same, accumulated since enable_vof() (or the last resetVofBcVolumes()).

Changing a boundary colour mid-run deliberately does NOT reset it — a slug injection is exactly the case where the running total is the quantity of interest.

Definition at line 1705 of file flow_ibm_vof.hpp.

Referenced by main().

◆ resetVofBcVolumes()

template<class Grid >
void peclet::flow::Solver< Grid >::resetVofBcVolumes ( )

Definition at line 1710 of file flow_ibm_vof.hpp.

◆ vofApplyColourBc()

template<class Grid >
void peclet::flow::Solver< Grid >::vofApplyColourBc ( CCField  f)

The colour field's boundary rules, applied at the END of vofFillGhosts — i.e.

after the halo/periodic exchange and after clampFill, so the BC overwrite wins exactly as the property/velocity BCs win over the halo fill (WO-F's fill-then-BC order).

TWO GUARDS, both load-bearing:

  • vofBcActive_ — with no VoF BC set this returns before touching anything, which is what makes gate G5 (every existing VoF ctest bit-identical) hold by construction.
  • the identity test against vofAdv_.colour() — vofFillGhosts is the advector's generic exchange hook and rung V2b calls it on the half-shifted colour and on the momentum velocity fields too (momentum_advect.hpp). A colour BC applied to those would be nonsense. (Consequence, recorded rather than hidden: under enable_vof_momentum the half-shifted colour keeps the zero-gradient band at an inflow face. It matters only when the inflow colour differs from the colour of the fluid already at the boundary.)

Definition at line 1716 of file flow_ibm_vof.hpp.

References peclet::flow::vof::bcColourBackflow(), peclet::flow::vof::bcColourConst(), peclet::flow::vof::bcColourProfile(), peclet::flow::vof::WyAdvector::colour(), peclet::flow::vof::WyAdvector::faceVel(), peclet::flow::Solver< Grid >::kVofG, peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

Referenced by peclet::flow::Solver< Grid >::vofExchangeRaw().

◆ vofBcPropGhosts()

template<class Grid >
void peclet::flow::Solver< Grid >::vofBcPropGhosts ( CCField  f)

WO-R item 5 — the Neumann property policy at an inflow face.

fillPropGhosts copies the inner cell's value into the ghost. At a liquid inlet next to a gas interior that makes the inlet FACE density (the arithmetic mean of inner and ghost, used by the momentum time term and by the projection coefficient alike) the interior's density, wrong by up to the full ratio. rho and mu are closures of C and the colour ghost now carries the inflow value, so the consistent repair is not a second BC rule but the SAME closure evaluated on the ghost band: rho_ghost = rho(C_inflow) by construction.

Two cases, both keyed on the field identity:

  • f IS the G=2 colour mirror -> put the inflow colour in its ghost band (the Neumann copy just overwrote it). This has to happen first, and it does: advectVof fills C's ghosts and project() fills rho's later in the step.
  • f is a closure OUTPUT -> re-evaluate that closure on the ghost band. Anything else (a field with no closure, a hand-set rho) keeps the Neumann copy — there is no C to derive it from and inventing one would be a silent model.

Definition at line 1740 of file flow_ibm_vof.hpp.

References peclet::flow::applyClosureFaceGhost(), peclet::flow::vof::bcColourConst(), peclet::flow::vof::bcColourProfile(), peclet::flow::Solver< Grid >::G, peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

Referenced by peclet::flow::Solver< Grid >::fillPropGhosts().

◆ vofRebuildBcBlock()

◆ resampleFaceScalar()

template<class Grid >
CCField peclet::flow::Solver< Grid >::resampleFaceScalar ( const std::vector< double > &  prof,
int  nb,
int  nc,
int  face,
C3  ext,
int  g,
int &  outNc 
)

Clamp-resample a per-position face scalar from the user's (nb, nc) INNER grid onto the ghost-inclusive (b, c) plane of an extended block, so the fill kernel indexes it directly by face position.

Same rule as setDomainBcProfile, one component instead of three.

Definition at line 1793 of file flow_ibm_vof.hpp.

References peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

Referenced by peclet::flow::Solver< Grid >::vofRebuildBcBlock().

◆ checkVofBcFace()

template<class Grid >
void peclet::flow::Solver< Grid >::checkVofBcFace ( int  f,
int  wantType,
const char *  who 
)

A VoF boundary colour is only meaningful on a face that already carries the matching domain BC, and getting that wrong is silent (the ghost band would be written and then never read as boundary data).

Fail loudly instead.

Definition at line 1811 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::enableVof().

Referenced by peclet::flow::Solver< Grid >::setVofBackflow(), peclet::flow::Solver< Grid >::setVofInflow(), and peclet::flow::Solver< Grid >::setVofInflowProfile().

◆ vofBcArm()

template<class Grid >
void peclet::flow::Solver< Grid >::vofBcArm ( )

◆ vofHarvestBcVolumes()

template<class Grid >
void peclet::flow::Solver< Grid >::vofHarvestBcVolumes ( )

Move the advector's per-face boundary volume ledger into the solver's, once per advection.

Definition at line 1837 of file flow_ibm_vof.hpp.

References peclet::flow::vof::WyAdvector::bcFaceVolume().

Referenced by peclet::flow::Solver< Grid >::advectVof(), and peclet::flow::Solver< Grid >::advectVofMomentum().

◆ computeVofCurvature()

◆ vofCurvatureStats()

template<class Grid >
vof::VofCurvature::Stats peclet::flow::Solver< Grid >::vofCurvatureStats ( ) const

Definition at line 1871 of file flow_ibm_vof.hpp.

Referenced by main().

◆ getVofCurvature()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getVofCurvature ( )

The interface curvature kappa = 2H in the caller's units, i.e.

1/LENGTH (the internal field is 1/h; kappa_phys = kappa'/hRef).

Definition at line 1876 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::UnitScales::curvToPhys(), and peclet::flow::Solver< Grid >::gatherInner().

Referenced by main().

◆ getVofCurvatureBranch()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getVofCurvatureBranch ( )

Definition at line 1888 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::gatherInner().

Referenced by main().

◆ setVofCurvatureWeightWidth()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofCurvatureWeightWidth ( double  d)

Definition at line 1895 of file flow_ibm_vof.hpp.

References peclet::flow::vof::VofCurvature::weightWidth.

◆ vofCurvatureWeightWidth()

template<class Grid >
double peclet::flow::Solver< Grid >::vofCurvatureWeightWidth ( ) const

Definition at line 1900 of file flow_ibm_vof.hpp.

References peclet::flow::vof::VofCurvature::weightWidth.

◆ setVofCurvatureMixedHeightFit()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofCurvatureMixedHeightFit ( bool  on)

◆ vofCurvatureMixedHeightFit()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofCurvatureMixedHeightFit ( ) const

◆ setSurfaceTension()

◆ surfaceTension()

template<class Grid >
double peclet::flow::Solver< Grid >::surfaceTension ( ) const

The surface tension in the caller's units (what set_surface_tension was given).

Definition at line 1941 of file flow_ibm_vof.hpp.

◆ setVofInterfaceEps()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofInterfaceEps ( double  eps)

Definition at line 1946 of file flow_ibm_vof.hpp.

References peclet::flow::vof::VofCurvature::interfaceEps.

◆ vofInterfaceEps()

template<class Grid >
double peclet::flow::Solver< Grid >::vofInterfaceEps ( ) const

Definition at line 1953 of file flow_ibm_vof.hpp.

◆ setVofBlockKappaClip()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofBlockKappaClip ( bool  enabled,
double  kappaMaxPhys = -1.0 
)

◆ setCsfMode()

template<class Grid >
void peclet::flow::Solver< Grid >::setCsfMode ( int  m)

Definition at line 1975 of file flow_ibm_vof.hpp.

◆ csfMode()

template<class Grid >
int peclet::flow::Solver< Grid >::csfMode ( ) const

Definition at line 1980 of file flow_ibm_vof.hpp.

◆ vofBlockCsf()

◆ csfActive()

◆ setVofKappaFrozen()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofKappaFrozen ( bool  on)

Definition at line 1995 of file flow_ibm_vof.hpp.

◆ vofKappaFrozen()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofKappaFrozen ( ) const

Definition at line 2000 of file flow_ibm_vof.hpp.

◆ setVofKappaConstant()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofKappaConstant ( double  kappa)

kappa is a PHYSICAL curvature, 1/length (the internal field is 1/h; see vof_curvature()).

Definition at line 2005 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::addField(), peclet::flow::Solver< Grid >::UnitScales::curvToPhys(), and peclet::flow::Solver< Grid >::enableVof().

Referenced by configure().

◆ capillaryDt()

template<class Grid >
double peclet::flow::Solver< Grid >::capillaryDt ( )

The Brackbill capillary limit in the CALLER's time unit.

UNITS NOTE for the whole VoF stack. The colour advector runs on the UNIT LATTICE like every other operator here (WyAdvector::h() stays 1 and its Courant number is the index ‘v*dt’, which IS the physicalu*dt/h‘), so nothing inside it changes with the domain. What crosses the boundary changes: sigma on the way in, kappa and every TIME on the way out. Check: dt’ = sqrt((rho1'+rho2')/(4 pi sigma')) with rho' = rho/rhoRef and sigma' = sigma*tRef^2/(rhoRef*hRef^3) gives exactly sqrt((rho1+rho2)hRef^3/(4 pi sigma))/tRef.

Definition at line 2017 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::capillaryDtInternal(), and peclet::flow::Solver< Grid >::UnitScales::timeToPhys().

Referenced by configure(), configure(), configure(), main(), and peclet::flow::Solver< Grid >::vofStepLimits().

◆ capillaryDtInternal()

◆ setCapillaryCfl()

template<class Grid >
void peclet::flow::Solver< Grid >::setCapillaryCfl ( double  f)

Definition at line 2041 of file flow_ibm_vof.hpp.

◆ capillaryCfl()

template<class Grid >
double peclet::flow::Solver< Grid >::capillaryCfl ( ) const

Definition at line 2046 of file flow_ibm_vof.hpp.

◆ vofStepLimits()

template<class Grid >
Solver< Grid >::VofStepLimits peclet::flow::Solver< Grid >::vofStepLimits ( )

Both limits at the current state, in the CALLER's time unit (courant is dimensionless).

Definition at line 2051 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::capillaryDt(), and peclet::flow::Solver< Grid >::vofMaxCourant().

Referenced by peclet::flow::Solver< Grid >::stepAdaptive().

◆ phaseDensitySum()

◆ phaseDensityRange()

◆ stepAdaptive()

template<class Grid >
double peclet::flow::Solver< Grid >::stepAdaptive ( double  cflTarget,
double  capillaryCflTarget,
double  dtMax 
)

◆ vofStepPrecheck()

◆ capillaryThrowMessage()

◆ updateVofCurvature()

◆ advectVof()

◆ enableVofMomentum()

template<class Grid >
void peclet::flow::Solver< Grid >::enableVofMomentum ( double  rhoGasPhys,
double  rhoLiquidPhys 
)

rhoGas / rhoLiquid are PHYSICAL densities, the same numbers the rho closure is given.

Refused together with the block container (enableVofBlocks*), in either call order.

Definition at line 2245 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::enableVof(), peclet::flow::vof::MomentumConsistentAdvector::init(), peclet::flow::kVofMomBlocksMsg, and peclet::flow::Solver< Grid >::UnitScales::rhoToInt().

Referenced by configure().

◆ vofMomentumEnabled()

template<class Grid >
bool peclet::flow::Solver< Grid >::vofMomentumEnabled ( ) const

Definition at line 2270 of file flow_ibm_vof.hpp.

◆ setVofRhoFloorFrac()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofRhoFloorFrac ( double  f)

◆ vofRhoFloorFrac()

template<class Grid >
double peclet::flow::Solver< Grid >::vofRhoFloorFrac ( ) const

◆ vofRhoFloor()

template<class Grid >
double peclet::flow::Solver< Grid >::vofRhoFloor ( ) const

◆ setVofMomentumMuscl()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofMomentumMuscl ( bool  on)

◆ setVofMomentumCellFlag()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofMomentumCellFlag ( bool  on)

◆ setVofFluxClamp()

template<class Grid >
void peclet::flow::Solver< Grid >::setVofFluxClamp ( bool  on)

◆ vofMomentumDiagnostics()

◆ getVofAdvectedVelocity()

template<class Grid >
std::vector< double > peclet::flow::Solver< Grid >::getVofAdvectedVelocity ( int  c)

Definition at line 2312 of file flow_ibm_vof.hpp.

References peclet::flow::Solver< Grid >::gatherInner().

Referenced by main().

◆ advectVofMomentum()

◆ enablePhaseChange()

template<class Grid >
void peclet::flow::Solver< Grid >::enablePhaseChange ( double  rhoG,
double  rhoL,
double  hlv 
)

Turn on phase change.

rhoG/rhoL are the phase densities used by the regression (dV = mdot A dt / rho_l) and by the divergence source (S = mdot A (1/rho_g - 1/rho_l)); they are given EXPLICITLY rather than read off a closure, exactly as enable_vof_momentum does and for the same reason. hlv is the latent heat (energy per mass) and is only used by the thermal mass flux. All three are PHYSICAL (kept verbatim in pc*Phys_, converted by pcRefreshUnits, so a reference scale pinned later re-derives them). Registers "mdot" and "pc_source", which hold INTERNAL values (mdotToInt, divToInt of UnitScales).

Definition at line 14 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::addField(), peclet::flow::Solver< Grid >::enableVof(), peclet::flow::Solver< Grid >::pcRefreshUnits(), and peclet::flow::Solver< Grid >::setVofWispEps().

Referenced by configure(), and main().

◆ phaseChangeEnabled()

template<class Grid >
bool peclet::flow::Solver< Grid >::phaseChangeEnabled ( ) const

Definition at line 67 of file flow_ibm_phase_change.hpp.

◆ setMassFluxUniform()

template<class Grid >
void peclet::flow::Solver< Grid >::setMassFluxUniform ( double  v)

Prescribe a UNIFORM mass flux (P0), in mass per area per time.

Overwrites "mdot" on the inner cells and its ghosts with the INTERNAL value, so under an armed extent the reference density and time must already be pinned (requireScalesPinned): the field is not re-derived later.

Definition at line 72 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::UnitScales::mdotToInt(), peclet::flow::Solver< Grid >::requirePhaseChange(), and peclet::flow::Solver< Grid >::requireScalesPinned().

Referenced by main().

◆ setMassFlux()

template<class Grid >
void peclet::flow::Solver< Grid >::setMassFlux ( const std::vector< double > &  v)

◆ setPhaseChangeThermal()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeThermal ( const std::string &  tname,
double  Tsat,
double  kg,
double  kl,
double  Rint 
)

P1: compute mdot each step from the registered scalar tname by the one-sided pure-cell weighted least-squares gradients of vof/phase_change.hpp.

Tsat is the saturation temperature (never rescaled), kg/kl the phase conductivities (power per length per kelvin, physical) and Rint the interfacial heat-transfer resistance of the Schrage/IHTR Robin condition T_G = T_sat + mdot R_int (Bureš & Sato 2021); Rint = 0 is the hard Dirichlet and is the default.

Definition at line 127 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::hasScalar(), peclet::flow::Solver< Grid >::isCutcellScalar(), peclet::flow::Solver< Grid >::pcRefreshUnits(), peclet::flow::Solver< Grid >::pcUpdateThermalMask(), peclet::flow::Solver< Grid >::requirePhaseChange(), and peclet::flow::Solver< Grid >::scalarDirichletMask().

Referenced by configure(), and main().

◆ setPhaseChangeThermalOff()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeThermalOff ( )

Definition at line 149 of file flow_ibm_phase_change.hpp.

◆ setPhaseChangePlaneDirichlet()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangePlaneDirichlet ( bool  on)

The PLANE-ANCHORED (ghost-fluid) Dirichlet condition, ON by default.

Rungs P0/P1 pinned the whole interfacial CELL at T_G, so the numerical thermal boundary sat at the cell CENTRE while the mass-flux gradient is fitted from the PLIC PLANE — an O(h) mismatch that changes sign as the interface sweeps through a cell, and the first-order component of the P1 Stefan error (WO-P01 finding 6). With this on, the interfacial cell is instead given the value the one-sided linear profile takes at the cell centre, T_cell = T_G + (dT/dn) phi_c, with phi_c the signed normal distance from the plane to the centre and dT/dn the SAME weighted least-squares one-sided fit the mass flux uses, refitted on the CURRENT colour and temperature. On a saturated side the fit returns 0 and the condition degenerates to the hard Dirichlet exactly, so it is inert wherever the old form was right. set_phase_change_plane_dirichlet(False) restores the P0/P1 behaviour bit-for-bit.

Definition at line 154 of file flow_ibm_phase_change.hpp.

Referenced by main().

◆ phaseChangePlaneDirichlet()

template<class Grid >
bool peclet::flow::Solver< Grid >::phaseChangePlaneDirichlet ( ) const

Definition at line 159 of file flow_ibm_phase_change.hpp.

◆ setPhaseChangeQuadraticFit()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeQuadraticFit ( bool  on)

The QUADRATIC one-sided gradient fit (T - T_G = G phi + Q phi^2) instead of the linear one.

This is VOF_PLAN §9 item 1's Aslam quadratic extrapolation in least-squares form: the same samples and the same stencil reach, one more basis function. Once the plane-anchored Dirichlet has removed the cell-centre mismatch, the linear fit's ‘O(T’' h)` curvature bias is the leading error of the rung.

Definition at line 164 of file flow_ibm_phase_change.hpp.

Referenced by main().

◆ phaseChangeQuadraticFit()

template<class Grid >
bool peclet::flow::Solver< Grid >::phaseChangeQuadraticFit ( ) const

Definition at line 169 of file flow_ibm_phase_change.hpp.

◆ setPhaseChangeArea()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeArea ( int  mode)

WO-P3c — which geometry the interfacial AREA comes from.

A_Gamma enters the plane shift (dV = mdot A dt / rho_l) and the divergence source (S = mdot A (1/rho_g - 1/rho_l)), so the bubble grows as int mdot dA and a biased area is a biased growth rate.

  • 0 = vof::kAreaPlic — rungs P0/P1: plicArea on the MYC normal. The recorded numbers.
  • 1 = vof::kAreaMetric — the V3 curvature cascade's own geometry: the height function's area element sqrt(1 + h_x^2 + h_y^2) on tiers 1/2 and the PV paraboloid's gradient on tier 3, applied to the PLIC polygon's projected FOOTPRINT (see vof/interface_area.hpp).
  • 2 = vof::kAreaNormal — the same normals, but the plane is rebuilt on them (plicArea(n*, plicAlpha(n*, C))) instead of keeping the PLIC footprint.
  • 3 = vof::kAreaFootprint — the height function's OWN footprint times its own metric, the only variant whose cell pieces TILE (see vof/interface_area.hpp).
  • 4..7 — WO-P3d, the JOINED surface: marching tetrahedra on the cell-centre lattice, one watertight sheet whose triangles are booked to cells, so the SUM converges where no per-cell construction can (vof/marching_cubes.hpp). 4 = kAreaMcColour (the C = 1/2 level set, whole triangles to the cell holding the centroid), 5 = kAreaMcColourSplit (the same sheet, triangles clipped to each cell's cube), 6 = kAreaMcPlic and 7 = kAreaMcPlicSplit (the same two deposits on the zero of the PLIC-reconstructed signed distance, which is exact on a TILTED plane where the raw C = 1/2 interpolation is not).

Modes 1 and 2 are EXACT on a plane (the height function's differences are exact there and the cascade normal is the MYC one), so every planar gate is unmoved. The default is 0: on a well-resolved colour field the MYC area is already within 0.5 % of 4 pi R^2 on a sphere and the cascade buys nothing measurable — see the WO-P3c findings, which also record that WO-P3b's 5.5-9.3 % deficit was its probe's own 4^3 sub-sampled initialisation.

Definition at line 174 of file flow_ibm_phase_change.hpp.

Referenced by applyAreaModeEnv().

◆ phaseChangeArea()

template<class Grid >
int peclet::flow::Solver< Grid >::phaseChangeArea ( ) const

Definition at line 184 of file flow_ibm_phase_change.hpp.

◆ vofInterfaceArea()

template<class Grid >
double peclet::flow::Solver< Grid >::vofInterfaceArea ( )

The summed interfacial area over the inner region, PHYSICAL (globally reduced under MPI) — the E7 gallery's vof_interface_area().

Uses the CURRENT set_phase_change_area geometry, so the number a page quotes and the number the phase change integrates are the same one. Needs enable_vof; does not need phase change.

Definition at line 189 of file flow_ibm_phase_change.hpp.

References peclet::flow::vof::VofInterfaceArea::Stats::area, peclet::flow::Solver< Grid >::UnitScales::areaToPhys(), peclet::flow::Solver< Grid >::bridgeColourToVof(), peclet::flow::vof::WyAdvector::colour(), peclet::flow::vof::kAreaPlic, peclet::flow::Solver< Grid >::kVofG, peclet::flow::Solver< Grid >::pcAreaCascadeCompute(), peclet::flow::Solver< Grid >::pcEffInterfaceEps(), peclet::flow::vof::pcIsInterfacial(), peclet::flow::vof::plicAreaMetric(), peclet::flow::Solver< Grid >::UnitScales::vofMetric(), peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

◆ pcAreaCascadeCompute()

◆ pcAreaCascadeField()

template<class Grid >
SField peclet::flow::Solver< Grid >::pcAreaCascadeField ( ) const

The area field the last pcAreaCascadeCompute filled (either driver).

Definition at line 260 of file flow_ibm_phase_change.hpp.

References peclet::flow::vof::VofInterfaceArea::area(), peclet::flow::vof::VofMcArea::area(), and peclet::flow::vof::kAreaMcColour.

Referenced by peclet::flow::Solver< Grid >::pcBuildInterface().

◆ setPhaseChangeEnergy()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeEnergy ( double  rcpGas,
double  rcpLiquid 
)

Turn on the CONSISTENT energy transport (VOF_PLAN §9 item 6) for the scalar set_phase_change_thermal names: rho c_p T is advected with the colour advection's OWN geometric fluxes (vof/energy_advect.hpp) instead of the scalar module's Koren TVD flux, and the implicit solve carries per-cell k(C) (the k_gas/k_liquid of set_phase_change_thermal) and a rho c_p(C) time term instead of a constant diffusivity.

This is what stops artificial heating at a high rho c_p ratio: with two different fluxes the heat content carried into a mixed cell is divided by a heat capacity built from another flux, an error of order d(rho c_p) — 2000x at water/steam. Requires the thermal mass flux. rcpGas/rcpLiquid are volumetric heat capacities, physical (UnitScales::rcpToInt).

Definition at line 265 of file flow_ibm_phase_change.hpp.

References peclet::flow::vof::VofEnergyAdvector::exchange, peclet::flow::vof::VofEnergyAdvector::init(), peclet::flow::vof::VofEnergyAdvector::initialized(), peclet::flow::Solver< Grid >::pcRefreshUnits(), peclet::flow::Solver< Grid >::pcUpdateEnergyProps(), peclet::flow::Solver< Grid >::requirePhaseChange(), peclet::flow::Solver< Grid >::scalarField(), peclet::flow::vof::VofEnergyAdvector::setPhaseRcp(), and peclet::flow::Solver< Grid >::vofExchangeScalar().

Referenced by configure(), and main().

◆ setPhaseChangeEnergyMuscl()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeEnergyMuscl ( bool  on)

MinMod-limited donor reconstruction of the face temperature in the consistent energy flux (vof/energy_advect.hpp).

OFF by default — see the note there for the measurement.

Definition at line 294 of file flow_ibm_phase_change.hpp.

References peclet::flow::vof::VofEnergyAdvector::energyMuscl.

◆ phaseChangeEnergyMuscl()

template<class Grid >
bool peclet::flow::Solver< Grid >::phaseChangeEnergyMuscl ( ) const

◆ setPhaseChangeEnergyOff()

◆ phaseChangeEnergy()

template<class Grid >
bool peclet::flow::Solver< Grid >::phaseChangeEnergy ( ) const

Definition at line 311 of file flow_ibm_phase_change.hpp.

◆ setPhaseChangeBudget()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeBudget ( bool  on)

WO-P3f: turn the ENERGY BUDGET instrument on.

Allocates one extra cell field and runs two reductions per energy solve; OFF by default and every kernel is skipped when off, so the solve is bit-identical. Read with phase_change_budget().

Definition at line 316 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::requirePhaseChange().

◆ phaseChangeBudget()

template<class Grid >
bool peclet::flow::Solver< Grid >::phaseChangeBudget ( ) const

Definition at line 326 of file flow_ibm_phase_change.hpp.

◆ setPhaseChangeCarryConserve()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeCarryConserve ( bool  on)

WO-P3f: make the per-cell Dirichlet overwrite ENTHALPY-CONSERVING.

See pcCarryDeposit for the mechanism and the measurement. OFF by default (the shipped scheme is unchanged).

Definition at line 331 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::requirePhaseChange().

Referenced by applyP3fEnv(), and peclet::flow::Solver< Grid >::setPhaseChangeEnergyOrder().

◆ phaseChangeCarryConserve()

template<class Grid >
bool peclet::flow::Solver< Grid >::phaseChangeCarryConserve ( ) const

Definition at line 341 of file flow_ibm_phase_change.hpp.

◆ setPhaseChangeFitCurvature()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeFitCurvature ( double  kappa)

WO-P3f INSTRUMENT: prescribe the interface curvature kappa = div(n) the one-sided fits use to correct their sample distances (vof::pcCurvedDistance).

0 (the default) is the shipped tangent-plane distance and is bitwise inert. This is a PRESCRIBED number, not an estimator: it exists so the O(h/R) curvature bias of the fit can be measured against a known geometry before anyone builds a curvature estimator for it. kappa is a PHYSICAL curvature, 1/length (stored as the internal 1/h).

Definition at line 346 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::UnitScales::curvToPhys(), and peclet::flow::Solver< Grid >::requirePhaseChange().

Referenced by applyP3fEnv().

◆ phaseChangeFitCurvature()

template<class Grid >
double peclet::flow::Solver< Grid >::phaseChangeFitCurvature ( ) const

◆ setPhaseChangeEnergyOrder()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeEnergyOrder ( int  order)

WO-P3g — the SECOND-ORDER interfacial energy operator, as one package.

order = 1 is the shipped WO-P23…P3f scheme, bitwise. order = 2 turns on, together:

  1. set_phase_change_mdot_operator(True) — mdot is the energy operator's OWN interfacial flux q/(h_lv A) rather than a separate least-squares fit, so the heat the energy equation loses and the mass the regression produces are the same discrete number;
  2. set_phase_change_gfm_order(2) — the Gibou–Fedkiw three-point row (2/((1+theta) theta), 2/(1+theta)) instead of the two-point (1/theta, 1);
  3. set_phase_change_curvature_distance(True) — the row's theta and the one-sided fits' sample distances are measured to the CURVED interface, with kappa from the V3 curvature cascade (the same field surface tension uses), not to the tangent plane;
  4. set_phase_change_carry_conserve(True) — WO-P3f's enthalpy-conserving Dirichlet overwrite, which double-counted before item 1 removed the flux mismatch.

WO-P3f measured why they only work together: the shipped scheme's 1 % Scriven error is the residue of a CANCELLATION between (F1) the fit's O(h/R) curvature bias +6 %, (F2) the two-point row's O(h/delta_T) flux deficit −5 %, and (F3) the overwrite's −0.7 … −4.3 % enthalpy destruction — so repairing any ONE of them alone makes the gate worse, measured.

Definition at line 357 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::requirePhaseChange(), peclet::flow::Solver< Grid >::setPhaseChangeCarryConserve(), peclet::flow::Solver< Grid >::setPhaseChangeCurvatureDistance(), peclet::flow::Solver< Grid >::setPhaseChangeGfmOrder(), and peclet::flow::Solver< Grid >::setPhaseChangeMdotOperator().

Referenced by applyP3fEnv().

◆ phaseChangeEnergyOrder()

template<class Grid >
int peclet::flow::Solver< Grid >::phaseChangeEnergyOrder ( ) const

Definition at line 368 of file flow_ibm_phase_change.hpp.

◆ setPhaseChangeMdotOperator()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeMdotOperator ( bool  on)

WO-P3g item 1: take mdot from the energy operator's own interfacial flux instead of the one-sided least-squares fit.

The fit stays as ‘phase_change_diagnostics()['mdot_fit’]`.

Definition at line 373 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::requirePhaseChange().

Referenced by applyP3fEnv(), and peclet::flow::Solver< Grid >::setPhaseChangeEnergyOrder().

◆ phaseChangeMdotOperator()

template<class Grid >
bool peclet::flow::Solver< Grid >::phaseChangeMdotOperator ( ) const

Definition at line 383 of file flow_ibm_phase_change.hpp.

◆ setPhaseChangeGfmOrder()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeGfmOrder ( int  order)

WO-P3g item 2: the order of the one-sided (ghost-fluid) Dirichlet row.

1 = the shipped two-point form; 2 = Gibou–Fedkiw's three-point form (vof::pcGfmRow).

Definition at line 388 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::requirePhaseChange().

Referenced by applyP3fEnv(), and peclet::flow::Solver< Grid >::setPhaseChangeEnergyOrder().

◆ phaseChangeGfmOrder()

template<class Grid >
int peclet::flow::Solver< Grid >::phaseChangeGfmOrder ( ) const

Definition at line 396 of file flow_ibm_phase_change.hpp.

◆ setPhaseChangeCurvatureDistance()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeCurvatureDistance ( bool  on)

WO-P3g item 3: measure the GFM row's theta and the one-sided fits' sample distances to the CURVED interface, with the mean curvature taken per cell from the V3 cascade.

Supersedes set_phase_change_fit_curvature, which prescribes ONE curvature for the whole field; where both are on the cascade wins.

Definition at line 401 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::requirePhaseChange().

Referenced by applyP3fEnv(), and peclet::flow::Solver< Grid >::setPhaseChangeEnergyOrder().

◆ phaseChangeCurvatureDistance()

template<class Grid >
bool peclet::flow::Solver< Grid >::phaseChangeCurvatureDistance ( ) const

Definition at line 410 of file flow_ibm_phase_change.hpp.

◆ setPhaseChangeDepositFallback()

template<class Grid >
void peclet::flow::Solver< Grid >::setPhaseChangeDepositFallback ( bool  on)

WO-P3f open item 6 / WO-P3g — the divergence source's 5^3 fallback target, as a setter (it was only reachable through set_phase_change_deposit_fallback).

An interfacial cell whose two along-the-normal candidates (round(k n), k = 1, 2) are BOTH still interfacial keeps its source, and then carries div(open u) = S on its OWN faces — i.e. Weymouth-Yue advects the colour with a field that is not the liquid velocity, which ‘phase_change_diagnostics()['band_div’]reads out directly. With this on, those cells fall back to the best cell of the+n` half of the 5^3 box (Malan's collinearity weight). The order matters: making that search the PRIMARY rule DIVERGES the Scriven bubble (WO-P23), so it only ever fills holes.

Definition at line 415 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::requirePhaseChange().

◆ phaseChangeDepositFallback()

template<class Grid >
bool peclet::flow::Solver< Grid >::phaseChangeDepositFallback ( ) const

Definition at line 421 of file flow_ibm_phase_change.hpp.

◆ phaseChangeQOperator()

template<class Grid >
double peclet::flow::Solver< Grid >::phaseChangeQOperator ( ) const

The operator's interfacial heat (power), physical.

Definition at line 426 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::UnitScales::powerToPhys().

◆ phaseChangeQOrphan()

template<class Grid >
double peclet::flow::Solver< Grid >::phaseChangeQOrphan ( ) const

◆ phaseChangeCarryDeposited()

template<class Grid >
double peclet::flow::Solver< Grid >::phaseChangeCarryDeposited ( ) const

The carry ledger, physical: an energy with the consistent transport on, and a temperature times a volume without it (the constant-diffusivity scalar carries no heat capacity).

Definition at line 436 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::pcLedgerEnergyToPhys().

◆ phaseChangeCarryLost()

template<class Grid >
double peclet::flow::Solver< Grid >::phaseChangeCarryLost ( ) const

◆ phaseChangeBudgetValues()

template<class Grid >
Solver< Grid >::PhaseChangeBudget peclet::flow::Solver< Grid >::phaseChangeBudgetValues ( ) const

The budget, physical: energies and powers with the consistent transport on, temperature x volume (and per time) without it — see phaseChangeCarryDeposited.

Definition at line 454 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::UnitScales::divToPhys(), peclet::flow::Solver< Grid >::pcLedgerEnergyToPhys(), peclet::flow::Solver< Grid >::UnitScales::powerToPhys(), and peclet::flow::Solver< Grid >::UnitScales::volToPhys().

◆ pcBandDivergence()

template<class Grid >
double peclet::flow::Solver< Grid >::pcBandDivergence ( )

The BAND-EXTENDED LIQUID VELOCITY of VOF_PLAN §9 item 3, as a MEASUREMENT rather than a switch.

What that item exists to guarantee is that the field Weymouth-Yue advects the colour with is the LIQUID velocity at every interfacial cell — which the source deposit already delivers when it lands in the compact pure-gas layer behind the interface (WO-P01's P0b row measured the interfacial cell's own faces at the liquid velocity to 1e-19). The quantity that decides whether an extension is needed is therefore the discrete divergence of the ADVECTING field at the interfacial cells: it is exactly zero iff no deposit sits on a face WY reads. ‘phase_change_diagnostics()['band_div’]reportsmax |div(open u)|` over interfacial cells; a nonzero value there, times the frozen dilation flag, is the volume the colour update creates, so it is the direct read-out and not a proxy.

Definition at line 474 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::pcEffInterfaceEps(), peclet::flow::vof::pcIsInterfacial(), U, peclet::flow::C3::x, and peclet::flow::C3::y.

Referenced by peclet::flow::Solver< Grid >::phaseChangeDiagnostics().

◆ pcUpdateEnergyProps()

◆ pcRefreshUnits()

template<class Grid >
void peclet::flow::Solver< Grid >::pcRefreshUnits ( )

◆ requireScalesPinned()

template<class Grid >
void peclet::flow::Solver< Grid >::requireScalesPinned ( const char *  who,
bool  needRho 
) const

Under an armed extent, refuse a call that writes a dimensional value into a FIELD before the reference scales it converts with are pinned (rho: the first set_rho, dt: the first set_dt).

A field is converted once, at the call, and a scale pinned later would leave it in the wrong units silently. A no-op in cell units.

Definition at line 97 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::UnitScales::physical, peclet::flow::Solver< Grid >::UnitScales::rhoRefSet, and peclet::flow::Solver< Grid >::UnitScales::tRefSet.

Referenced by peclet::flow::Solver< Grid >::setDivergenceSource(), peclet::flow::Solver< Grid >::setMassFlux(), and peclet::flow::Solver< Grid >::setMassFluxUniform().

◆ closureTargetToInt()

template<class Grid >
double peclet::flow::Solver< Grid >::closureTargetToInt ( const std::string &  target) const

The internal-per-physical factor of a closure TARGET: rho, mu, force_x/y/z; 0.0 for any other field (its units are not known — the caller writes it in internal units).

Definition at line 332 of file flow_ibm_closures.hpp.

References peclet::flow::Solver< Grid >::UnitScales::forceToInt(), peclet::flow::Solver< Grid >::UnitScales::muToInt(), and peclet::flow::Solver< Grid >::UnitScales::rhoToInt().

Referenced by peclet::flow::Solver< Grid >::closureRefreshUnits(), and peclet::flow::Solver< Grid >::closureUnitsNotice().

◆ closureRefreshUnits()

template<class Grid >
void peclet::flow::Solver< Grid >::closureRefreshUnits ( Closure &  cl)

Re-derive a closure's internal p / tabY from its physical pPhys / tabYPhys with the current reference scales (setPropertyModel/Table, and refreshUnitDerived for all of them).

Definition at line 353 of file flow_ibm_closures.hpp.

References peclet::flow::Solver< Grid >::closureTargetToInt(), peclet::flow::LinearMix, peclet::flow::Solver< Grid >::UnitScales::physical, and peclet::flow::Table1D.

Referenced by peclet::flow::Solver< Grid >::refreshUnitDerived(), peclet::flow::Solver< Grid >::setPropertyModel(), and peclet::flow::Solver< Grid >::setPropertyTable().

◆ closureUnitsNotice()

template<class Grid >
void peclet::flow::Solver< Grid >::closureUnitsNotice ( const std::string &  target) const

Under a physical domain, say on stderr that a closure on a target of unknown dimension takes its parameters in internal units (once, at registration).

Definition at line 343 of file flow_ibm_closures.hpp.

References peclet::flow::Solver< Grid >::closureTargetToInt(), and peclet::flow::Solver< Grid >::UnitScales::physical.

Referenced by peclet::flow::Solver< Grid >::setPropertyModel(), and peclet::flow::Solver< Grid >::setPropertyTable().

◆ pcLedgerEnergyToPhys()

template<class Grid >
double peclet::flow::Solver< Grid >::pcLedgerEnergyToPhys ( ) const

The factor from an internal phase-change ledger entry (a per-cell sum of rcp' dT) to the caller's units: joules with the consistent transport on, temperature x volume without it.

Definition at line 446 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::UnitScales::energyToPhys(), peclet::flow::Solver< Grid >::UnitScales::vol, and peclet::flow::Solver< Grid >::UnitScales::volToPhys().

Referenced by peclet::flow::Solver< Grid >::phaseChangeBudgetValues(), peclet::flow::Solver< Grid >::phaseChangeCarryDeposited(), and peclet::flow::Solver< Grid >::phaseChangeCarryLost().

◆ vofExchangeScalar()

template<class Grid >
void peclet::flow::Solver< Grid >::vofExchangeScalar ( CCField  f)

The colour block's ghost policy WITHOUT the colour-specific rules (no solid-band fill, no VoF boundary colour): the halo/periodic exchange plus the non-periodic zero-gradient clamp.

This is the temperature's policy on the g=3 block.

Definition at line 2361 of file flow_ibm_vof.hpp.

References peclet::flow::vof::clampFill(), peclet::flow::Solver< Grid >::kVofG, peclet::flow::vof::periodicFill(), peclet::flow::Solver< Grid >::vofAxisPeriodic(), peclet::flow::Solver< Grid >::vofGlobalSize(), peclet::flow::Solver< Grid >::vofOrigin(), peclet::flow::C3::x, peclet::flow::C3::y, and peclet::flow::C3::z.

Referenced by peclet::flow::Solver< Grid >::setPhaseChangeEnergy().

◆ setDivergenceSource()

template<class Grid >
void peclet::flow::Solver< Grid >::setDivergenceSource ( const std::vector< double > &  v)

A PRESCRIBED extra divergence source (1/time, physical; set_dt must precede it under an extent, requireScalesPinned), x-fastest over the inner region, added to the Poisson RHS exactly like the phase-change deposit: the projection then solves for div(open u) = S_pc + S_user.

This is how a CLOSED (periodic) box is made compatible with a net vapour production: put a balancing sink somewhere the exact solution can absorb it. In a domain with an outflow face the outflow carries the imbalance and this is not needed.

Definition at line 521 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::addField(), peclet::flow::Solver< Grid >::UnitScales::divToInt(), peclet::flow::Solver< Grid >::fillPropGhosts(), peclet::flow::Solver< Grid >::requireScalesPinned(), and peclet::flow::Solver< Grid >::scatterInner().

◆ clearDivergenceSource()

template<class Grid >
void peclet::flow::Solver< Grid >::clearDivergenceSource ( )

Definition at line 539 of file flow_ibm_phase_change.hpp.

◆ setDivergenceSink()

template<class Grid >
void peclet::flow::Solver< Grid >::setDivergenceSink ( const std::vector< double > &  w)

WO-P23: an AUTO-BALANCED sink region for the phase-change divergence source.

w is a non-negative weight per inner cell (x-fastest); after every deposit the solver subtracts (global sum of the phase-change source) * w(i) / (global sum of w) from the source field, so the Poisson RHS is EXACTLY compatible in a closed domain, every step, with no user bookkeeping. This is the generalisation of WO-P01's hand-set sink plane, and it is what makes a closed-box phase-change run possible without the variable-density OUTFLOW operator (whose density-ratio inconsistency is WO-R2's subject): the sink is a region of the LIQUID far from the interface, where the exact solution simply has the liquid leaving.

Definition at line 544 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::addField(), peclet::flow::Solver< Grid >::fillPropGhosts(), peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::requirePhaseChange(), and peclet::flow::Solver< Grid >::scatterInner().

◆ clearDivergenceSink()

template<class Grid >
void peclet::flow::Solver< Grid >::clearDivergenceSink ( )

Definition at line 575 of file flow_ibm_phase_change.hpp.

◆ applyPhaseChange()

template<class Grid >
void peclet::flow::Solver< Grid >::applyPhaseChange ( double  dtPhysArg)

Kinematic entry point (the P0a/P1 driver): build mdot/A_G/n from the current colour and temperature, deposit the divergence source (for the census only — nothing is projected here) and apply the interface regression.

No Navier-Stokes step, no advection. dt is in the caller's time unit.

Definition at line 580 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::pcBudgetPost(), peclet::flow::Solver< Grid >::pcBuildInterface(), peclet::flow::Solver< Grid >::pcRegress(), peclet::flow::Solver< Grid >::pcScatterSource(), peclet::flow::Solver< Grid >::pcUpdateEnergyProps(), peclet::flow::Solver< Grid >::pcUpdateThermalMask(), peclet::flow::Solver< Grid >::requirePhaseChange(), peclet::flow::Solver< Grid >::scalarField(), and peclet::flow::Solver< Grid >::UnitScales::timeToInt().

Referenced by main().

◆ phaseChangeStep()

template<class Grid >
void peclet::flow::Solver< Grid >::phaseChangeStep ( )

The in-step driver: everything applyPhaseChange does, at the head of step().

Byte-identical no-op when phase change is off.

Definition at line 601 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::pcBuildInterface(), peclet::flow::Solver< Grid >::pcRegress(), and peclet::flow::Solver< Grid >::pcScatterSource().

Referenced by peclet::flow::Solver< Grid >::step().

◆ phaseChangeDiagnostics()

◆ pcBuildInterface()

template<class Grid >
void peclet::flow::Solver< Grid >::pcBuildInterface ( )

(1) The interface build: for every inner interfacial cell reconstruct the PLIC plane from the canonical G=2 colour, store its area and unit normal, evaluate mdot (thermal or prescribed), and decide which pure gas cell will receive the divergence source.

Then exchange those per-cell quantities so the regression's depth-1 ring and the source gather's depth-2 ring see the OWNER's values — which is what makes both decomposition-independent WITHOUT any reverse/add halo and without an atomic scatter (bitwise MPI, not a reduction floor).

Definition at line 653 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::area, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::areaHf, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::areaNone, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::areaOrphan, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::areaPv, peclet::flow::Solver< Grid >::bridgeColourToVof(), peclet::flow::Solver< Grid >::copyInner(), peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::fallbackCells, peclet::flow::Solver< Grid >::fillGhosts(), peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::interfaceCells, peclet::flow::vof::kAreaPlic, peclet::flow::Solver< Grid >::kVofG, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::mdotFit, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::mdotMax, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::mdotMean, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::mdotMin, peclet::flow::Solver< Grid >::nx(), peclet::flow::Solver< Grid >::ny(), peclet::flow::Solver< Grid >::nz(), peclet::flow::Solver< Grid >::pcAreaCascadeCompute(), peclet::flow::Solver< Grid >::pcAreaCascadeField(), peclet::flow::Solver< Grid >::pcBuildInDomain(), peclet::flow::vof::pcCentreDistance(), peclet::flow::vof::pcCurvedDistance(), peclet::flow::vof::pcDivSource(), peclet::flow::Solver< Grid >::pcEffInterfaceEps(), peclet::flow::Solver< Grid >::pcEffPureEps(), peclet::flow::vof::pcGfmRow(), peclet::flow::vof::pcGfmThetaKAniso(), peclet::flow::vof::pcGradAdd(), peclet::flow::vof::pcGradSolve(), peclet::flow::vof::pcGradSolve2(), peclet::flow::vof::pcGradWeight(), peclet::flow::vof::pcInterfaceTemperature(), peclet::flow::vof::pcIsInterfacial(), peclet::flow::vof::pcMassFlux(), peclet::flow::vof::pcOffsetDistance(), peclet::flow::vof::pcOperatorMassFlux(), peclet::flow::Solver< Grid >::pcUpdateEnergyProps(), peclet::flow::Solver< Grid >::pcUpdateThermalMask(), peclet::flow::Solver< Grid >::pcZeroDomainGhosts(), peclet::flow::Solver< Grid >::UnitScales::physical, peclet::flow::vof::plicAreaMetric(), peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::qOperator, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::qOrphan, peclet::flow::Solver< Grid >::scalarField(), peclet::flow::Solver< Grid >::UnitScales::vofMetric(), peclet::flow::Solver< Grid >::UnitScales::vol, peclet::flow::C3::x, and peclet::flow::C3::y.

Referenced by peclet::flow::Solver< Grid >::applyPhaseChange(), and peclet::flow::Solver< Grid >::phaseChangeStep().

◆ pcScatterSource()

template<class Grid >
void peclet::flow::Solver< Grid >::pcScatterSource ( )

(2) Deposit each interfacial cell's source into its chosen pure-gas cell, as a GATHER (each receiving cell scans the 5^3 box for donors that named it).

A gather rather than an atomic scatter because the sum then has a fixed order and the result is bitwise reproducible across decompositions; the donors' dep/tgt are valid two cells deep thanks to pcBuildInterface's exchange.

Definition at line 1025 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::fillPropGhosts(), peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::sourceCells, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::sourceSum, peclet::flow::C3::x, and peclet::flow::C3::y.

Referenced by peclet::flow::Solver< Grid >::applyPhaseChange(), and peclet::flow::Solver< Grid >::phaseChangeStep().

◆ pcRegress()

template<class Grid >
void peclet::flow::Solver< Grid >::pcRegress ( double  dt)

(3) The regression: two Jacobi passes over the exchanged per-cell data, so the clip deficit is redistributed with a FIXED summation order (bitwise across decompositions).

pass 1 (inner region grown by one, reading only exchanged fields): the raw plane shift C - mdot A dt/rho_l, clipped into [0,1], with the residue stored; pass 2 (inner region): add the clipped colour to the shares of the six face neighbours' residues, pushed along -n (a liquid deficit) or +n (a condensation excess) with weights n_d^2.

Definition at line 1084 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::deficitCells, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::excessCells, peclet::flow::Solver< Grid >::fillPropGhosts(), peclet::flow::Solver< Grid >::G, peclet::flow::vof::pcPushWeights(), peclet::flow::vof::pcRegressVolume(), peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::redistributed, peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::removedVolume, peclet::flow::Solver< Grid >::step(), peclet::flow::Solver< Grid >::PhaseChangeDiagnostics::unresolved, peclet::flow::Solver< Grid >::UnitScales::vol, peclet::flow::C3::x, and peclet::flow::C3::y.

Referenced by peclet::flow::Solver< Grid >::applyPhaseChange(), and peclet::flow::Solver< Grid >::phaseChangeStep().

◆ pcUpdateCurvature()

template<class Grid >
void peclet::flow::Solver< Grid >::pcUpdateCurvature ( )

The per-cell Dirichlet mask of the energy scalar: T = T_sat + mdot R_int in every interfacial cell, released everywhere else.

Rebuilt from the CURRENT colour, so a call after the colour advection is what the energy solve at the bottom of the step sees. WO-P3g item 3 — the V3 curvature cascade's kappa on the G = 2 phase-change block, from the CURRENT colour. Same driver, same g = 3 block and the same sign convention as surface tension: kappa = 2H in 1/h, positive for a convex blob of LIQUID, i.e. -2/R for a gas bubble — which is exactly div(n) for the PLIC normal, the convention pcCurvedDistance and pcGfmThetaK are derived in. Where the cascade produces no estimate it leaves 0, and both consumers then fall back to the tangent-plane distance, which is the shipped behaviour.

Definition at line 1198 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::bridgeColourToVof(), peclet::flow::vof::WyAdvector::colour(), peclet::flow::vof::VofCurvature::compute(), peclet::flow::Solver< Grid >::copyInner(), peclet::flow::Solver< Grid >::fillGhosts(), peclet::flow::Solver< Grid >::G, peclet::flow::vof::VofCurvature::kappa(), peclet::flow::Solver< Grid >::kVofG, and peclet::flow::Solver< Grid >::pcZeroDomainGhosts().

Referenced by peclet::flow::Solver< Grid >::pcUpdateThermalMask().

◆ pcBuildInDomain()

template<class Grid >
void peclet::flow::Solver< Grid >::pcBuildInDomain ( )

WO-P3g — 1 on every cell that CARRIES A ROW in the energy solve, 0 otherwise.

The operator-flux mdot gathers, from the interfacial side, the Dirichlet couplings of its PURE face neighbours. A neighbour that is a ghost belonging to another RANK does carry a row (that rank builds it), and dropping it would make mdot decomposition-dependent; a ghost beyond a NON-PERIODIC domain face carries none, and counting it invents heat. dmask cannot tell the two apart — pcZeroDomainGhosts makes both look pure — so this field does, by the same construction: 1 on the inner region, exchanged (so a rank's ghosts inherit the owner's 1 and a periodic wrap keeps it), then zeroed on the non-periodic domain ghosts.

Measured on the planar carry probe (64^3, an interface that spans the whole y-z cross-section, so its edge cells sit ON the domain boundary): without it those cells' mdot reads 2.115e-3 against the exact 2.000e-3, +5.8 %, and the operator flux exceeds the energy solve's own by 5.3e-4 of the total.

Definition at line 1211 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::fillGhosts(), peclet::flow::Solver< Grid >::G, and peclet::flow::Solver< Grid >::pcZeroDomainGhosts().

Referenced by peclet::flow::Solver< Grid >::pcBuildInterface().

◆ pcUpdateThermalMask()

◆ pcZeroDomainGhosts()

template<class Grid >
void peclet::flow::Solver< Grid >::pcZeroDomainGhosts ( CCField  f)

Zero the two ghost layers on every NON-periodic domain face this rank owns.

Used for the per-cell phase-change data, whose consumers treat a nonzero ghost as a real donor.

Definition at line 1352 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::G, peclet::flow::C3::x, and peclet::flow::C3::y.

Referenced by peclet::flow::Solver< Grid >::pcBuildInDomain(), peclet::flow::Solver< Grid >::pcBuildInterface(), peclet::flow::Solver< Grid >::pcUpdateCurvature(), and peclet::flow::Solver< Grid >::pcUpdateThermalMask().

◆ pcCarryDeposit()

template<class Grid >
void peclet::flow::Solver< Grid >::pcCarryDeposit ( ScalarField &  sc)

WO-P3f — the enthalpy the per-cell Dirichlet overwrite destroys, returned to the phase it came from.

An OPTION (set_phase_change_carry_conserve), OFF by default.

The leak. An interfacial cell's row is the identity T = dval (scalarMaskRhs), so whatever the geometric energy transport left in that cell is DISCARDED every step and replaced by the carried value pcCarriedValue. Over a cell's whole interfacial lifetime that telescopes to rho c_p (T_entry - dval_exit): a liquid cell that the interface sweeps enters with its superheat and leaves as vapour at T_sat, and the difference goes nowhere. It is one-signed on a growing bubble and it scales with the cells swept per step, i.e. with R^2 dR/dt — exactly the shape of the P3 flux deficit. Measured by phase_change_budget()'s d_overwrite on the Scriven scene at 128^3: -0.7 % of mdot h_lv A_Gamma at Ja = 0.5 and -4.3 % at Ja = 2 (a destruction), against a growth deficit of 1.0 / 1.5 %.

(What is NOT a leak, and the instrument says so: a cell CHANGING CLASS. e_enter is the enthalpy of the cells that became interfacial this step, but those cells do not move and their temperature is still in the field — the relabelling transfers nothing. The e_enter column is a flux between two BOOKS, not an energy sink, and the two genuine non-conservations of the rung are this overwrite and the q_gfm / mdot h_lv A mismatch.)

The repair. Before the overwrite, hand dE_j = rho c_p(C_j) (T_j - dval_j) to cell j's face neighbours that are still IN the solve, weighted by n_d^2 — the same allocation the clip-and-redistribute uses, and a fixed-order GATHER (each receiving cell recomputes its donors' decision) so it is decomposition-independent with no reverse-add halo, the WO-P01 pattern. Which SIDE of the interface receives is decided per axis and locally: of the two pure neighbours along that axis, the one whose deviation from T_Gamma has the same sign as the interfacial cell's own. That is the phase the discarded enthalpy came from — the superheated LIQUID on an evaporating bubble (P3), the superheated VAPOUR on the Stefan problem (P1) — with no scene-specific rule anywhere.

Reads: the donor at depth 1 and the donor's own neighbours at depth 2, all inside the G = 2 halo and all exchanged before this runs. Writes: inner unmasked cells only.

Definition at line 1379 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::G, peclet::flow::vof::pcPhaseMix(), peclet::flow::C3::x, and peclet::flow::C3::y.

Referenced by peclet::flow::Solver< Grid >::pcUpdateThermalMask().

◆ pcCarryApply()

template<class Grid >
void peclet::flow::Solver< Grid >::pcCarryApply ( ScalarField &  sc)

WO-P3f: consume pcCarrySrc_ into the energy solve's time base.

Called from advanceScalars right after cOld is taken, so the deposit enters that step's RHS.

Definition at line 1457 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::G, peclet::flow::C3::x, and peclet::flow::C3::y.

Referenced by peclet::flow::Solver< Grid >::advanceScalars().

◆ pcBudgetPre()

◆ pcBudgetPost()

template<class Grid >
void peclet::flow::Solver< Grid >::pcBudgetPost ( ScalarField &  sc)

WO-P3f, part 2: the state AFTER the energy solve, the heat the plane-anchored rows actually delivered across the interface, and the class snapshot the NEXT step compares against.

qGfm mirrors scalarMaskGfm exactly (same theta, same face conductivity choice, same openness) and accumulates k open (T_Gamma - T_i)/theta — the heat flowing INTO the unmasked set, i.e. NEGATIVE while a bubble grows into superheated liquid. It is the energy equation's own interfacial flux, and mdot h_lv A_Gamma is the regression's; the instrument exists to compare them.

Definition at line 1554 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::PhaseChangeBudget::calls, peclet::flow::Solver< Grid >::G, peclet::flow::Solver< Grid >::PhaseChangeBudget::hOpenNew, peclet::flow::vof::pcGfmRow(), peclet::flow::vof::pcGfmThetaKAniso(), peclet::flow::Solver< Grid >::PhaseChangeBudget::qBehind, peclet::flow::Solver< Grid >::PhaseChangeBudget::qGfm, peclet::flow::Solver< Grid >::UnitScales::vofMetric(), peclet::flow::C3::x, and peclet::flow::C3::y.

Referenced by peclet::flow::Solver< Grid >::advanceScalars(), and peclet::flow::Solver< Grid >::applyPhaseChange().

◆ pcApplyDivergenceSource()

template<class Grid >
void peclet::flow::Solver< Grid >::pcApplyDivergenceSource ( CCField  div)

Subtract the phase-change (and any prescribed) divergence source from div_ so the deflated pressure solve delivers div(open u) = S.

One branch in project(), inert when off.

Definition at line 1622 of file flow_ibm_phase_change.hpp.

References peclet::flow::Solver< Grid >::G.

Referenced by peclet::flow::Solver< Grid >::projectAssembleDivergence().

◆ pcEffInterfaceEps()

template<class Grid >
double peclet::flow::Solver< Grid >::pcEffInterfaceEps ( ) const

The colour tolerance that decides which cells are INTERFACIAL, and it has to be at least the colour advector's own wisp tolerance.

This is a real interaction bug and the measurement is in the findings. WO-R2 item 4 made enable_vof set WyAdvector::wispEps = 1e-8, so the advector treats a cell with C <= 1e-8 (or >= 1 - 1e-8) as PURE for reconstruction and flux. Phase change used its own 1e-12, so over the band 1e-12 < C < 1e-8 the two disagreed about what an interface IS: the phase-change driver reconstructed a plane, gave the cell an area, an mdot, a Dirichlet row and a divergence-source deposit, while Weymouth-Yue moved that cell's colour algebraically as a pure phase. On the P3 Scriven bubble the disagreement DIVERGES the run — R(t) error 48 % and the study's dt-collapse guard trips at step 34, against 2.002 % and 80 clean steps with set_vof_wisp_eps(0.0). The planar P0/P1/P2 gates never saw it (their interface has no wisps), which is exactly why it had to be found on the curved case.

Definition at line 1644 of file flow_ibm_phase_change.hpp.

References peclet::flow::vof::WyAdvector::wispEps.

Referenced by peclet::flow::Solver< Grid >::pcAreaCascadeCompute(), peclet::flow::Solver< Grid >::pcBandDivergence(), peclet::flow::Solver< Grid >::pcBuildInterface(), peclet::flow::Solver< Grid >::pcUpdateThermalMask(), and peclet::flow::Solver< Grid >::vofInterfaceArea().

◆ pcEffPureEps()

template<class Grid >
double peclet::flow::Solver< Grid >::pcEffPureEps ( ) const

…and the mirror statement: a cell the ADVECTOR treats as a pure phase is a pure phase here too, or the source deposit's "find a pure gas cell" walk rejects exactly the cells the colour field has already emptied and the source is left in an interfacial cell (measured: band_div 2.2e+02 on the P2 sucking gate with only the interfacial tolerance raised).

Definition at line 1649 of file flow_ibm_phase_change.hpp.

References peclet::flow::vof::WyAdvector::wispEps.

Referenced by peclet::flow::Solver< Grid >::pcBuildInterface(), and peclet::flow::Solver< Grid >::pcUpdateThermalMask().

◆ requirePhaseChange()

◆ scalarField()

◆ scalarDirichletMask()

template<class Grid >
void peclet::flow::Solver< Grid >::scalarDirichletMask ( const std::string &  name)

Allocate (idempotently) the per-cell Dirichlet mask + value of a registered scalar.

Inert until allocated: advanceScalars branches on dmask.extent(0).

Definition at line 175 of file flow_ibm_scalars.hpp.

References peclet::flow::Solver< Grid >::scalarField().

Referenced by peclet::flow::Solver< Grid >::setPhaseChangeThermal().

◆ setPropertyModel()

◆ setDensityMode()

◆ hasCutcellPressure()

template<class Grid >
bool peclet::flow::Solver< Grid >::hasCutcellPressure ( ) const

Definition at line 197 of file flow_ibm_closures.hpp.

◆ setPorousContinuity()

◆ syncPorousPrev()

template<class Grid >
void peclet::flow::Solver< Grid >::syncPorousPrev ( )

Definition at line 258 of file flow_ibm_closures.hpp.

Referenced by configure().

◆ setPorousDepsDt()

template<class Grid >
void peclet::flow::Solver< Grid >::setPorousDepsDt ( bool  on)

Definition at line 264 of file flow_ibm_closures.hpp.

◆ setPorousConservative()

template<class Grid >
void peclet::flow::Solver< Grid >::setPorousConservative ( bool  on)

Definition at line 269 of file flow_ibm_closures.hpp.

Referenced by configure().

◆ setPressureUnderRelax()

template<class Grid >
void peclet::flow::Solver< Grid >::setPressureUnderRelax ( double  w)

Definition at line 274 of file flow_ibm_closures.hpp.

◆ setPropertyMode()

◆ setVariableRotational()

template<class Grid >
void peclet::flow::Solver< Grid >::setVariableRotational ( int  mode,
double  chi 
)

Definition at line 300 of file flow_ibm_closures.hpp.

◆ setPropertyTable()

template<class Grid >
void peclet::flow::Solver< Grid >::setPropertyTable ( const std::string &  target,
const std::string &  in0,
const std::vector< double > &  xs,
const std::vector< double > &  ys 
)

◆ updateProperties()

◆ enableCellForce()

template<class Grid >
void peclet::flow::Solver< Grid >::enableCellForce ( )

Definition at line 379 of file flow_ibm_closures.hpp.

Referenced by configure(), configure(), configure(), configure(), and configure().

◆ enableDrag()

◆ configurePorousDragSolver()

◆ addDragDiagonal()

◆ patchScalarDirichletFaceVar()

template<class Grid >
void peclet::flow::Solver< Grid >::patchScalarDirichletFaceVar ( CCField  AC,
CCField  band,
CCField  kc,
int  a,
int  side 
)

◆ patchScalarDirichletFace()

template<class Grid >
void peclet::flow::Solver< Grid >::patchScalarDirichletFace ( CCField  AC,
CCField  band,
double  Din,
int  a,
int  side 
)

◆ applyScalarBcFace()

template<class Grid >
void peclet::flow::Solver< Grid >::applyScalarBcFace ( CCField  c,
int  a,
int  side,
int  type,
double  val,
bool  edges = false 
)

Member Data Documentation

◆ G

template<class Grid >
constexpr int peclet::flow::Solver< Grid >::G = 2
staticconstexpr

Definition at line 80 of file flow_ibm.hpp.

Referenced by peclet::flow::Solver< Grid >::addCsfRhs(), peclet::flow::Solver< Grid >::addCsfRhsBlocks(), peclet::flow::Solver< Grid >::addCsfRhsCellInterp(), peclet::flow::Solver< Grid >::addDragDiagonal(), peclet::flow::Solver< Grid >::addField(), peclet::flow::Solver< Grid >::addWallFluxDivergence(), peclet::flow::Solver< Grid >::advanceScalars(), peclet::flow::Solver< Grid >::advectVof(), peclet::flow::Solver< Grid >::advectVofKinematic(), peclet::flow::Solver< Grid >::advectVofMomentum(), peclet::flow::Solver< Grid >::allocateBlock(), peclet::flow::Solver< Grid >::applyBackflowStab(), peclet::flow::Solver< Grid >::applyBalancedForceProjection(), peclet::flow::Solver< Grid >::applyContactAngle(), peclet::flow::Solver< Grid >::applyScalarBcFace(), peclet::flow::Solver< Grid >::applySuperficialVelocity(), peclet::flow::Solver< Grid >::applyVelocityBcAll(), peclet::flow::Solver< Grid >::applyVelocityBcCompTo(), peclet::flow::Solver< Grid >::applyVelocityBcFace(), peclet::flow::Solver< Grid >::bcVelFacePair(), peclet::flow::Solver< Grid >::bridgeColourToVof(), peclet::flow::Solver< Grid >::bridgeOutflowFacePlanes(), peclet::flow::Solver< Grid >::bridgeVelocityToVof(), peclet::flow::Solver< Grid >::buildAdvStencil(), peclet::flow::Solver< Grid >::buildAdvStencilVar(), peclet::flow::Solver< Grid >::buildBalancedFaceForce(), peclet::flow::Solver< Grid >::buildOpenFaceField(), peclet::flow::Solver< Grid >::buildRhs(), peclet::flow::Solver< Grid >::buildRhsColoVar(), peclet::flow::Solver< Grid >::buildRhsForced(), peclet::flow::Solver< Grid >::buildRhsVar(), peclet::flow::Solver< Grid >::buildRhsVarMom(), peclet::flow::Solver< Grid >::buildVelocityOverlays(), peclet::flow::Solver< Grid >::buildVofCellVelocity(), peclet::flow::Solver< Grid >::buildVofGeometry(), peclet::flow::Solver< Grid >::buildWallVelocity(), peclet::flow::Solver< Grid >::chebSolveComp(), peclet::flow::Solver< Grid >::checkMovingInstancesAreCut(), peclet::flow::Solver< Grid >::checkSealedInflowCells(), peclet::flow::Solver< Grid >::computeDivAdv(), peclet::flow::Solver< Grid >::computeVofBlockCsf(), peclet::flow::Solver< Grid >::computeVofCurvature(), peclet::flow::Solver< Grid >::constCoeffResidual(), peclet::flow::Solver< Grid >::constraintDivergence(), peclet::flow::Solver< Grid >::csfDiagnostics(), peclet::flow::Solver< Grid >::ensureScalarCutGeometry(), peclet::flow::Solver< Grid >::ensureScalarSolidRecord(), peclet::flow::Solver< Grid >::extendSdfDomainGhosts(), peclet::flow::Solver< Grid >::fillAxis(), peclet::flow::Solver< Grid >::fillGhostsFaces(), peclet::flow::Solver< Grid >::fillPeriodicAxes(), peclet::flow::Solver< Grid >::fillVelGhostsTo(), peclet::flow::Solver< Grid >::filterCellField(), peclet::flow::Solver< Grid >::finishResidual(), peclet::flow::Solver< Grid >::fluidMomentumCells(), peclet::flow::Solver< Grid >::gatherInner(), peclet::flow::Solver< Grid >::getMomentumDiagonal(), peclet::flow::Solver< Grid >::getVofDynamicField(), peclet::flow::Solver< Grid >::getVofFilledColour(), peclet::flow::Solver< Grid >::getVofGeometry(), peclet::flow::Solver< Grid >::ghostWidth(), peclet::flow::Solver< Grid >::harvestVofBlockUnion(), peclet::flow::Solver< Grid >::hydroForceTorque(), peclet::flow::Solver< Grid >::hydroForceTorqueReaction(), peclet::flow::Solver< Grid >::maxAbsDiffInner(), peclet::flow::Solver< Grid >::maxOpenDivergenceInternal(), peclet::flow::Solver< Grid >::maxOpenDivergenceProjectedInternal(), peclet::flow::Solver< Grid >::maxPorousResidual(), peclet::flow::Solver< Grid >::minMuInner(), peclet::flow::Solver< Grid >::outflowBackflow(), peclet::flow::Solver< Grid >::patchScalarDirichletFace(), peclet::flow::Solver< Grid >::patchScalarDirichletFaceVar(), peclet::flow::Solver< Grid >::pcApplyDivergenceSource(), peclet::flow::Solver< Grid >::pcBandDivergence(), peclet::flow::Solver< Grid >::pcBudgetPost(), peclet::flow::Solver< Grid >::pcBudgetPre(), peclet::flow::Solver< Grid >::pcBuildInDomain(), peclet::flow::Solver< Grid >::pcBuildInterface(), peclet::flow::Solver< Grid >::pcCarryApply(), peclet::flow::Solver< Grid >::pcCarryDeposit(), peclet::flow::Solver< Grid >::pcRegress(), peclet::flow::Solver< Grid >::pcScatterSource(), peclet::flow::Solver< Grid >::pcUpdateCurvature(), peclet::flow::Solver< Grid >::pcUpdateEnergyProps(), peclet::flow::Solver< Grid >::pcUpdateThermalMask(), peclet::flow::Solver< Grid >::pcZeroDomainGhosts(), peclet::flow::Solver< Grid >::phaseChangeDiagnostics(), peclet::flow::Solver< Grid >::phaseDensityRange(), peclet::flow::Solver< Grid >::pressureBcGhost(), peclet::flow::Solver< Grid >::projectAssembleDivergence(), peclet::flow::Solver< Grid >::projectBuildCoefficients(), peclet::flow::Solver< Grid >::projectCorrectVelocities(), peclet::flow::Solver< Grid >::projectSolve(), peclet::flow::Solver< Grid >::reactionBudgetTerms(), peclet::flow::Solver< Grid >::rebuildStencils(), peclet::flow::Solver< Grid >::reduceMaxAbsInner(), peclet::flow::Solver< Grid >::resampleBcProfile(), peclet::flow::Solver< Grid >::scalarBudget(), peclet::flow::Solver< Grid >::scalarCaptureOpenFaceFlux(), peclet::flow::Solver< Grid >::scalarCutAdvection(), peclet::flow::Solver< Grid >::scalarCutAssembleSolve(), peclet::flow::Solver< Grid >::scalarCutMatvec(), peclet::flow::Solver< Grid >::scalarCutMatvecTwo(), peclet::flow::Solver< Grid >::scalarFacets(), peclet::flow::Solver< Grid >::scalarMeanFlux(), peclet::flow::Solver< Grid >::scalarMeanGradPosition(), peclet::flow::Solver< Grid >::scatterInner(), peclet::flow::Solver< Grid >::seedFaceFieldFromCells(), peclet::flow::Solver< Grid >::setDivergenceSink(), peclet::flow::Solver< Grid >::setScalarMeanGradient(), peclet::flow::Solver< Grid >::setSolidBuildOpenness(), peclet::flow::Solver< Grid >::setSolidGhostProjectionOverlay(), peclet::flow::Solver< Grid >::setSolidStarOverlay(), peclet::flow::Solver< Grid >::setSolidUploadSdf(), peclet::flow::Solver< Grid >::setSolidVelocityMgAuto(), peclet::flow::Solver< Grid >::setupBcDiffusion(), peclet::flow::Solver< Grid >::smoothComp(), peclet::flow::Solver< Grid >::solveBalancedForceSystem(), peclet::flow::Solver< Grid >::solvePressureSystem(), peclet::flow::Solver< Grid >::stencilBnorm(), peclet::flow::Solver< Grid >::stencilResidual(), peclet::flow::Solver< Grid >::updateProperties(), peclet::flow::Solver< Grid >::uploadVelocity(), peclet::flow::Solver< Grid >::vofBcPropGhosts(), peclet::flow::Solver< Grid >::vofRebuildBcBlock(), peclet::flow::Solver< Grid >::vofSolidColourSum(), peclet::flow::Solver< Grid >::wallAreaProbe(), peclet::flow::Solver< Grid >::wallFluxImbalance(), and peclet::flow::Solver< Grid >::zeroSolidColour().

◆ kVofG

template<class Grid >
constexpr int peclet::flow::Solver< Grid >::kVofG = 3
staticconstexpr

Definition at line 2859 of file flow_ibm.hpp.

Referenced by peclet::flow::Solver< Grid >::advectVof(), peclet::flow::Solver< Grid >::advectVofKinematic(), peclet::flow::Solver< Grid >::advectVofMomentum(), peclet::flow::Solver< Grid >::applyContactAngle(), peclet::flow::Solver< Grid >::applyDomainWallGeometry(), peclet::flow::Solver< Grid >::bindVofBlockPatch(), peclet::flow::Solver< Grid >::bridgeColourToVof(), peclet::flow::Solver< Grid >::bridgeVelocityToVof(), peclet::flow::Solver< Grid >::buildVofBlock(), peclet::flow::Solver< Grid >::buildVofCellVelocity(), peclet::flow::Solver< Grid >::buildVofGeometry(), peclet::flow::Solver< Grid >::computeVofBlockCsf(), peclet::flow::Solver< Grid >::computeVofCurvature(), peclet::flow::Solver< Grid >::contactAngleDiagnostics(), peclet::flow::Solver< Grid >::getVofDynamicField(), peclet::flow::Solver< Grid >::getVofFilledColour(), peclet::flow::Solver< Grid >::getVofGeometry(), peclet::flow::Solver< Grid >::harvestVofBlockUnion(), peclet::flow::Solver< Grid >::imposeDomainWallKind(), peclet::flow::Solver< Grid >::pcAreaCascadeCompute(), peclet::flow::Solver< Grid >::pcBuildInterface(), peclet::flow::Solver< Grid >::pcUpdateCurvature(), peclet::flow::Solver< Grid >::updateVofBlockOverlap(), peclet::flow::Solver< Grid >::vofApplyColourBc(), peclet::flow::Solver< Grid >::vofExchangeRaw(), peclet::flow::Solver< Grid >::vofExchangeScalar(), peclet::flow::Solver< Grid >::vofExtendWallBand(), peclet::flow::Solver< Grid >::vofInterfaceArea(), and peclet::flow::Solver< Grid >::vofRebuildBcBlock().


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