Diagnostics
Every diagnostic has a code, and the family of the code says which part reported it.
| Codes | Reported by | Section |
|---|---|---|
CFD-E, CFD-W | The native solver: check, run, preview, profile, report | Native case checks and run errors |
CFD-X, CFD-D | The OpenFOAM adapter and the reference data | External backend and reference data |
CFD-P | The Python package | Tools, examples and scripts |
CFD-U, CFD-T, CFD-R | Example programs, optimization lessons, release and documentation tools | Tools, examples and scripts |
CFD-M | The map and street converters, the ride tool and the mobile study | City blocks and mobile measurements |
CFD-B | Performance probes, comparisons and sweeps | Tools, examples and scripts; Native profiling and accuracy-sweep diagnostics |
Tools, examples and scripts
The guide’s example programs (examples/manual/, crates/cfd-craft/examples/)
and validation/manual_examples.py use
CFD-U001 manual.<field> for missing/unavailable inputs, occupied example
output paths, failed process/schema expectations, unaccepted example results,
incorrect source units or source-response scaling, and checkpoint/archive
replays that disagree. These are example/API checks, not new solver numerical
tolerances. Rust library solver failures retain their existing diagnostics;
the OpenFOAM example retains the adapter’s external codes.
The optimization lessons (tutorials/optimization) use
CFD-T001 optimization.<field> when a lesson check fails: an unaccepted
response, replay or held-out solve (the path names the solve or arm), a native
LP/MIP status, primal or integrality check, an LP that disagrees with the
independent vertex reference, a superposition replay outside its tolerance, an
incomplete or failed GP job, inconsistent evaluation accounting, or a velocity
field whose length does not match the grid’s faces. These are lesson checks,
not new solver tolerances; F3’s fidelity gate is reported per design, not as a
diagnostic.
The Python package reports CFD-P001 python.<field>: python.case for a
dictionary that strict JSON cannot represent (NaN, infinity, unsupported
types), python.worker when the solver thread panicked or ended without a
result (the panic message is included), and python.<command> for
console-script failures outside the native report. Native rejections keep their
own codes and paths. The release scripts (scripts/package_version.py,
scripts/check_release.py) and the installed-package acceptance
(validation/check_installed.py) report CFD-R001 release.<field>:
inconsistent versions, crate metadata or lockfiles, and failed installed
checks. Neither family is a solver tolerance.
The reference generator (scripts/generate_reference.py) reports
CFD-R002 reference.<field>: reference.binary when the native binary cannot
be run or prints no usable JSON, reference.cli.markers when cli.md lacks a
generated-block marker, reference.python-api for a public Python definition
without a docstring, reference.<page> (for example reference.case-schema)
when --check finds a committed page that differs from the current build, and
reference.diagnostics when --check finds a CFD- code in the Rust or Python
sources that this page does not list.
The documentation check (scripts/check_docs.py) reports
CFD-R003 docs.<field>: PAGE:LINE: message for a page whose code blocks do not
hold: docs.fence for a block without a known info string or without an end,
docs.marker for an unknown, misplaced, malformed or repeated
<!-- check: ... --> or <!-- file: ... --> comment, a tolerance above 1e-4,
a timeout that is not a positive number of seconds or a missing tolerance
sentence, docs.setup when ## Setup is not the first section, docs.python
and docs.bash for a block that raises, exits non-zero, has a syntax error,
names a script that is not in the checkout or does not end in time, docs.text
when the output of the block before it differs from the shown text (floats
within the tolerance the page declares, everything else exactly) or when a
text block shows a float on a page without a tolerance, docs.json
for JSON that is not strict, a case that cfd-craft check rejects or a block
that differs from the committed file it names, docs.sh, docs.toml and
docs.rust for a block that does not parse or is not found in the file it is
bound to, docs.binary when cfd-craft cannot be run, docs.counts when a page has
fewer blocks of a class than its entry in docs/check-counts.json, has no
entry, or (for the default set) an entry names a page that is not checked,
docs.page for an unreadable page and docs.arguments for invalid options.
The line is the line of the opening fence, or of the differing output line; it
is 0 for docs.counts. These are checks of the
documentation, not solver tolerances.
The documentation site tools (scripts/mdbook_links.py, the mdBook
preprocessor, and scripts/check_site.py, the check of the built book/
directory) report CFD-R004 site.<field>: site.link for a link in a page
under docs/ whose target does not exist or leaves the repository,
site.book or site.protocol for input that mdBook should not send,
site.directory for a missing or empty site directory, site.reference for an
internal href or src in the built HTML that resolves to no file, and
site.anchor for a fragment that names no id on the target page. These are
checks of the documentation site, not solver tolerances.
Native performance probes use CFD-B001 benchmark.<field> for invalid probe
arguments, case or output, missing input files, nonfinite or null results,
repetitions that disagree, changed binary/case/producer identities, a child that
did not perform the requested work, unequal work or fields, missing or malformed
report fields and timing samples, and failed, cancelled or timed-out benchmark
children. The same-host backend comparison uses CFD-B002 comparison.<field>
for invalid limits or inputs, a run that is not accepted or misses the 0.06
Ghia screen, an ambiguous solver record, work, profiles or producers that differ
between rounds, and inputs changed during the comparison. These research
measurements are not CFD numerical-acceptance or physical-qualification
verdicts.
Native case checks and run errors
cfd-craft check CASE prints a cfd-craft.check/0.1 report on stdout. Each
diagnostic has a code, a severity, a JSON path into the case (for example
geometry[1], sources[0].rate_kg_s_m, numerics.advective_cfl_max) and a
message. Errors make the case invalid; warnings do not. run, profile and
preview print the same report and exit 1 when the case is invalid, before any output
directory is created. preview checks the coarsened case it runs, then compares
it with the original’s cell mask, which it counts without building the original
grid.
The grid, source and receptor checks need the built grid. When the estimated peak does not fit this host (CFD-W070), they are skipped, so a check never allocates more than the host can hold. They also run only when the case has no other error, and a file that does not parse is reported alone (CFD-E000): check again after each fix.
| Code | Severity | Meaning |
|---|---|---|
| CFD-E000 | error | The file is not a valid case: unknown or duplicate field, wrong type, trailing data. The path points at the element |
| CFD-E001 | error | Unsupported schema_version |
| CFD-E002 | error | Empty name |
| CFD-E003 | error | A domain length outside 1e-6..1e9 m |
| CFD-E004 | error | An axis with fewer than 2 (1 on a periodic axis) or more than 4096 cells |
| CFD-E005 | error | ground_open_top on x or y |
| CFD-E006 | error | Estimated peak memory above run.memory_limit_mib, or more than 1e8 cells |
| CFD-E007 | error | Estimated artifacts above output.max_total_mib |
| CFD-E008 | error | Threads, step budget, pressure iterations or monitor window out of range |
| CFD-E009 | error | A time, tolerance or step limit that is not finite and positive |
| CFD-E010 | error | advective_cfl_max outside 0..0.45 |
| CFD-E011 | error | Neutral RANS without ground_open_top |
| CFD-E012 | error | Invalid flow parameters |
| CFD-E013 | error | Obstacles with prescribed uniform flow |
| CFD-E014 | error | Box ID missing or repeated, or bounds not increasing inside the domain |
| CFD-E015 | error | Constituent ID or diffusivity invalid |
| CFD-E016 | error | Source ID, constituent or declared rate invalid |
| CFD-E017 | error | Source support degenerate or outside the domain |
| CFD-E018 | error | More than one initial condition per constituent, or an undeclared one |
| CFD-E019 | error | Receptor ID missing or repeated |
| CFD-E020 | error | Steady sources without an open boundary to remove their mass; a particle source also passes with a declared ground, roof or leaf deposition candidate |
| CFD-E021 | error | Invalid moving wall |
| CFD-E022 | error | Wall-time limit above seven days or physical horizon above 1e12 s |
| CFD-E023 | error | Laminar flow with ground_open_top; its open top exists only in the RANS closure |
| CFD-E024 | error | Prescribed velocity with a normal component at an impermeable boundary |
| CFD-E025 | error | Negative or nonfinite initial concentration |
| CFD-E026 | error | Invalid periodic Gaussian initial condition |
| CFD-E027 | error | Receptor support degenerate or outside the domain |
| CFD-E028 | error | A box or polygon prism contains no cell center, so the grid would not represent it; the path names the shape |
| CFD-E030 | error | The geometry leaves no fluid cells |
| CFD-E034 | error | numerics.pressure_preconditioner: multigrid on a grid without fluid components, or with nonpositive/nonfinite pressure weights. A geometry mask and several fluid components are supported and do not raise it |
| CFD-E036 | error | numerics.pressure_preconditioner: a principal line-block Cholesky pivot is nonpositive/nonfinite; no diagonal repair or fallback |
| CFD-E035 | error | numerics.pressure_preconditioner: the multigrid coarse Cholesky factor is not positive definite (on a masked grid, the factor of one fluid component), or masked aggregation could not reduce a connected component; no diagonal repair or hidden fallback is applied |
| CFD-E037 | error | numerics.momentum_limiter: limited_upwind without a limiter, or a limiter with another momentum scheme |
| CFD-E045 | error | numerics.steady_algorithm: an implicit pseudo-time algorithm in transient mode |
| CFD-E047 | error | numerics.steady_algorithm: an implicit pseudo-time algorithm with prescribed flow, or implicit_viscous with neutral_rans |
| CFD-E040 | error | A source intersects a solid cell |
| CFD-E041 | error | A source has no support on the grid |
| CFD-E042 | error | A receptor is empty or samples a solid cell |
| CFD-E043 | error | A steady source in a fluid component without an outlet; a particle source also passes with a represented ground, roof or leaf deposition sink in that component |
| CFD-E044 | error | The represented source density is not finite |
| CFD-E070 | error | run, profile and preview: the estimated peak exceeds 80 % of this host’s available memory |
| CFD-E072 | error | preview only: coarsening changes the solid volume by more than 20 % or the number of fluid components |
| CFD-E073 | error | preview only: the original cell mask cannot be counted (more than 1e8 cells, or its 4 bytes per cell do not fit this host), so the preview cannot be compared with it |
| CFD-W001 | warning | A box spans fewer than 10 vertical cells: too coarse for physical interpretation |
| CFD-W002 | warning | RANS blockage ratio above the COST 732 recommendation of 3 % |
| CFD-W003 | warning | RANS domain clearance below the COST 732 recommendation (about 5 H_max upstream, at the sides and above; 15 H_max downstream). Every open, slip or wall side is checked; periodic sides are not |
| CFD-W004 | warning | numerics.pressure_preconditioner: pressure weights select symmetric line/small-plane blocks and semicoarsening (ratio above 25, including stiff two-cell axes). Setup and memory increase; compare total cost with IC(0), especially for extreme stretching. Weak two-cell spans alone do not trigger this policy. With geometry the same weight ratio draws the warning, but the masked path has no line blocks: it keeps point smoothing and can need more iterations and time than IC(0). See the pressure guide and anisotropy results |
| CFD-W070 | warning | check only: the estimated peak exceeds 80 % of this host’s available memory; the grid checks are skipped |
W002 and W003 encode the COST 732 best-practice guideline (Franke et al., 2007) as summarized by secondary sources that cite it. The primary document was not retrieved from its distribution share; validation/data-inventory.json records that. They are warnings because best-practice distances depend on the scenario: a wind-tunnel reproduction may use the tunnel’s own dimensions.
Codes from a run, a restart or report, reported in summary.json error or on stderr:
| Code | Meaning |
|---|---|
| CFD-E031 | Closed fluid component with an incompatible net flux |
| CFD-E032 | Pressure CG lost positive definiteness |
| CFD-E033 | Pressure iteration limit reached |
| CFD-E050 | Checkpoint dimensions do not match the case |
| CFD-E051 | Nonfinite or invalid state, including concentration in a solid cell |
| CFD-E052 | Velocity divergence |
| CFD-E053 | Negative concentration beyond round-off; no clipping is applied |
| CFD-E054 | Eddy viscosity outside the declared numerical regime |
| CFD-E055 | The time step is not finite and positive |
| CFD-E056 | An implicit momentum-correction system is nonfinite or singular, or its CG lost positive definiteness |
| CFD-E057 | An implicit k or ε correction system is nonfinite or singular |
| CFD-E060 | Checkpoint identity or checksum mismatch |
| CFD-E061 | Fields or checkpoint omitted because they would exceed the output budget; the manifest lists them under omitted and the run exits 2. report repeats the code on stderr for such an archive and exits 0 |
| CFD-E062 | The output directory already exists |
| CFD-E063 | The output directory cannot be created, for example because its parent does not exist |
| CFD-E064 | report rejects the archive; the message names the failed check |
| CFD-E065 | The restart checkpoint cannot be read or parsed, or is larger than half of run.memory_limit_mib |
| CFD-E066 | The restart checkpoint lies beyond run.max_steps, or in transient mode beyond run.end_time_s, of the case |
External backend and reference data
These Python diagnostics carry the code and offending field in the error text. They belong to the separate external artifact schema. E062/E063 are also used for occupied/unavailable external output paths. The external tools exit 0 for an accepted result, 2 for a completed, stopped or verified run without accepted evidence, and 1 for a failed execution or invalid input (backend guide).
| Code | Meaning |
|---|---|
| CFD-X001 | Invalid external case/input identity or execution-limit field, including an iteration limit without a divisor between 50 and 250 (iterations) |
| CFD-X002 | Missing/unsupported runtime, version, package identity or installer dependency |
| CFD-X003 | A child command exited unsuccessfully; the actual return code and log are retained |
| CFD-X004 | External execution wall deadline reached |
| CFD-X005 | External output/per-file budget reached |
| CFD-X006 | Invalid mesh, returned field, sample, numerical record or archive checksum |
| CFD-X007 | A completed external solve did not reach its convergence/continuity gate |
| CFD-X008 | External execution cancelled; process group stopped |
| CFD-X009 | A cross-solver comparison exceeds its frozen target |
| CFD-X010 | The solver log shows a numerical breakdown: execution.solve.residual for a NaN/Inf residual or continuity value, execution.solve.continuity for a reported mean continuity error (sum local, in units of U_ref/H) of at least 1. The process group is stopped and the failure archive retained |
| CFD-X011 | The independent Cartesian audit rejects mesh.* (points, faces, owner/neighbour order and orientation, boundary ranges, volume, first-cell heights), fields.phi.* or wallShearStress.* (missing, malformed, nonfinite, or zero traction on a wall); run.numerical marks an archive without a final field, which is not assessed |
| CFD-X012 | initial_state.*: an ineligible or changed restart source (source.*), a receipt that is incomplete or disagrees with the consumed inputs (fields, fixed inputs, metadata, controls, field header times), a runtime or rebuilt mesh that differs from the source (runtime, mesh.*), a stored face flux that fails the independent local gate (phi.local_continuity), or a stage input that cannot be written (inputs) |
| CFD-X013 | comparison.*: a restart comparison of two archives from different cases, recipes, meshes or runtimes, or without final fields; an invalid mode or missing data; a run of the fixed-work driver (source, split, continuous) that did not complete with a final field |
| CFD-D001 | Reference/protocol hash, measurement identity, pairing or metric input invalid |
| CFD-X014 | mapping.*: in a coarse-to-fine preparation, solve or archive, an unsupported source, level or initialization; changed source bytes or a broken source chain (source.*); failed source acceptance or audit; invalid mapped fields; consumed values that no single nearby source cell supplies in every field (mapper.values) or replay statistics that differ from the receipt (mapper.replay); utility arguments or logs that differ from the receipt (mapper.*, commands); changed generated boundaries or controls; missing, malformed or unreadable evidence; an exceeded output budget (output); or a runtime or rebuilt mesh that differs (runtime, mesh.*) |
| CFD-X015 | refinement.*: unsupported campaign limits; an output inside the source or the reverse (output); an unreadable, unaccepted, non-cold or unsupported coarse source, or one that fails its audit or measurement screen (source, source.*); a source changed during its checked snapshot or a copy that is not the archive the plan froze (source.copy.*, source.inventory, source.manifest); a changed or incorrectly bound retained parent (stages[N].parent.*); a failed archive checkpoint (archives.*, preserving the underlying diagnostic), including an archive changed after its first checkpoint, a sealed summary that differs from the returned record (stages[N].summary.*) or a stage or producer that is not the frozen implementation (stages[N].implementation.*, plan.implementation.*); incompatible mesh-pair inputs, runtimes or observable identities (pair.*); or a symlink rejected before CI archive serialization (archive.*). No archive is repaired or resealed |
Native profiling and accuracy-sweep diagnostics
| Code | Meaning |
|---|---|
| CFD-B003 | profile.*: an active or incorrectly nested phase snapshot (active, nesting), an unwritable profile report (output), or a profile/archive identity, time-accounting or attempted-work mismatch named by its field path. |
| CFD-B004 | sweep.*: invalid grid/limit/target/row fields, changed inputs (inputs), inconsistent repeated accepted work/fields/producer (repeat.*), a failed bounded child (native.execution, openfoam.execution), an occupied process-log destination (process.output), or an evidence zip that cannot be written, contains a symlink or an unsafe member, or holds an archive of unknown schema (archive.*). Unaccepted numerical rows remain recorded separately. |
CFD-B005 pressure_benchmark.<field> identifies invalid pressure-comparison
inputs, changed producers, failed or malformed child measurements, missing
returned arrays, inconsistent work or repeats, failed independent recovery,
cavity numerical/archive/reference gates or pressure/velocity equivalence.
Rows retain the original measurement when a later check rejects them. Cold setup,
reused pressure time, accepted solver time and workflow time are separate scopes.
CFD-B004 sweep.process.namespace reports unavailable or invalid Linux procfs
PID/group namespace metadata. Process cleanup uses local IDs from NSpid/NSpgid
and checks namespace identity, rather than comparing ancestor procfs IDs with
local killpg IDs.
CFD-B006 pressure_suite.<field> covers the shared rough-pressure probe and
anisotropy campaign: invalid arguments/limits/cases, occupied or failed output,
nonfinite data, changed inputs/producers, inconsistent work/repetitions and
invalid result identities. A valid pressure-limit failure or missed independent
recovery bound remains a nonqualifying measurement, with no speedup ratio.
CFD-B007 momentum.<field> identifies a failed momentum verification fixture:
invalid/empty/nonfinite norms or order inputs (norms, orders.*), seed or
generated-checkpoint shape (<trial>.seed, <trial>.initial), a vortex solve,
actual timestep count or time-refinement failure (<trial>.run, <trial>.steps,
temporal), an invalid 1000-step stability control (stability.run), changed
default artifacts or work (defaults.<filename>, defaults.pressure_iterations),
an invalid self-reference/profile (self.*), or output/argument errors
(output, arguments), and a failed predeclared second-order gate (gates).
An intentional stability iteration limit is recorded separately from numerical
acceptance. CFD-B008 steady.<field> identifies a failed implicit steady-algorithm
campaign (validation/steady_algorithms.py): a run that misses the unchanged
gates (<run name>), fields of different shape or a zero canyon reference field
(fields), a failed fixed-point shrink gate (fixed_point), unknown schemes
(schemes), any other campaign failure (campaign) or output errors
(output), for the cavity and for the --case canyon campaign. Explicit cavity grid selectors use
CFD-X001 recipe.cavity_grid; shared sweep grids use CFD-B004 sweep.grids.
CFD-B004 sweep.collection.<run_directory> rejects an archive that passed its
measurement-time checks but fails revalidation after all child runs. The row
retains accepted_at_measurement, gains collection_verified=false and is
excluded from qualifying costs. sweep.collection.manifest identifies a changed
sealed manifest. Collection does not repair files or relax archive checks.
CFD-E080 constituents[i].particle.<field> rejects a nonfinite or out-of-range
spherical aerosol diameter (1e-8..1e-4 m), density (above reference air and at most
30000 kg/m3), or settling/deposition speed (0..10 m/s). CFD-E081 constituents[i].particle.settling_velocity_m_s rejects a computed
Stokes–Cunningham speed outside its creeping-flow range (particle Reynolds
number above 0.1). A separately justified direct speed bypasses that formula;
it does not validate the particle physics.
CFD-E082 vegetation[i].<field> rejects a duplicate/empty canopy ID, an
invalid box, or nonfinite/out-of-range canopy parameters: LAD 0..100 m2/m3,
drag coefficient 0..10, leaf collection velocity 0..10 m/s.
CFD-E083 vegetation[i].drag_coefficient rejects positive drag with a
prescribed velocity, because no momentum response would be solved. Use zero
drag for a prescribed-flow leaf-collection study, or solve laminar/RANS flow.
City blocks and mobile measurements
| Code | Path | Meaning |
|---|---|---|
| CFD-E084 | geometry[i].footprint_m, geometry_min_passage_cells | Invalid/self-intersecting polygon, mismatched footprint bounds or nonpositive passage-resolution request |
| CFD-E085 | building_roughness_m | Building roughness must be finite, positive and used with neutral RANS |
| CFD-W011 | geometry_min_passage_cells | A represented horizontal street between solids has fewer cells than requested, or the request was not evaluated because the grid has more than 10000000 cells (the message says which; geometry.json still records the passage of every shape) |
| CFD-M001 | map | Converter rejected source geometry, coordinates, elevation range, provenance or native case check; the message names the reason |
The wind-direction campaign (validation/urban_campaign.py) has no code of
its own. It refuses invalid budgets or a case without neutral_rans flow with
a Python ValueError, and each direction that fails keeps a row with
accepted: false and an error text such as campaign_budget_exhausted,
worker_watchdog_timeout, worker_failed or no_native_archive.
CFD-E028 is an error also when a polygon prism contains no cell center: a
warning must never silently remove a building from the physics.
For particle bins, CFD-E020 run.mode admits a closed-air source only with
a declared removal candidate, and CFD-E043 sources[i] then requires an actual
positive represented ground/roof/leaf removal mechanism in the same fluid
component as each source support cell. A sink in another component or a canopy
volume that misses all fluid-cell centers does not qualify. Passive gases keep
the original outlet requirement. Admissibility does not establish convergence.
CFD-M002 covers the optional supplied-street emission converter. Paths identify
rates.columns, rates.rows[CSV line].<field>, streets.crs, streets.features[i].<field>,
streets['ID'].segments[i], map_provenance.<field>, height_m, case.sources,
native_check or output. It rejects missing/nonfinite/negative rates, missing
or mismatched kg/s/m units, duplicate/unknown IDs, invalid coordinates or map
transforms, continuous building intersections and failed native case preflight.
Intersecting sources are never relocated; positive-rate omissions from clipping
and unrated streets remain explicit in the provenance. See
the traffic converter.
CFD-E086 receptors[i].polyline_m, .height_m or .sample_spacing_m
rejects an invalid path receptor: 2..4097 finite in-domain vertices, positive
segment lengths, in-domain height and finite positive spacing are required.
CFD-E087 receptors[i] rejects any path segment that enters a represented solid
cell, even between generated samples, or any sample interpolation stencil with
positive solid support. CFD-E088 receptors[i].sample_spacing_m rejects more
than 20001 generated samples per path; CFD-E088 receptors rejects more than
50000 across a case. Both limits apply before sample allocation.
CFD-M004 virtual_ride identifies invalid/nonfinite speed, interval, response
time or sensor series, an unaccepted/non-steady source field, consumed archive
checksum problems, a missing route/constituent, a ride exceeding 200000 samples,
or an existing/unwritable result file. The tool’s output is an idealized pass
through a steady mean local increment, not time-resolved atmospheric validation.
CFD-E089 mobile_response.case rejects nonlinear transport, nonzero initial
scalar conditions, a non-steady run or changed frozen-flow physics/controls.
mobile_response.flow rejects an incomplete/unaccepted, mismatched or changed
flow preparation; identities and actual field gates are recomputed. A retained
flow/diffusivity allocation exceeding run.memory_limit_mib is also rejected.
The ordinary run and restart contracts are unchanged.
CFD-M003 mobile_inference covers invalid matrix/observation identities,
nonfinite values, noise/pass assumptions, malformed study inputs, unsafe IDs,
duplicate training/held-out identities and execution/output errors in the
optional mobile study driver. Bounded native or integer-solver failures remain
in the report, and the study then does not pass.