OpenFOAMGPT: a RAG-Augmented LLM Agent for OpenFOAM-Based Computational Fluid Dynamics
arXiv:2501.06327 · doi:10.1063/5.0257555
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) pipeline, demonstrating how preexisting simulation setups can further specialize the agent for sub-domains such as energy and aerospace. Despite the great performance of the agent, human oversight remains crucial for ensuring accuracy and adapting to shifting contexts. Fluctuations in model performance over time suggest the need for monitoring in mission-critical applications. Although our demonstrations focus on OpenFOAM, the adaptable nature of this framework opens the door to developing LLM-driven agents into a wide range of solvers and codes. By streamlining CFD simulations, this approach has the potential to accelerate both fundamental research and industrial engineering advancements.
References in corpus (17)
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Turbulence Modeling in the Age of Data
- Enhancing Computational Fluid Dynamics with Machine Learning
- A Comprehensive Physics-Informed Machine Learning Framework for Predictive Turbulence Modeling
- Physics-Informed Machine Learning Approach for Augmenting Turbulence Models: A Comprehensive Framework
- Deep Neural Networks for Data-Driven Turbulence Models
- Information transfer between turbulent boundary layer and porous media
- Toward Discretization-Consistent Closure Schemes for Large Eddy Simulation Using Reinforcement Learning
- Evaluation of OpenAI o1: Opportunities and Challenges of AGI
- LLM and Simulation as Bilevel Optimizers: A New Paradigm to Advance Physical Scientific Discovery
- AtomAgents: Alloy design and discovery through physics-aware multi-modal multi-agent artificial intelligence
- Pre-Trained Large Language Models for Industrial Control
- Prompt a Robot to Walk with Large Language Models
- FLUID-LLM: Learning Computational Fluid Dynamics with Spatiotemporal-aware Large Language Models
- Rapid and Automated Alloy Design with Graph Neural Network-Powered LLM-Driven Multi-Agent Systems
- Using Large Language Models for Parametric Shape Optimization
Cited by in corpus (6)
- Fine-tuning a Large Language Model for Automating Computational Fluid Dynamics Simulations
- A Status Quo Investigation of Large Language Models towards Cost-Effective CFD Automation with OpenFOAMGPT: ChatGPT vs. Qwen vs. Deepseek
- Large Language Model Driven Development of Turbulence Models
- ChatCFD: An LLM-Driven Agent for End-to-End CFD Automation with Structured Knowledge and Reasoning
- CFDagent: A Language-Guided, Zero-Shot Multi-Agent System for Complex Flow Simulation
- Foam-Agent: A Large Language Model-Based Multi-Agent Framework for Automating Computational Fluid Dynamics Workflows