An open-source python-based finite elements code for hydrogen transport
Hydrogen transport
Heat transfer
diffusion and trapping
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
An open-source python-based finite elements code for hydrogen transport
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()
An open-source python-based finite elements code for hydrogen transport
"Anything is possible with FEniCS, you just have to code it."
We want to make hydrogen transport simulations easy for everyone!
We also encourage contributions!
Physics
Dimension
✅ 1D
✅ 2D
✅ 3D
Boundary conditions
Traps
Thermo-desorption
3D monoblocks
Tritium breeding blankets
✅ How to install FESTIM
✅ Main features
❌Not a python course
❌Not a FEniCS course
❌Not a complete tour of FESTIM
Docker
Conda
✅
✅
✅
✅
✅
✅
with WSL
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
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
Run the workshop in Codespaces (recommended):
Codespace is a virtual environment with everything ready for the workshop!
All in your browser!
git clone https://github.com/RemDelaporteMathurin/FESTIM-workshop
jupyter-notebook