FESTIM (Finite Elements Simulation of Tritium in Materials) is a tool for modeling Hydrogen Isotopes (HIs) transport in materials. The governing equations are composed of:
- Fick's law of diffusion of species based on concentration gradient
- Soret effect
- Trapping/detrapping macroscopic rate equations
- Heat equation
The following features are included in this tool:
- Mesh import from XDMF files
- Adaptive stepsize
- Temperature is defined by:
- user-defined expression
- solving transient/stationnary heat equation
- Multiple intrinsic/extrinsic traps with non-homogeneous density distribution
- Wide range of built-in boundary conditions (Sievert's law, recombination flux, experimental data, user-defined expression...)
- Derived quantities computation (surface fluxes, volume integrations, extrema over domains, mean values over domains...)
FESTIM spatially discretises the PDEs using the Finite Element Methods. To this extent, we chose to use the C++/Python library FEniCS. The implicit time discretisation method is backward Euler. PDEs are solved using FEniCS' Newton nonlinear solver. A library of generic functions is provided so that users can run custom simulations in addition to the flexibility of FEniCS built-in functions.
The FEniCS project provides a Docker image with FEniCS and its dependencies (python3, UFL, DOLFIN, numpy, sympy...) already installed. See their "FEniCS in Docker" manual.
Get Docker here.
Pull the Docker image and run the container, sharing a folder between the host and container:
For Windows users:
docker run -ti -v ${PWD}:/home/fenics/shared --name fenics quay.io/fenicsproject/stable:latest
For Linux users:
docker run -ti -v $(pwd):/home/fenics/shared --name fenics quay.io/fenicsproject/stable:latest
Clone FESTIM's git repository:
git clone https://github.com/RemDelaporteMathurin/FESTIM
Run the tests:
pytest-3 Tests/
FESTIM allows users to export their data to .csv, .txt or to a XDMF format with an XML interface. The latter can then be opened in visualisation tools like ParaView or VisIt.
- R. Delaporte-Mathurin, et al., Finite Element Analysis of Hydrogen Retention in ITER Plasma Facing Components using FESTIM. Nuclear Materials and Energy 21: 100709. DOI: 10.1016/j.nme.2019.100709.