PhAST: Matrix-Free, Differentiable PyTorch Solver for Phase-Field Fracture¶
Phase-field Autograd Solver in Torch
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.
Get started View examples Capability matrix Source on GitHub
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
Core Strengths¶
Matrix-free operators
Fracture and damage updates use operations on PyTorch tensors without persistent global stiffness assembly on the main dynamic path.
Differentiable mechanics
Supported tensor operations remain compatible with PyTorch autograd, making forward runs inspectable and extensible for sensitivity studies.
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.
YAML plus fluent API
Use declarative YAML for reproducible runs and phast.Problem
for programmatic model authoring.
Documentation¶
Section |
What it covers |
|---|---|
Recommended source, Conda, and Docker routes. |
|
Installation, |
|
Environment discovery, sanitizer, configuration preflight, and completed-run checks. |
|
Problem setup, YAML, Python API, physics, meshes, sparse solves, and result APIs. |
|
Runnable fracture, solid-mechanics, and beta validation examples with visual outputs. |
|
Device choice, backend policy, timing evidence, and |
|
Issues, maintainer review, and contribution routes. |
|
Clone the code, open issues, inspect examples, and contribute through GitHub. |
For New Users¶
If you are new to PhAST, follow one continuous route:
Install and diagnose the environment: Use Install, then run the sanitizer and
python -m phast doctor.Complete a bounded solve: Run the linear-plate example and inspect its result directory.
Learn the formulation: Read the Phase-Field Primer and Visual Glossary.
Construct a model: Work through the problem-setup notebook and the Python API.
Check the capability boundary: Review the Capability Matrix before selecting a fracture, beta, or experimental route.
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.
Start
- Install PhAST
- Getting Started
- Installation Route Selector
- 1. Prerequisites
- 2. Create An Environment And Install
- 3. Verify The Environment
- 4. Know Which YAML Files Are Runnable
- 5. Run A Small End-To-End Example
- 6. Run A Phase-Field Fracture Example
- 7. Understand The Solver Sequence
- 8. Create A New Setup
- 9. Platform And Optional Backend Notes
- 10. If You Become Stuck
- 11. Build The Documentation
- Verify Install
- Troubleshooting and Failure Modes
Learn
- Tutorials
- Phase-field primer for mechanics engineers
- Visual glossary for phase-field fracture
- Dynamic SENT: inspect a complete public PhAST example
- 1. Locate the existing public artifacts
- 2. Read the problem before reading solver options
- 3. Inspect the retained mesh and named-region contract
- 4. Connect regions to boundary conditions
- 5. Identify the numerical route
- 6. Run structural preflight
- 7. Keep full execution an explicit decision
- 8. Inspect retained crack propagation
- 9. Inspect retained energy and crack-tip histories
- 10. Compare retained provenance with the current YAML
- 11. Interpretation and next steps
- Step-by-step PhAST problem setup
- Problem statement before software
- 1. Install dependencies
- 2. Imports and working directory
- 3. Define a small geometry
- 4. Visualize the geometry before meshing
- 5. Generate the mesh with Gmsh
- 6. Inspect named regions from the mesh
- 7. Visualize the mesh and physical groups
- 8. Build the problem manually with
phast.Problem - 9. Visualize supports, loading, and the damage seed
- 10. Solver settings: what the common choices mean
- 11. Write the runnable YAML configuration
- 12. Run the bounded solver workflow
- 13. Inspect the result directory
- 14. Plot histories and final fields
- 15. Create or view animations
- 16. What to change for a real study
- 17. Controlled exercises and exit questions
- Notebook 02: mesh-resolution diagnostic for \(h/\ell_0\)
- Notebook 03: retained Miehe SENT results
- Modular fracture problems and learned damage updates
- Controlled exploration experiments
- Prepare configuration copies
- 1. Poisson-ratio sensitivity
- 2. Energy-split comparison
- 3. Resolution relative to the regularization length
- 4. Output-cadence comparison
- 5. Inspect result artifacts
- 6. Damage-update cadence in explicit dynamics
- 7. Anderson acceleration for staggered convergence
- Reporting the experiment
- Heterogeneous Material Fields
- From a tutorial to a first research study
- What this workflow establishes
- 1. Reproduce the baseline route
- 2. State the research question
- 3. Complete the modelling-decision record
- 4. Select the nearest supported pathway
- 5. Represent geometry and microstructure
- 6. Select material and fracture assumptions
- 7. Define loading and boundary conditions
- 8. Relate the mesh to the phase-field length scale
- 9. Author and preflight the configuration
- 10. Execute a bounded pilot
- 11. Inspect the result as a scientific record
- 12. Separate calibration from validation
- Realistic first milestone
- Requesting review or assistance
User Manual
How-to Guides
- Setting Up New Problems
- FEM Workflow Map
- Units
- Setup Checklist
- Why this sequence matters
- Minimal Fluent Setup
- Start From a Solved Example
- Geometry and Meshes
- Regions
- Materials
- Initial Conditions
- Boundary Conditions
- Analysis Steps and Solver Settings
- Outputs
- Validate, Run, Inspect
- Acceptance Targets
- What Makes a Good Public Example?
- Python API
- Declarative YAML Workflows
- Results and visualization
- Learned damage predictor interface
- Performance and Reproducibility
- Paper reproduction
Examples
- Example gallery
- Example inputs and outputs
- Curated example contract
- Example tiers
- example folder layout
- Output artifact contract
- README contract
- YAML-first rules
- Script-contract rules
- Tutorial readiness flags
- Inputs and provenance
- Required metadata files
- Required CSV outputs
- Required visual outputs
- Trajectory and visualization stores
- Result inspection
- HPC execution and batch curation
- README, gallery, and root-doc integration
- Capability-boundary wording
- Tests and drift checks
- Curation checklist
- Solid Mechanics
- Quasi-static Fracture
- Dynamic Fracture
- Plasticity and Interface Beta Workflows
- Experimental TET4 geometry
- Unsupported and Experimental Workflows
Reference
- Reference
- Command-line reference
- YAML configuration reference
- Public API Reference
- Glossary
- Capability Matrix
- Public Workflow API
- Sparse solve API
- Time integrators
- Mixed-precision CG
- Adaptive meshing
- Algorithm overview
- phast.solvers.adaptive.compute_refinement_indicator
- phast.solvers.adaptive.crack_tip_neighborhood_criterion
- phast.solvers.adaptive.damage_gradient_criterion
- phast.solvers.adaptive.interpolate_elem_field
- phast.solvers.adaptive.interpolate_field
- phast.solvers.adaptive.refine_mesh
- phast.solvers.adaptive.union_refine_set