Table of Contents
Fetching ...

Integrating Large Language Models for Automated Structural Analysis

Haoran Liang, Mohammad Talebi Kalaleh, Qipei Mei

TL;DR

This work introduces a framework that translates natural-language structural analysis problems into executable OpenSeesPy scripts via LLMs, enabling automated 2D frame analysis. It couples a structured prompt design, in-context learning, and a three-stage code-generation pipeline with OpenSeesPy and OpsVis to produce runnable models and visualizations, evaluated on a 20-task SAWP benchmark. GPT-4o emerges as the most capable model, achieving near-perfect accuracy and benefiting notably from domain-specific instructions, while stability and asymmetry pose challenges that motivate validation layers and smarter prompting. The findings suggest LLM-driven automation can significantly reduce manual modeling effort in structural engineering, with future work focusing on scaling datasets, applying SFT/RLFT, and integrating validation or multimodal checks for practical deployment.

Abstract

Automated analysis for engineering structures offers considerable potential for boosting efficiency by minimizing repetitive tasks. Although AI-driven methods are increasingly common, no systematic framework yet leverages Large Language Models (LLMs) for automatic structural analysis. To address this gap, we propose a novel framework that integrates LLMs with structural analysis software. LLMs serve as the core engine: they parse structural descriptions from text and translate them into executable Python scripts. Moreover, the framework integrates the generative capabilities of LLMs with code-based finite element (FE) tools like OpenSeesPy. It employs domain-specific prompt design and in-context learning strategies to enhance the LLM's problem-solving capabilities and generative stability, enabling fully automated structural analysis from descriptive text to model outputs. In our experiments, we introduce a well-curated small-scale benchmark dataset of 20 structural analysis word problems (SAWPs) with ground-truth solutions and evaluate the performance of different LLMs within our framework in solving these SAWPs. The role of system instructions, crafted by structural engineers, is also investigated to understand their impact on LLM-driven structural analysis. Additionally, the generative stability of our framework is examined. Through multiple validation experiments on the benchmark, our results demonstrate that the proposed framework can substantially increase the level of automation in solving SAWPs compared to traditional methods. Quantitatively, the framework, built on GPT-4o, achieved 100% accuracy, surpassing GPT-4 (85%), Gemini 1.5 Pro (80%), and Llama-3.3 (30%) on the test examples. Furthermore, integrating domain-specific instructions enhanced performance by 30% on problems with asymmetrical structural configurations.

Integrating Large Language Models for Automated Structural Analysis

TL;DR

This work introduces a framework that translates natural-language structural analysis problems into executable OpenSeesPy scripts via LLMs, enabling automated 2D frame analysis. It couples a structured prompt design, in-context learning, and a three-stage code-generation pipeline with OpenSeesPy and OpsVis to produce runnable models and visualizations, evaluated on a 20-task SAWP benchmark. GPT-4o emerges as the most capable model, achieving near-perfect accuracy and benefiting notably from domain-specific instructions, while stability and asymmetry pose challenges that motivate validation layers and smarter prompting. The findings suggest LLM-driven automation can significantly reduce manual modeling effort in structural engineering, with future work focusing on scaling datasets, applying SFT/RLFT, and integrating validation or multimodal checks for practical deployment.

Abstract

Automated analysis for engineering structures offers considerable potential for boosting efficiency by minimizing repetitive tasks. Although AI-driven methods are increasingly common, no systematic framework yet leverages Large Language Models (LLMs) for automatic structural analysis. To address this gap, we propose a novel framework that integrates LLMs with structural analysis software. LLMs serve as the core engine: they parse structural descriptions from text and translate them into executable Python scripts. Moreover, the framework integrates the generative capabilities of LLMs with code-based finite element (FE) tools like OpenSeesPy. It employs domain-specific prompt design and in-context learning strategies to enhance the LLM's problem-solving capabilities and generative stability, enabling fully automated structural analysis from descriptive text to model outputs. In our experiments, we introduce a well-curated small-scale benchmark dataset of 20 structural analysis word problems (SAWPs) with ground-truth solutions and evaluate the performance of different LLMs within our framework in solving these SAWPs. The role of system instructions, crafted by structural engineers, is also investigated to understand their impact on LLM-driven structural analysis. Additionally, the generative stability of our framework is examined. Through multiple validation experiments on the benchmark, our results demonstrate that the proposed framework can substantially increase the level of automation in solving SAWPs compared to traditional methods. Quantitatively, the framework, built on GPT-4o, achieved 100% accuracy, surpassing GPT-4 (85%), Gemini 1.5 Pro (80%), and Llama-3.3 (30%) on the test examples. Furthermore, integrating domain-specific instructions enhanced performance by 30% on problems with asymmetrical structural configurations.

Paper Structure

This paper contains 17 sections, 4 equations, 20 figures, 11 tables.

Figures (20)

  • Figure 1: LLM-Driven finite element analysis framework for 2D frame structures
  • Figure 2: Partial process illustrating how LLMs extract information from the problem description and convert it into Python scripts.
  • Figure 3: An ICL prompt template for all structural analysis problems
  • Figure 4: Examples of commonsense reasoning for system instructions
  • Figure 5: Pattern 1 for generating new example problems
  • ...and 15 more figures