Can ChatGPT Implement Finite Element Models for Geotechnical Engineering Applications?

ABSTRACT This study assesses the capability of ChatGPT to generate finite element code for geotechnical engineering applications from a set of prompts. We tested three different initial boundary value problems using a hydro‐mechanically coupled formulation for unsaturated soils, including the dissipation of excess pore water pressure through fluid mass diffusion in one‐dimensional space, time‐dependent differential settlement of a strip footing, and gravity‐driven seepage. For each case, initial prompting involved providing ChatGPT with necessary information for finite element implementation, such as balance and constitutive equations, problem geometry, initial and boundary conditions, material properties, and spatiotemporal discretization and solution strategies. Any errors and unexpected results were further addressed through prompt augmentation processes until the ChatGPT‐generated finite element code passed the verification/validation test. Our results demonstrate that ChatGPT required minimal code revisions when using the FEniCS finite element library, owing to its high‐level interfaces that enable efficient programming. In contrast, the MATLAB code generated by ChatGPT necessitated extensive prompt augmentations and/or direct human intervention, as it involves a significant amount of low‐level programming required for finite element analysis, such as constructing shape functions or assembling global matrices. Given that prompt engineering for this task requires an understanding of the mathematical formulation and numerical techniques, this study suggests that while a large language model may not yet replace human programmers, it can greatly assist in the implementation of numerical models.

Authors

Institutions

Publication Details

Journal
International Journal for Numerical and Analytical Methods in Geomechanics
Published
2025-02-06
DOI
https://doi.org/10.1002/nag.3956
Citations
10
Primary Topic
Dam Engineering and Safety
Type
article
Field-Weighted Citation Impact
9.53

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Can ChatGPT Implement Finite Element Models for Geotechnical Engineering Applications?

Hyoung Suk Suh, Tae Sup Yun, Tae-Gu Kim
10 citations
International Journal for Numerical and Analytical Methods in Geomechanics
Dam Engineering and Safety
9.53
article

Can ChatGPT Implement Finite Element Models for Geotechnical Engineering Applications?

Hyoung Suk Suh, Tae Sup Yun, Tae-Gu Kim
article en
10 citations

Abstract

ABSTRACT This study assesses the capability of ChatGPT to generate finite element code for geotechnical engineering applications from a set of prompts. We tested three different initial boundary value problems using a hydro‐mechanically coupled formulation for unsaturated soils, including the dissipation of excess pore water pressure through fluid mass diffusion in one‐dimensional space, time‐dependent differential settlement of a strip footing, and gravity‐driven seepage. For each case, initial prompting involved providing ChatGPT with necessary information for finite element implementation, such as balance and constitutive equations, problem geometry, initial and boundary conditions, material properties, and spatiotemporal discretization and solution strategies. Any errors and unexpected results were further addressed through prompt augmentation processes until the ChatGPT‐generated finite element code passed the verification/validation test. Our results demonstrate that ChatGPT required minimal code revisions when using the FEniCS finite element library, owing to its high‐level interfaces that enable efficient programming. In contrast, the MATLAB code generated by ChatGPT necessitated extensive prompt augmentations and/or direct human intervention, as it involves a significant amount of low‐level programming required for finite element analysis, such as constructing shape functions or assembling global matrices. Given that prompt engineering for this task requires an understanding of the mathematical formulation and numerical techniques, this study suggests that while a large language model may not yet replace human programmers, it can greatly assist in the implementation of numerical models.

International Journal for Numerical and Analytical Methods in GeomechanicsVol. 49(6)
Yonsei University (KR), Case Western Reserve University (US)
Case Western Reserve University, National Research Foundation, National Research Foundation of Korea, Ministry of Science and ICT, South Korea
Openalex Percentile: Top 2%
Dam Engineering and Safety
9.53
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.