A finite element solver for simulating crack propagation using the phase-field approach to fracture.
Built on top of fenicsx, fragma supports advanced features like:
- Crack propagation in anisotropic media
- Indirect load control using path-following methods
The full documentation is available at: https://floiseau.github.io/fragma.
Do no hesitate to contact me for more information (https://floiseau.github.io/.
To run fragma, install the required Python modules in a dedicated environment:
- Create and activate a dedicated environment:
conda create -n fragma
conda activate fragma- Install FEniCSx (with GMSH):
conda install -c conda-forge fenics-dolfinx=0.10 pyvista mpich gmsh # Linux and macOS
conda install -c conda-forge fenics-dolfinx=0.10 pyvista pyamg gmsh # Windows- Install
fragma:
pip install . # If you cloned the repo
pip install fragma # If you want to install from pypiTest fragma with ready-to-run examples:
cd examples/XX_example_name
./run.sh
Visualize results using Paraview or PyVista.
- A GMSH mesh file (
mesh.geo) - A
parameters.tomlconfiguration file (seeexamples)
- Navigate to your simulation directory.
- Activate the environment:
conda activate fragma
- Run the solver:
fragma
Note:
- Use
OMP_NUM_THREADS=1on some Linux distributions to control thread usage:OMP_NUM_THREADS=1 python path/to/repo/fragma/main.py
- Results are saved in the
resultsdirectory:- VTK files (e.g.,
Displacement.pvd) for field visualization - CSV files (e.g.,
probes.csv) for scalar outputs
- VTK files (e.g.,