arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.09602physics.flu-dyncs.AIcs.CL
收藏

针对计算流体力学模拟的大型语言模型微调

Fine-tuning a Large Language Model for Automating Computational Fluid Dynamics Simulations

State Key Laboratory for Turbulence and Complex Systems, College of Engineering, Peking University, Beijing 100871, China(湍流与复杂系统国家重点实验室,工程学院,北京大学,北京100871,中国);HEDPS-CAPT, Peking University, Beijing 100871, China(HEDPS-CAPT,北京大学,北京100871,中国)

Zhehao Dong, Zhen Lu, Yue Yang

AI总结:

通过微调领域特定LLM,实现从自然语言到CFD模拟配置的自动化,提升复杂工程流程的效率和准确性。

摘要:

配置计算流体力学(CFD)模拟通常需要大量的领域专业知识,限制了更广泛的应用。尽管大型语言模型(LLMs)在科学计算中有所发展,但其在自动化CFD工作流程中的应用仍不成熟。我们提出了一种以领域特定LLM适应为中心的新方法。通过在NL2FOAM数据集上微调Qwen2.5-7B-Instruct,该数据集包含28716个自然语言到OpenFOAM配置的配对数据,并带有链式思维(CoT)注释,我们能够实现从自然语言描述到可执行CFD设置的直接翻译。一个多代理框架协调整个过程,自动验证输入、生成配置、运行模拟并纠正错误。在包含21种不同流动案例的基准测试中,评估显示了最先进的性能,达到了88.7%的解决方案准确率和82.6%的一次尝试成功率。这显著优于更大的通用模型,如Qwen2.5-72B-Instruct、DeepSeek-R1和Llama3.3-70B-Instruct,同时还需要更少的纠正迭代次数,并保持较高的计算效率。结果突显了领域特定适应在部署LLM助手进行复杂工程工作流程中的关键作用。我们的代码和微调模型已存放在https://github.com/YYgroup/AutoCFD。

英文摘要:

Configuring computational fluid dynamics (CFD) simulations typically demands extensive domain expertise, limiting broader access. Although large language models (LLMs) have advanced scientific computing, their use in automating CFD workflows is underdeveloped. We introduce a novel approach centered on domain-specific LLM adaptation. By fine-tuning Qwen2.5-7B-Instruct on NL2FOAM, our custom dataset of 28716 natural language-to-OpenFOAM configuration pairs with chain-of-thought (CoT) annotations, we enable direct translation from natural language descriptions to executable CFD setups. A multi-agent framework orchestrates the process, autonomously verifying inputs, generating configurations, running simulations, and correcting errors. Evaluation on a benchmark of 21 diverse flow cases demonstrates state-of-the-art performance, achieving 88.7% solution accuracy and 82.6% first-attempt success rate. This significantly outperforms larger general-purpose models like Qwen2.5-72B-Instruct, DeepSeek-R1, and Llama3.3-70B-Instruct, while also requiring fewer correction iterations and maintaining high computational efficiency. The results highlight the critical role of domain-specific adaptation in deploying LLM assistants for complex engineering workflows. Our code and fine-tuned model have been deposited at https://github.com/YYgroup/AutoCFD.

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

↑