LLM-constrained interface drives FEniCS simulations without writing solver code
Researchers Nilay Upadhyay and Wesley F. Reinhart present a constrained natural-language interface for multi-physics finite element analysis that limits LLM involvement to front-end parsing tasks, keeping all solver logic in human-written, deterministically dispatched templates.
Score breakdown
The architecture demonstrates that constraining LLM involvement to structured front-end parsing — rather than solver code generation — can achieve high reliability on finite element simulation benchmarks while avoiding the code-correctness risks of open-ended autonomous generation.
- 01The LLM is restricted to parsing prompts into structured JSON and generating Gmsh geometry code; it never writes FEniCS solver templates or derives weak forms.
- 02A deterministic dispatcher routes validated specs to five human-written FEniCS/UFL templates: linear elasticity, hyperelasticity, elastoplasticity, thermo-mechanical coupling, and phase-field fracture.
- 03Template layer achieves sub-percent error on smooth cases and 2–5% error on harder nonlinear cases versus analytical solutions and published benchmarks.
Upadhyay and Reinhart propose a constrained architecture for natural-language-driven finite element simulation that addresses a core reliability risk: LLM-generated solver code on the critical path. Their system confines the LLM to two front-end tasks — parsing natural-language prompts into structured JSON specifications, and generating Gmsh geometry code only for non-catalog geometries — with retry feedback loops for both. The LLM never writes FEniCS solver templates, derives variational weak forms, or produces any numerical solver logic.
A 10-case custom-geometry benchmark routed through the real LLM-to-Gmsh path achieved 90.0% first-pass and final success, with one unrecovered invalid-geometry failure.
A deterministic dispatcher maps validated JSON specifications to five human-written FEniCS/UFL templates: linear elasticity, hyperelasticity, elastoplasticity, thermo-mechanical coupling, and phase-field fracture. This template layer is validated against analytical solutions and published 2D/3D benchmarks, achieving sub-percent agreement on smooth cases with adequate meshes and 2–5% error on harder nonlinear cases.
The LLM-facing front end is evaluated separately. On a 15-prompt parser benchmark, 9 of 15 cases produced valid parses on the first pass, with all remaining cases repaired after retry, yielding a final valid parse rate of 100.0%, 100.0% problem-class accuracy, and 97.1% field-extraction accuracy. A 10-case custom-geometry benchmark routed through the real LLM-to-Gmsh path achieved 90.0% first-pass and final success, with one unrecovered invalid-geometry failure. As an end-to-end demonstration, the system generates and analyzes a 3D elastoplastic L-bracket with a fillet and bolt hole from a single natural-language prompt. The authors characterize the contribution as a "measured architecture for natural-language-driven variational simulation, not open-ended autonomous code generation."
Key facts
- 01The LLM is restricted to parsing prompts into structured JSON and generating Gmsh geometry code; it never writes FEniCS solver templates or derives weak forms.
- 02A deterministic dispatcher routes validated specs to five human-written FEniCS/UFL templates: linear elasticity, hyperelasticity, elastoplasticity, thermo-mechanical coupling, and phase-field fracture.
- 03Template layer achieves sub-percent error on smooth cases and 2–5% error on harder nonlinear cases versus analytical solutions and published benchmarks.
- 04On a 15-prompt parser benchmark, first-pass valid parses were obtained for 9 of 15 cases; after retry, final valid parse rate reached 100.0%.
- 05Field-extraction accuracy on the parser benchmark was 97.1%; problem-class accuracy was 100.0%.
- 06A 10-case custom-geometry benchmark via the LLM-to-Gmsh path achieved 90.0% success, with one unrecovered invalid-geometry failure.
- 07An end-to-end demo generates and analyzes a 3D elastoplastic L-bracket with a fillet and bolt hole from a single natural-language prompt.
Topics
Summary and scoring are generated automatically from the original article. We always link back to the publisher and never republish images or paywalled content. Last processed Jun 10, 2026 · 15:34 UTC. How this works →