A Preliminary Assessment of Coding Agents for CFD Workflows
Ke Xiao, Haoze Zhang, Yangchen Xu, Runze Mao, Han Li, Zhi X. Chen
TL;DR
The paper investigates tool-using coding agents to automate OpenFOAM CFD workflows, proposing a lightweight prompt strategy that prioritizes tutorial reuse and log-driven repair to achieve end-to-end execution. Evaluated on FoamBench-Advanced, the approach demonstrates dramatic gains in completion and stability for tutorial-derivative tasks, while stronger LLMs like GPT-5.2 substantially improve mesh generation for obstacle flows. The results indicate that coding agents can automate substantial portions of CFD pipelines with minimal configuration, yet geometry, meshing, and complex 3D/physics regimes still require human oversight and further study. Overall, coding agents hold practical potential to streamline CFD workflows, with tangible benefits for 2D and tutorial-like tasks and clear directions for extending to more demanding simulations.
Abstract
We investigate the use of tool-using coding agents to automate end-to-end workflows in the open-source CFD package OpenFOAM. Building on general-purpose coding agent interfaces, we introduce a lightweight configuration that guides an agent toward tutorial reuse and log-driven repair to improve case setup and execution. We evaluate this approach on the FoamBench-Advanced benchmark, covering both tutorial-derivative and planar 2D obstacle-flow tasks. For tutorial-derivative cases, prompt guidance dramatically increases execution completion rates and reduces unnecessary tool calls. For obstacle-flow cases, stronger language models such as GPT-5.2 markedly improve mesh generation and overall task completion compared to earlier models. Our findings show that coding agents can correctly execute a range of CFD simulations with minimal configuration and that model capability significantly influences performance on tasks requiring geometry and mesh creation. These results suggest that coding agents have practical utility for automating portions of CFD workflows while highlighting areas that require further investigation.
