OpenFOAMGPT: a RAG-Augmented LLM Agent for OpenFOAM-Based Computational Fluid Dynamics
Sandeep Pandey, Ran Xu, Wenkang Wang, Xu Chu

TL;DR
OpenFOAMGPT is a novel LLM-based agent that enhances OpenFOAM CFD simulations through retrieval-augmented generation, enabling complex task handling, domain specialization, and efficient multi-scenario addressing, with human oversight remaining essential.
Contribution
This work introduces a RAG-augmented LLM agent tailored for OpenFOAM CFD, demonstrating improved performance and adaptability across diverse engineering tasks.
Findings
Superior performance of GPT-4o in complex CFD tasks
Effective domain-specific specialization via retrieval-augmented generation
Efficient convergence in multi-phase flow and heat transfer simulations
Abstract
This work presents a large language model (LLM)-based agent OpenFOAMGPT tailored for OpenFOAM-centric computational fluid dynamics (CFD) simulations, leveraging two foundation models from OpenAI: the GPT-4o and a chain-of-thought (CoT)-enabled o1 preview model. Both agents demonstrate success across multiple tasks. While the price of token with o1 model is six times as that of GPT-4o, it consistently exhibits superior performance in handling complex tasks, from zero-shot case setup to boundary condition modifications, turbulence model adjustments, and code translation. Through an iterative correction loop, the agent efficiently addressed single- and multi-phase flow, heat transfer, RANS, LES, and other engineering scenarios, often converging in a limited number of iterations at low token costs. To embed domain-specific knowledge, we employed a retrieval-augmented generation (RAG)…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
