FoamBench: CFD & OpenFOAM Benchmark
- FoamBench is a benchmark framework for VoF-based two-phase CFD and OpenFOAM workflow automation, emphasizing interface transport and capillary dynamics.
- It standardizes tests for surface-tension driven flows using canonical cases and metrics such as L1 shape error and parasitic current measurements.
- The framework promotes reproducible comparisons among solvers and language models by providing open input data, Jupyter notebooks, and uniform evaluation protocols.
FoamBench denotes a benchmark framework for computational fluid dynamics, but the term is used in two distinct senses in the arXiv literature. In its earlier and more physically grounded usage, FoamBench is a reusable benchmark suite for surface-tension-driven incompressible two-phase flows formulated with the Volume-of-Fluid (VoF) method, introduced to enable direct quantitative comparison of VoF implementations under common canonical tests, metrics, meshes, and post-processing (Lippert et al., 2022). In later work on language-model evaluation for CFD, FoamBench is reused as the OpenFOAM-centric component of CFDLLMBench, where it measures whether a model can synthesize, execute, and validate complete OpenFOAM cases from natural-language prompts (Somasekharan et al., 19 Sep 2025). The shared name reflects a benchmarking function, but the underlying objects, tasks, and success criteria are different.
1. Origin, purpose, and scope
In the sense established by "A benchmark for surface-tension-driven incompressible two-phase flows" (Lippert et al., 2022), FoamBench was proposed because many VoF methods are available in commercial and open-source software, yet stable and accurate handling of small-scale capillary flows remains challenging and fair comparison is difficult without common test conditions. Its purpose is to provide a common, quantitative basis for comparing different VoF implementations, especially with respect to interface advection and capillary or surface-tension-dominated dynamics (Lippert et al., 2022).
The benchmark is explicitly aimed at methods discretizing the two-phase Navier–Stokes equations in a one-fluid formulation. The paper states that the publicly available input data, secondary benchmark data, and post-processing notebooks can be reused by any two-phase flow simulation method that discretizes the same continuum model in a one-fluid formulation (Lippert et al., 2022). This makes FoamBench not a solver, but a reproducible experimental and analytical framework for solver comparison.
A later and distinct usage appears in "CFDLLMBench: A Benchmark Suite for Evaluating LLMs in Computational Fluid Dynamics" (Somasekharan et al., 19 Sep 2025). There, FoamBench is the part of a larger suite intended to test whether a LLM can move beyond CFD theory and isolated code synthesis into OpenFOAM workflow automation. In that setting, FoamBench evaluates generation of complete case setups that execute successfully and produce physically accurate results (Somasekharan et al., 19 Sep 2025). The 2026 assessment of coding agents adopts the same meaning and focuses specifically on FoamBench-Advanced (Xiao et al., 12 Feb 2026).
This suggests that "FoamBench" should be treated as a polysemous benchmark label rather than a single invariant artifact.
2. One-fluid VoF formulation and governing quantities
In the two-phase-flow benchmark, FoamBench is built on the standard one-fluid formulation of incompressible two-phase Navier–Stokes flow (Lippert et al., 2022). The phase indicator is defined as
From this indicator, the benchmark defines the mixture density and viscosity by
Incompressibility is enforced through
and the momentum balance is written as
with the surface-tension force represented as
Within the VoF discretization, the cell-wise phase fraction is
and its exact transport form is
These definitions matter because FoamBench is not merely a collection of test geometries. It is tied to a specific continuum formulation, so that differences in benchmark outcomes can be interpreted as differences in interface transport, curvature reconstruction, and coupling between pressure and surface-tension forcing, rather than as differences in physical modeling assumptions (Lippert et al., 2022).
3. Benchmark families, canonical problems, and diagnostic metrics
The two-phase-flow FoamBench contains two main families of tests: convection tests and hydrodynamic/capillary tests (Lippert et al., 2022). The convection family isolates VoF transport accuracy independently of surface tension. It includes a 2D sphere/disc in diagonal flow, a 2D sphere in vortex flow, and a 3D sphere in vortex flow. In each case the flow is reversed halfway through the simulation, so the interface should ideally return to its initial state (Lippert et al., 2022).
For these advection tests, the benchmark uses the shape error
which measures how well the initial interface is restored after reversal (Lippert et al., 2022).
The hydrodynamic and capillary family is broader and addresses parasitic currents, droplet translation, capillary-wave dynamics, and oscillatory surface-tension phenomena. The cases are 2D stationary droplet, 3D stationary droplet, 2D translating droplet, 3D translating droplet, 2D oscillating capillary wave, and 3D oscillating droplet (Lippert et al., 2022). Three fluid pairings are used: water/air, Ravenol gear oil/air, and Novec 7500/water, spanning density ratios from about 1.6 to 838.8 and kinematic viscosity ratios from about 0.06 to 15.3 (Lippert et al., 2022).
Several quantitative diagnostics are defined. For stationary and translating droplets, FoamBench uses velocity and 0 errors,
1
with 2 for stationary droplets and 3 for translating droplets (Lippert et al., 2022). For capillary dynamics, the benchmark introduces the capillary time-step constraint
4
and, for the oscillating wave, the time-averaged relative amplitude error
5
The 3D oscillating droplet benchmark uses the analytical eigenmode solution
6
with
7
The benchmark structure therefore separates transport error from capillary-force error while preserving a common physical formulation. A plausible implication is that it can diagnose whether a method fails primarily in interface advection, in curvature estimation, or in pressure–surface-tension balance.
4. Compared solvers and main technical findings
FoamBench in the two-phase-flow sense compares six VoF implementations: OpenFOAM interFoam, OpenFOAM interIsoFoam, TwoPhaseFlow interFlow, Ansys Fluent, and Basilisk, with TwoPhaseFlow reported with both parabolic-fit curvature and an RDF-based curvature variant (Lippert et al., 2022). The comparison intentionally uses recommended default settings and avoids case-specific tuning, so the results reflect typical out-of-the-box behavior rather than solver-specific hand optimization (Lippert et al., 2022).
Across the convection tests, the paper reports that the geometric methods generally outperform the algebraic method interFoam, and that Basilisk and interIsoFoam typically produce the smallest shape error (Lippert et al., 2022). In the diagonal-flow and vortex cases, interFoam shows substantially larger deformation errors, which can become severe enough to compromise the physical fidelity of subsequent surface-tension calculations (Lippert et al., 2022).
For the hydrodynamic cases, the benchmark identifies surface tension modeling as the main bottleneck, especially for unstructured VoF methods in OpenFOAM and Fluent (Lippert et al., 2022). Basilisk, using height-function curvature on Cartesian grids, generally performs best in 2D, although the advantage is less consistent in 3D and depends on the fluid pairing (Lippert et al., 2022). The RDF/parabolic-fit approaches in TwoPhaseFlow can perform very well in some settings, and the paper notes that interFlow with RDF often yields among the smallest parasitic currents in stationary-droplet tests (Lippert et al., 2022).
An important conclusion is that no method is uniformly best across all cases, resolutions, and fluid combinations (Lippert et al., 2022). Another is that higher resolution does not always reduce measured error in hydrodynamic cases, because finer meshes can localize curvature errors and increase local velocity extrema (Lippert et al., 2022). This observation is significant because it complicates naive convergence narratives: in capillary-dominated flow, error behavior is strongly entangled with curvature reconstruction and discrete force balance.
The oscillating-wave and oscillating-droplet tests also reveal that initialization quality matters a great deal (Lippert et al., 2022). Fluent is specifically noted to use a comparatively rough "inside-out" initialization followed by smoothing, which can perturb early-time damping and frequency measurements (Lippert et al., 2022). The paper additionally notes that boundary conditions for 8 can materially affect results; for the oscillating wave, a TwoPhaseFlow-specific constantAlphaContactAngle boundary condition at 9 improved results relative to a standard zero-gradient treatment (Lippert et al., 2022).
5. Reproducibility, public artifacts, and methodological role
A defining feature of FoamBench is its packaging as a public, reusable benchmark package (Lippert et al., 2022). The benchmark inputs, secondary data, and post-processing notebooks are openly available via a TUDatalib data repository snapshot and a Bosch Research GitHub repository (Lippert et al., 2022). The use of Jupyter notebooks is central: the notebooks automate post-processing, produce benchmark plots and metrics, and make it straightforward to rerun the analysis on new solver outputs (Lippert et al., 2022).
This infrastructure gives FoamBench a methodological role beyond its original paper. Because other VoF implementations can submit results in the same format and compare against existing outputs with minimal additional work, FoamBench functions as a standardization layer for capillary-flow benchmarking (Lippert et al., 2022). It is intended for researchers and developers working on VoF-based one-fluid discretizations for incompressible two-phase flows, especially those involving surface tension, capillary waves, droplet dynamics, and parasitic currents (Lippert et al., 2022).
This suggests that FoamBench is best understood not only as a set of canonical cases but as a reproducibility protocol: common initial conditions, common meshes, common post-processing, and common error definitions are all part of the benchmark object.
6. Reuse of the name in LLM-for-CFD benchmarking
A distinct benchmark called FoamBench appears in the 2025 CFDLLMBench paper (Somasekharan et al., 19 Sep 2025). There, FoamBench is defined as the OpenFOAM-centric component of a broader benchmark suite comprising CFDQuery, CFDCodeBench, and FoamBench (Somasekharan et al., 19 Sep 2025). Its purpose is to evaluate whether a model can generate complete OpenFOAM case setups that execute successfully and yield physically accurate results, rather than merely producing syntactically plausible files (Somasekharan et al., 19 Sep 2025).
This FoamBench is split into FoamBench Basic and FoamBench Advanced. FoamBench Basic contains 110 cases derived from 11 OpenFOAM tutorial problems, while FoamBench Advanced contains 16 hand-crafted cases created by CFD experts that are not tutorial variants and require more extrapolation (Somasekharan et al., 19 Sep 2025). The benchmark is described as covering more than 15 geometric and physics scenarios across 126 total OpenFOAM cases (Somasekharan et al., 19 Sep 2025).
Its evaluation protocol defines four component metrics: executability 0, folder-and-file structure 1, file similarity 2, and relative error 3, where
4
The NMSE score is then mapped by
5
The benchmark’s strict Success Rate counts only cases where both execution and physical accuracy succeed, that is, where 6 and 7 (Somasekharan et al., 19 Sep 2025).
The reported results show a large separation between superficial text similarity and operational success. In zero-shot prompting, the best model on FoamBench Basic achieves a Success Rate of 0.045, and on FoamBench Advanced the best zero-shot success is 0.007 (Somasekharan et al., 19 Sep 2025). The best-performing configuration uses Foam-Agent with RAG and Reviewer and Sonnet 3.5, reaching 0.336 on Basic and 0.250 on Advanced (Somasekharan et al., 19 Sep 2025). The benchmark also catalogues recurring failure modes: inconsistent patch definitions, missing files such as blockMeshDict or controlDict, undefined solver-specific keywords, numerical instability, and geometry or mesh errors (Somasekharan et al., 19 Sep 2025).
The 2026 paper "A Preliminary Assessment of Coding Agents for CFD Workflows" narrows the focus to FoamBench-Advanced and uses it to evaluate tool-using coding agents on OpenFOAM workflows (Xiao et al., 12 Feb 2026). It states that FoamBench-Advanced contains 16 expert-authored, non-tutorial cases, grouped in that paper into nine tutorial-derivative tasks and seven planar 2D obstacle-flow tasks (Xiao et al., 12 Feb 2026). In tutorial-derivative tasks, an OpenFOAM-focused prompt raises completion from 4/9 to 9/9, with average 8 and 9, and 7/9 cases achieving 0 (Xiao et al., 12 Feb 2026). For the harder obstacle-flow tasks, the paper reports that stronger models such as GPT-5.2 markedly improve geometry and mesh generation relative to weaker models (Xiao et al., 12 Feb 2026).
The later CFDLLMBench usage thus redefines FoamBench as a benchmark of workflow synthesis and execution in OpenFOAM, rather than a benchmark of VoF two-phase physics. The shared name should not obscure that distinction.
7. Conceptual significance and common misconceptions
A common misconception is that FoamBench denotes a single universally recognized benchmark. The published record instead supports two benchmark lineages. The earlier FoamBench is a VoF benchmark for incompressible two-phase flow with surface tension (Lippert et al., 2022). The later FoamBench is an OpenFOAM case-generation benchmark inside CFDLLMBench (Somasekharan et al., 19 Sep 2025, Xiao et al., 12 Feb 2026). These lineages differ in governing equations, task formulation, metrics, and intended users.
Another misconception is that the two-phase-flow FoamBench is primarily about runtime or parallel efficiency. The paper does not frame it that way. Its central concerns are interface transport accuracy, curvature and surface-tension fidelity, parasitic currents, and agreement with analytical or reference solutions (Lippert et al., 2022). Conversely, the CFDLLMBench FoamBench is not a physical solver benchmark in the traditional numerical-analysis sense; it is a benchmark of whether a model can assemble the file structure, dictionaries, geometry, and numerical settings needed for a valid OpenFOAM run (Somasekharan et al., 19 Sep 2025).
The coexistence of these meanings is also relevant to interpretation of adjacent literature. The 2025 robotics paper "Foam: A Tool for Spherical Approximation of Robot Geometry" explicitly notes that it does not define anything called “FoamBench” and that any benchmark-like interpretation would have to be inferred from its experimental evaluation rather than from a formal benchmark artifact (Coumar et al., 17 Mar 2025). This clarifies that the term is not a generic label for any evaluation involving "foam" software.
Taken together, the literature suggests two durable uses of the name. In numerical multiphase flow, FoamBench designates a reproducible framework for comparing VoF methods under capillary-dominated conditions (Lippert et al., 2022). In LLM-for-CFD research, it designates a practical benchmark for end-to-end OpenFOAM workflow automation (Somasekharan et al., 19 Sep 2025, Xiao et al., 12 Feb 2026).