An open-source python-based finite elements code for hydrogen transport
2022
2019
Start of FESTIM development
FESTIM open-source
Oct 2023
v1.0 release
2024
Hydrogen transport
Heat transfer
diffusion and trapping
McNabb & Foster
An open-source python-based finite elements code for hydrogen transport
An open-source python-based finite elements code for hydrogen transport
✅ More transparency
✅ More collaborations
✅ More flexibility
An open-source python-based finite elements code for hydrogen transport
The code is missing a feature?
Just add it!
Found a bug?
Report it and we'll fix it!
📈5 years of development
📑12+ publications
🗣️100+ citations
🧑💻14+ contributors
🏛️20+ institutions using the code
🧑💻27+ Slack members
⭐75+ stars on GitHub
3 workshops
Evolution of GitHub stars
8 private companies
10 universities
16 research organisations
An open-source python-based finite elements code for hydrogen transport
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 = F.Temperature(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()
Make use of the python ecosystem
Create a 1D mesh easily
Materials
Temperature
Boundary conditions
Settings and stepsize
Only a few lines of python!
Check out the complete documentation at
Installation instructions
User guide
We want to make hydrogen transport simulations easy for everyone!
We also encourage contributions!
No barrier
with barrier
Permeation barrier
Substrate
High H pressure
Low H pressure
Conservation of chemical potential
Permeation flux
Benedikt & Day, (2017) Fusion Engineering and Design
courtesy of V. Kulagin (MePhi)
courtesy of J. Dark (CEA/LSPM)
James Dark et al 2021 Nucl. Fusion 61 116076
courtesy of J. Dark (CEA LSPM)
courtesy of K. Dunnell (MIT)
Velocity
Temperature
Tritium concentration
courtesy of 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
courtesy of V. Kulagin (MePhi)
\(P(t)\)
permeation flux
Enclosure
festim-vv-report.readthedocs.io
Effective-diffusion through a slab
2D multi-material
Exact
Computed concentration
governing equations
exact solutions
parameters (sources, BCs, ICs)
FESTIM
computed solutions
solve
run
compare
⚠️sometimes very complex!
governing equations
manufactured solutions
source terms, BCs and ICs
FESTIM
computed solutions
compare
fork
fork
pull request
FESTIM
Jane Doe
FESTIM
John Doe
FESTIM
festim-dev
pull request
Documentation
and installation instructions
The FESTIM workshop is a series of tutorials
from basic problems to more advance cases
conda install -c conda-forge fenics-dolfinx
pip install git+https://github.com/festim-dev/festim.git@fenicsx
dolfinx
Reaction
You can try this version of FESTIM right now!
\( \mathrm{H} \) = mobile H
\( \mathrm{D} \) = mobile D
\( [\mathrm{H}_x\mathrm{D}_y] \) = \(x\) H and \(y\) D in trap
same underlying equations!
Can be represented by festim.Reaction
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
see Zibrov and Schmid, NME, 2024
for complete description