{"title":"500行以下自包含Python有限元实现的相场法断裂力学","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":"{\"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}","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}
Less than 500 lines self-contained Python finite element implementation of the phase-field method for fracture mechanics
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.
期刊介绍:
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.