PhAST¶
Phase-field Autograd Solver in Torch
CEMS Lab · PyTorch-native FEM workflows
Matrix-free, differentiable phase-field fracture and FEM benchmarks in PyTorch.
What is PhAST? PhAST is a Python library built on PyTorch that allows you to solve phase-field fracture problems without assembling large global matrices. It is designed to be differentiable, making it easier to combine with machine learning techniques.
(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 public examples, reproducibility, batch runs, and exact
reruns of published simulations.
Get started View examples Capability matrix Source on GitHub
Run a first check
pip install -e .
python -m phast doctor
python -m phast run examples/dynamic/B7_dynamic_crack_branching_comsol/config.yaml --validate-only
python -m phast run examples/quasistatic/miehe_tension/config.yaml --validate-only
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 fields, response histories, manifests, and compact animations.
YAML plus fluent API
Use declarative YAML for reproducible runs and phast.Problem
for programmatic model authoring.
Documentation¶
Section |
What it covers |
|---|---|
Installation, |
|
Backend visibility, expected doctor output, and a schema-validation smoke test. |
|
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, discussions, maintainer review, and contribution route. |
|
Clone the code, open issues, inspect examples, and contribute through GitHub. |
For New Users: Your First 15 Minutes¶
If you are new to PhAST, we recommend following this path:
Learn the Basics: Read the “What is PhAST?” summary above, then follow the Phase-Field Primer and Visual Glossary.
Install: Follow the Getting Started guide.
Run a Simple Example: Run
python -m phast run examples/quasistatic/miehe_tension/config.yamlto see a result quickly.Understand the API: Read the Python API to understand how the models are defined.
Check Capabilities: Review the Capability Matrix to ensure your target problem is supported.
Which Path Should I Use?¶
| Goal | First page | Stable surface |
|—|—|
| Install and run a first case | Getting started | 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 | production / beta / scaffold labels |
Workflow In One Line¶
YAML / phast.Problem -> Mesh -> Operators -> Solver -> Result bundle
Get Started
User Guide
- User Guide Overview
- 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
- Physics, Units, and Formulation
- Configuration guide
- Mesh formats
- Geometry and setup gallery
- Promoted 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 promotion
- README, gallery, and root-doc integration
- Capability-boundary wording
- Tests and drift checks
- Promotion checklist
- Capability Matrix
- Sparse linear solver
Supported Workflows
Example Gallery
API Reference
- Public API Reference
- Public Workflow API
- Sparse linear solver
- 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
Performance & Reproducibility
Community