[Paper Review] Reproducible and replicable CFD: it's harder than you think
This paper demonstrates that achieving reproducible and replicable computational fluid dynamics (CFD) is far more challenging than assumed, even with open-source code and rigorous practices. Through a three-year replication study using three different CFD codes—OpenFOAM, IBAMR, and PetIBM—the authors identify critical sources of variability in meshing, boundary conditions, linear solvers, and parallel computing, showing that identical physical setups can yield divergent results due to implementation differences, even when parameters are identical.
Completing a full replication study of our previously published findings on bluff-body aerodynamics was harder than we thought. Despite the fact that we have good reproducible-research practices, sharing our code and data openly. Here's what we learned from three years, four CFD codes and hundreds of runs.
Motivation & Objective
- To rigorously replicate previously published CFD results on snake aerodynamics using multiple open-source solvers.
- To investigate why reproducibility in computational fluid dynamics remains elusive despite open science practices.
- To identify and document hidden sources of variability in CFD simulations beyond code and data sharing.
- To advocate for more rigorous standards in computational science, including reproducible workflows and transparent reporting of negative results.
Proposed method
- Replicated a prior 2D immersed boundary method simulation of snake aerodynamics using three distinct CFD codes: OpenFOAM, IBAMR, and PetIBM.
- Employed structured Cartesian meshes (original cuIBM), unstructured triangular meshes (GMSH), and adaptive Cartesian meshes (SnappyHexMesh) to assess mesh sensitivity.
- Used identical geometric models, boundary conditions, and flow parameters (Reynolds number, angle of attack) across all codes.
- Implemented full workflow automation using Docker containers, Jupyter notebooks, and scripted post-processing to ensure reproducibility of the entire pipeline.
- Conducted convergence studies on grid resolution, time step, and iterative solver tolerance to assess solution independence.
- Compared results across codes, focusing on lift coefficients, vorticity fields, and wake structures to detect discrepancies.
Experimental results
Research questions
- RQ1To what extent can previously published CFD results be replicated using different open-source solvers with identical input parameters?
- RQ2How do differences in mesh generation, particularly structured vs. unstructured meshes, affect the physical fidelity and stability of CFD simulations?
- RQ3What role do linear solvers and their convergence criteria play in introducing variability in CFD results, even when tolerance values are set identically?
- RQ4How do parallelization and distributed-memory execution affect the reproducibility of unsteady, chaotic fluid flows?
- RQ5Why do seemingly minor implementation differences—such as mesh generator choice or solver library—lead to unphysical artifacts like spurious vortices?
Key findings
- Spurious vortices appeared in OpenFOAM simulations using GMSH-generated unstructured meshes, despite passing standard mesh quality checks, indicating that mesh topology and element quality significantly impact simulation stability.
- Switching to SnappyHexMesh eliminated unphysical vortices, demonstrating that mesh generation tools and their output quality are critical to simulation reliability.
- Different linear algebra libraries (e.g., PETSc vs. OpenFOAM’s internal solvers) produced divergent convergence behavior even with identical tolerance settings, due to differing residual definitions and stopping criteria.
- Parallel execution introduced rounding errors that accumulated across processors, leading to small but measurable differences in solution fields, especially in long-time unsteady simulations.
- Replication required extensive tuning of boundary conditions and solver parameters across codes, revealing that 'identical' setups are not equivalent across different software stacks.
- The study concluded that reproducibility in CFD demands more than sharing code and data—it requires full, automated, and version-controlled workflows, including environment and dependency management.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.