arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.02199math.NAcs.AIcs.NA
收藏

ChatGPT能否为岩土工程应用实现有限元模型?

Can ChatGPT implement finite element models for geotechnical engineering applications?

Yonsei University(延世大学);Case Western Reserve University(凯斯西储大学)

Taegu Kim, Tae Sup Yun, Hyoung Suk Suh

AI总结:

本研究通过三个非饱和土水力-力学耦合初边值问题评估ChatGPT生成有限元代码的能力,发现其在FEniCS下仅需少量修改,而MATLAB代码需大量提示增强或人工干预,表明大语言模型可辅助但尚不能取代数值模型编程人员。

摘要:

本研究评估了ChatGPT根据一组提示词为岩土工程应用生成有限元代码的能力。我们使用非饱和土的水力-力学耦合公式测试了三个不同的初边值问题,包括一维空间中通过流体质量扩散实现的超孔隙水压力消散、条形基础的随时间变化的差异沉降以及重力驱动渗流。对于每种情况,初始提示都向ChatGPT提供了有限元实现所需的信息,例如平衡方程和本构方程、问题几何、初始条件和边界条件、材料属性以及时空离散化和求解策略。任何错误和意外结果都通过提示增强过程进一步处理,直到ChatGPT生成的有限元代码通过验证/确认测试。我们的结果表明,使用FEniCS有限元库时,ChatGPT所需的代码修改最少,这得益于其能够实现高效编程的高级接口。相比之下,ChatGPT生成的MATLAB代码需要大量的提示增强和/或直接人工干预,因为它涉及有限元分析所需的大量底层编程,例如构造形函数或组装全局矩阵。鉴于该任务的提示工程需要理解数学公式和数值技术,本研究表明,虽然大语言模型可能尚不能取代人类程序员,但它可以极大地辅助数值模型的实现。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑