18#ifndef PECLET_FLOW_SDFLOW_IBM_HPP
19#define PECLET_FLOW_SDFLOW_IBM_HPP
27#include <Kokkos_Core.hpp>
33#include "peclet/core/geom/device_scene.hpp"
47#include "peclet/core/field/field_set.hpp"
48#include "peclet/core/solver/anderson.hpp"
79 using FV = Kokkos::View<MReal*, CCMem>;
80 static constexpr int G = 2;
138 double h[3] = {1.0, 1.0, 1.0};
139 double org[3] = {0.0, 0.0, 0.0};
140 double ext[3] = {0.0, 0.0, 0.0};
178 double hp[3] = {1.0, 1.0, 1.0};
179 double w[3] = {1.0, 1.0, 1.0};
242 double a[3] = {0.0, 0.0, 0.0};
243 double b[3] = {1.0, 1.0, 1.0};
256 Solver(
int nx,
int ny,
int nz,
const std::array<double, 3>& extent,
257 const std::array<double, 3>& origin,
const std::array<long, 3>&
globalCells);
263 void setPhysicalDomain(
const std::array<double, 3>& extent,
const std::array<double, 3>& origin,
293 std::array<double, 3>
spacing()
const;
344 void setMu(
double m);
347 void setDt(
double d);
629 const std::vector<double>& oz);
868 const std::vector<double>&
ww);
870#ifdef PECLET_FLOW_MPI
975 bool periodic =
false);
997 const std::array<double, 3>&
ang,
const double* center =
nullptr);
1009 const std::array<double, 4>&
quat);
1259 void setVelocity(
int c,
const std::vector<double>& v);
1359 std::vector<peclet::core::solver::AndersonRole>
roles;
1363#ifdef PECLET_FLOW_MPI
1486 CCField u, b, inhom, rscale, mask;
1487 FV AC, AW, AE, AS, AN, AB, AT;
1489 Kokkos::View<int*, CCMem> idMap;
1490 Kokkos::View<int, CCMem> counter;
1879 peclet::core::geom::InstanceMotionView<double>
motionView()
const;
2435 template <
class Fill,
class Color,
class ColorDu>
2437 std::function<
double()>
resid =
nullptr,
double bnorm = 0.0);
2605 bool hasField(
const std::string& name)
const;
2628 std::vector<double>
getField(
const std::string& name);
2631 void setField(
const std::string& name,
const std::vector<double>& v);
2661 void addScalar(
const std::string& name,
double D,
int scheme,
int iters,
bool cutcell =
false);
2664 bool hasScalar(
const std::string& name)
const;
2669 void setScalarBc(
const std::string& name,
int face,
int type,
double value);
2705 void setScalarWall(
const std::string& name,
int type,
double value,
double coefficient,
2884 void setVof(
const std::vector<double>& c);
2887 std::vector<double>
getVof();
3039 double sigma = 0.0);
3188 void enableVofBlocks(
const std::vector<std::array<double, 4>>& seeds);
3286 const std::vector<std::vector<double>>&
colours);
4588 const std::string& in1,
const std::vector<double>&
params);
4678 const std::vector<double>& xs,
const std::vector<double>&
ys);
4739 void resizeForBlock();
4745 void reallocOwnedFields();
4750 void rebindFieldAliases();
4757 static void resizeIfAllocated(
CCField& f,
const char*
label, std::size_t n);
4760 void resizeBlockScratch();
4765 CCField ensureTarget(
const std::string& name);
4768 void ensureCellForceAll();
4786 bool touchesGlobalFace(
int f)
const;
4817 std::size_t n_, n1_;
4818 double rho_ = 1.0, mu_ = 0.1, dt_ = 50.0;
4822 double rhoPhys_ = 1.0, muPhys_ = 0.1, dtPhys_ = 50.0;
4823 std::array<double, 3> fPhys_{{0, 0, 0}};
4824 double sigmaPhys_ = 0.0;
4825 double slipPhys_ = 0.0;
4826 double bcVelPhys_[6][3] = {};
4827 std::array<double, 3> f_{{0, 0, 0}};
4832 int superficialAxis_ = -1;
4833 double superficialVelPhys_ = 0.0;
4834 Kokkos::View<double, CCMem> superficialShift_;
4835 int velIters_ = 200, presIters_ = 20;
4836 double velTol_ = 0.0;
4837 int velMinIters_ = 2;
4838 long lastMomentumSweeps_ = 0;
4841 double velResTol_ = -1.0;
4842 double lastMomentumResid_ = -1.0;
4845 double lastAxNorm_ = 0.0;
4846 int pcgMaxit_ = 500;
4847 double pcgRtol_ = 1
e-10;
4848 bool useChebyshev_ =
false,
4849 chebBoundsSet_ =
false;
4850 bool useFcg_ =
false;
4853 int chebMaxit_ = 120;
4854 double chebRtol_ = 1
e-9, chebA_ = 0.0, chebB_ = 0.0;
4857 bool chebWarmOk_ =
false;
4858 long chebColdRestarts_ = 0;
4861 bool pressGraphAmg_ =
false;
4866 int pressAgglomMode_ = -1;
4867 long lastPressureIters_ = 0;
4868 bool lastPressureFailed_ =
false;
4873 bool bfpSet_ =
false, bfpOn_ =
false;
4874 bool bfpOpenNotice_ =
false;
4881 bool pbValid_ =
true;
4882 bool pWritten_ =
false, pbWritten_ =
false;
4889 double bfpChebA_ = 0.0, bfpChebB_ = 0.0;
4890 bool bfpChebSet_ =
false;
4892 bool lastBalancedForceFailed_ =
false;
4893 long balancedForceFailures_ = 0;
4894 bool bfpFailWarned_ =
false;
4895 bool coeffBuiltThisStep_ =
false;
4896 long lastBalancedForceIters_ = 0;
4903 bool faceFieldValid_ =
false;
4906 bool vofPrecheckDone_ =
false;
4912 std::shared_ptr<vof::VofBlockSet> vofBlocks_;
4913 std::shared_ptr<vof::VofBlockExchange> vofBlockExch_;
4920 SField vofBlkS_, vofBlkCeff_;
4921 VofOverlapCensus vofOverlap_{};
4922 bool vofOverlapDensity_ =
false;
4925 double vofBlockKappaMax_ = -1.0;
4927 int vofBlockDebris_ = -1;
4928 bool vofPhantomBound_ =
true;
4929 bool distributed_ =
false;
4931#ifdef PECLET_FLOW_MPI
4932 std::shared_ptr<GridHaloTopology<3>> velHalo_;
4933 std::shared_ptr<GridHalo<double>> velDev_;
4934 std::shared_ptr<GridHalo<MReal>> velDevF_;
4935 bool caMomentum_ =
false;
4936 bool momStencilDirty_[3] = {
true,
true,
true};
4937 std::shared_ptr<peclet::core::decomp::BlockDecomposer<3>>
4939 MPI_Comm comm_ = MPI_COMM_NULL;
4940 int gnx_ = 0, gny_ = 0, gnz_ = 0;
4942 int bc_[6] = {0, 0, 0, 0, 0, 0};
4943 double bcVel_[6][3] = {};
4944 bool hasBc_ =
false, hasOutflow_ =
false;
4948 bool backflowWarned_ =
false;
4949 double backflowBeta_ =
4953 int bcProfNc_[6] = {0, 0, 0, 0, 0, 0};
4954 std::vector<double> bcProfRaw_[6];
4955 int bcProfNb_[6] = {0, 0, 0, 0, 0, 0};
4956 int bcProfRawNc_[6] = {0, 0, 0, 0, 0, 0};
4957 CCField bcDcorr_[3], bcBrhs_[3];
4958 bool advect_ =
false, cutcellPressure_ =
false, implicitFou_ =
false;
4959 bool deferredCorr_ =
true;
4961 bool incremental_ =
true,
4963 bool dtDirty_ =
false;
4967 bool geometryBuilt_ =
false;
4968 int faceInterp_ = 9;
4971 bool advWallVel_ =
true;
4975 bool ufAdvect_ =
true;
4978 bool outflowOpCoeff_ =
true;
4981 bool exactResidual_ =
false;
4987 int decompLevels_ = 0;
4988 double decompMaxImbalance_ = 1.05;
4993 bool weightedDec_ =
false;
4994 double aspectTheta_ = 2.0;
4995 bool rotationalP_ =
true;
4997 bool rotFilter_ =
false;
5002 double rotFilterEps_ = 0.05;
5003 double rotWeight_ = 1.0;
5004 double rotWallW_ = 0.0;
5007 int apertureOrder_ = 2;
5008 int fluidOnlyMode_ = 0;
5009 StarOverlay starOv_;
5010 Kokkos::View<int, CCMem> starCounter_;
5012 bool useVelocityMg_ =
false;
5013 bool vmgExplicit_ =
false;
5017 long vmgAutoCells_ = std::numeric_limits<long>::max();
5018 long vmgAutoMinGlobal_ = 0
L;
5019 int vmgAutoMinExtent_ = 16;
5020 double vmgAutoMinCond_ = 13.0;
5022 bool vmgDecided_ =
false;
5023 int vmgLevels_ = 4, vmgVcycles_ = 8;
5024 bool useVelocityCheb_ =
false;
5025 bool vmgCheb_ =
false;
5026 int vmgChebDegree_ = 0;
5027 double vmgChebEigRatio_ = 10.0;
5028 int velChebMaxit_ = 400;
5031 int outerIters_ = 1;
5032 double outerTol_ = 0.0;
5033 long lastOuterIters_ = 0;
5034 double lastOuterCorr_ = 0.0;
5036 double tStep_ = 0.0, tPredictor_ = 0.0, tMomentum_ = 0.0, tProjection_ = 0.0;
5038 bool vofTiming_ =
false;
5040 double tStepSum_ = 0.0, tPredSum_ = 0.0, tMomSum_ = 0.0, tProjSum_ = 0.0;
5041 double vofTick()
const;
5044 void vofAdd(
double& acc,
double t0);
5049 static double phaseTick();
5052 CCField sdf_, ox_, oy_, oz_, phi_, div_, P_, ox1_, oy1_, oz1_, rhs1_, phi1_, r_, z_, pp_, Ap_;
5053 bool ghostProjection_ =
false;
5054 bool colSchemeAuto_ = Grid::collocated;
5057 Kokkos::View<int*, CCMem> gpIdMap_;
5058 Kokkos::View<int, CCMem> gpCounter_;
5060 int gpMatrixOrder_ = 2, gpRhsOrder_ = 2;
5062 bool hasExactCross_ =
false;
5065 double slipLambda_ = 0.0;
5066 bool wallSlip_ =
false;
5067 Kokkos::View<int, CCMem> slipSkipDev_;
5068 std::array<int, 3> slipSandwich_{0, 0, 0};
5069 bool sceneCrossings_ =
false;
5070 std::shared_ptr<peclet::core::geom::SceneQueryDevice<double, CCMem>> sceneQ_;
5071 bool hasScene_ =
false;
5077 Kokkos::View<int*, CCMem> cutOwner_;
5083 std::vector<double> instCen_, instLin_, instAng_;
5084 Kokkos::View<double*, CCMem> instCenD_, instLinD_, instAngD_;
5086 bool hasMotion_ =
false;
5098 bool haveUStar_ =
false;
5104 bool haveAdvRhs_ =
false;
5105 bool wallFluxDiv_ =
true;
5111 bool freshSeed_ =
true;
5114 std::shared_ptr<peclet::core::geom::SceneBuilder<double>> sceneB_;
5115 peclet::core::Vec3<double> sceneOrigin_{0, 0, 0}, sceneExtent_{0, 0, 0};
5116 bool scenePeriodic_ =
false;
5117 long imageOverlapCells_ = 0;
5118 std::vector<long> movingCutCells_;
5119 std::vector<int> instCenPinned_;
5120 std::vector<long> movingDegenerate_;
5121 bool sceneDirty_ =
false;
5122 std::vector<double> oxOverride_, oyOverride_, ozOverride_;
5123 bool hasOpenOverride_ =
false;
5139 peclet::core::FieldSet fields_;
5140 std::vector<ScalarField> scalars_;
5145 long scgVersion_ = 0;
5149 bool scalarOpenValid_ =
false;
5151 bool pcEnabled_ =
false, pcThermal_ =
false, pcHasUser_ =
false;
5152 double pcRhoG_ = 1.0, pcRhoL_ = 1.0, pcHlv_ = 1.0;
5153 double pcTsat_ = 0.0, pcKg_ = 0.0, pcKl_ = 0.0, pcRint_ = 0.0;
5155 double pcRhoGPhys_ = 1.0, pcRhoLPhys_ = 1.0, pcHlvPhys_ = 1.0;
5156 double pcKgPhys_ = 0.0, pcKlPhys_ = 0.0, pcRintPhys_ = 0.0;
5157 double pcRcpGPhys_ = 1.0, pcRcpLPhys_ = 1.0;
5158 double pcInterfaceEps_ = 1
e-12, pcPureEps_ = 1
e-12;
5159 std::string pcTName_;
5160 CCField pcMdot_, pcSrc_, pcUser_, pcArea_, pcNrm_[3], pcDep_, pcTgt_, pcCnew_, pcDefic_;
5161 PhaseChangeDiagnostics pcDiag_;
5163 bool pcPlaneDir_ =
true;
5164 double pcGfmThMin_ = 0.1, pcGfmThMax_ = 1.9;
5165 bool pcQuadFit_ =
true;
5174 vof::VofInterfaceArea pcAreaC_;
5175 vof::VofMcArea pcAreaMc_;
5176 double pcMcOrphanArea_ = 0.0;
5181 bool pcDepositFallback_ =
false;
5182 bool pcEnergy_ =
false;
5183 double pcRcpG_ = 1.0, pcRcpL_ = 1.0;
5185 vof::VofEnergyAdvector vofEnergy_;
5186 double pcBandDiv_ = 0.0;
5187 CCField pcGn_[3], pcGphi_, pcTgam_;
5192 bool pcBudgetOn_ =
false;
5193 PhaseChangeBudget pcBudget_;
5199 double pcFitKappa_ = 0.0;
5200 bool pcCarryConserve_ =
false;
5202 double pcCarryDeposited_ = 0.0, pcCarryLost_ = 0.0;
5207 bool pcMdotOperator_ =
false;
5208 int pcGfmOrder_ = 1;
5209 bool pcCurvDist_ =
false;
5213 bool pcMaskFresh_ =
false;
5214 double pcQOperator_ = 0.0;
5215 double pcQOrphan_ = 0.0;
5216 double pcMdotFitMean_ = 0.0;
5217 bool pcHasSink_ =
false;
5218 double pcSinkW_ = 0.0;
5219 std::vector<Closure> closures_;
5221 bool hasCellForce_ =
false;
5222 bool varProps_ =
false;
5223 bool harmonicMu_ =
false;
5225 int varRotMode_ = 0;
5226 double varRotChi_ = 1.0;
5227 bool varRho_ =
false;
5230 bool vofEnabled_ =
false;
5233 bool rhoFaceHarmonic_ =
false;
5234 bool outflowCorrValid_ =
false;
5239 bool outflowRhoCorr_ =
true;
5243 bool vofSolidZero_ =
true;
5246 bool contactAngleSet_ =
false;
5247 double contactAngleDeg_ = 90.0;
5248 int contactPivot_ = vof::kVofPivotVolume;
5249 std::vector<double> contactAngleField_;
5253 vof::VofDynamicWetting vofDyn_;
5254 double contactSigmaOverride_ = 0.0;
5255 bool contactSigmaWarned_ =
false;
5257 vof::WyAdvector vofAdv_;
5259 double vofCflLimit_ = 0.25;
5260 double sigmaCsf_ = 0.0;
5261 double capillaryCfl_ = 1.0;
5262 double csfInterfaceEps_ = 1
e-8;
5264 bool kappaFrozen_ =
false;
5267 bool vofBcActive_ =
false;
5269 bool vofInflowSet_[6] = {
false,
false,
false,
false,
false,
false};
5270 bool vofBackflowSet_[6] = {
false,
false,
false,
false,
false,
false};
5271 double vofInflowC_[6] = {0, 0, 0, 0, 0, 0};
5272 double vofBackflowC_[6] = {0, 0, 0, 0, 0, 0};
5273 std::vector<double> vofInflowProfRaw_[6];
5274 int vofInflowProfNb_[6] = {0, 0, 0, 0, 0, 0};
5275 int vofInflowProfNc_[6] = {0, 0, 0, 0, 0, 0};
5276 CCField vofInflowProf3_[6], vofInflowProfG2_[6];
5277 int vofProf3Nc_[6] = {0, 0, 0, 0, 0, 0}, vofProfG2Nc_[6] = {0, 0, 0, 0, 0, 0};
5282 double vofBcVol_[6] = {0, 0, 0, 0, 0, 0};
5283 double vofBcVolTotal_[6] = {0, 0, 0, 0, 0, 0};
5285 vof::VofCurvature vofCurv_;
5286 CCField kappaField_, kappaBranch_;
5287 vof::VofCurvature::Stats vofCurvStats_{};
5289 bool vofMomEnabled_ =
false;
5290 vof::MomentumConsistentAdvector vofMom_;
5292 double vofRhoG_ = 1.0, vofRhoL_ = 1.0;
5293#ifdef PECLET_FLOW_MPI
5294 std::shared_ptr<GridHaloTopology<3>> vofHalo_;
5295 std::shared_ptr<GridHalo<double>> vofDev_;
5297 CCField rho1_, cx1_, cy1_, cz1_;
5298 bool porous_ =
false;
5299 double pressUnderRelax_ = 1.0;
5300 bool porousDepsDt_ =
true;
5304 CCField epsField_, epsPrev_, eps1_, depsdt_;
5311 bool porousCons_ =
true;
5313 bool hasDrag_ =
false;
5336#ifdef PECLET_FLOW_INSTANTIATING
5372#ifndef PECLET_FLOW_INSTANTIATING
5374extern template class Solver<Staggered>;
5375extern template class Solver<Colocated>;
flow — VoF rung V1: Weymouth & Yue (2010) directionally-split, exactly volume-conserving geometric ad...
flow — VoF Part III rung W0: the per-bubble VoF BLOCK, a third container over the same L1 kernels (su...
flow — VoF Part III rung W0: the block gather/scatter (VOF_PLAN.md §10 design items 2 and 4).
void imposeDomainWallKind(int mask)
void vofExchangeScalar(CCField f)
The colour block's ghost policy WITHOUT the colour-specific rules (no solid-band fill,...
int pressureBottomExtent() const
void setVofMomentumMuscl(bool on)
void projectAssembleDivergence()
void setScalarSource(const std::string &name, double S)
void setSolidUploadSdf(CCField din)
void setVofCurvatureMixedHeightFit(bool on)
double wallFluxImbalance()
Net wall flux this rank injects, sum over inner cells of u_w .
void scalarCutMatvecTwo(ScalarField &sc, CCField yf, CCField ys, CCField xf, CCField xs)
bool hasCutcellPressure() const
void setContactAngleClamp(double loDeg, double hiDeg)
const VofTiming & vofTimingReport() const
bool vofBlocksEnabled() const
void setPressureMeanRemoval(bool all)
std::vector< double > getScalarSolid(const std::string &name)
double multigridAspectThreshold() const
int phaseChangeArea() const
std::vector< double > getFaceVelocity(int c)
void setPhaseChangeGfmOrder(int order)
WO-P3g item 2: the order of the one-sided (ghost-fluid) Dirichlet row.
void setVofRhoFloorFrac(double f)
void harvestVofBlockUnion()
void setPhaseChangeEnergyMuscl(bool on)
MinMod-limited donor reconstruction of the face temperature in the consistent energy flux (vof/energy...
void enableVofBlocksFromField(const std::vector< std::array< int, 6 > > &boxes)
static constexpr int kVofG
bool phaseChangeEnergyMuscl() const
void setSolidInitPressureMg()
void setScalarWall(const std::string &name, int type, double value, double coefficient, int instance)
void setInstanceTransform(int i, const std::array< double, 3 > &translation, const std::array< double, 4 > &quat)
Move one instance (Layer 3 rung 4).
std::array< int, 3 > globalResolution() const
long numPressureChebyshevRestarts() const
void projectPressureUpdate()
void extendSdfDomainGhosts(CCField f)
Repair a cell-centred geometry field's ghost band on every rank-owned NON-PERIODIC domain face,...
void setContactAngleSmoothing(bool on)
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 setPhaseChangeThermalOff()
void applyVelocityBcAll(int fold, bool doOutflow)
void vofApplyColourBc(CCField f)
The colour field's boundary rules, applied at the END of vofFillGhosts — i.e.
void fillVelGhosts(int comp, int fold)
void pcZeroDomainGhosts(CCField f)
Zero the two ghost layers on every NON-periodic domain face this rank owns.
std::vector< double > scalarGeometryField(int which)
void setIncrementalPressure(bool on)
void pcCarryDeposit(ScalarField &sc)
WO-P3f — the enthalpy the per-cell Dirichlet overwrite destroys, returned to the phase it came from.
std::function< double()> constCoeffResidual(int c, double bx, double by, double bz, double Ac)
long lastPressureAllreduceCount() const
void setVelocityTolerance(double rtol, int minIters)
double maxOpenDivergenceInternal()
The same diagnostic in INDEX units (per tRef), which is what the solver's own guards read.
void addCsfRhs(int c, CCField dst, bool rowScaled, bool faceRange=false)
double stencilBnorm(int c)
double capillaryCfl() const
void registerBalancedForceState()
void setContactAngleDynamicOff()
bool pressureCoarseGhost() const
void buildRhsVarMom(int c)
void scatterInner(CCField fld, const std::vector< double > &in)
void setSolid(const std::vector< double > &sdfInner, bool cutcellPressure)
Host entry point: upload the inner SDF once and delegate.
void phaseChangeStep()
The in-step driver: everything applyPhaseChange does, at the head of step().
void setContactAnglePivot(int mode)
void setVofBlockPool(bool on)
bool contactAngleSet() const
ScalarField & scalarField(const std::string &name)
PhaseChangeDiagnostics phaseChangeDiagnostics()
void setVofKappaConstant(double kappa)
kappa is a PHYSICAL curvature, 1/length (the internal field is 1/h; see vof_curvature()).
bool phaseChangeDepositFallback() const
bool balancedForceProjection() const
void buildOpenFaceField()
Build ufOpen_ = the face field with each open (outflow) domain face overwritten by its zero-gradient ...
void setScalarSourceField(const std::string &name, const std::vector< double > &S)
std::array< double, 3 > scalarMeanFlux(const std::string &name)
bool hasMovingInstance() const
True when at least one instance carries a nonzero velocity – i.e.
long solveBalancedForceSystem(double bref, double r0)
void fillDragBetaGhosts()
void fillGhosts(CCField f)
std::vector< double > getVofCurvature()
The interface curvature kappa = 2H in the caller's units, i.e.
long lastOuterIterations() const
void setMassFluxUniform(double v)
Prescribe a UNIFORM mass flux (P0), in mass per area per time.
double decompositionMaxImbalance() const
void fillDomainPeriodic(CCField f)
void setPressureCoarseGhost(bool on)
Neumann (zero-gradient) coarse ghost on wall/inflow faces before the pressure MG's prolongation — the...
void setDomainBc(int face, int type, double vx, double vy, double vz)
bool advWallInputs() const
R0 helper: allocate (once) and arm the per-component advective-term stash the reaction-force budget c...
void refreshWallVelocity()
Re-derive ONLY the wall-velocity fields and the momentum operator that folds them in.
void setUfAdvection(bool on)
Advect the collocated momentum with the PROJECTED, divergence-free MAC face field uf_/vf_/wf_ (DEFAUL...
void setPhaseChangeFitCurvature(double kappa)
WO-P3f INSTRUMENT: prescribe the interface curvature kappa = div(n) the one-sided fits use to correct...
int vofBlockAssign() const
void fillPropGhosts(CCField f, bool edges=false)
void requireCollocatedFaceForceScope(const char *who)
void seedFaceFieldFromCells()
double lastStepSeconds() const
void patchScalarDirichletFaceVar(CCField AC, CCField band, CCField kc, int a, int side)
void setFaceInterp(int mode)
void applyBackflowStab(int c)
void pcScatterSource()
(2) Deposit each interfacial cell's source into its chosen pure-gas cell, as a GATHER (each receiving...
void checkMovingInstancesAreCut()
A MOVING instance whose surface produces no fractional face aperture has no path for its wall velocit...
sco::MeanGradPosition scalarMeanGradPosition(const double Gphys[3]) const
std::vector< std::array< int, 3 > > pressureMgLevelRatios() const
void pcApplyDivergenceSource(CCField div)
Subtract the phase-change (and any prescribed) divergence source from div_ so the deflated pressure s...
int sceneInstanceCount() const
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,...
void setPhaseChangeMdotOperator(bool on)
WO-P3g item 1: take mdot from the energy operator's own interfacial flux instead of the one-sided lea...
std::vector< double > scalarSolidGeometryField(const std::string &name, int which)
void setVofTiming(bool on)
std::vector< double > getField(const std::string &name)
std::vector< long > movingInstanceDegeneratePoints() const
Per instance: staggered points where the sampled sdf is exactly zero (see the warning).
void setOutflowRhoCorrection(bool on)
void setPropertyMode(bool variable, bool harmonic)
std::vector< double > vofBlockKappa(long id)
double lastPressureAllreduceSeconds() const
void addCsfRhsBlocks(int c)
double phaseChangeCarryDeposited() const
The carry ledger, physical: an energy with the consistent transport on, and a temperature times a vol...
void setVofMomentumCellFlag(bool on)
void setVelocityChebyshev(bool on, int maxit=400)
void applyVelocityBcComp(int comp, int fold, bool doOutflow)
void setOpennessOverride(const std::vector< double > &ox, const std::vector< double > &oy, const std::vector< double > &oz)
void setOuterTolerance(double tol)
CCField addField(const std::string &name)
void vofBcArm()
Arm the rung: install the mask, rebuild the profiles, and zero the boundary volume ledger.
void computeVofCurvature()
double lastMomentumResidual() const
double maxOpenDivergence()
void scalarCutRefusals(const ScalarField &sc) const
std::array< double, 3 > domainOrigin() const
Physical lower corner of the GLOBAL inner grid.
void computeVofBlockCsf()
void setPressureGraphAmg(bool on)
bool vofHasGeometry() const
void scalarCutMatvec(ScalarField &sc, CCField y, CCField x)
double vofSolidColourSum()
std::array< long, 3 > fluidMomentumCells()
The number of unmasked (fluid) staggered momentum cells per component – the exact discrete datum the ...
ScalarField & cutcellScalar(const std::string &name, const char *who)
void pcRegress(double dt)
(3) The regression: two Jacobi passes over the exchanged per-cell data, so the clip deficit is redist...
vof::VofInterfaceArea::Stats pcAreaCascadeCompute()
Run the cascade area driver on the (already bridged) g = 3 colour block.
VelocityMG::Comm vmgComm() const
double velocityResidualTolerance() const
void buildRhsColoVar(int c)
ScalarCutFacets scalarFacets(const std::string &name)
SField pcAreaCascadeField() const
The area field the last pcAreaCascadeCompute filled (either driver).
void setVelocitySolverAuto()
double pcEffPureEps() const
…and the mirror statement: a cell the ADVECTOR treats as a pure phase is a pure phase here too,...
void setPressureTelescope(bool on)
std::vector< double > getVofFilledColour()
double phaseChangeQOrphan() const
void setPressureStrict(bool on)
Throw instead of reporting when the pressure preconditioner returns a non-finite correction (ISSUES s...
void pcUpdateThermalMask()
void enableVofBlocks(const std::vector< std::array< double, 4 > > &seeds)
OutflowBackflow outflowBackflow()
void fillGhostsFaces(CCField f)
bool freshCellSeed() const
bool advectionWallVelocity() const
void applyVelocityBcFace(CCField f, int comp, int a, int s, int fold, bool doOutflow)
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...
void scalarCutAssembleSolve(ScalarField &sc, bool steady)
std::array< double, 3 > wallAreaProbe()
A_wall EXACTNESS PROBE (diagnostic for the Layer-4 force integral).
void pcUpdateEnergyProps()
Refresh k(C) and (rho c_p)(C) on the G=2 block from the current colour.
void rebuildGeometry()
Re-derive ALL geometry from the current instance transforms (Layer 3 rung 4): rebuild the accelerated...
void exchangeFieldAdd(const std::string &name)
void setSolidSelectScheme()
std::vector< double > getVofAdvectedVelocity(int c)
void advanceScalarCutCell(ScalarField &sc)
CCConst advVelView(int c) const
The velocity view the advection operators must read for component c: the wall-corrected scratch while...
void setContactAngleDynamic(double thetaEDeg, double slipCells, double muLiquid, double sigma=0.0)
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 referenc...
void exchangeField(const std::string &name)
void setAdvection(bool on)
std::array< long, 3 > globalCells() const
The GLOBAL cell counts (this rank's block single-rank).
void bridgeOutflowFacePlanes()
Bridge the HIGH-side boundary-face openness plane of every rank-owned outflow axis from the g=2 block...
void setPressureExactResidual(bool on)
WO-R2 item 3 — the exact (matrix-free, double, flux-form) level-0 operator apply in the residual and ...
std::vector< double > getVofGeometry(int which)
double phaseChangeQOperator() const
The operator's interfacial heat (power), physical.
void setSolidFromScene(bool cutcellPressure)
Sample the scene onto this rank's inner grid and install it as the solid, entirely on device – no nx*...
void vofRebuildBcBlock()
(Re)build everything that lives on the g=3 block for this rung: the out-of-domain mask and the resamp...
void addScalar(const std::string &name, double D, int scheme, int iters, bool cutcell=false)
std::vector< double > vofBcVolumes() const
Signed liquid volume that crossed each of the six domain faces during the LAST colour advection,...
void setScalarBcProfile(const std::string &name, int face, const std::vector< double > &prof, int n1, int n2)
double maxPorousResidual()
bool phaseChangeEnabled() const
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...
double maxOpenDivergenceProjectedInternal()
The same diagnostic in INDEX units (per tRef), which is what the solver's own guards read.
std::vector< double > getVof()
double surfaceTension() const
The surface tension in the caller's units (what set_surface_tension was given).
bool outflowRhoCorrection() const
void copyInner(CCField dst, C3 de, int dg, CCConst src, C3 se, int sg)
void requireNoGeometry(const char *who) const
void setDivergenceSink(const std::vector< double > &w)
WO-P23: an AUTO-BALANCED sink region for the phase-change divergence source.
void applyVelocityBcCompTo(CCField f, int comp, int fold, bool doOutflow)
double capillaryDtInternal()
The same limit in the solver's index time (per tRef) — what the step's own guards compare to.
void setPropertyModel(const std::string &target, ClosureKind kind, const std::string &in0, const std::string &in1, const std::vector< double > ¶ms)
double maxAbsDiffInner(CCConst a, CCConst b)
void fillPeriodicAxes(CCField f, int axes)
void scalarCutAdvection(ScalarField &sc, bool steady)
void requireIsotropic(const char *what) const
Phase 2 §7 — refuse an ANISOTROPIC domain in a consumer this phase does not carry.
double vofTimingProjectionSeconds() const
CsfDiagnostics csfDiagnostics()
const scg::ScalarCutGeometry & scalarCutGeometry()
void setBackflowStab(double beta)
std::array< double, 3 > spacing() const
Cell size per axis (equal on every axis unless the Phase 2 anisotropic path is armed – see unitScales...
void setSurfaceTension(double sigma)
void exchangeExtRaw(CCField f)
Raw ghost fill of an extended-block field: the rank halo exchange under MPI, the periodic wrap single...
bool velocityChebyshevActive() const
void setVelocityIterations(int it)
void vofHarvestBcVolumes()
Move the advector's per-face boundary volume ledger into the solver's, once per advection.
void enableVofMomentum(double rhoGasPhys, double rhoLiquidPhys)
rhoGas / rhoLiquid are PHYSICAL densities, the same numbers the rho closure is given.
ScalarFaceFlux scalarFaceFlux(int a) const
double finishResidual(int c)
ScalarCutBudget scalarBudget(const std::string &name)
bool ufAdvVelocity() const
Are the advection operators reading the projected face field this step? Collocated grid,...
std::vector< double > getVofCurvatureBranch()
bool bcVelFacePair(int a) const
std::vector< double > scalarWallFlux(const std::string &name)
void setPressureChebyshev(bool on, int maxit, double rtol)
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 perpendicu...
double vofBlockImbalanceOf(int mode) const
void scalarCutWarnings(ScalarField &sc)
const UnitScales & unitScales() const
bool lastBalancedForceFailed() const
bool rhoFaceHarmonic() 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.
CCConst openFaceView(int c) const
Component c of the face field AS THE ADVECTION AND THE DIVERGENCE DIAGNOSTIC MUST READ IT: advFaceVie...
void applyScalarBcFace(CCField c, int a, int side, int type, double val, bool edges=false)
bool phaseChangeEnergy() const
void requireVofGeometry(const char *who)
void ensureScalarCutGeometry()
bool phaseChangeMdotOperator() const
void setSolidGhostProjectionOverlay(CCField din)
void addWallFluxDivergence(CCField d)
void ensureScalarSolidRecord(ScalarField &sc, const std::vector< char > &conj)
double capillaryDt()
The Brackbill capillary limit in the CALLER's time unit.
void setVof(const std::vector< double > &c)
void setContactAngleHysteresis(double thetaADeg, double thetaRDeg)
static constexpr double defaultVofWispEps()
The value enableVof starts from.
double maxOpenDivergenceProjected()
long lastBalancedForceIterations() const
void setScalarBc(const std::string &name, int face, int type, double value)
bool hasOpenDomainFace() const
std::vector< double > getOpenness(int c)
long periodicImageOverlapCells() const
Cells on this rank whose solid/fluid sign was set by a periodic IMAGE of an instance wider than the b...
bool pressureStrict() const
void buildVelocityOverlays(bool resetU)
Build the three per-component Robust-Scaled cut-cell overlays + solid masks from the CURRENT sdf_ (ex...
void setSolidBuildOverlaysAndStencils()
vof::VofCurvature::Stats vofBlockCurvatureStats() const
void applyDomainWallGeometry(int mask)
void addDragDiagonal(int c)
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...
std::vector< double > getVofBlockForce(int c)
void setGhostProjection(bool on, int matrixOrder=2, int rhsOrder=2)
bool scalarRootRank() const
rank 0 (or not distributed): the one that prints a warning
bool vofKappaFrozen() const
void pcBudgetPost(ScalarField &sc)
WO-P3f, part 2: the state AFTER the energy solve, the heat the plane-anchored rows actually delivered...
std::array< long, 2 > vofBlockPoolStats() const
void constraintDivergence(CCConst fx, CCConst fy, CCConst fz, CCField out)
int scalarNumBodies() const
void setVofCutFluxClamp(bool on)
CCConst advFaceView(int c) const
Component c of the collocated MAC face field (uf_/vf_/wf_), flow's low-face convention: entry i is th...
void setPhaseChangePlaneDirichlet(bool on)
The PLANE-ANCHORED (ghost-fluid) Dirichlet condition, ON by default.
int apertureOrder() const
ContactAngleDiagnostics contactAngleDiagnostics()
void setVofCurvatureWeightWidth(double d)
void projectBuildCoefficients()
void setVariableRotational(int mode, double chi)
void setWallFluxDivergence(bool on)
Rung 3 on/off.
void setPressureUnderRelax(double w)
long lastMomentumSweeps() const
void setScalarMeanGradient(const std::string &name, const std::array< double, 3 > &G)
bool vofCutFluxClamp() const
double vofRhoFloorFrac() const
double vofTimingPredictorSeconds() const
double vofInterfaceArea()
The summed interfacial area over the inner region, PHYSICAL (globally reduced under MPI) — the E7 gal...
void setPressureLevels(int levels)
long balancedForceFailures() const
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 para...
void vofExchangeRaw(CCField f)
std::array< int, 3 > blockOrigin() const
void setFluidOnlyConstraint(int mode)
double wallSlipLength() const
The Navier slip length in the caller's units (0 = no-slip).
void setRotationalPressure(bool on)
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 setPhaseChangeQuadraticFit(bool on)
The QUADRATIC one-sided gradient fit (T - T_G = G phi + Q phi^2) instead of the linear one.
void setDeferredCorrection(bool on)
void setScalarSolid(const std::string &name, double D, double capacity, double partition, double contactResistance, int instance)
void applySuperficialVelocity()
double vofInterfaceEps() const
void clearDivergenceSink()
void setPressureGeometry(const std::vector< double > &sdfInner)
void setVofBlockAssign(int mode, long every)
void resampleBcProfile(int face)
double phaseChangeFitCurvature() const
double pcBandDivergence()
The BAND-EXTENDED LIQUID VELOCITY of VOF_PLAN §9 item 3, as a MEASUREMENT rather than a switch.
scg::ScalarCutCensus scalarCutCensus()
void pcBudgetPre(ScalarField &sc)
WO-P3f, the energy-budget instrument, part 1: the state BEFORE the energy solve, and the class-change...
double contactAngle() const
void setWallSlipLength(double lambdaCells)
WO-V6b – the VELOCITY half of the dynamic contact line.
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...
void applyPhaseChange(double dtPhysArg)
Kinematic entry point (the P0a/P1 driver): build mdot/A_G/n from the current colour and temperature,...
void updateVofCurvature()
void requireWettingWall() const
void vofBlockCensus(std::vector< long > &masters, std::vector< long > &cells) const
void setPhaseChangeCarryConserve(bool on)
WO-P3f: make the per-cell Dirichlet overwrite ENTHALPY-CONSERVING.
void setVofBackflow(int f, double value)
inletOutlet backflow colour on outflow face f (default 0 = gas): where the boundary face velocity poi...
void applyBalancedForceProjection()
vof::MomentumConsistentAdvector::Diagnostics vofMomentumDiagnostics()
bool wallFluxDivergence() const
std::vector< double > vofBlockColour(long id)
void fillVelGhostsTo(CCField f, int comp, int fold, bool doOutflow=true)
std::vector< long > movingInstanceCutCells() const
Per instance: cut rows of the momentum operator (all three components) at inner points this rank owns...
std::vector< double > getVofDynamicField(int which)
std::vector< double > hydroForceTorque()
PHASE 2 (anisotropic cells), doc/anisotropic_metric.md §4.4 — ADMITTED since commit C4.
void setVofCurvatureWorklist(bool on)
VofCurvature::useWorklist — run the height-function cascade and the PV fallback over a COMPACTED list...
void setPhaseChangeEnergyOff()
void setContactAngleField(const std::vector< double > &thetaDeg)
void seedFreshCells(CCField mOld[3])
FRESH CELLS: the points a moving body has just uncovered.
void setCapillaryCfl(double f)
SceneMap sceneMap() const
const vof::VofCurvature::Timing & vofCurvatureTiming() const
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-inclusiv...
bool vofMomentumEnabled() const
vof::VofCurvature::Stats vofCurvatureStats() const
void setCommAvoiding(int mask)
Communication-avoiding red-black smoothing: kCaMomentum | kCaMg.
void fillAxis(CCField f, int axis)
void setAdvectionWallVelocity(bool on)
A0 — wall velocity (not zeros) in the advection inputs' masked rows. DEFAULT true.
void pcBuildInterface()
(1) The interface build: for every inner interfacial cell reconstruct the PLIC plane from the canonic...
void setVofPhantomCapillaryBound(bool enabled)
std::vector< double > getMomentumDiagonal(int c)
std::vector< double > reactionBudgetTerms()
R0 DECOMPOSITION PROBE.
void setPorousDepsDt(bool on)
void updateVofBlockOverlap()
int contactAnglePivot() const
void setField(const std::string &name, const std::vector< double > &v)
void setSolidDevice(CCField din, bool cutcellPressure)
Device entry point (Layer 2): the inner SDF is ALREADY on device, so geometry never round-trips throu...
void setApertureOrder(int order)
double lastProjectionSeconds() const
double lastSuperficialVelocityShift() const
The shift the last step() applied (caller's velocity units; 0 when off).
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 sol...
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 solveScalarSteady(const std::string &name)
std::vector< double > getOpennessProj(int c)
double pcLedgerEnergyToPhys() const
The factor from an internal phase-change ledger entry (a per-cell sum of rcp' dT) to the caller's uni...
std::vector< double > vofBcVolumesTotal() const
The same, accumulated since enable_vof() (or the last resetVofBcVolumes()).
void closureRefreshUnits(Closure &cl)
Re-derive a closure's internal p / tabY from its physical pPhys / tabYPhys with the current reference...
void setVofWorklist(bool on)
WyAdvector::useWorklist — the compaction of the PLIC reconstruction pass onto the mixed cells.
void buildVofCellVelocity()
std::vector< double > getVelocity(int c)
void setPorousConservative(bool on)
void chebSolveComp(int c)
std::array< int, 3 > blockShape() const
bool geometryBuilt() const
void vofExtendWallBand(CCField f, int mask)
VofOverlapCensus vofBlockOverlapCensus() const
void setRhoFaceHarmonic(bool on)
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,...
void setSolidBuildOpenness()
bool pressureExactResidual() const
void setScalarTolerance(const std::string &name, double rtol)
bool contactAngleHysteresis() const
void setVofStepParity(long n)
long strideOf(int c) const
const vof::WyAdvector::Timing & vofKernelTiming() const
bool pressureSolveFailed() const
void collocatedV8AutoFallback(const char *why)
peclet::core::geom::InstanceMotionView< double > motionView() const
bool hasField(const std::string &name) const
void clearDivergenceSource()
void setDomainBcProfile(int face, const std::vector< double > &prof, int nb, int nc)
void setAdvectionScheme(int s)
void enablePhaseChange(double rhoG, double rhoL, double hlv)
Turn on phase change.
void throwVelocityMgVariableMu(const char *who) const
int pressureTelescopeCount() const
void setSolidStarOverlay()
void setExactCrossingsFromScene()
EXACT wall crossings straight from the scene, on device, on every rank – the in-solver replacement fo...
long lastPressureIterations() const
std::array< int, 3 > wallSlipSandwichCells() const
Cut-cell axes at which a one-cell fluid gap kept the no-slip closure (per component).
void setPressurePcg(bool on, int maxit, double rtol)
void setVelocityMultigridAuto(long cellsPerRank, long minGlobalCells=-1, int minBlockExtent=-1)
long solvePressureSystem(CCField rhs1, CCField x1)
void allocateBlock(int nx, int ny, int nz)
void scalarCaptureOpenFaceFlux()
void setVelocityMultigrid(bool on, int levels, int vcycles)
void setRotationalWeight(double w)
void setVofBlockDeviceStaging(bool on)
void setDensityMode(bool variable)
double lastPredictorSeconds() const
void fillCellForceGhosts()
bool hasScalar(const std::string &name) const
void setMu(double m)
Dynamic viscosity, in the caller's units.
void setVofKappaFrozen(bool on)
void pcBuildInDomain()
WO-P3g — 1 on every cell that CARRIES A ROW in the energy solve, 0 otherwise.
int phaseChangeGfmOrder() const
void setDecomposition(int levels, double maxImbalance=1.05)
How the shared level-0 MPI decomposition is built.
void setExactCrossings(const std::vector< double > &t)
double vofRhoFloor() const
void setPressureWarmstart(bool on)
void superficialVelocityPrecheck() const
void velSweepLoop(Fill &&fill, Color &&sweepColor, ColorDu &&sweepColorDu, std::function< double()> resid=nullptr, double bnorm=0.0)
void setPressureIterations(int it)
void pcCarryApply(ScalarField &sc)
WO-P3f: consume pcCarrySrc_ into the energy solve's time base.
bool balancedForceActive() const
Kokkos::View< MReal *, CCMem > FV
double stepAdaptive(double cflTarget, double capillaryCflTarget, double dtMax)
void pcUpdateCurvature()
The per-cell Dirichlet mask of the energy scalar: T = T_sat + mdot R_int in every interfacial cell,...
bool velocityMgChebyshev() const
void bridgeVelocityToVof()
void setVofBlockOverlapDensity(bool enabled)
void refreshUnitDerived()
Re-derive every internal (index-unit) quantity from the stored physical inputs.
long vofStepParity() const
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....
void setPropertyTable(const std::string &target, const std::string &in0, const std::vector< double > &xs, const std::vector< double > &ys)
void setSolidVelocityMgAuto()
void setPressureBottomSolver(int engine)
static double vofWallPlaneSdf(int gx, int gy, int gz, I3 gs, int mask)
void configurePorousDragSolver()
void setScalarMaxIterations(const std::string &name, int maxit)
void enableVofBlocksFromColours(const std::vector< std::array< int, 6 > > &boxes, const std::vector< std::vector< double > > &colours)
double pcEffInterfaceEps() const
The colour tolerance that decides which cells are INTERFACIAL, and it has to be at least the colour a...
void buildAdvStencil(int c)
void setVofBlockDebris(bool enabled)
void setPressureTelescopeForceLevel(int level)
void requireBalancedForceScope(const char *who, bool atStep) const
void advectVofKinematic(double dtPhysArg)
dt is in the caller's time unit.
void setVofInterfaceEps(double eps)
void checkSealedInflowCells()
Reject geometry that seals fluid cells against a prescribed INFLOW face off from the rest of the doma...
void setVofWispEps(double eps)
WO-R2 item 4 — the wisp threshold on the advector's mixed-cell predicate and on the interface Courant...
bool phaseChangeBudget() const
double effectiveContactSigma() const
void setVofBlockKappaClip(bool enabled, double kappaMaxPhys=-1.0)
CCField fieldView(const std::string &name)
double vofLastCourant() const
void pushVofMetric()
Hand the anisotropic cell metric to every VoF driver that exists (Phase 3).
std::string capillaryThrowMessage(double cap) const
void setCollocatedScheme(const std::string &name)
double lastMomentumSeconds() const
void setVelocityMgChebyshev(bool on, int degree=0, double eig_ratio=10.0)
void setFreshCellSeed(bool on)
Fresh-cell policy for moving geometry.
void setPressureBottomExtent(int cells)
The set_pressure_bottom("auto") criterion: agglomerate once the coarsest GLOBAL grid exceeds this man...
bool phaseChangeQuadraticFit() const
void filterCellField(CCField f, int axis)
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 (...
bool contactAngleDynamic() const
void buildAdvStencilVar(int c)
bool ensureAdvStash(int c, bool adv)
bool bcStencilPath() const
void setOutflowOperatorCoefficient(bool on)
WO-R2 item 1 ABLATION: set_outflow_operator_coefficient(False) restores the pre-WO-R2 operator,...
double vofTimingMomentumSeconds() const
void setImplicitAdvection(bool on)
double vofTimingStepSeconds() const
void setVofSolidColourZero(bool on)
void setPhaseChangeCurvatureDistance(bool on)
WO-P3g item 3: measure the GFM row's theta and the one-sided fits' sample distances to the CURVED int...
std::vector< vof::VofBox > vofBlockRankBoxes(int size) const
bool instanceCenterPinned(int i) const
double vofCurvatureWeightWidth() const
void setVelocityResidualTolerance(double rtol)
void setPhaseChangeEnergyOrder(int order)
WO-P3g — the SECOND-ORDER interfacial energy operator, as one package.
std::function< double()> stencilResidual(int c, bool exchange=false)
bool mixedVelocityMg() const
void setPressureBottomMode(int mode)
void requirePhaseChange(const char *who) const
int phaseChangeEnergyOrder() const
void phaseDensityRange(double &lo, double &hi)
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 se...
sco::MaterialTable scalarMaterialTable(ScalarField &sc, std::vector< char > &conj)
VarFaceProps makeFaceProps(int c)
void setPhaseChangeEnergy(double rcpGas, double rcpLiquid)
Turn on the CONSISTENT energy transport (VOF_PLAN §9 item 6) for the scalar set_phase_change_thermal ...
void setRotationalWallWeight(double w0)
void vofBcPropGhosts(CCField f)
WO-R item 5 — the Neumann property policy at an inflow face.
void vofFillGhosts(CCField f)
bool pressureTelescope() const
void addCsfRhsCellInterp(int c, CCField dst, bool rowScaled, bool faceRange=false)
void setBalancedForceProjection(bool enabled)
const vof::WyAdvector & vofAdvector() const
double reduceMaxAbsInner(CCConst f)
void setPorousContinuity(bool on)
void setRho(double r)
Fluid density, in the caller's units.
double phaseChangeCarryLost() const
vof::WyAdvector::Diagnostics vofDiagnostics()
bool vofAxisPeriodic(int a) const
void patchScalarDirichletFace(CCField AC, CCField band, double Din, int a, int side)
void setVofCflLimit(double v)
void invalidateScalarCutGeometry()
void scalarDirichletMask(const std::string &name)
Allocate (idempotently) the per-cell Dirichlet mask + value of a registered scalar.
VofStepLimits vofStepLimits()
Both limits at the current state, in the CALLER's time unit (courant is dimensionless).
void setRotationalFilter(bool on, double eps=0.05)
void buildRhsForced(int c)
bool velocityMultigridActive() const
bool phaseChangeCurvatureDistance() const
std::array< double, 3 > domainExtent() const
Physical extent of the GLOBAL inner grid (cell counts without a physical domain).
std::vector< std::string > fieldNames() const
std::vector< double > gatherInner(CCField fld)
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 ...
double vofWispEps() const
bool vofSolidColourZero() const
bool phaseChangePlaneDirichlet() const
bool vofCurvatureWorklist() const
double vofBlockImbalance() const
std::vector< double > cellCentres(int axis) const
Physical cell-centre coordinates of THIS rank's inner block along axis (nx/ny/nz values).
void copyBlockShifted(CCField dst, C3 de, CCConst src, C3 se, int off)
int vofWetWallMask() const
bool phaseChangeCarryConserve() const
void buildBalancedFaceForce(int c)
void pcRefreshUnits()
Re-derive the INTERNAL phase-change constants (pcRhoG_ ... pcRcpL_) from the caller's physical ones (...
int decompositionLevels() const
std::vector< vof::VofBlockStats > vofBlockStats() const
CCConst wallVelView(int c) const
void fillPorousEpsGhosts()
void advectVofBlocks(double dtPhysArg, bool requireSolenoidal=true)
dt is in the caller's time unit.
void setContactAngle(double thetaDeg)
void setVofFluxClamp(bool on)
void setPhaseChangeBudget(bool on)
WO-P3f: turn the ENERGY BUDGET instrument on.
PhaseChangeBudget phaseChangeBudgetValues() const
The budget, physical: energies and powers with the consistent transport on, temperature x volume (and...
bool vofCurvatureMixedHeightFit() const
void setDivergenceSource(const std::vector< double > &v)
A PRESCRIBED extra divergence source (1/time, physical; set_dt must precede it under an extent,...
double contactAngleSlip() const
std::vector< double > hydroForceTorqueReaction()
Hydrodynamic force and torque per instance from the DISCRETE REACTION (route (b) of the design note's...
double vofCflLimit() const
bool outflowOperatorCoefficient() const
void setPressureFcg(bool on, int maxit, double rtol)
std::vector< double > getPressure()
const vof::VofBlockSet * vofBlockSet() const
The block container itself, read-only (tests: the metric and tunables its cascades carry).
void setMultigridAspectThreshold(double theta)
The anisotropic-coarsening aspect threshold theta shared by the pressure and velocity multigrids (doc...
void setOuterIterations(int iters)
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 r...
bool isCutcellScalar(const std::string &name) const
void setPhaseChangeArea(int mode)
WO-P3c — which geometry the interfacial AREA comes from.
bool colocatedFaceForce() const
bool hasPhysicalDomain() const
void projectCorrectVelocities()
The container: a replicated table of blocks, the per-step orchestration (gather → advect → re-centre ...
Weymouth-Yue split advection of a colour field on an extended (inner + ghost) block.
flow — collocated (ABC approximate-projection) variable-density kernels: the mass-adjoint pair of run...
flow — VoF rung V-BC (WO-R): the colour field's OPEN-BOUNDARY ghost rules and the out-of-domain mask ...
flow — VoF rung V2a (WO-J): the bridge between the solver's G = 2 block and the colour field's own g ...
flow — VoF rung V3 (WO-O): the view-level driver for the curvature cascade.
flow — VoF Part II (WO-P23): CONSISTENT rho c_p T transport, driven by the SAME geometric fluxes as t...
flow — face/cell material-property accessors for the variable-coefficient momentum operator.
flow — IbmSolver domain boundary conditions: setDomainBc/profiles, pressureBcGhost,...
flow — IbmSolver property closures: property/density modes, porous continuity, drag,...
flow — IbmSolver core: allocation, physical-domain scales, rho/mu/dt and pressure/velocity driver set...
flow — IbmSolver diagnostics: state getters, divergence probes, timers and the outflow/backflow censu...
flow — IbmSolver static solid geometry: setSolid / setSolidDevice and its stages, pressure geometry.
flow — IbmSolver hydrodynamic force and torque: the reaction-budget terms and wall probes.
flow — IbmSolver MPI: initMpi, redistribute, rebalanceByWeights and the post-repartition field-resize...
flow — IbmSolver phase change: interface area, mass flux, energy transport, budget accounting,...
flow — IbmSolver pressure projection: step(), the project() stages, the buildRhs family,...
flow — IbmSolver transported scalars: addScalar/setScalarBc/advanceScalars and their BC application.
flow — IbmSolver cut-cell scalar transport (doc/scalar_ibm_design.md): the geometry record of WO-2 — ...
flow — IbmSolver scene and moving geometry: scene instances and motion upload, wall velocity,...
flow — IbmSolver Volume-of-Fluid: the colour field, cut-cell VoF geometry, contact angle,...
flow — the gauge-exact directional cell-centre pressure gradient.
flow — OPT-IN forensics for the ghost-projection overlay (PECLET_FLOW_GP_DEBUG).
flow — GridLayout policy traits (placement of the velocity unknowns).
flow — WO-P3c: the view-level driver of the cascade-consistent interfacial area.
flow — collocated approximate (MAC) projection helpers (Almgren–Bell–Colella style).
flow — Chebyshev semi-iteration as a standalone momentum (implicit-diffusion) solver,...
flow — portable (Kokkos) geometric multigrid for the cut-cell (variable-openness) pressure Poisson.
flow — portable (Kokkos) IBM geometric fields + variable-coefficient RB-GS smoother.
flow — portable (Kokkos) cut-cell pressure operator + Chorin projection.
flow — portable (Kokkos) MAC stencil operators: Red-Black Gauss-Seidel smoothers + divergence.
flow — portable (Kokkos) velocity (momentum) multigrid for the IBM diffusion solve: the STAIRCASE coa...
flow — WO-P3d: the block driver of the marching-tetrahedra interfacial area.
flow — VoF rung V2b (WO-K): momentum-consistent transport of rho^c u_c on the half-shifted (MAC) mome...
@ kAreaMcPlic
the PLIC signed-distance level set, centroid deposit
Kokkos::View< unsigned char *, SMem > UCField
GpOverlayReal< mreal > GpOverlayMReal
Kokkos::View< double *, CCMem > CCField
Kokkos::View< const double *, CCMem > CCConst
Kokkos::View< double *, SMem > SField
flow — VoF phase change (Part II, rungs P0/P1): the container-free kernel set.
flow — the multidimensional iteration policies: iteration order follows storage.
flow — device property closures: material properties / body forces as functions of fields.
flow — cell-centred scalar transport (advection–diffusion) on the cut-cell grid.
flow — portable (Kokkos) staggered MAC momentum advection (Koren TVD + FOU).
std::vector< peclet::core::solver::AndersonRole > roles
std::array< double, 9 > signature
std::vector< CCField > fields
OUTFLOW REVERSAL CENSUS – the regime in which the zero-gradient (do-nothing) outflow is only conditio...
WO-P3f — the ENERGY BUDGET of the phase-change energy solve.
long nLeaveGas
interfacial -> gas (the bubble swallowing a cell)
double hMasked
the same over MASKED (interfacial) cells
double hOpenNew
the same, after the solve
double qGfm
heat INTO the unmasked set across the plane-anchored rows (W)
double dEoverwrite
sum rcp (dval - T) over masked cells: what the Dirichlet rows inject when they overwrite the transpor...
long nEnterLiquid
liquid -> interfacial transitions this step
double qBehind
WO-P3g: the second-order row's one-sided rescaling of the band BEHIND each interfacial face,...
long calls
how many energy solves have been instrumented
double eLeave
... and of the cells that LEFT it (carrying pcCarriedValue)
double dEoverwriteNew
the part of it on cells that were NOT masked last step
long nEnterGas
gas -> interfacial
double eEnter
sum rcp (T - T_sat) of the cells that JOINED the masked set
double hLiquid
sum rcp (T - T_sat) over PURE LIQUID cells, before the solve
long nMasked
size of the masked set
double hOpen
sum rcp (T - T_sat) over UNMASKED cells, before the solve
long nLeaveLiquid
interfacial -> liquid
long sourceCells
cells that RECEIVED a deposit
long deficitCells
cells that clipped at C = 0
double bandDiv
max |div(open u)| over interfacial cells (WO-P23; see pcBandDivergence)
double redistributed
|clip deficit| pushed into neighbours this step
long areaNone
WO-P3c: cells with NO cascade geometry (kept their MYC PLIC area)
double qOperator
WO-P3g: the heat (W) the operator's Dirichlet rows draw across the interface, i.e.
double mdotFit
WO-P3g: the AREA-WEIGHTED one-sided-fit mdot, kept as the diagnostic that item 1 replaced (0 unless t...
double areaOrphan
WO-P3d: area the JOINED sheet booked to cells that are not interfacial, i.e.
long areaPv
WO-P3c: cells whose area came from the PV paraboloid (tier 3)
long fallbackCells
interfacial cells whose +n walk found no pure gas cell
long areaHf
WO-P3c: cells whose area came from a height function (tiers 1/2a)
double sourceSum
sum of the deposited divergence source over inner cells (1/s)
double area
sum of the PLIC polygon areas over interfacial cells (h^2)
double removedVolume
sum of dV actually subtracted this step (+ = evaporated)
double Tmax
energy-scalar extrema (consistent transport only)
double unresolved
clip residue no neighbour could absorb (pushed anyway)
double qOrphan
... the part of it on interfacial cells with NO area, which the regression drops: the ONE non-conserv...
long excessCells
cells that clipped at C = 1
diagnostics.scalar_budget (§8.2), physical; collective under MPI.
diagnostics.scalar_facets (§8.2): this rank's facets, physical; per facet 3 values for the centroid a...
std::vector< int > instance
std::vector< double > flux
std::vector< double > normal
std::vector< double > wallValue
std::vector< double > area
std::vector< double > centroid
The ONE predicate for the cut-cell scalar's advective face flux (doc/scalar_ibm_design....
CCField vel
face-normal index velocity at the low a-face of cell i (internal)
CCField open
the projection's openness of that face
The map between the solver's INDEX coordinates and the coordinate system the analytic scene is writte...
double a[3]
scene_a = a[a] + b[a]*xi_a (xi = global index)
double velToInt[3]
scene velocity -> index velocity
double dToInt
scene signed distance -> index distance (1/hRef)
double angToInt
scene angular velocity -> index (omega*tRef)
double w[3]
w_a = 1 / h_a'^2 (<= 1)
double org[3]
physical lower corner of the GLOBAL inner grid
double areaToPhys() const
double powerToPhys() const
double angVelToInt() const
double rhoRef
reference density = the first set_rho
double forceToInt(int a) const
double speedToInt() const
vof::VofMetric vofMetric() const
bool physical
an extent was given (the scales are armed)
double timeToPhys() const
double h[3]
cell size per axis = extent / cells
double hp[3]
h_a' = h_a / hRef (>= 1, exactly 1 on the finest axis)
double sigmaToInt() const
double resistToInt() const
double forceTotalToPhys() const
double velToPhys(int a) const
double torqueToPhys() const
double vol
V' = h_x' h_y' h_z' (cell volume in hRef^3)
long cells[3]
the GLOBAL cell counts the extent spans
bool aniso
some h_a' != 1 — kernels dispatch the per-axis body
double energyToPhys() const
An internal energy (rho c_p T summed over cells of volume hRef^3) to joules: the internal energy unit...
double tRef
reference time = the first set_dt
double curvToPhys() const
double hRef
reference length = min_a h_a (== h_a, Phase 1)
double ext[3]
physical extent of the GLOBAL inner grid
double mdotToPhys() const
double velToInt(int a) const
double latentToInt() const
long cells
cells with S > 1 + 1e-8 (global)
bool active
the phantom-aware capillary bound is in force
double maxSum
max_cells S (global)
double excess
sum over cells of (S - 1)^+ (global, cell volumes)
double courant
the interface-local Courant number at the current dt
double cflDt
the largest dt the WY boundedness cap admits
double capillaryDt
the largest dt the Brackbill capillary constraint admits
double binding
min(cflDt, capillaryCfl * capillaryDt)
double bridge
... of which: the G=2 <-> g=3 bridges + the C ghost policy
double curvature
the V3 height-function cascade + the capillary dt check
double momBridge
... of which: its bridges
double blockAdvect
the block-container colour stage as a whole (advectVofBlocks)
double csf
the V4 balanced-force CSF added to the three momentum RHSs
double momAdvect
the momentum-consistent colour+rho^c u stage (advectVofMomentum)
double blockDebris
... of which: the debris/residue pass (§5.3/§13 of the note)
double phaseChange
the Part II phase-change stage (mdot, deposit, regression)
The geometry part of diagnostics.scalar_census (§8.2).
The whole record: per-cell fields on the extended block (kappa and unknown haloed; the apertures comp...
The per-body material of a conjugate scalar, internal units (§4.2): conj 1 on a conjugate body; lam =...
G.x at the centre of extended-block cell j (physical; cellCentres' formula, unwrapped).
Per-call census of the cascade over this block's inner region (LOCAL; a distributed caller sums them ...
Per-call census over the inner region (LOCAL; a distributed caller sums it).
flow — VoF rung V4 (WO-P): balanced-force continuum surface force + the capillary Δt.
static constexpr double AC
flow — VoF rung V6 (WO-V6): the DYNAMIC contact angle (Cox-Voinov with an explicit slip length) and a...