论文精选

FEniCS 约束自然语言接口:LLM 只做前端,求解器模板由人类编写

A Constrained Natural-Language Interface for Variational Multi-Physics Finite Element Simulations in FEniCS

精选理由

做有限元仿真的工程师和研究者终于有了一个既省力又可靠的 AI 助手——LLM 只负责理解需求,核心求解器由人类专家编写,避免了自动生成代码的可靠性风险。建议做多物理场仿真的团队点开看看这个架构设计。

AI 摘要

该论文提出了一种用于 FEniCS 多物理场有限元仿真的约束自然语言接口。LLM 仅负责前端任务:将用户提示解析为结构化 JSON、为非标准几何生成 Gmsh 代码,并利用重试反馈修正错误。它从不编写 FEniCS 求解器模板、推导弱形式或编写数值求解核心。一个确定性调度器将验证后的规范映射到五个人类编写的 FEniCS/UFL 模板:线弹性、超弹性、弹塑性、热力耦合和相场断裂。在解析器基准测试中,首次有效解析率为 9/15,重试后达到 100%,问题分类准确率 100%,字段提取准确率 97.1%。在自定义几何基准测试中,首次和最终成功率均为 90%。该架构通过约束 LLM 角色,在保持灵活性的同时提高了仿真代码的可靠性。

原文 · arXiv cs.LG

A Constrained Natural-Language Interface for Variational Multi-Physics Finite Element Simulations in FEniCS

Large language models can reduce the manual effort required to set up finite element simulations, but they introduce reliability risks when generated solver code lies on the critical path. We present a constrained natural-language interface for multi-physics finite element analysis in which the LLM is limited to front-end tasks: parsing prompts into structured JSON, generating Gmsh code only for non-catalog geometries, and using retry feedback for those stages. It never writes FEniCS solver templates, derives weak forms, or writes the numerical solver core. A deterministic dispatcher maps the validated specification to five human-written FEniCS/UFL templates: linear elasticity, hyperelasticity, elastoplasticity, thermo-mechanical coupling, and phase-field fracture. We validate this deterministic template layer against analytical solutions and published 2D/3D benchmarks. Smooth cases reach sub-percent agreement on adequate meshes, while harder nonlinear cases reach the 2-5 percent range. We also evaluate the LLM-facing front end directly. In a 15-prompt parser benchmark, first-pass valid parses were obtained for 9 cases, and all remaining cases were repaired after retry, giving a final valid parse rate of 100.0 percent, 100.0 percent problem-class accuracy, and 97.1 percent field-extraction accuracy. In a 10-case custom-geometry benchmark routed through the real LLM-to-Gmsh path, first-pass and final success were both 90.0 percent, with one unrecovered invalid-geometry failure. These results show that the parser and constrained prompt/validation design are effective on these benchmarks. As an end-to-end demonstration, the system generates and analyzes a 3D elastoplastic L-bracket with a fillet and bolt hole from one natural-language prompt. The contribution is a measured architecture for natural-language-driven variational simulation, not open-ended autonomous code generation.