core 1.5.0
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
Loading...
Searching...
No Matches
probe_flux.hpp File Reference

core — the probe-flux wall closure: probe distance, trilinear probe stencil, the four-rung fallback ladder, and the per-facet wall / interface conductances. More...

#include <cmath>
#include "peclet/core/scheme/cut_cell_closure.hpp"

Go to the source code of this file.

Classes

struct  peclet::core::scheme::ProbeResult
 One facet's probe: the rung, the probe distance s, and n stencil cells (lattice offsets relative to the facet's cell, weights summing to 1). More...
 

Namespaces

namespace  peclet
 
namespace  peclet::core
 
namespace  peclet::core::scheme
 
namespace  peclet::core::scheme::detail
 

Functions

PECLET_CORE_CC_HD double peclet::core::scheme::probeSupport (const double n[3], const double h[3])
 S(n) = ½ Σ_a |n_a| h_a: the support half-width of a cell of size h along the unit normal n (§3.1).
 
PECLET_CORE_CC_HD double peclet::core::scheme::detail::probeFloor (double x)
 
PECLET_CORE_CC_HD void peclet::core::scheme::trilinearStencil (const double xi[3], int base[3], double w[8])
 Trilinear stencil of the index-space point ξ (cell centres at integer ξ, relative to the facet's cell): base = floor(ξ), and w[k] for the cell base + (k & 1, (k >> 1) & 1, k >> 2), w[k] = Π_a (bit_a ? f_a : 1 − f_a) with f = ξ − base.
 
PECLET_CORE_CC_HD bool peclet::core::scheme::detail::probeCandidate (const double xw[3], const double n[3], const double h[3], double s, double xi[3], int base[3], double w[8])
 
template<class Lookup >
PECLET_CORE_CC_HD bool peclet::core::scheme::detail::probeAllUnknown (const int base[3], const double w[8], const Lookup &L)
 
PECLET_CORE_CC_HD void peclet::core::scheme::detail::probeFillAll (ProbeResult &r, int rung, double s, const int base[3], const double w[8])
 
template<class Lookup >
PECLET_CORE_CC_HD ProbeResult peclet::core::scheme::buildProbe (const double xw[3], const double n[3], const double h[3], const Lookup &L)
 Build the probe of one facet by the ladder of §3.3.
 
PECLET_CORE_CC_HD double peclet::core::scheme::wallConductance (double s, double L, double k)
 Wall conductance of a Robin facet (§1.4): G = 1 / (s/L + 1/k), the flux out of the fluid per area being G (u_p − g).
 
PECLET_CORE_CC_HD double peclet::core::scheme::interfaceConductance (double sf, double Lf, double Rc, double ss, double Ls)
 Conjugate interface conductance (§1.4): the series resistance of the fluid probe leg, the contact resistance and the solid probe leg, G_c = 1 / (s_f/Λ_f + R_c + s_s/Λ_s), so that the flux from solid to fluid is G_c (u_ps − u_pf) in the ψ form.
 

Variables

constexpr int peclet::core::scheme::kProbeR0 = 0
 Ladder rungs, in ProbeResult::rung (flow stores them as uint8).
 
constexpr int peclet::core::scheme::kProbeR1a = 1
 
constexpr int peclet::core::scheme::kProbeR1b = 2
 
constexpr int peclet::core::scheme::kProbeR2 = 3
 
constexpr double peclet::core::scheme::kProbeSigma = 1.1
 Probe distance factors on S(n) (§3.1, §3.3): R0 = 1.1, R1a = 1.5, R2 = 0.5.
 
constexpr double peclet::core::scheme::kProbeSigmaLong = 1.5
 
constexpr double peclet::core::scheme::kProbeSigmaLast = 0.5
 
constexpr double peclet::core::scheme::kProbeWeightEps = 1e-12
 V1 ignores stencil cells whose weight is at most this.
 
constexpr double peclet::core::scheme::kProbeClearance = 0.5
 V2: φ_phase(p) ≥ kProbeClearance · s.
 
constexpr int peclet::core::scheme::kProbeReach = 2
 V3: every stencil cell within ±kProbeReach cells on each axis (the G = 2 halo).
 
constexpr double peclet::core::scheme::kProbeGapMin = 0.2
 R1b is attempted only when the estimated gap w exceeds kProbeGapMin · S(n) ...
 
constexpr double peclet::core::scheme::kProbeMinKeptWeight = 0.5
 ... and accepted only when the kept weights sum to at least kProbeMinKeptWeight.
 

Detailed Description

core — the probe-flux wall closure: probe distance, trilinear probe stencil, the four-rung fallback ladder, and the per-facet wall / interface conductances.

Design: flow doc/scalar_ibm_design.md §1.4 (wall closure), §3 (probe distance D6, stencil, ladder, precision D7). A wall facet with centroid x_w and unit normal n (into the phase being probed) reads the field at the probe point p = x_w + s n by trilinear interpolation over the 8 cells around p; the wall flux is then eliminated per facet as G (u_p − g) with the conductance G of wallConductance / interfaceConductance.

Container-free: the caller's Lookup answers "is the cell at lattice offset (dx, dy, dz) an unknown of this phase?" and "what is the phase-signed SDF at index-space point ξ?". Lattice OFFSETS (relative to the facet's cell) are returned, never DOF indices — flow converts them to linear block offsets, amr maps them to leaf DOFs (§7.1).

Ladder (§3.3), S = S(n) = ½ Σ_a |n_a| h_a (the cell's support half-width along n):

  • R0: s₀ = 1.1 S, trilinear (all 8); accept if V1 ∧ V2 ∧ V3.
  • R1a: only when R0 failed V1 alone; s = 1.5 S, trilinear (all 8); accept if V1 ∧ V2 ∧ V3.
  • R1b: gap estimate w = s₀ + φ(p₀); if w > 0.2 S, s = ½ w, trilinear with the cells that are not unknowns dropped and the rest renormalized; accept if Σ kept weights ≥ 0.5 ∧ V3.
  • R2: s = 0.5 S, the cell itself with weight 1 (last resort, first order); always.

V1: every stencil cell with weight > 1e-12 is an unknown of the phase. V2 (clearance): φ_phase(p) ≥ ½ s. V3: reach ≤ 2 on every axis — evaluated on all 8 stencil cells FIRST, so the Lookup is never asked about a cell (or a φ sample) beyond the G = 2 halo. R1b needs φ(p₀), so it is attempted only when R0's stencil passed V3.

Host/device: PECLET_CORE_CC_HD as in scheme/cut_cell_closure.hpp. Everything is double (D7).

Definition in file probe_flux.hpp.