Skip to content

floiseau/fragma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

239 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fragma

License GitHub PyPI Documentation Zenodo

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/.


📦 Installation

To run fragma, install the required Python modules in a dedicated environment:

  1. Create and activate a dedicated environment:
conda create -n fragma
conda activate fragma
  1. 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
  1. Install fragma:
pip install .       # If you cloned the repo
pip install fragma  # If you want to install from pypi

Quick Start

Test fragma with ready-to-run examples:

cd examples/XX_example_name
./run.sh

Visualize results using Paraview or PyVista.


Usage

Requirements

  • A GMSH mesh file (mesh.geo)
  • A parameters.toml configuration file (see examples)

Running a Simulation

  1. Navigate to your simulation directory.
  2. Activate the environment:
    conda activate fragma
  3. Run the solver:
    fragma

Note:

  • Use OMP_NUM_THREADS=1 on some Linux distributions to control thread usage:
    OMP_NUM_THREADS=1 python path/to/repo/fragma/main.py

Outputs

  • Results are saved in the results directory:
    • VTK files (e.g., Displacement.pvd) for field visualization
    • CSV files (e.g., probes.csv) for scalar outputs

About

Fracture in Anisotropic Media using a Phase-field Model

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •