A matrix-free, differentiable PyTorch solver for phase-field fracture: Formulation, benchmarks, and inverse analysis

2026-06-22Computational Engineering, Finance, and Science

Computational Engineering, Finance, and Science
AI summary

The authors developed an open-source software tool using PyTorch that models how cracks form and grow in materials, running efficiently on both CPUs and GPUs without needing extra compiled code. Their method simplifies computations by focusing on small tensor operations rather than assembling large global matrices. The tool supports various technical fracture modeling approaches and works across different operating systems. The authors also demonstrate that their solver can be used to find important material properties, like fracture energy, by using automatic differentiation and optimization techniques. This approach allows for combining fracture modeling with modern machine learning tools.

phase-field fracturePyTorchautomatic differentiationfinite element methodmatrix-free methodsexplicit dynamicsAmbrosio-Tortorelli regularizationconjugate-gradient solverL-BFGS optimizationfracture energy
Authors
Allamaprabhu Ani, Jean-François Molinari, Ghatu Subhash, Sathiskumar Anusuya Ponnusami
Abstract
A matrix-free, open-source PyTorch solver is presented for phase-field fracture on central processing units (CPUs) and graphics processing units (GPUs) without custom compiled extensions. In the explicit dynamic pathway, finite-element operations are formulated as element-wise tensor contractions with scatter-based accumulation, removing global sparse mechanics-stiffness assembly from the core time-stepping loop. Both Ambrosio-Tortorelli regularisations (AT1 and AT2), multiple energy decompositions (spectral, volumetric-deviatoric, and star-convex), and plane strain or plane stress assumptions are supported. The explicit mechanics kernels are compatible with PyTorch's automatic differentiation engine (autograd), while the implicit, bound-constrained damage solve is wrapped in a custom backward rule. This rule implements implicit differentiation through the conjugate-gradient (CG) linear solve and keeps memory independent of the internal CG iteration count. The same implementation runs unmodified across macOS, Linux, and Windows, and has been run on meshes of order $10^6$ nodes on a single NVIDIA A100 GPU. The solver is compared against four dynamic fracture cases (straight crack propagation, shear-induced kinking, dynamic branching, and crack-hole interaction in perforated plates) and two quasi-static cases (single-edge notched tension and a notched-holed plate). As a differentiability demonstration, the scalar fracture energy $G_c$ is recovered from observed crack patterns using PyTorch gradients through the forward solve and limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) optimisation. Recovery of $G_c$ with relative error below $10^{-3}$ is achieved after three accepted L-BFGS states for glass and two for alumina. The implementation can be extended and combined with differentiable optimisation and machine-learning components.