Saved in:
Bibliographic Details
Main Authors: Dong, Zhehao, Lu, Zhen, Yang, Yue
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2504.09602
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909976531828736
author Dong, Zhehao
Lu, Zhen
Yang, Yue
author_facet Dong, Zhehao
Lu, Zhen
Yang, Yue
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2504_09602
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Fine-tuning a Large Language Model for Automating Computational Fluid Dynamics Simulations
Dong, Zhehao
Lu, Zhen
Yang, Yue
Fluid Dynamics
Artificial Intelligence
Computation and Language
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.
title Fine-tuning a Large Language Model for Automating Computational Fluid Dynamics Simulations
topic Fluid Dynamics
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2504.09602