用微调的智能体模型自动完成有限元分析全流程。
ALL-FEM: Agentic Large Language models Fine-tuned for Finite Element Methods
- 用领域微调的AI智能体生成、调试并可视化有限元代码。
- 在39个基准测试中实现71.79%的代码成功率,优于非智能体方案。
- 适合工程仿真人员快速构建复杂物理系统的自动化求解流程。
有限元分析是几乎所有制造品设计与验证的核心,支撑从固体、流体到多物理场系统的仿真。然而,编写有限元代码并分析结果需掌握数值分析、连续介质力学和编程等多领域知识。传统大语言模型虽可生成代码,但常出现幻觉、忽视变分结构,无法闭环完成从问题描述到验证解的全过程。本文提出ALL-FEM,一个融合代理式AI与领域微调大模型的自主仿真系统,支持在固体力学、流体及多物理场场景下生成FEniCS代码。我们构建了超1000个经验证的FEniCS脚本语料库,结合500多个专家代码与检索增强的多模型生成-筛选管道,覆盖多种偏微分方程、几何形状与边界条件。基于该语料库,对3B至120B参数的模型进行微调。我们的代理框架调度多个专用智能体,由微调模型驱动,实现问题建模为偏微分方程、代码生成与调试、结果可视化。在39个基准测试中评估,涵盖线性/非线性弹性、塑性、牛顿/非牛顿流动、热流体、流固耦合、相分离及移动域上的输运问题。嵌入多智能体工作流并引入运行时反馈,最佳模型(GPT OSS 120B)达到71.79%的代码级成功率,显著优于非代理部署的GPT 5 Thinking。结果表明,通过智能体架构协调的小型微调模型即可实现有限元工作流的自动化,为计算科学与工程中的自主仿真系统提供可行范式。
原文摘要 · Abstract (English)
Finite element (FE) analysis guides the design and verification of nearly all manufactured objects. It is at the core of computational engineering, enabling simulation of complex physical systems, from fluids and solids to multiphysics systems. However, implementing FE codes and analyzing simulation results demands expertise across numerical analysis, continuum mechanics, and programming. Conventional Large Language Models (LLMs) can generate FE code, but they hallucinate, lack awareness of variational structures, and cannot close the loop from problem statement to a verified solution. Here, we propose ALL-FEM, an autonomous simulation system that integrates agentic AI with domain-specific, fine-tuned LLMs for FEniCS code generation across solid, fluid, and multiphysics applications. We construct a corpus of 1000+ verified FEniCS scripts by combining 500+ curated expert codes with a retrieval-augmented, multi-LLM pipeline that generates and filters codes for diverse PDEs, geometries, and boundary conditions. We used the corpus to fine-tune LLMs with 3B to 120B parameters. Our agentic framework orchestrates specialized agents, powered by fine-tuned LLMs, to formulate problems as PDEs, generate and debug code and visualize the results. We evaluated the system on 39 benchmarks that include problems of linear/nonlinear elasticity, plasticity, Newtonian/non-Newtonian flow, thermofluids, fluid-structure interaction, phase separation, and transport on moving domains. Embedded in a multi-agent workflow with runtime feedback, the best fine-tuned model (GPT OSS 120B) achieves code-level success of 71.79%, outperforming a non-agentic deployment of GPT 5 Thinking. By showing that relatively small, fine-tuned LLMs, orchestrated through agentic frameworks, can automate FE workflows, ALL-FEM offers a blueprint for autonomous simulation systems in computational science and engineering.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。