Anvil: An integration of artificial intelligence, sampling techniques, and a combined CAD-CFD tool
Harsh Vardhan, Umesh Timalsina, Michael Sandborn, David Hyde, Peter Volgyesi, Janos Sztipanovits
TL;DR
Anvil addresses the need for an open-source, automated CAD-CFD workflow for shape optimization in subsonic flows by integrating FreeCAD for CAD modeling, OpenFOAM for CFD, and Bayesian optimization within a Python-driven toolchain. It enables three operational modes—data generation, CFD evaluation, and optimization—using a parametric CAD seed design expressed in a configuration JSON, with meshing via auto-refinement and turbulence modeled by Reynolds-averaged Navier–Stokes with the $k$-$\omega$ SST model. The authors demonstrate Anvil through CFD studies of UUV, land vehicles, UAVs, as well as an underwater hull optimization and winged-air-vehicle data generation, highlighting its end-to-end automation and sample-efficient design exploration. The work advances accessible, efficient, open-source design optimization workflows for subsonic engineering problems and outlines clear directions for extending to higher speeds and enhanced numerical validation.
Abstract
In this work, we introduce an open-source integrated CAD-CFD tool, Anvil, which combines FreeCAD for CAD modeling and OpenFOAM for CFD analysis, along with an AI-based optimization method (Bayesian optimization) and other sampling algorithms. Anvil serves as a scientific machine learning tool for shape optimization in three modes: data generation, CFD evaluation, and shape optimization. In data generation mode, it automatically runs CFD evaluations and generates data for training a surrogate model. In optimization mode, it searches for the optimal design under given requirements and optimization metrics. In CFD mode, a single CAD file can be evaluated with a single OpenFOAM run. To use Anvil, experimenters provide a JSON configuration file and a parametric CAD seed design. Anvil can be used to study solid-fluid dynamics for any subsonic flow conditions and has been demonstrated in various simulation and optimization use cases. The open-source code for the tool, installation process, artifacts (such as CAD seed designs and example STL models), experimentation results, and detailed documentation can be found at \url{https://github.com/symbench/Anvil}.
