PhAST: Matrix-Free, Differentiable PyTorch Solver for Phase-Field Fracture

Phase-field Autograd Solver in Torch

PhAST logo

CEMS Lab · PyTorch-native FEM workflows

PhAST is a matrix-free, differentiable PyTorch solver for phase-field fracture and FEM benchmarks.

What is PhAST? PhAST is a PyTorch finite-element solver for two-dimensional phase-field fracture in explicit dynamics and quasi-static mechanics. Its principal dynamic pathway evaluates finite-element operators without retaining a global stiffness matrix. Selected tensor operations remain compatible with autograd, subject to the documented limitations of history updates, active sets, and optional sparse backends.

(New to phase-field modeling? Read our Phase-Field Primer and the Visual Glossary to learn the basics).

Use the fluent phast.Problem API to author new models. Use YAML configurations for documented examples, reproducibility, batch runs, and reviewable reruns of published simulations.

Run a first check

The base source installation does not require a separate PhAST compilation step. Optional HPC backends are not required for validation.

pip install -e .
python run_sanitizer.py
python -m phast doctor
python -m phast run examples/solid_mechanics_beta/linear_plate/config.yaml --output_dir runs/linear_plate
Kalthoff-Winkler impact crack growth
Dynamic fracture showcase: Kalthoff-Winkler impact crack growth.

Core Strengths

Matrix-free operators

Fracture and damage updates use operations on PyTorch tensors without persistent global stiffness assembly on the main dynamic path.

Formulation

Differentiable mechanics

Supported tensor operations remain compatible with PyTorch autograd, making forward runs inspectable and extensible for sensitivity studies.

API reference

Public benchmark bundles

Public examples include YAML inputs, setup figures, final field plots, response histories, manifests, and compact animations. Reloadable numerical fields require a retained trajectory store.

Example gallery

YAML plus fluent API

Use declarative YAML for reproducible runs and phast.Problem for programmatic model authoring.

Python API

Documentation

Section

What it covers

Install

Recommended source, Conda, and Docker routes.

Getting started

Installation, phast doctor, validation, first run, and result inspection.

Verify install

Environment discovery, sanitizer, configuration preflight, and completed-run checks.

User guide

Problem setup, YAML, Python API, physics, meshes, sparse solves, and result APIs.

Example gallery

Runnable fracture, solid-mechanics, and beta validation examples with visual outputs.

Performance and reproducibility

Device choice, backend policy, timing evidence, and torch.compile reporting.

Community

Issues, maintainer review, and contribution routes.

Source repository

Clone the code, open issues, inspect examples, and contribute through GitHub.

For New Users

If you are new to PhAST, follow one continuous route:

  1. Install and diagnose the environment: Use Install, then run the sanitizer and python -m phast doctor.

  2. Complete a bounded solve: Run the linear-plate example and inspect its result directory.

  3. Learn the formulation: Read the Phase-Field Primer and Visual Glossary.

  4. Construct a model: Work through the problem-setup notebook and the Python API.

  5. Check the capability boundary: Review the Capability Matrix before selecting a fracture, beta, or experimental route.

  6. Progress to fracture and heterogeneity: Use the tutorial sequence and example-local READMEs, which state runtime and evidence boundaries.

Which Path Should I Use?

| Goal | First page | Stable surface | |—|—| | Install and run a first case | Install and Getting started | python run_sanitizer.py followed by python -m phast doctor | | Author new models | Python API and Setting up problems | phast.Problem | | Reproduce or batch-run examples | YAML workflow | python -m phast run config.yaml | | Inspect completed runs | Public API reference | phast.load_result(path) | | Browse runnable examples | Example gallery | flat public example folders | | Diagnose failed runs | Troubleshooting | units, mesh, backend, and output checks | | Check supported physics | Capability matrix | supported / beta / experimental / scaffold labels |

Workflow In One Line

YAML / phast.Problem -> Mesh -> Operators -> Solver -> Result bundle

For phase-field fracture, this sequence expands to configuration validation, mesh construction, mechanics update, tensile-history update, bounded damage solution, irreversibility enforcement, and result/provenance output. See the solver overview for the algorithmic pathway.

Learn