FESTIM: status and developments after 5 years of hydrogen transport modelling

Remi Delaporte-Mathurin

User inputs

  • Material properties
  • Trap properties
  • Geometry
  • Boundary conditions
  • Initial conditions
  •            ...

Heat transfer model

T

Hydrogen transport model

  • McNabb & Foster
  • Multi-level trapping
  • Multi-isotopes
  • ...

FESTIM

Outputs

  • H concentration fields \(c(x,t)\)
  • Temperature field \(T(x,t)\)
  • surface fluxes
  • inventories
  • average concentration
  •              ...

2019

Start of development

We need a new tool!

Problem: predict T retention and permeation

 

  • Multi-dimensional
  • Multi-material
  • non homogeneous temperature

W

Cu

CuCrZr

Particle and heat fluxes

Convection

14 mm

2022

 License Apache 2.0

More transparency

  • Reproducibility in papers
  • Source code available

✅ More collaborations

  • No need for complex collaboration agreements
  • External contributions

✅ More flexibility

  • Can be adapted to your needs
  • Better interoperability

2019

Open source

We need a numerical tool

Problem: predict T retention and permeation

 

  • Multi-dimensional
  • Multi-material
  • non homogeneous temperature

W

Cu

CuCrZr

Particle and heat fluxes

Convection

14 mm

2022

 License Apache 2.0

More transparency

  • Reproducibility in papers
  • Source code available

✅ More collaborations

  • No need for complex collaboration agreements
  • External contributions

✅ More flexibility

  • Can be adapted to your needs
  • Better interoperability

Oct 2023

v1.0 release

2019

v1.0 release

We need a numerical tool

Problem: predict T retention and permeation

 

  • Multi-dimensional
  • Multi-material
  • non homogeneous temperature

W

Cu

CuCrZr

Particle and heat fluxes

Convection

14 mm

2022

Oct 2023

April 2024

Non-profit organisation supporting open source software for science and research

More info at numfocus.org

2019

We need a numerical tool

Problem: predict T retention and permeation

 

  • Multi-dimensional
  • Multi-material
  • non homogeneous temperature

W

Cu

CuCrZr

Particle and heat fluxes

Convection

14 mm

2022

Oct 2023

April 2024

Non-profit organisation supporting open source software for science and research

More info at numfocus.org

Meet the development team

Jonathan Dufour

CEA, France

+ many other contributors

Remi Delaporte-Mathurin

MIT, US

@RemDelaporteMathurin

Samuele Meschini

MIT, US

@SamueleMeschini

Etienne Hodille

CEA, France

@ehodille

Gabriele Ferrero

PoliTo, Italy

@gabriele-ferrero

James Dark

CEA, France

@jhdark

Vladimir Kulagin

MEPhI, Russia

@KulaginVladimir

fork

fork

pull request

FESTIM

Jane

FESTIM

John

FESTIM

festim-dev

pull request

FESTIM is open-source

The code is missing a feature?

Just add it!

Found a bug?

Report it and we'll fix it!

How to use FESTIM

Documentation

and installation instructions

FESTIM is user-friendly

  • Very easy to learn
     
  • Plenty of libraries (numpy, scipy, matplotlib, HTM...)
     
  • Inuitive interface
conda install -c conda-forge fenics
pip install festim

Two lines to install!

import festim as F
import numpy as np

my_model = F.Simulation()

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 = 500  # K

my_model.boundary_conditions = [
    F.DirichletBC(
        surfaces=[1, 2],
        value=1e15,  # H/m3/s
        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)  # s

my_model.initialise()

my_model.run()

FESTIM is user-friendly

  • Online user support forum
     
  • Anyone from the community can answer questions (developers and users)

The FESTIM-workshop offers dozens of tutorials

Available at:
github.com/festim-dev/FESTIM-workshop

FESTIM is user-friendly

Runs in your browser without installing anything!

UKAEA Aug 2024

FESTIM is user-friendly

To date, 4 user workshops have been organised, covering:

  • Basic usage
  • Advanced usage
  • Hackathons
  • How to contribute

UKAEA Aug 2024

~60 attendees in total!

FESTIM is fully documented

Installation instructions

User guide

FESTIM is verified & validated

  • Validated against TDS, permeation experiments...
     
  • Verified against analytical solutions in many different problems
     
  • New V&V online book

festim-vv-report.readthedocs.io

 

14 verification cases (4 in progress)

6 validation cases (5 in progress)

Method of Exact Solution

governing equations

exact solutions

parameters (sources, BCs, ICs)

FESTIM

computed solutions

solve

run

compare

⚠️sometimes very complex!

Method of Manufactured Solutions

governing equations

manufactured solutions

source terms, BCs and ICs

FESTIM

computed solutions

compare

V&V

Effective-diffusion through a slab

2D multi-material

Exact

Computed concentration

FESTIM is verified & validated

Transparent

  • all the code is available
  • including pre- and post-processing

Reproducible

  • Nothing is hard coded
  • All cases are run automatically

Version control

  • Source code of the book available on GitHub
  • Contributions are welcome!

FESTIM is used worldwide

8 private companies

13 universities

18 research organisations

📈5 years of development

📑14+ publications

🗣️110+ citations

🧑‍💻20+ contributors

🏛️26+ institutions using the code

🧑‍💻70+ Slack members

⭐90+ stars on GitHub

🧑‍💻4 workshops

FESTIM in numbers

Evolution of GitHub stars

Open source

SOFE

New reference paper

Kyoto Fusioneering

UKAEA

IPP

Retention studies

  • Delaporte-Mathurin et al 2024 International Journal of Hydrogen Energy 63 786–802
  • Delaporte-Mathurin et al 2024 Nucl. Fusion 64 026003
  • ITER plasma facing components
  • Transient estimation of tritium retention

Detritiation studies

Influence of ELMs on retention

  • 1D model of a ITER monoblock
     
  • Transient heat transfer simulation
     
  • Varying surface heat flux

Permeation experiment

No barrier

with barrier

Permeation barrier

Substrate

High H pressure

Low H pressure

Permeation flux

TDS analysis

Breeding Blanket modelling

  • DEMO WCLL
  • Complex 3D geometry
  • Coupled to fluid dynamics
  • Tritium generation in the LiPb volume (computed from OpenMC)

James Dark et al 2021 Nucl. Fusion 61 116076

Tritium extraction system

K. Dunnell (MIT)

  • Permeation Against Vacuum
  • Complex 3D geometry
  • Coupled with fluid dynamics
  • Tritium extraction from permeable membranes

BABY tritium breeding experiment

Velocity

Temperature

Tritium concentration

C. Weaver (MIT)

① neutrons are generated

 

② tritium is created from nuclear reactions

 

③ tritium is transported in the salt

 

④ tritium is released into the gas phase

 

⑤ tritium is collected and counted

BABY breeding experiment

Kinetic surface model

Paper is progress...

New in v1.3!

FESTIM can inform fuel cycle models

Text

Metal Foil Pumps for DIR

  • H is implanted in the first \( 10 \ \mathrm{nm} \)
  • Super-permeation regime is attained at high recombination energy (upstream surface)
  • Source code

Benedikt & Day, (2017) Fusion Engineering and Design

  I want multi-isotopes😠

  tRaPs aT iNtErFaCeS! 🫠

I only trust multi-level occupancy trapping 🥴

What about the diffusion of intersitials?! 🤔

Traps can diffuse! 😠

2022

2019

Start of development

open source

2023

v1.0 release

2024

Towards FESTIM 2

FESTIM limitations

Parallel scaling issues

 Technical debt

Legacy FEniCS deprecated

Current interface condition  does not scale well

Many hard coded foundations

Implementation of new features is more complex

Bugs not being fixed

Can't take advantage of   new features

FEniCSx

New Features

Multi-isotope transport

New mesh types

Validation on PFCs

Chemical reactions

External physics integration

Anisotropic diffusion

Multilevel trapping

Massively parallel

Towards the future: FESTIM 2

Chemical reactions

  • More suitable for molten salts
  • Even more flexibility

Multi-species transport

  • Isotopic exchange
  • Multi-level trapping
  • Transport of impurities, He, interstitials...
  • Validation on WEST PFCs

Finite element engine upgrade

  • Better performances (including in parallel)
  • Bigger models
  • Mixed topology meshes

Graphical user interface?

New examples

Spherical cavity trapping

see Zibrov and Schmid, NME, 2024

for complete description

  • Implementation in FESTIM of the spherical cavity trapping model developed by Zibrov and Schmid
  • Custom trapping equations
  • Smooth implementation in FESTIM

Interface discontinuity 

  • 2 materials
  • 1 mobile + 1 trap

Pull request under review #878

But this changes a lot of things!

FESTIM 1

with dolfinx

1 mesh for the whole domain

1 mesh for the whole domain

Submesh 1

Submesh 2

VectorFunctionSpace \(V\) (eg. 3 components)

Function \(u\) (eg. 3 components)

VectorFunctionSpace \(V_1\)

\(V_2\)

Function \(u_1\) (eg. 2 comps.)

\(u_2\) (eg. 3 comps.)

1 function for the whole domain

1 function per subdomain

Isotope swapping

\mathrm{H} + [\ \ \ ]_\mathrm{trap} \ \substack{p \\[-1em] \longleftarrow\\[-1em] \longrightarrow \\[-1em] k} \ [\mathrm{H}]_\mathrm{trap}
\mathrm{D} + [\ \ \ ]_\mathrm{trap} \ \substack{p \\[-1em] \longleftarrow\\[-1em] \longrightarrow \\[-1em] k} \ [\mathrm{D}]_\mathrm{trap}
\mathrm{D} + [\mathrm{H}]_\mathrm{trap} \ \substack{k_\mathrm{swap} \\[-1em] \longleftarrow\\[-1em] \longrightarrow \\[-1.2em] k_\mathrm{swap}} \ [\mathrm{D}]_\mathrm{trap} + \mathrm{H}

same underlying equations!

Can be represented by festim.Reaction

Isotope swapping

my_model.species = [
    mobile_H,
    mobile_D,
    trapped_H,
    trapped_D,
]

my_model.reactions = [
    F.Reaction(
        k_0=k_0,
        E_k=0.39,
        p_0=1e13,
        E_p=1.2,
        reactant1=mobile_H,
        reactant2=empty_trap,
        product=trapped_H,
        volume=my_subdomain,
    ),
    F.Reaction(
        k_0=k_0,
        E_k=0.39,
        p_0=1e13,
        E_p=1.2,
        reactant1=mobile_D,
        reactant2=empty_trap,
        product=trapped_D,
        volume=my_subdomain,
    ),
    F.Reaction(
        k_0=k_0,
        E_k=0.1,
        p_0=k_0,
        E_p=0.1,
        reactant1=mobile_H,
        reactant2=trapped_D,
        product=[mobile_D, trapped_H],
        volume=my_subdomain,
    ),
]

Usual trapping reactions

Swapping reaction

4 species are defined

Multi-isotope, multi-level trapping

  • 7 different species
  • 6 reactions
  • \( c_H = 10^{20} \ \mathrm{m^{-3}} \) on the left
  • \( c_D = 10^{19} \ \mathrm{m^{-3}} \) on the right
  • Source code available here

1 trap, 2 levels, 2 isotopes

\mathrm{H} + [\ \ \ ] \ \substack{p_1 \\[-1em] \longleftarrow\\[-1em] \longrightarrow \\[-1em] k_1} \ [\mathrm{H}_1\mathrm{D}_0]
\mathrm{H} + [\mathrm{H}_1\mathrm{D}_0] \ \substack{p_2 \\[-1em] \longleftarrow\\[-1em] \longrightarrow \\[-1em] k_2} \ [\mathrm{H}_2\mathrm{D}_0]
\mathrm{D} + [\ \ \ ] \ \substack{p_3 \\[-1em] \longleftarrow\\[-1em] \longrightarrow \\[-1em] k_3} \ [\mathrm{H}_0\mathrm{D}_1]
\mathrm{D} + [\mathrm{H}_0\mathrm{D}_1] \ \substack{p_4 \\[-1em] \longleftarrow\\[-1em] \longrightarrow \\[-1em] k_4} \ [\mathrm{H}_0\mathrm{D}_2]
\mathrm{H} + [\mathrm{H}_0\mathrm{D}_1] \ \substack{p_5 \\[-1em] \longleftarrow\\[-1em] \longrightarrow \\[-1em] k_5} \ [\mathrm{H}_1\mathrm{D}_1]
\mathrm{D} + [\mathrm{H}_1\mathrm{D}_0] \ \substack{p_6 \\[-1em] \longleftarrow\\[-1em] \longrightarrow \\[-1em] k_6} \ [\mathrm{H}_1\mathrm{D}_1]

\( \mathrm{H} \) = mobile H

\( \mathrm{D} \) = mobile D

\( [\mathrm{H}_x\mathrm{D}_y] \) = \(x\) H and \(y\) D in trap

Anisotropy

  • Anisotropic materials can be simulated with very few modifications
  • Composites
  • Anisotropic microstructures
D = \begin{bmatrix} D_{xx} & 0\\ 0 & D_{yy} \end{bmatrix}

Follow the development roadmap

When is FESTIM 2 released?

Anonymous FESTIM dev

We don't know. But it'll be sooner if you help us!

Anonymous FESTIM user

Open-source is win-win

🚀FESTIM benefits from the community

  • New use cases
  • New features
  • Improved documentation
  • V&V

🚀The community benefits from FESTIM

  • 21+ active projects using FESTIM
  • ~30 institutions using the code
  • 4 workshops

What FESTIM needs to thrive?

More external contributions!

💵Funding: no project currently supports FESTIM dev

🧑‍💻Code: only 3 core developers (only one permanent)

FESTIM: status and developments after 5 years of hydrogen transport modelling

By Remi Delaporte-Mathurin

FESTIM: status and developments after 5 years of hydrogen transport modelling

  • 156