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

Files

 
bench.cpp
 
centre_of_rotation_gate.py
 
contact_capacity_gate.py
 
csg_wall_velocity_gate.py
 
cutwall_freefall_trace.py
 
cutwall_newton_audit.py
 
cutwall_periodic_control.py
 
cutwall_tow_drag.py
 
dbg_scene.cpp
 
dem_capture.cpp
 
duct_re_gate.py
 
flow_probe.py
 
force_gate.py
 
fresh_cell_gate.py
 
galilean_gate.py
 
galilean_re_gate.py
 
lattice_plane_gate.py
 
moving_step_bench.py
 
mpi_scene_gate.py
 
owner_gate.py
 
periodic_image_gate.py
 
probe.cpp
 
refresh_wall_gate.py
 
rotation_gate.py
 
rotlet_gate.py
 
scene_check.py
 
scene_particle_gate.py
 
setsolid_bench.py
 
settling_gate.py
 
time_setsolid.py
 
torque_gate.py
 
traj.cpp
 
voro_capture.cpp
 
wall_transform_gate.py

Detailed Description

SDF-campaign dev probes

Regression net beyond the ctest suites — see ../../../doc/ and the suite's ../../../../docs/archive/ANALYTIC_SDF_GEOMETRY.md for what each gates.

Provenance. These lived as suite/.sdf-campaign-probes/ (untracked, a session-independent copy) from the analytic-SDF geometry campaign, 2026-08-29 .. 09-02. They moved here on 2026-09-22 and are now TRACKED, closing the umbrella ../../../../docs/QUALITY_PLAN.md item that asked for exactly this move: nine tracked documents cite these gates and their measured numbers, so a fresh clone had references to files it did not have. If you are following a link that says .sdf-campaign-probes/, this is the directory it means.

The captured before_*.bin / mask6_before.npy / np*.npz comparison artifacts are NOT tracked (.gitignore): they are regenerated by the probes that write them. Everything that carries a reference VALUE carries it in the source or in this README, not in a binary.

Paths in the notes below are relative to this directory; run them from the flow repo root with the build on PYTHONPATH.

Layer 0-2 (geometry, scene)

  • flow_probe.py flow physics fingerprint; u_sum MUST be 6.74193610583927948e+05. RUN AT 4 OpenMP THREADS. p_sum and u_l2 (and, at high thread counts, u_sum's last digits) are thread-count sensitive in flow's host reductions — pre-existing, not a regression signal. (PYTHONPATH=<flow build> OMP_PROC_BIND=false OMP_NUM_THREADS=4 python …)
  • scene_check.py 3-way geometry agreement: sampled array == 108-image scene == native periodic scene, + scene crossings finite
  • setsolid_bench.py set_solid rebuild cost split (Layer-3 datum: 339 ms @128^3 host, 65/35)
  • time_setsolid.py AMR RCP acceptance driver (depth N; needs core/python/build_cuda2)
  • mpi_scene_gate.py Layer-2 MPI scene demo AND Layer-4 rung 4. Run under mpirun at np=1,2,4, then --compare. Claims: per-rank cut owner == the single-rank global field restricted to the block (0 mismatches), k identical, resolved per-instance force equal to 4e-07 (atomics, so not bitwise).

Layer 3 (moving geometry)

  • owner_gate.py cut ownership vs a numpy brute-force argmin on the 4-sphere bed
  • galilean_gate.py THE rung-2/3 gate. u_B + V == u_A between a lab and a boosted frame, run with the wall-flux term ON and OFF so its absence is exhibited, not asserted. Also prints the integrated force in both frames — force is frame-invariant, and that check is what caught the masked-solid bug. GAL_STEPS=<n> to vary the solver work (the ON error falls with it; the OFF error does not).
  • rotlet_gate.py spinning sphere vs the analytic rotlet. Only decidable at R/L <~ 0.05; above that the naive periodic image sum dominates. ROTLET_MODE=refprobe is the experiment that establishes which (R fixed in CELLS, box varying). ROTLET_RF, ROTLET_CROSSINGS, ROTLET_IMAGES.
  • moving_step_bench.py march = a translating sphere actually moves and drags fluid across 40 rebuilds; bench = ms/step static vs moving vs moving+rebuild. A BODY FORCE IS ESSENTIAL in the bench or the static baseline solves nothing.

Layer 4 (resolved CFD-DEM)

  • force_gate.py BOTH force evaluations against the momentum balance. The REACTION (route b, the coupling force) must satisfy sum F = f*N_fluid to the unsteady tail + solver residual — measured -8.8e-15 at 1600 steps; a percent-level miss means a budget term is missing (that is what this gate now checks). The traction (diagnostic) stays ~29% low by construction and is printed alongside so the inconsistency stays visible.
  • settling_gate.py settling sphere vs the terminal velocity predicted from the SAME box's drag measured with the SAME (reaction) force, plus the total-momentum diagnostic. With the reaction force the action-reaction gap is zero by construction. Needs dem + coupling on PYTHONPATH.
  • fresh_cell_gate.py the moving-boundary force-spike study: Seo & Mittal 2-delta metric + a 5-harmonic residual, dt/h/amplitude legs, fresh-cell seeding off vs on. Seeding (default ON since flow 1a01769) removes a resolution-independent +2.6..2.9% drag bias and 20-50x of spurious oscillation.
  • rotation_gate.py THE TORQUE GATE (flow 16e91ec). A: static spin vs the exact 8*pi*mu*a^3*Om – was a structural -31% (Laplacian-form budget missing mu*(n x Omega), exactly 1/3), now +3.5/+2.4/+2.2% CONVERGING; net force must stay ~1e-13. B: spin-decay through ResolvedCfdDem apply_torque=True vs the same box's calibrated drag (1.039 measured). ROT_STATIC_ONLY=1 skips B; ROT_FULL=1 adds the N=128 rungs. Needs flow (+dem+coupling for B).

Composed particles (§6.5)

  • scene_particle_gate.py dem SHAPE_SCENE vs the same shape as a fine grid bake, at OMP_NUM_THREADS=1: relaxed-contact separation vs the closed form, and a 400-step colliding trajectory (must track to the GRID's resolution, since the tree is exact and the grid is the approximation). Needs core/python/build_geom + a dem build on PYTHONPATH. TRAP inside: set_positions resets particles to shape 0 — re-apply set_shape_ids after.

C++ oracles

  • traj.cpp/bench.cpp dem single-thread trajectory oracle + narrowphase bench (OMP_NUM_THREADS=1!)
  • dem_capture.cpp dem SDF-surface bit oracle; before_omp/cuda.bin = pre-Layer-0 baselines
  • voro_capture.cpp voro provider bit oracle
  • probe.cpp Kokkos host/device parity probe (superseded by ctest geom_batch_device)
  • mask6_before.npy depth-6 AMR fluid mask, LEGACY-expression baseline (parity reference) Build the .cpp ones against core/include (+dem/src or voro/include) + the Kokkos prefix, as the originating commit messages describe.

Build recipes used for these (2026-08-30)

flow build_l3_omp host-openmp flow build_l3_cuda nvidia-cuda flow build_l4_mpi host-openmp + -DPECLET_FLOW_MPI=ON dem build_l4_omp host-openmp core build_komp3 host-openmp core build_kcuda2 nvidia-cuda TRAP: set_pressure_multigrid(True, levels=1) costs 920 ms/step at N=64 on CUDA against 19.5 ms at depth 4 — the "coarse" solve is left on the full grid. Fine on CPU; a 50x tax on GPU.

2026-09-02 — geometry & finite-Re gates (ten Cate campaign close-out)

  • galilean_re_gate.py [DH] [Re] [N] [STEPS] — finite-Re Galilean pair: towed sphere vs fixed sphere in a stream (set_velocity), same impulsive start + body force. PASS = quasi-steady drag within 2%. Measured: 0.03% (Re 1.5, d/h 8), 0.9% (d/h 12), 2.1% (Re 30).
  • duct_re_gate.py [DH] [Re] [STEPS] — static twin of the settling tank: fixed sphere, duct walls translating with the plug. Duct Cd/Abraham 1.30 → 1.08 → 1.06 at Re 0.015 / 1.5 / 30 (screening).
  • periodic_image_gate.py — a CSG slab wider than the periodic box refills its own cavity (images are a UNION); periodic_image_overlap_cells() must flag it (43 680 cells) and read 0 for L/2 + wall.
  • lattice_plane_gate.py — a moving face exactly on a grid plane is inert (sdf == 0 at staggered points: fluid to the mask, not a ghost to the fold); moving_instance_degenerate_points() must count 4 096 there and 0 for the 0.3-cell-shifted plate (which moves the fluid).
  • csg_wall_velocity_gate.py — wall velocity on a CSG difference instance holds a plug exactly (momentum fraction 1.0000 over 100 steps; 0.44 with walls at rest). Run with an argument for the two-instance ordering variants.
  • cutwall_*.py — the ten-cate probes (free-fall trace, Newton audit, tow drag, periodic control), tank slab now L/2 + 1 (the 0.7 L slab was the trap).