Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pressure multigrid results

This is the historical P1 point-smoother/full-coarsening campaign, including the shape sweep added in merged PR #13. Its rows are retained unchanged. The subsequent line/small-plane and semicoarsening implementation has separate anisotropy results and a fresh native/OpenFOAM gap assessment.

Scope and protocol

Baseline: main bbd191b (merged PRs #11 and #12), measured 2026-10-31. Opt-in tensor-linear symmetric geometric multigrid versus the unchanged default IC(0), solving the same fine pressure equation. No scientific gate was relaxed. One solver thread on AMD EPYC 9V74; Rust 1.88.0, locked dependencies; the host exposed 9 CPUs with an 8-CPU quota and 8 GiB memory limit. Native source fingerprint: d246dc36db0681182f74601a8bd8c87932283769bc836ea566d0e2a4ea6592d9.

One warmup and three alternating timed pairs per configuration. Repeated work and returned fields match for each method. Kernel results below come from the isolated campaign, with one cold solve and three reused solves per child; reused time is the median within a child, then across timed children.

Manufactured pressure kernels

All 40 child records passed the independent manufactured-field and true-residual bounds. Boundary conditions are wall x/z and periodic y; the cavity retains two span cells. Nominal tolerance is 1e-11, independent RMS recovery bound 1e-8 and final true-relative-residual bound 1.01e-10. The table reports milliseconds.

GridIC(0) / MG iterationsCold IC(0)Cold MGReused IC(0)Reused MGReused speedup
cavity2453 / 61.4374.6391.2920.9281.39×
cavity48102 / 612.94223.46813.0073.6463.57×
cavity96193 / 6100.655118.179102.41016.8646.07×
cube2461 / 722.338161.03619.56513.0591.50×
cube48113 / 7413.9641995.427390.576152.0882.57×

Cold multigrid is slower on every tested kernel. Reuse amortizes hierarchy construction; a single small solve is not a reason to select it. The observed 6/7 iterations belong to this RHS and are not a general iteration bound.

Accepted coupled cavity

Both methods keep the canonical numerics, 20000-step/600-second resource bounds, independent archived-field audit and frozen 0.06 Ghia centerline screen. All 16 child records passed, including warmups. Solver time includes setup and actual stepping; workflow time additionally includes process/output/checking work.

Flow-plane gridSteps (both)IC(0) PCG workMG PCG workIC(0) solver sMG solver sSolver speedupGhia error (both)
24²2010204,85024,1207.3555.4121.36×0.02756134
48²63901,262,03576,680180.66574.1082.44×0.01695144

Maximum returned-field differences over the pairs: velocity 2.22e-16 m/s; pressure 2.22e-15 m²/s², with the same gauge. Predeclared bounds were 1e-8 and 1e-7 respectively. The 0.01 development accuracy target remains unmet; pressure acceleration does not change donor-cell momentum error. No fresh OpenFOAM speed ratio or matched-accuracy comparison is claimed.

Hosted reproduction

The manual external=pressure job ran the same campaign on a GitHub runner (AMD EPYC 7763, 4 CPUs, ubuntu-24.04; run 41235330963) on the code of commit 646dda3, which differs from the recorded measurements by the CFD-W004 check and an exact (rather than hashed) hierarchy reuse check. All rows passed; iterations, steps and Ghia errors equal the recorded ones.

ConfigurationIC(0) / MG iterationsIC(0)MGSpeedup
kernel cavity24, reused ms53 / 61.6320.9281.76×
kernel cavity48, reused ms102 / 613.1034.0513.24×
kernel cavity96, reused ms193 / 6102.4416.0876.37×
kernel cube24, reused ms61 / 722.91914.1031.63×
kernel cube48, reused ms113 / 7378.06130.762.89×
accepted cavity 24², solver s204,850 / 24,1207.9655.5261.44×
accepted cavity 48², solver s1,262,035 / 76,680185.3373.972.51×

Cold multigrid solves were again slower than IC(0) on every kernel (0.14–0.84×). The evidence zip kept its directory entries; all 16 sealed archives verified in its extracted copy.

Shape sweep: where multigrid is slower

The kernels above use a smooth manufactured right-hand side on near-isotropic grids. A separate sweep on another host solved a rough compatible right-hand side (sin(0.618 i), centered) to a relative tolerance of 1e-10, timing the second solve, so the hierarchy is reused. One thread. Face weights are 1/dx² per axis; the ratio is taken between axes of more than two cells, and CFD-W004 marks ratios above 25.

CellsDomain, mWeights x/y/zRatioW004IC(0) it / msMG it / ms
96×2×244×0.1×1576/400/5761no106 / 9.710 / 5.0
48×48×481×1×0.22304/2304/5760025no132 / 379.619 / 304.4
64×2×641×0.1×0.24096/400/10240025no96 / 15.717 / 15.9
128×2×16100×1×12/4/256128yes212 / 17.042 / 16.9
64×64×81×1×0.014096/4096/640000156yes199 / 153.540 / 154.3
64×2×641×0.1×0.14096/400/409600100yes85 / 13.934 / 30.9
64×2×641×0.1×0.054096/400/1638400400yes82 / 13.568 / 61.0
48×48×481×1×0.12304/2304/230400100yes151 / 436.836 / 569.3
32×32×161×1×0.051024/1024/102400100yes127 / 44.037 / 71.5
64×8×641×1×14096/64/409664yes109 / 87.036 / 148.7
64×16×641×4×14096/16/4096256yes162 / 278.970 / 644.5
64×8×641×1×0.24096/64/1024001600yes136 / 108.6121 / 505.8
64×8×641×1×0.14096/64/4096006400yes147 / 116.0231 / 935.9

With a rough right-hand side, one cycle costs roughly as much as 5–10 IC(0) applications. Multigrid was faster only on the near-isotropic shapes; above a ratio of 25 it was as fast or slower, sometimes with more iterations. In a separate review test (64×8×64, domain 1×1×0.02 m, x/z ratio 2500), multigrid exceeded the case default of 1200 PCG iterations and stopped with CFD-E033, where IC(0) converged in about 200. check reports CFD-W004 for such cases; semicoarsening or line smoothing is the remedy, and part of the next pressure work.

Memory and work attribution

GNU time 1.9 reports the maximum individual process RSS, including waited descendants, rather than simultaneous aggregate memory. Peak columns below are maxima across timed children. Hierarchy storage counts retained numeric/index vector capacities and level records, excluding reporting/cache handles, allocator overhead, the grid, outer PCG vectors and construction temporaries.

KernelIC(0) peak MiBMG peak MiBMG retained MiBGrid complexityOperator complexity
cavity243.073.500.481.3282.267
cavity485.326.952.061.3322.450
cavity9615.1621.588.541.3332.553
cube2411.7717.316.311.1432.443
cube4880.14123.7052.681.1432.601

The 48² accepted-run peaks were 21.03 MiB (IC(0)) and 22.70 MiB (MG). The preflight hierarchy/construction allowance is 1024 additional bytes per cell before the existing 25% margin; it is a conservative budget rather than RSS.

Additional 100-step 48² phase profiles are explicitly incomplete steady runs. They pass archive/profile/independent checks and compare equivalent fields, but are not accepted-solution timings. IC(0) used 19162 PCG iterations and MG 1200, with 200 independent true-residual checks each. MG built one five-level hierarchy (6138 cells/78084 stored entries across levels), made 1200 cycles and coarse solves, and recorded 29376000 smoothing cell updates. Pressure projection occupied about 85.0% of the IC(0) profile and 67.2% of the MG profile.

Verification and reproducibility

  • Clean Rust 1.88 release workspace tests: 65 passed; fmt and clippy with warnings denied passed.
  • Python suites pass normally and with -O, including strict profile fault injection, field equivalence/repetition rejection, and process cleanup.
  • Independent dense Galerkin matrices, the entire small preconditioner on the compatible subspace, manufactured/continuous Poisson and projection checks pass.
  • Changed public face coefficients rebuild the hierarchy; masks fail explicitly. Cancellation and pressure limits preserve the entire prior state.
  • Default IC(0) fields/checkpoints/probes match the merged binary bitwise on cavity and masked canyon controls, including legacy checkpoint replay. Multigrid restart matches uninterrupted fields/checkpoints/probes bitwise.
  • Gaussian refinement, Poiseuille and empty-ABL checks pass with multigrid. Empty-ABL U/k/epsilon drift above H is 0.2341%/0.9405%/2.6754%, below the unchanged 2%/5%/5% gates. Its known below-H epsilon drift remains about 16.2%.

The measurements froze their observer before the later PID-namespace cleanup fix. This host exposes ancestor procfs IDs; cleanup now uses namespace-local NSpid/NSpgid and checks namespace identity. The pre-fix observer and original failed tests are retained in raw evidence. Measured native executables launch no subprocesses; kernel and solver timers are internal and unchanged by that post-child enumeration fix. Raw workflow times retain their original observer identity. A separate final-observer control validates the complete measurement path, without replacing the three-pair headline measurements.

Use the guide and validation/benchmark_pressure.py to reproduce. The recorded evidence was archived with validation/archive_evidence.py, which keeps directory entries rather than copying only files; all 69 sealed archives verify in its extracted copy.

Remaining work

IC(0) remains default. Masked topology/component-preserving coarsening, robust anisotropy, cheaper hierarchy construction and coarse operator complexity are next pressure work. Better momentum accuracy and an implicit/steady flow algorithm remain separate gap-closing steps. (Since then anisotropic smoothing followed in P2a, and P3a and P5a closed the cavity gap at matched accuracy; see the gap status. Masked coarsening P2b and the hierarchy cost P2c remain.) The canyon experimental-data gate, and the native physical-qualification status, are unchanged.