Skip to main content

A finite element solver, built on top of FEniCSx, for simulating crack propagation using the phase-field approach to fracture.

Project description

fragma

GitHub PyPI Documentation

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.


📦 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fragma-2026.1.22.tar.gz (38.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fragma-2026.1.22-py3-none-any.whl (40.9 kB view details)

Uploaded Python 3

File details

Details for the file fragma-2026.1.22.tar.gz.

File metadata

  • Download URL: fragma-2026.1.22.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fragma-2026.1.22.tar.gz
Algorithm Hash digest
SHA256 cee0c6a6b67044e4971c8373c3c280475d76af6b6bd9763d1725705325a60284
MD5 6039b32be304169d290864989116bcb1
BLAKE2b-256 7ee3fa89da53d57a9060d714ee1b27317bd893ecf1341526c88bcb94c511fc72

See more details on using hashes here.

Provenance

The following attestation bundles were made for fragma-2026.1.22.tar.gz:

Publisher: deploy_pypi_package.yml on floiseau/fragma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fragma-2026.1.22-py3-none-any.whl.

File metadata

  • Download URL: fragma-2026.1.22-py3-none-any.whl
  • Upload date:
  • Size: 40.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fragma-2026.1.22-py3-none-any.whl
Algorithm Hash digest
SHA256 91983cfdf5ae6816b0b8fdc289eb6d7a6a1f9ee64f5bb7857cd0b1b97dcad8a1
MD5 269eb14903acf52557d31ba3e17e4a89
BLAKE2b-256 6a4226d9990dc446cec432c86047bc67e3cf41f6651a9cd6e4451e21107aacec

See more details on using hashes here.

Provenance

The following attestation bundles were made for fragma-2026.1.22-py3-none-any.whl:

Publisher: deploy_pypi_package.yml on floiseau/fragma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page