Code-to-theory validation · OpenFOAM

CFD Verification Suite — digitalmodel

Known-answer verification of the digitalmodel OpenFOAM CFD capability · verified against real OpenFOAM v2312 (not mocked) · epic #1161

9 / 9 known-answer cases — laminar, turbulent, lift, free surface, waves, floating body, green-water impact + wave-body interaction + wave loading on a vertical cylinder vs MacCamy–Fuchs diffraction (#1171) + heave-RAO frequency-response spot-check vs potential flow (#1324) + 2D tank sloshing vs analytical modes & SPHERIC forced roll (#1429) INTERACTIVE — live charts, animations, VIV screening calculator

SolverOpenFOAM ESI v2312
Regimes coveredSteady BL · Bluff body · Turbulent RANS · Airfoil lift · Free-surface VOF · Waves · 6-DOF floating body · Wave-body (overset) · Forced-roll sloshing
Cases verified11 known-answer + RAO spot-check
Flat plate Cf4.6% mean vs Blasius
Cylinder Cd−0.5% vs Williamson
License hostLinux, license-free

1  Verification philosophy

The digitalmodel CFD capability is verified by known-answer cases. No domain workflow is considered production-ready until it reproduces a result with a known analytical or benchmark answer. Verification runs execute against real OpenFOAM v2312 — not mocked — so the numbers below come from converged solutions of the actual solver, not from stubs. Every report is an interactive capability page: charts support hover/zoom/series-toggling (Plotly), the transient cases carry scrubbable animations of the solved fields (the Kármán vortex street; the dam-break collapse), and each case states the realistic offshore use case it gates — hull friction, VIV screening, control-surface lift, green water & sloshing. Two flow regimes anchor the suite: a steady boundary-layer case (flat plate, Blasius similarity solution) and a transient bluff-body case (cylinder at Re = 100, vortex shedding). CFD without verification is decoration.

2  Verification summary

Each row is a fully reproducible case whose CFD result is compared against a classical analytical or experimental benchmark. Full derivations, meshes, and figures are in the linked reports.

CaseRegimeSolverQuantity CFDBenchmarkErrorReport
Flat plate (Blasius)
#1167
Steady boundary layer simpleFoam (laminar) Skin friction Cf mean 4.6%
(≤5.2% max) agreement
Blasius 0.664/√Rex within 5% View report →
Cylinder Re = 100
#1166
Transient bluff body pimpleFoam (laminar) Mean drag Cd 1.344 1.33–1.37
(Williamson 1996)
−0.5% View report →
Turbulent flat plate (k-ω SST)
#1168
Turbulent boundary layer (RANS) simpleFoam + kOmegaSST Skin friction Cf + law of the wall law of the wall captured;
Cf within ~9% of correlations
Prandtl/Schlichting turbulent Cf;
universal log law
~9% View report →
NACA0012 airfoil
#1174
Lift-generating airfoil (RANS) simpleFoam + Spalart-Allmaras Lift-curve slope + drag polar slope 0.1037/deg
(−2.2% vs experiment)
thin-airfoil 2π/rad;
NACA0012 experiment
−2.2% View report →
Dam break (VOF free surface)
#1165
Multiphase free surface interFoam (VOF, laminar) Surge front Z(T) + mass mean 3.0% / max 8.1%
(gate-corrected); drift 6×10−7
Martin & Moyce (1952)
experiments, n²=2
within 10% View report →
Numerical wave tank (StokesII)
#1170
Marine wave generation interFoam + waveModels H, dispersion k, reflection H within 4.7%; k +0.2%;
Kr = 0.010
ω² = gk·tanh(kd);
input StokesII wave
within 5% View report →
Floating-body heave decay
#1169
Marine 6-DOF floating body interFoam + sixDoFRigidBodyMotion Draft + heave period draft +1.1%; 11 damped cycles;
Ca ≈ 0.39 (physical)
Archimedes; hydrostatic
period + added mass
within 5% View report →
Green-water impact (Kleefsman)
#1172
Marine wave impact / slamming interFoam (VOF, 3D) Impact pressure + water heights P2 peak +1.5%, arrival +3.5%;
H2/H4 MAE 4.3%/2.1%
Kleefsman/MARIN experiment
(official SPHERIC data)
within 20% View report →
Wave-excited floating body
#1302
Marine wave-body interaction (overset) overInterDyMFoam + sixDoF Heave RAO (long-wave limit) RAO 1.017
(fast mesh 1.006)
wave follower: RAO → 1
(λ/B ≈ 29, Newman 1977)
+1.7% View report →
Heave-RAO frequency response
#1324
Marine seakeeping RAO vs potential flow overInterDyMFoam + sixDoF Heave RAO vs wave period off-res ±3% vs BEM;
near-res grid-independent
reduction (RAO ≈ 0.7–1.0)
capytaine BEM curve
(OrcaWave/AQWA physics)
off-res verified
resonance: open finding
View report →
Free-decay heave damping
#1332
Overset body damping (attributes #1324) overInterDyMFoam + sixDoF (still water) Natural freq ωn + damping ζ ωn within 0.4% of reference;
ζ ≈ 0.13 (amplitude-indep.)
capytaine radiation a33/b33
(resonance ωn, ζrad)
body dynamics verified View report →
Cylinder wave loading
#1171
Marine wave-structure loading (monopile) interFoam + forces FO (3D) Inline wave force + phase force within 3.4% of MacCamy–Fuchs;
phase 1.9°; 0.72× Morison (diffraction)
MacCamy–Fuchs (1954)
linear diffraction, exact
within 15% View report →
Tank sloshing (2D forced roll)
#1429 / #1433
Marine free-surface sloshing (moving mesh) interFoam (VOF) + solidBody roll First-mode frequency + impact pressure ≤0.30% across 4 fills;
SPHERIC Sensor 1 peak 4,688 Pa
ω² = (πg/L)·tanh(πh/L);
Delorme/SPHERIC exp. 3,710 ± 732 Pa
≤0.30% freq;
pressure within 2σ
View study →
Verification →

Flat plate also verifies that velocity profiles collapse onto f'(η) with RMS 0.025 (28,600-cell two-block mesh, ReL = 1×104). Cylinder also matches Strouhal St = 0.1655 vs 0.164 (+0.9%) with lift amplitude 0.325 (21,120-cell body-fitted O-grid).

3  How the capability is built

The CFD stack is fully open-source and runs license-free on Linux — no Windows licensed host is required, unlike the OrcaFlex / AQWA / ANSYS workflows. The toolchain is Python-orchestrated end to end:

FreeCAD + gmsh → OpenFOAM ESI + olaFlow → PyVista / ParaView

The execution layer wraps this pipeline in fail-closed, config-driven components:

Caught only by running real OpenFOAM. A latent runner bug was surfaced — and fixed — only because verification ran against the actual solver: the error-marker matched OpenFOAM's benign startup banner trapFpe: Floating point exception trapping enabled, false-positiving every successful run. Fixed in PR #1191. A mocked pipeline would never have exposed this.

Every case is config-driven, deterministic, and provenance-stamped; figures and metrics are computed directly from the converged solutions — no hand-entered values.

4  Engineering depth

Each case involved a modelling judgment that mattered more than raw mesh count.

Flat plate — leading-edge treatment dominates. A 4-iteration error-isolation study drove Cf agreement from ~30% to ~5% by identifying the leading-edge treatment (a 20 mm upstream symmetry run-in) as the controlling modelling decision — not mesh density and not domain size. The dominant error source was physical, not numerical.
Cylinder — body-fitted grid + seeded shedding. A body-fitted O-grid (not snappyHexMesh) keeps wall shear accurate, giving Cd within 0.5%. A grid-aligned symmetric setup suppresses shedding, so the freestream is tilted 5° to seed it — a circle is rotationally symmetric, so Cd and St are unchanged. Strouhal is extracted from lift zero-crossings because the FFT bin is too coarse.
Turbulent flat plate — resolved to the wall. Meshed to y+ ≈ 0.13 (viscous sublayer, no wall functions bridging the gap); the k-ω SST profile collapses onto the universal law of the wall (sublayer + log law + wake). The residual ~9% Cf offset vs the empirical correlations sits within their own 5–10% mutual scatter and the resolved near-leading-edge transition; the law-of-the-wall collapse is the stronger verification.
NACA0012 — lift generation. Angle-of-attack polar by freestream rotation (wind-axis forces); lift-curve slope 0.1037/deg, within 2.2% of experiment and ~5% below the ideal 2π/rad — the physically correct thickness/viscous deficit. The slope is incidence-independent, so the mesh's built-in geometric offset (recovered as a −1.4° zero-lift angle) doesn't affect the verification; the reference area uses the measured ~35-chord, not unit chord.
Dam break — the gate-release artifact is physics, not error. The CFD releases the column instantaneously; the experiment's diaphragm removal takes finite time, so the raw front leads the measurement at early T. The literature-standard +0.175 dimensionless time shift (used identically by the Lethe benchmark) brings every digitized Martin & Moyce point within 8.1%. Both raw and corrected metrics are gated in the regression test, and the uniform mesh is sized so the column edges fall exactly on cell faces — the initial water volume matches the analytic column to five digits and drifts by only 6×10−7 over the run.
Wave-excited body — overset retires the morphing collapse. The deforming-mesh attempt floats perfectly through the calm ramp and dies at first wave arrival — a waterline corner cell is sheared to zero volume (deltaCoeffs FPE), reproducibly. Moving the body on a rigid overset component mesh eliminates the failure structurally: no cell ever deforms. The heave RAO then lands within 1.7% of the long-wave wave-follower limit, with the incident amplitude taken from a Goda–Suzuki split over upstream gauges — minus one gauge whose sample ray sits bit-exactly on a cell face and double-counts columns (detected by a mean-level guard and excluded in the open, the same class of lesson as the Kleefsman density-aware probes). Two more portability facts: sixDoFRigidBodyState FATALs under the overset mesh class (the body state is parsed from the solver log), and the parallel decomposition must keep the overset region inside one slab — a straddling boundary ran ~6× slower per cell.
Wave tank — the near-field is physics, not error. The gauge 0.35 wavelengths from the wavemaker reads +8% on wave height: generation carries evanescent modes that decay within about a wavelength, so wave-quality gates apply from x ≥ 8 m (standard NWT practice). In the established region the height holds within 4.7% with 1% boundary reflection — the absorption quality that makes long screening runs affordable.
Floating body — the period offset is the added mass. The measured heave period exceeds the waterplane-stiffness value by 18%; solving for the added mass gives Ca ≈ 0.39, inside the published range for rectangular sections. A solver that missed the radiation/added-mass physics would land on the hydrostatic period — the offset is gated as a physical band, not hidden as an error. Heave-only constraints turn the tutorial into a clean 1-DOF decay benchmark.
Kleefsman impact — official data, density-aware sensors. The geometry and every experimental trace come from the official SPHERIC Test 2 distribution (no hand digitizing), and the P2 impact peak lands within 1.5% on half the Kleefsman grid. The pressure probes are placed half a local cell off the box faces by the builder — a fixed offset valid at one resolution sits inside the carved obstacle at another (caught by running the coarse variant; regression-tested). Impact peaks keep the standard 20% band: P1's first-millisecond spike is near-singular and was smoothed even by the original 1.2M-cell VOF study.

5  Reproduce

Each report links to a reproducible OpenFOAM case under cases/ (flat_plate_blasius, cylinder_re100, turbulent_flat_plate, naca0012_polar, dam_break, wave_tank, floating_body_decay, kleefsman_impact, wave_excited_body) with a generator script and a README. Reproduction requires a solver-capable host; check readiness first with openfoam doctor.

6  Provenance & roadmap

This suite is part of the digitalmodel CFD epic #1161, covering the foundational verification cases #1167 (flat plate) and #1166 (cylinder), the first turbulent case #1168 (turbulent flat plate, k-ω SST), and the first lift-generating case #1174 (NACA0012 airfoil, Spalart-Allmaras), and the first free-surface case #1165 (dam break, interFoam VOF), the wave-generation gate #1170 (StokesII numerical wave tank), the first moving-body case #1169 (floating-body heave decay, sixDoFRigidBodyMotion) and the first wave-body interaction case #1302 (wave-excited floating body, overset), and the ballast-tank sloshing campaign #1429/#1433 (free decay across fills, forced-roll resonance, amplitude backbone, SPHERIC pressure validation — see the 2D CFD study) — now done. Remaining work: