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

Recorded external-backend results

These numbers were produced by the commands below. The implementation files had the SHA-256 identities listed at the end. The run used OpenFOAM Foundation 13 package 20260407 (build 13-441953dfbb42, serial, f64, 32-bit labels) on a GitHub-hosted ubuntu-24.04 runner with four cores of an AMD EPYC 9V45, using Python 3.12. The external-backend job of the CI workflow runs exactly these commands on manual dispatch. Rerun them and read the reports rather than treating these values as targets; wall times and the iterations reached within a time budget depend on the machine.

The cavity comparison passes. The backstep does not pass its numerical gate: the coarse solve stalls, and the finer meshes time out. Its measurement screen is therefore not assessed. Nothing here qualifies the native canyon model or passive-gas transport.

python integrations/install_openfoam13.py --output runs/openfoam13
python tutorials/external_cfd.py --preset study --timeout-s 300 \
  --foam-root runs/openfoam13/runtime/opt/openfoam13 \
  --output runs/external-study

Cavity: native and OpenFOAM against Ghia

Re=100. The native case advances to 30 s; OpenFOAM solves the steady equations and converged in 696 iterations. Ghia et al. is a numerical reference, not an experiment. OpenFOAM’s vertical axis is y, the native one z.

ComparisonMaximum error / lid speedTarget
Native versus Ghia0.02754880.06
OpenFOAM versus Ghia0.008966320.06
Native versus OpenFOAM at the Ghia stations0.03117050.06

Backstep: OpenFOAM against Driver–Seegmiller measurements

The raw TMR measurements are fetched with frozen SHA-256 identities. The x/H=-4 profile defines the inlet; the 112 downstream velocity samples and 17 lower-wall Cf values are evaluation data. No case parameter is fitted to them.

Numerical status, level 1 (22,656 cells): all 6000 iterations ran in 165 s, with no convergence report. The final pressure initial residual is 1.19e-3, against the gate of 1e-7. Over the last 600 iterations its median is 1.492e-3, against 1.488e-3 over the 600 before: the solve is stalled, not slowly converging. Local continuity and the stored boundary-flux imbalance are small, but every pressure solve makes them small, so they do not show a steady solution.

The first lower-wall cell centre lies at y+ 13 (median; range 2.4–16.7) in the scored region 1 < x/H < 12. That is the buffer layer, where the k-based wall function switches.

Metrics at the final iterate. These describe one iterate of a stalled solve, not a solution. They carry no evidential weight, and the measurement screen is not assessed.

x/HSamplesRMSE U/UrefBelow y/H=2Maximum errorNo-step predictor RMSETarget
1280.04670.05710.1390.06750.10
4280.06540.08040.1430.1790.10
6280.09270.1150.1710.2370.10
10280.09220.1130.1800.3220.10

The no-step predictor is the inlet profile above y/H=1 and zero below. At x/H=1 it scores 0.0675, inside the 0.10 target, so that target does not discriminate there. Below y/H=2, the shear layer and recovery region, the errors at x/H=6 and 10 exceed the target; the outer flow, which is easy to match, lowers the full-profile RMSE.

Lower-wall Cf RMSE is 0.000491 against a target of 0.001; Cf=0 everywhere would score 0.00145. Predicted reattachment is 6.4505 H against a measured 6.26 ± 0.10 H. The 0.19 H error is inside the 0.75 H screening target but outside the reported experimental uncertainty. The profile file supplies no mean-U uncertainty.

Mesh levels

LevelCellsExecutionIterations started in 300 sNumerically accepted
122,656completed6000no (stalled)
290,624timeout2192no
3203,904timeout854no

Levels 2 and 3 reached about 24 % and 9 % of their 6000 iterations; finishing them needs roughly 20 and 55 minutes of serial time. Their final iteration was not written, so they are marked not evaluable rather than given a score. With no two accepted levels there is no mesh sensitivity and no GCI.

Since refinement moves the first cell toward y+ 1–10, a converged series would also cross wall-treatment regimes. A wall-resolved or wall-function-consistent mesh is needed before the series can be interpreted; the wall-resolved results record such a recipe.

Earlier configurations, all failed

Before the recorded configuration, the level-1 backstep was run with four recipes. All ended without numerical acceptance:

RecipeIterationsFinal p residualOutcome
130006.0e-3gate not reached (CFD-X007)
260001.25e-3gate not reached (CFD-X007)
3, first-order momentum advection——timeout at 600 s (CFD-X004)
4, the recorded configuration60001.19e-3gate not reached (CFD-X007)

Earlier runs of the recorded configuration gave the same level-1 metrics and cavity errors to the digits shown here; how far levels 2 and 3 get in 300 s depends on the runner. At revisions of the backend and case generator that generate the same dictionaries, they reached 1418/554, 1456/572 and 1443/568 iterations on runners with an AMD EPYC 7763 (level 1 in 265, 260 and 266 s) and 1672/663 on an AMD EPYC 9V74 (224 s); still earlier runs, on another EPYC 7763 runner and on an eight-core cloud machine, reached 1458/570 and 1406/522.

What is needed next

The legacy stall persists with SIMPLEC pressure relaxation 1 as well as 0.2; in that control its largest late changes lie in wall-function cells near the switch point, y+ about 11 (wall-resolved results). A wall-resolved recipe converges at level 1 there. The next steps are:

  • an accepted mesh series of the wall-resolved recipe;
  • a continuous wall-function package as a one-change test of the legacy stall;
  • inlet-turbulence, inlet-profile and model sensitivity;
  • justified screening targets.

The native wall roughness and throughput tasks, measured canyon concentrations and an external passive-scalar comparison are separate work. No general urban-model validation or Rust performance advantage is claimed.

Reproduction: guide chapter 16. Assumptions: external model card.

Implementation identities (SHA-256)

FileSHA-256
integrations/openfoam_backend.py1f733f86f08acfe5d87b514678c67ec718ce7b72cb3019779ded7405a7c91969
integrations/openfoam_cases.pyf0e79c2e8054884c56e38e740b8dcc5708134fb44fbbe379ca6ed22ec6a38860
validation/backstep_data.py736281b80881ffb8c3773fb54b0288245d6a92352bcd42ecd1eac376754d964d
validation/compare_backstep.py5141c2e7e9b22850e6a7143dab21dcb28002c527740257c1097c569e0d9a4a3e
validation/audit_openfoam_mesh.py9274c2151328ea0fbde8b083eb184b4d2b36767f4d5d514907735678b0d77cd1
tutorials/external_cfd.py63512ea458ba17d09791e80886a25f52bd54749236d4cccb0914c08a38b63a6e