arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.06327physics.flu-dynphysics.comp-ph
收藏

OpenFOAMGPT:一种基于检索增强生成的LLM代理,用于基于OpenFOAM的计算流体力学

OpenFOAMGPT: a RAG-Augmented LLM Agent for OpenFOAM-Based Computational Fluid Dynamics

Technische Universität Ilmenau(伊尔梅瑙工业大学);University of Stuttgart(斯图加特大学);Beihang University(北京航空航天大学);University of Exeter(埃克塞特大学)

Sandeep Pandey, Ran Xu, Wenkang Wang, Xu Chu

AI总结:

OpenFOAMGPT是一种基于检索增强生成的LLM代理,用于优化OpenFOAM的CFD模拟,通过高效处理复杂任务提升工程应用效率。

摘要:

本文介绍了一种基于大型语言模型(LLM)的代理OpenFOAMGPT,专门针对以OpenFOAM为核心的计算流体力学(CFD)模拟。该代理利用了来自OpenAI的两个基础模型:GPT-4o和一个支持链式推理(CoT)的o1预览模型。两个代理在多个任务上均表现出色。尽管o1模型的token价格是GPT-4o的六倍,但其在处理复杂任务时始终表现出色,从零样本案例设置到边界条件修改、湍流模型调整和代码翻译。通过迭代纠正循环,该代理高效地处理了单相和多相流动、热传递、RANS、LES及其他工程场景,通常在少量迭代中收敛,且在低token成本下表现良好。为了嵌入领域特定知识,我们采用了检索增强生成(RAG)管道,展示了如何利用已有的模拟设置进一步专门化代理,以适应如能源和航空航天等子领域。尽管代理性能优异,但人类监督仍至关重要,以确保准确性和适应不断变化的环境。模型性能随时间波动表明,在关键应用中需要监控。虽然我们的演示集中在OpenFOAM上,但该框架的适应性为开发LLM驱动的代理进入广泛的求解器和代码领域打开了大门。通过简化CFD模拟,这种方法有潜力加速基础研究和工业工程的进步。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑