Welcome to the
FESTIM workshop
FESTIM
An open-source python-based finite elements code for hydrogen transport
FESTIM
Hydrogen transport
Heat transfer
diffusion and trapping
An open-source python-based finite elements code for hydrogen transport
FESTIM
✅ More transparency
✅ More collaborations
✅ More flexibility
An open-source python-based finite elements code for hydrogen transport
FESTIM
- Easy to learn
- Plenty of libraries (numpy, scipy, matplotlib, HTM...)
An open-source python-based finite elements code for hydrogen transport
FESTIM
An open-source python-based finite elements code for hydrogen transport
import festim as F
my_model = F.Simulation()
import numpy as np
my_model.mesh = F.MeshFromVertices(
vertices=np.linspace(0, 1e-6, num=1001)
)
my_model.materials = F.Material(id=1, D_0=1.9e-7, E_D=0.2)
my_model.T = F.Temperature(value=500)
my_model.boundary_conditions = [
F.DirichletBC(
surfaces=[1,2],
value=1e15, # H/m3/s
field=0
)
]
my_model.sources = [F.Source(value=1e20, volume=1, field=0)]
my_model.settings = F.Settings(
absolute_tolerance=1e10,
relative_tolerance=1e-10,
final_time=100 # s
)
my_model.dt = F.Stepsize(0.1)
my_model.initialise()
my_model.run()
FESTIM
An open-source python-based finite elements code for hydrogen transport
- Based on the FEniCS library
- Flexible
- Complex geometries
"Anything is possible with FEniCS, you just have to code it."
FESTIM's philosophy
We want to make hydrogen transport simulations easy for everyone!
We also encourage contributions!
- Feedback (suggestions, bug reports...)
- Implement new features
- Bug fixing
- Documentation updates (even small ones!)
- ...
FESTIM main features
Physics
- Hydrogen diffusion
- Trapping (McNabb & Foster)
- Heat transfer
- Conservation of chemical potential
- Soret effect
Dimension
✅ 1D
✅ 2D
✅ 3D
Boundary conditions
- Imposed concentration/temperature
- Hydrogen/heat flux
- Recombination flux
- Dissociation flux
- Convective heat flux
- Sievert's law
- Plasma implantation approx.
- ...
Traps
- Time/space dependent densities
- Extrinsic traps
A few examples
Thermo-desorption
3D monoblocks
Tritium breeding blankets
The workshop
✅ How to install FESTIM
✅ Main features
❌Not a python course
❌Not a FEniCS course
❌Not a complete tour of FESTIM
Contents
- Basic simulation
- Thermo-desorption experiment
- Permeation experiment
- Multi-material simulation
- Post-processing
- Advection-diffusion
- Heat transfer
- CAD integration
- HTM integration
How to install FESTIM
Docker
Conda
✅
✅
✅
✅
✅
✅
with WSL
Install with Docker
docker run -ti -v $(pwd):/home/fenics/shared quay.io/fenicsproject/stable:latest
1. Get Docker
2. Create a FEniCS docker container
4. Navigate to /home/fenics/shared to see your local files
pip install festim
3. Install FESTIM
Install with Conda
1. Get conda
2. Create a FESTIM environment
conda create -n festim -c conda-forge fenics
conda activate festim
3. Install FESTIM
pip install festim
with WSL
Workshop
Run the workshop in Codespaces (recommended):
- Create a GitHub account
- Go to the workshop repo
- Create a Codespace
Codespace is a virtual environment with everything ready for the workshop!
All in your browser!
Workshop
git clone https://github.com/RemDelaporteMathurin/FESTIM-workshop
jupyter-notebook
FESTIM workshop
By Remi Delaporte-Mathurin
FESTIM workshop
- 413