Computational fracture mechanics examples with FEniCSx

Computational fracture mechanics examples with FEniCSx#

This webpage provides basic examples on computational methods to solve fracture mechanics problems using DOLFINx.

This work includes the contribution of the Early Stage Researchers (ESR) of the ITN project Newfrac funded by the European Commission under a Marie Skłodowska-Curie Actions Grant Agreement n. 861061.

The webpage is build using Jupyter-book, reusing the configuration of the Dolfinx Tutorial.

Comments and corrections to this webpage should be submitted to the issue tracker by going to the relevant page, then click the git-symbol in the top right corner and “open issue”.

Installation#

To run this notebooks on your computer, we suggest using Docker or Conda, as exaplained below.

Docker#

  1. First, install docker for your operating system. You can find instructions here: https://docs.docker.com/get-docker/

  2. Download and unzip the present repository. If you have git installed, you can clone the repository with git clone  https://github.com/newfrac/fenicsx-fracture.git.
    Otherwise download and unzip the file https://github.com/newfrac/fenicsx-fracture/archive/refs/heads/main.zip.

  3. To build a docker image for this documentation, you can run from the root of the downloaded repository (use the PowerShell if you are on Windows)

docker build -t fenicsx-fracture -f docker/Dockerfile .
  1. To create a one-time usage container you can call:

docker run --rm -ti -v $(pwd):/root/shared -w /root/shared  --init -p 8888:8888 fenicsx-fracture

You can then access the jupyter lab notebook opening in your browser one of the links starting with http://... indicated in the terminal.

Steps 1-3 need to be done only the first time. After, you can then start the container with the command in step 4 directly.

Conda#

To run the notebooks locally, we recommend to use the conda environment provided in this repository. To install conda, please follow the instructions here.

To create the conda environment and activate it

conda env create -f fenicsx-fracture.yml
conda activate fenicsx-fracture

Binder#

Although we recommend to execute the notebook locally, you can also use the cloud-based binder service to execute the notebooks:

Binder

Acknowledgements#

The funding received from the European Union’s Horizon 2020 research and innovation programme under Marie Skłodowska-Curie grant agreement No. 861061-NEWFRAC is gratefully acknowledged.

This project is created using the open source Jupyter Book project and the book of dolfinx-tutorial as a template.

Building the book locally (for developers)#

To generate the book locally:

jupyter-book build .

To visualize the results, open in your browser the generated file _build/html/index.html.

License#

MIT License, see LICENSE file.