AI copilot runs computational fluid dynamics from plain-language commands
SciOpen
image: A user's plain-language command, “Simulate 30P-30N airfoil”, is handled by CFD-copilot, which plans and tracks the simulation tasks while generating the underlying OpenFOAM configuration. The framework lets engineers launch and analyze simulations without manually writing input files.
Credit: Chinese Journal of Aeronautics
Computational fluid dynamics (CFD) is essential for aircraft design, aerodynamic analysis, and many other engineering applications. Yet using CFD software still requires expertise in physics modeling, numerical methods, boundary conditions, and case-specific configuration files. This steep learning curve can keep non-specialists from taking full advantage of high-fidelity simulations.
In a recent study in Chinese Journal of Aeronautics (https://doi.org/10.1016/j.cja.2026.104321), researchers from Peking University introduced CFD-copilot, a natural-language-driven framework that automates CFD workflows from case setup to post-processing. Instead of manually editing input files and calling separate analysis tools, users describe simulation and analysis tasks in plain language. The framework translates those requests into executable CFD configurations, runs simulations, corrects errors when needed, and extracts or visualizes results.
The system combines three major components. First, it uses a domain-adapted large language model to generate OpenFOAM configurations. The team fine-tuned a Qwen3-8B model with LoRA on the NL2FOAM dataset, which contains 49,205 pairs mapping natural-language descriptions, mesh files, and input templates to OpenFOAM setups. This adaptation helps the model learn CFD-specific rules rather than relying only on general programming ability.
Second, CFD-copilot organizes simulation through a multi-agent loop. A pre-checker inspects inputs and mesh files; a generator produces the OpenFOAM configuration; a runner executes the simulation; and a corrector analyzes error logs and guides revisions. This loop reduces manual debugging and makes automated setup more robust.
Third, the framework introduces a Model Context Protocol (MCP)-enabled post-processing layer. The MCP server hosts more than 100 OpenFOAM-derived tools, including functions for force coefficients, vorticity, streamlines, and surface sampling. The language-model client interprets a request, selects the proper tool, fills in parameters, and calls the server. New tools can be added simply by placing them on the server, without modifying the client or retraining the model.
The researchers evaluated CFD-copilot on three aerodynamic benchmarks excluded from the fine-tuning dataset: the 2D NACA 0012 airfoil, the three-element 30P-30N high-lift airfoil, and the 3D Ahmed body. For NACA 0012, the framework achieved an average success rate of 52.86%, with velocity and pressure-field accuracies of 96.41% and 93.22%. It also generated pressure coefficient distributions, lift coefficient curves, and streamline visualizations from natural-language prompts.
For the more complex 30P-30N airfoil, CFD-copilot obtained a converged automated result with velocity and pressure-field accuracies of 93.14% and 88.44%, and a lift coefficient relative error of 2.58%. The MCP workflow handled multi-surface pressure sampling over the slat, main element, and flap, and produced streamline and vorticity visualizations showing gap acceleration and wake merging. In the 3D Ahmed body case, the framework generated results suitable for post-processing and visualized wake-related vortical structures through a simple natural-language instruction.
“By reducing reliance on domain-specific syntax and manual setup, CFD-copilot lowers the barrier to entry and allows operators to focus on the scientific objectives of their analysis rather than the intricacies of implementation,” the authors write.
Looking ahead, the team plans to expand the training data to cover moving geometries, compressible flows, multiphase flows, and adaptive mesh refinement. They also aim to explore reinforcement learning strategies that use simulation convergence and physical consistency as feedback for numerical-parameter configuration. The long-term goal is to let engineers focus on scientific questions and design decisions, while AI agents handle configuration, execution, and analysis. The code and fine-tuned model are openly available at github.com/YYgroup/AutoCFD.
Original Source
Zhehao Dong, Shanghai Du, Zhen Lu, Yue Yang. CFD-copilot: Leveraging domain-adapted large language model and model context protocol to enhance simulation automation[J]. Chinese Journal of Aeronautics, 2026, 39(9):104321, https://doi.org/10.1016/j.cja.2026.104321.
About Chinese Journal of Aeronautics
Chinese Journal of Aeronautics (CJA) is an open access, peer-reviewed international journal covering all aspects of aerospace engineering, monthly published by Elsevier. The Journal reports the scientific and technological achievements and frontiers in aeronautic and astronautic engineering, in both theory and practice. CJA is indexed in SCI (IF =6.9, Q1), EI, IAA, AJ, CSA, Scopus.
Disclaimer: AAAS and EurekAlert! are not responsible for the accuracy of news releases posted to EurekAlert! by contributing institutions or for the use of any information through the EurekAlert system.