Table of Contents
Fetching ...

CFD-copilot: leveraging domain-adapted large language model and model context protocol to enhance simulation automation

Zhehao Dong, Shanghai Du, Zhen Lu, Yue Yang

TL;DR

CFD-copilot proposes a domain-adapted LLM and MCP-based post-processing to enable end-to-end, natural language–driven CFD automation. A four-agent setup automates setup while a modular MCP server enables scalable, tool-agnostic post-processing. Experimental results on NACA 0012 and the 30P-30N high-lift configuration show meaningful gains in automation reliability for simpler cases and highlight limitations for complex geometries, where larger LLMs underperform. The framework lowers CFD entry barriers by abstracting solver details and enabling language-driven data extraction and visualization, with future work targeting solver-parameter optimization via reinforcement learning.

Abstract

Configuring computational fluid dynamics (CFD) simulations requires significant expertise in physics modeling and numerical methods, posing a barrier to non-specialists. Although automating scientific tasks with large language models (LLMs) has attracted attention, applying them to the complete, end-to-end CFD workflow remains a challenge due to its stringent domain-specific requirements. We introduce CFD-copilot, a domain-specialized LLM framework designed to facilitate natural language-driven CFD simulation from setup to post-processing. The framework employs a fine-tuned LLM to directly translate user descriptions into executable CFD setups. A multi-agent system integrates the LLM with simulation execution, automatic error correction, and result analysis. For post-processing, the framework utilizes the model context protocol (MCP), an open standard that decouples LLM reasoning from external tool execution. This modular design allows the LLM to interact with numerous specialized post-processing functions through a unified and scalable interface, improving the automation of data extraction and analysis. The framework was evaluated on benchmarks including the NACA~0012 airfoil and the three-element 30P-30N airfoil. The results indicate that domain-specific adaptation and the incorporation of the MCP jointly enhance the reliability and efficiency of LLM-driven engineering workflows.

CFD-copilot: leveraging domain-adapted large language model and model context protocol to enhance simulation automation

TL;DR

CFD-copilot proposes a domain-adapted LLM and MCP-based post-processing to enable end-to-end, natural language–driven CFD automation. A four-agent setup automates setup while a modular MCP server enables scalable, tool-agnostic post-processing. Experimental results on NACA 0012 and the 30P-30N high-lift configuration show meaningful gains in automation reliability for simpler cases and highlight limitations for complex geometries, where larger LLMs underperform. The framework lowers CFD entry barriers by abstracting solver details and enabling language-driven data extraction and visualization, with future work targeting solver-parameter optimization via reinforcement learning.

Abstract

Configuring computational fluid dynamics (CFD) simulations requires significant expertise in physics modeling and numerical methods, posing a barrier to non-specialists. Although automating scientific tasks with large language models (LLMs) has attracted attention, applying them to the complete, end-to-end CFD workflow remains a challenge due to its stringent domain-specific requirements. We introduce CFD-copilot, a domain-specialized LLM framework designed to facilitate natural language-driven CFD simulation from setup to post-processing. The framework employs a fine-tuned LLM to directly translate user descriptions into executable CFD setups. A multi-agent system integrates the LLM with simulation execution, automatic error correction, and result analysis. For post-processing, the framework utilizes the model context protocol (MCP), an open standard that decouples LLM reasoning from external tool execution. This modular design allows the LLM to interact with numerous specialized post-processing functions through a unified and scalable interface, improving the automation of data extraction and analysis. The framework was evaluated on benchmarks including the NACA~0012 airfoil and the three-element 30P-30N airfoil. The results indicate that domain-specific adaptation and the incorporation of the MCP jointly enhance the reliability and efficiency of LLM-driven engineering workflows.

Paper Structure

This paper contains 13 sections, 10 figures, 2 tables.

Figures (10)

  • Figure 1: The framework of CFD-copilot. The workflow progresses from user input through a pre-checker, LLM-based generation of input files, simulation execution by the runner, and an iterative error correction loop involving the corrector. Upon successful simulation completion, the post-processor extracts and visualizes flow fields based on natural language instructions, enabling direct access to numerical results and high-fidelity visualizations.
  • Figure 2: Architecture of the MCP system in the Post-processor. The MCP server hosts over 100 tool functions derived from the official OpenFOAM library, including utilities for calculating force coefficients, vorticity, and streamlines. The MCP client facilitates communication between the LLM and the server, enabling the execution of post-processing tasks and result visualization through natural language commands.
  • Figure 3: An example MCP server tool for computing force coefficients in OpenFOAM.
  • Figure 4: NACA 0012 airfoil mesh.
  • Figure 5: Automation performance of the CFD-copilot framework on the NACA 0012 airfoil across different AoA. Bar chart shows success rate (%), average correction iterations, and total token consumption ($\times 10^3$).
  • ...and 5 more figures