Table of Contents
Fetching ...

Deep Energy Method with Large Language Model assistance: an open-source Streamlit-based platform for solving variational PDEs

Yizheng Wang, Cosmin Anitescu, Mohammad Sadegh Eshaghi, Xiaoying Zhuang, Timon Rabczuk, Yinghua Liu

TL;DR

The paper presents LM-DEM, an open-source, Streamlit-based platform that solves variational PDEs via the deep energy method while leveraging large-language-models to generate Gmsh geometries from natural language or images. It combines energy-form PINNs with optional FEM solutions, supports built-in and user-defined energy functionals, and provides flexible solver configuration across geometry, boundary conditions, materials, networks, and training. The approach reduces geometry preprocessing burdens, enables easy definition of custom energy functionals via a UMAT-like interface, and offers in-app visualization plus ParaView-compatible exports, making energy-form PINNs accessible to beginners and practitioners. The work highlights quasi-static capabilities, potential for dynamic extensions, and a vision toward agentic workflows and adaptive strategies to improve robustness and efficiency in variational PDEsolving.

Abstract

Physics-informed neural networks (PINNs) in energy form, also known as the deep energy method (DEM), offer advantages over strong-form PINNs such as lower-order derivatives and fewer hyperparameters, yet dedicated and user-friendly software for energy-form PINNs remains scarce. To address this gap, we present \textbf{LM-DEM} (Large-Model-assisted Deep Energy Method), an open-source, Streamlit-based platform for solving variational partial differential equations (PDEs) in computational mechanics. LM-DEM integrates large language models (LLMs) for geometry modeling: users can generate Gmsh-compatible geometries directly from natural language descriptions or images, significantly reducing the burden of traditional geometry preprocessing. The solution process is driven by the deep energy method, while finite element solutions can be obtained in parallel. The framework supports built-in problems including Poisson, screened Poisson, linear elasticity, and hyperelasticity in two and three dimensions, as well as user-defined energy functionals analogous to the \texttt{UMAT} interface in Abaqus. The source code is available at https://github.com/yizheng-wang/LMDEM, and a web-based version is accessible at https://ai4m.llmdem.com. LM-DEM aims to lower the barrier for practitioners and beginners to adopt energy-form PINNs for variational PDE problems.

Deep Energy Method with Large Language Model assistance: an open-source Streamlit-based platform for solving variational PDEs

TL;DR

The paper presents LM-DEM, an open-source, Streamlit-based platform that solves variational PDEs via the deep energy method while leveraging large-language-models to generate Gmsh geometries from natural language or images. It combines energy-form PINNs with optional FEM solutions, supports built-in and user-defined energy functionals, and provides flexible solver configuration across geometry, boundary conditions, materials, networks, and training. The approach reduces geometry preprocessing burdens, enables easy definition of custom energy functionals via a UMAT-like interface, and offers in-app visualization plus ParaView-compatible exports, making energy-form PINNs accessible to beginners and practitioners. The work highlights quasi-static capabilities, potential for dynamic extensions, and a vision toward agentic workflows and adaptive strategies to improve robustness and efficiency in variational PDEsolving.

Abstract

Physics-informed neural networks (PINNs) in energy form, also known as the deep energy method (DEM), offer advantages over strong-form PINNs such as lower-order derivatives and fewer hyperparameters, yet dedicated and user-friendly software for energy-form PINNs remains scarce. To address this gap, we present \textbf{LM-DEM} (Large-Model-assisted Deep Energy Method), an open-source, Streamlit-based platform for solving variational partial differential equations (PDEs) in computational mechanics. LM-DEM integrates large language models (LLMs) for geometry modeling: users can generate Gmsh-compatible geometries directly from natural language descriptions or images, significantly reducing the burden of traditional geometry preprocessing. The solution process is driven by the deep energy method, while finite element solutions can be obtained in parallel. The framework supports built-in problems including Poisson, screened Poisson, linear elasticity, and hyperelasticity in two and three dimensions, as well as user-defined energy functionals analogous to the \texttt{UMAT} interface in Abaqus. The source code is available at https://github.com/yizheng-wang/LMDEM, and a web-based version is accessible at https://ai4m.llmdem.com. LM-DEM aims to lower the barrier for practitioners and beginners to adopt energy-form PINNs for variational PDE problems.
Paper Structure (30 sections, 36 equations, 12 figures, 1 table)

This paper contains 30 sections, 36 equations, 12 figures, 1 table.

Figures (12)

  • Figure 1: Overall framework of LM-DEM. The user provides a natural-language prompt (e.g., "Create a cat") to the large language model, which returns a geometry. Configuration is organized into five panels: Geometry (mesh dimension, quadrature rule, derivative evaluation, mesh size), Material (Poisson, screened Poisson, linear elasticity, hyperelasticity, or user-defined), Boundary (Dirichlet, Neumann, and body force), Network (layers, width, activation, type), and Training (epochs, early stopping, batch size, CUDA, learning rate). Dirichlet boundary conditions are enforced a priori; the pipeline then feeds into the deep energy method to obtain the solution.
  • Figure 2: LLM-assisted geometry modeling in LM-DEM: (a) the main interface where users provide prompts specifying geometry and boundary-condition locations; the LLM returns a Gmsh-compatible .geo script, and users can switch backends (e.g., OpenAI, DeepSeek, Ollama) or start a new chat to retry; (b) the geometry generated and meshed via Gmsh; (c) the generated .geo script, which can be edited directly or opened in the Gmsh GUI for refinement.
  • Figure 3: LLM-assisted geometry modeling in LM-DEM with image input: (a) the input image (e.g., a T-shaped structure); (b) the generated geometry and mesh. LM-DEM supports multimodal input: in addition to text prompts, users can upload an image and the LLM infers the geometry and boundary-condition layout, producing a .geo file for Gmsh.
  • Figure 4: Post-processing in LM-DEM: (a) an LLM-generated 3D geometry with the prompt "Generate a table; the seating area is the force boundary, and the bottom edges of the four legs are the displacement boundaries." (b) 3D displacement contour; (c) displacement point cloud with slicing visualization; (d) evolution of the loss/energy; (e) 3D stress contour; (f) stress point cloud with slicing visualization. LM-DEM provides in-app visualization in the Streamlit interface and supports export to ParaView-compatible .vtk files for further analysis.
  • Figure 5: 2D geometry examples generated by LM-DEM using LLMs. From top to bottom: a plate with a circular hole, an L-shaped beam, and a bicycle geometry. Each row corresponds to an independent dialog session. From left to right, the columns show successive refinement results based on the prompts listed in \ref{['2D_prompt']}. Red regions denote displacement (Dirichlet) boundaries, while green regions indicate force (Neumann) boundaries.
  • ...and 7 more figures