Phase-Field Fracture Modeling with FEniCSx: An Open-Source Initiative
Published:
To make the phase-field approach to fracture mechanics more accessible and to get feedback on the computational aspects of my research in this area, I have developed three main repositories. These are designed to provide both educational resources and professional codebases for researchers and students working with FEniCSx.
While I try to keep them updated with the latest development version of FEniCSx, please be aware that they may not always be perfectly in sync.
A quick note: A fourth repository, phasefield_usnccm, was created for the 18th US National Congress on Computational Mechanics short course. However, I am not sure about the future updates and maintenance of this repository.
Let’s dive into the three core repositories.
1. FEniCSx_Kamarei_Kumar_Lopez-Pamies: An Educational Introduction
Repository: farhadkama/FEniCSx_Kamarei_Kumar_Lopez-Pamies
This repository serves as an educational entry point into the world of phase-field fracture, designed to introduce newcomers to phase-field modeling of fracture using FEniCSx. The code structure is deliberately kept simple and well-commented to facilitate understanding of the fundamental concepts. The implementation is based on our recent work in [1].
The examples provided cover a range of fundamental scenarios in fracture mechanics, including:
- Cylindrical hole tension test
- Single edge notch tension test
- Surfing test
- Indentation test
- Brazilian test
- Poker-chip test
These examples illustrate the capability of the model to describe the nucleation and propagation of fracture in nominally elastic brittle materials at large under arbitrary monotonic quasistatic boundary conditions. These cases provide a solid foundation for understanding how phase-field models can be applied to diverse fracture problems.
2. FEniCSx_Kamarei_Lopez-Pamies: A Professional Framework for Elastic Brittle Fracture
Repository: farhadkama/FEniCSx_Kamarei_Lopez-Pamies
This repository takes a more professional and comprehensive approach, providing a complete framework to generate meshes and run simulations for nine distinct benchmark tests for fracture in elastic brittle materials [2]. These challenges were designed to rigorously assess the viability of fracture models across the full spectrum of loading conditions.
The nine tests, or “circles,” systematically explore the entire fracture envelope, as summarized in the table below, which maps each problem to its corresponding loading mode:
| Test | Strength Nucleation | Griffith Nucleation | Strength-Griffith Mediated Nucleation | Griffith Propagation Mode I | Griffith Propagation Mode III |
|---|---|---|---|---|---|
| Uniaxial tension | ✓ | ||||
| Biaxial tension | ✓ | ||||
| Torsion | ✓ | ||||
| Pure-shear | ✓ | ||||
| Single edge notch | ✓ | ||||
| Indentation | ✓ | ||||
| Poker-chip | ✓ | ||||
| Double cantilever beam | ✓ | ✓ | |||
| Trousers | ✓ | ✓ |
3. FEniCSx_Kamarei_Sozio_Lopez-Pamies: Finite Deformation Viscoelasticity
Repository: farhadkama/FEniCSx_Kamarei_Sozio_Lopez-Pamies
This repository represents an educational codebase focusing on the complex topic of finite deformation viscoelasticity, directly related to my PhD thesis. The focus here extends beyond standard finite deformation elasticity to incorporate viscoelastic material behavior, which is essential for accurately modeling fracture in polymers and other time-dependent materials. This repository provides an implementation that can be viewed as a computational approach to sharp-fracture theory, capturing the Griffith-like competition between bulk energy and surface energy. The implementation is based on our recent work in [3].
A Note on Solvers and Configuration
It is important to note that the solver settings and options within these repositories are not one-size-fits-all. The optimal configuration—including choices for linear and non-linear solvers, preconditioners, and other parameters—is highly dependent on the specific problem, the size of the mesh, and the available computational resources. Users are encouraged to experiment with these settings to find the most efficient and robust setup for their own applications.
Each repository contains detailed README files that provide guidance on how to modify the codes for different scenarios, along with explanations of the key parameters that control the numerical behavior of the simulations.
References
[1] Kamarei, F., Kumar, A., Lopez-Pamies, O. (2024). The poker-chip experiments of synthetic elastomers explained. Journal of the Mechanics and Physics of Solids, 188, 105683. (PDF)
[2] Kamarei, F., Zeng, B., Dolbow, J.E., Lopez-Pamies, O. (2025). Nine circles of elastic brittle fracture: A series of challenge problems to assess fracture models. arXiv preprint, 2507.00266. (PDF)
[3] Kamarei, F., Sozio, F., Lopez-Pamies, O. (2024). The single edge notch fracture test for viscoelastic elastomers. arXiv preprint, 2410.15380. (PDF)
