Less than 500 lines self-contained Python finite element implementation of the phase-field method for fracture mechanics

IF 5.7 2区 工程技术 Q2 COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS
Nathan Shauer
{"title":"Less than 500 lines self-contained Python finite element implementation of the phase-field method for fracture mechanics","authors":"Nathan Shauer","doi":"10.1016/j.advengsoft.2025.104013","DOIUrl":null,"url":null,"abstract":"<div><div>This paper presents a simple self-contained finite element implementation of the phase-field method for fracture mechanics. The implementations are done in Python, and they only use the standard <span>NumPy</span> and <span>SciPy</span> libraries for basic matrix operations and to solve the resulting systems of equations. The AT2 phase-field model is adopted and the additive decomposition of the energy density is employed to prevent fracture propagation under compressive stresses. The alternate minimization algorithm is adopted for solving the nonlinear system of equations. The implementation is verified using three examples: a bar under tension, a notched plate under tension, and a three-point bending test. The results display good agreement with analytical solutions and solutions from other authors. Each example is less than 500 lines long, and they are available on GitHub at <span><span>https://github.com/nathanshauer/phasefield-jr-py</span><svg><path></path></svg></span> and as supplementary data to this article. These Python scripts are intended for educational purposes and to provide a simple starting point for those interested in the phase-field method for fracture mechanics.</div></div>","PeriodicalId":50866,"journal":{"name":"Advances in Engineering Software","volume":"210 ","pages":"Article 104013"},"PeriodicalIF":5.7000,"publicationDate":"2025-08-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Advances in Engineering Software","FirstCategoryId":"5","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0965997825001516","RegionNum":2,"RegionCategory":"工程技术","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0

Abstract

This paper presents a simple self-contained finite element implementation of the phase-field method for fracture mechanics. The implementations are done in Python, and they only use the standard NumPy and SciPy libraries for basic matrix operations and to solve the resulting systems of equations. The AT2 phase-field model is adopted and the additive decomposition of the energy density is employed to prevent fracture propagation under compressive stresses. The alternate minimization algorithm is adopted for solving the nonlinear system of equations. The implementation is verified using three examples: a bar under tension, a notched plate under tension, and a three-point bending test. The results display good agreement with analytical solutions and solutions from other authors. Each example is less than 500 lines long, and they are available on GitHub at https://github.com/nathanshauer/phasefield-jr-py and as supplementary data to this article. These Python scripts are intended for educational purposes and to provide a simple starting point for those interested in the phase-field method for fracture mechanics.
500行以下自包含Python有限元实现的相场法断裂力学
本文给出了断裂力学相场法的一个简单的自包含有限元实现。这些实现是用Python完成的,它们只使用标准的NumPy和SciPy库进行基本的矩阵运算和求解得到的方程组。采用AT2相场模型,采用能量密度加性分解防止压应力作用下的断裂扩展。采用交替极小化算法求解非线性方程组。通过三个实例验证了该方法的实现:受拉杆、受拉缺口板和三点弯曲试验。结果与解析解和其他作者的解吻合较好。每个示例的长度都不超过500行,可以在GitHub上(https://github.com/nathanshauer/phasefield-jr-py)获得,也可以作为本文的补充数据。这些Python脚本用于教学目的,并为那些对断裂力学的相场方法感兴趣的人提供一个简单的起点。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Advances in Engineering Software
Advances in Engineering Software 工程技术-计算机:跨学科应用
CiteScore
7.70
自引率
4.20%
发文量
169
审稿时长
37 days
期刊介绍: The objective of this journal is to communicate recent and projected advances in computer-based engineering techniques. The fields covered include mechanical, aerospace, civil and environmental engineering, with an emphasis on research and development leading to practical problem-solving. The scope of the journal includes: • Innovative computational strategies and numerical algorithms for large-scale engineering problems • Analysis and simulation techniques and systems • Model and mesh generation • Control of the accuracy, stability and efficiency of computational process • Exploitation of new computing environments (eg distributed hetergeneous and collaborative computing) • Advanced visualization techniques, virtual environments and prototyping • Applications of AI, knowledge-based systems, computational intelligence, including fuzzy logic, neural networks and evolutionary computations • Application of object-oriented technology to engineering problems • Intelligent human computer interfaces • Design automation, multidisciplinary design and optimization • CAD, CAE and integrated process and product development systems • Quality and reliability.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信