Welcome to the

FESTIM workshop

FESTIM

An open-source python-based finite elements code for hydrogen transport ​

FESTIM

\rho C_p \frac{\partial T}{\partial t} = \nabla \cdot (\lambda \nabla T)
\frac{\partial c_\mathrm{m}}{\partial t} = \nabla \cdot (D \nabla c_\mathrm{m}) - \frac{\partial c_{\mathrm{t}, i}}{\partial t}
\frac{\partial c_{\mathrm{t}, i}}{\partial t} = k \ c_\mathrm{m} \ (n - c_{\mathrm{t}, i}) - p \ c_{\mathrm{t}, i}

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

  1. Basic simulation
  2. Thermo-desorption experiment
  3. Permeation experiment
  4. Multi-material simulation
  5. Post-processing
  6. Advection-diffusion
  7. Heat transfer
  8. CAD integration
  9. 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

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

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):

  1. Create a GitHub account
  2. Go to the workshop repo
  3. Create a Codespace

Codespace is a virtual environment with everything ready for the workshop!

 

All in your browser!

Workshop

  1. Create a GitHub account
  2. Clone to the workshop repo

 

 

 

 

      3. Install FESTIM

 

      4. Run a jupyter-notebook

git clone https://github.com/RemDelaporteMathurin/FESTIM-workshop
jupyter-notebook

FESTIM workshop

By Remi Delaporte-Mathurin

FESTIM workshop

  • 413