Abstract
This study investigates the current state of automating Computational Fluid Dynamics (CFD) using Large Language Models (LLMs) within the OpenFOAMGPT framework. We evaluate frontier models, including OpenAI's o1 and GPT-4o, alongside cost-effective alternatives such as Alibaba's Qwen 2.5-Max and DeepSeek V3. Our findings indicate that while high-end reasoning models excel in complex debugging, newer models from the Qwen and DeepSeek families offer a 100x cost reduction while maintaining competitive performance on standard engineering benchmarks. This suggests a viable path toward democratizing CFD through affordable, autonomous agentic workflows.
Introduction
Computational Fluid Dynamics (CFD) is an essential tool in modern engineering, yet software packages like OpenFOAM present a notoriously steep learning curve. The complexity arises from an intricate C++ architecture and the requirement for precise, text-based configuration files. While Large Language Models (LLMs) offer the potential to automate these workflows, the high cost of frontier models like OpenAI’s o1 has historically made the iterative "trial-and-error" nature of CFD debugging prohibitively expensive. This paper explores the "status quo" of LLM-driven CFD automation, seeking a cost-effective middle ground that does not sacrifice simulation accuracy.
Methodology: The OpenFOAMGPT Framework
To evaluate model performance, the researchers utilized OpenFOAMGPT, a multi-agent framework designed to orchestrate the entire CFD lifecycle. The architecture is composed of four primary modules:
- Builder: Interprets user queries and historical context to formulate an execution plan.
- Executor: Manages the reasoning process, querying the LLM to generate or modify configuration files.
- Interpreter: Translates the LLM’s natural language or code output into valid OpenFOAM dictionary files.
- OpenFOAM Runner: Executes the simulation and captures error logs. If a failure occurs, the logs are fed back into the loop for automated debugging.
In this investigation, Retrieval-Augmented Generation (RAG) was intentionally disabled to assess the pure zero-shot capabilities of the models, testing their innate understanding of fluid dynamics and OpenFOAM syntax.
Experimental Setup
The models were benchmarked against a diverse suite of CFD cases, including laminar flows (Cavity flow, 2D Cylinder), turbulent regimes (PitzDaily, Hotroom), multiphase simulations (Dambreak, Particle column, 2D rising bubble), and complex geometries (3D MotorBike, 2D NozzleFlow). This variety ensures a robust test of the models' ability to handle different physics and boundary conditions.
Results and The Cost-Efficiency Frontier
The most significant finding of this study is the emergence of a new cost-efficiency frontier. As shown in the pricing comparison, models like DeepSeek V3 and Qwen 2.5-Max provide a massive economic advantage over OpenAI's flagship models.
Key Performance Insights:
- Qwen 2.5-Max as the "Sweet Spot": Qwen 2.5-Max performed nearly on par with OpenAI o1 across several tasks. For instance, it successfully completed the "Bubble" case in 8 iterations at a total cost of just $0.25, whereas equivalent runs on o1 would be orders of magnitude more expensive.
- Reasoning vs. Scale: Reasoning-heavy models (like o1) consistently outperformed standard models (like GPT-4o) in debugging complex syntax errors. However, the study noted a "Sub-100B Wall," where models under 100 billion parameters (like QwQ-32B) struggled significantly with specialized engineering domains.
- Stability Concerns: While DeepSeek V3 is highly cost-effective, its API output was occasionally noted to be less stable than OpenAI’s offerings during high-complexity reasoning tasks.
Limitations and Future Outlook
Despite the progress in cost-effectiveness, several hurdles remain for full CFD automation:
- Context Window Constraints: Large CFD error logs can exceed the context limits of some models, hindering multi-step error correction.
- Multimodal Requirements: Current models lack the ability to "see" the mesh or geometry directly, relying instead on textual descriptions which can be ambiguous.
- Domain Specialization: The failure of smaller models suggests that general-purpose training is insufficient; there is a clear need for LLMs fine-tuned on engineering-specific corpora.
Conclusion
The investigation confirms that LLM-driven CFD automation is becoming financially viable for large-scale engineering projects. While expert oversight remains necessary for verifying complex boundary conditions and turbulence models, the 100x cost reduction offered by models like Qwen and DeepSeek marks a pivotal shift toward autonomous, accessible engineering simulation tools.
Summary updated