Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bbbef65
upgraded to jupyter 2, made myst.yml instead of toc and conf
Oct 2, 2025
b35cd29
removed old .yml files
Oct 2, 2025
9bb112f
moved jupy2 dependencies
Oct 2, 2025
34c48e7
pre release
RemDelaporteMathurin Oct 3, 2025
6362a70
quotes in pip command + dark logo
RemDelaporteMathurin Oct 3, 2025
565b6ab
python command
RemDelaporteMathurin Oct 3, 2025
2e61d17
fixed install of jupyterbook2
RemDelaporteMathurin Oct 3, 2025
c148449
attempt to fix the build
RemDelaporteMathurin Oct 3, 2025
fced6af
post build
RemDelaporteMathurin Oct 3, 2025
8890cba
build and move html
RemDelaporteMathurin Oct 3, 2025
657fc4b
override build
RemDelaporteMathurin Oct 4, 2025
f9f55e6
added hyphen
Oct 6, 2025
7edbec4
overriding build and creating environment with command
Oct 8, 2025
3152e32
added conda init
Oct 8, 2025
19093de
not using conda activate anymore
Oct 8, 2025
3c0836c
added node.js to dependancies
Oct 8, 2025
3be70ad
fixed hyphen?
Oct 8, 2025
03323cb
updated syntax
Oct 8, 2025
cbf2b5a
syntax update
Oct 8, 2025
3d85caa
added html to command line
Oct 8, 2025
96764d2
fixing path location
Oct 8, 2025
cda3f22
added init for jupy book
Oct 8, 2025
db86959
changed init to start
Oct 8, 2025
4d4a3d8
listing folder to see what builds
Oct 8, 2025
f1ce3ad
debugging fix
Oct 8, 2025
8f52c15
bash command
Oct 8, 2025
50d6728
removed markdown text in reactions.ipynb temporarily
Oct 8, 2025
f213379
adding /book to path
Oct 9, 2025
c0fb70c
trying example from jupy2 gh
Oct 9, 2025
5f42702
typo fix
Oct 9, 2025
577b340
added keep-host
Oct 9, 2025
0a57eb3
not creating environment to test if host connects
Oct 9, 2025
85887e5
changing host location
Oct 9, 2025
fc39efb
changing html to site
Oct 9, 2025
35b1fc7
adding back env
Oct 9, 2025
700d407
change host location before running commands
Oct 9, 2025
29c2de8
changed template
Oct 14, 2025
ba867e1
changed binder url
Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
version: 2

# conda:
# environment: environment.yml

build:
os: ubuntu-22.04
tools:
python: "miniconda-latest"
nodejs: "20"
apt_packages:
- libglx-mesa0
- libgl1
- xvfb
jobs:
pre_build:
# Generate the Sphinx configuration for this Jupyter Book so it builds.
- "jupyter-book config sphinx book/"

conda:
environment: environment.yml

sphinx:
builder: html
fail_on_warning: true
configuration: book/_config.yml
commands:
- npm install -g mystmd
# - pip install "jupyter-book>=2.0.0a0"
- conda env create --name festim-workshop-jupyter2 --file environment.yml
- mkdir -p $READTHEDOCS_OUTPUT/site
- ls
- export HOST=127.0.0.1
- export BASE_URL=.
- conda run -n festim-workshop-jupyter2 bash -c "cd book/ && jupyter book build --html"
- cp -a book/_build/html/. "$READTHEDOCS_OUTPUT/html" && rm -r book/_build
48 changes: 0 additions & 48 deletions book/_config.yml

This file was deleted.

39 changes: 0 additions & 39 deletions book/_toc.yml

This file was deleted.

53 changes: 8 additions & 45 deletions book/content/species_reactions/reactions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"\n",
"We'll start with a simple reaction between species A and B forming species C at a rate $k$ and assume there is no backward reaction.\n",
"\n",
"```{math}\n",
"<!-- ```{math}\n",
"\\ce{A + B ->[k] C}\n",
"```"
"``` -->"
]
},
{
Expand Down Expand Up @@ -224,9 +224,6 @@
"\n",
"The previous example can be very easily extended to a two-way reaction:\n",
"\n",
"```{math}\n",
"\\ce{A + B <-->[k][p] C}\n",
"```\n",
"\n",
"The governing equations for this problem are:\n",
"\n",
Expand Down Expand Up @@ -350,13 +347,9 @@
"Here we consider a reaction scheme where mobile species A and B react to form species C (immobile).\n",
"Species C then reacts *on its own* to form species D.\n",
"\n",
"```{math}\n",
"\\ce{A + B <-->[k_1][p_1] C}\n",
"```\n",
"\n",
"```{math}\n",
"<!-- ```{math}\n",
"\\ce{C ->[k_2] D}\n",
"```\n",
"``` -->\n",
"\n",
"The governing equations of this system are:\n",
"\n",
Expand Down Expand Up @@ -500,10 +493,7 @@
"\n",
"\n",
"Hydrogen trapping can be represented as a reaction too. Here we consider mobile hydrogen ($\\mathrm{H}$) reacting with an empty trap ($[\\ ]$) to form trapped hydrogen ($\\mathrm{[H]}$):\n",
"\n",
"```{math}\n",
"\\ce{H + [ ] <-->[k][p] [H]}\n",
"```\n"
"\n"
]
},
{
Expand Down Expand Up @@ -884,18 +874,6 @@
"\n",
"Let's consider a trap with 3 occupancy levels. We have the following reaction scheme:\n",
"\n",
"```{math}\n",
"\\ce{H + [ ] <-->[k][p] [1H]}\n",
"```\n",
"\n",
"```{math}\n",
"\\ce{H + [1H] <-->[k][p] [2H]}\n",
"```\n",
"\n",
"```{math}\n",
"\\ce{H + [2H] <-->[k][p] [3H]}\n",
"```\n",
"\n",
"The underlying governing equations are:\n",
"\n",
"\\begin{align}\n",
Expand Down Expand Up @@ -1040,13 +1018,6 @@
"\n",
"Now we consider a unique trapping site that can react with two different mobile species H and D:\n",
"\n",
"```{math}\n",
"\\ce{H + [\\ ] <-->[k][p] [H]}\n",
"```\n",
"\n",
"```{math}\n",
"\\ce{D + [\\ ] <-->[k][p] [D]}\n",
"```\n",
"\n",
"The governing equations for this problem are:\n",
"\n",
Expand Down Expand Up @@ -1203,9 +1174,7 @@
"\n",
"``Reaction`` objects can have multiple products. This is useful to simulate things like isotope swapping where a mobile species reacts with a trapped species, and swap their positions:\n",
"\n",
"```{math}\n",
"\\ce{H + [T] <-->[k_\\mathrm{swap}][k_\\mathrm{swap}] T + [H]}\n",
"```\n",
"\n",
"\n",
"In this example we consider the above reaction, with an initial condition for the trapped T concentration and mobile H diffusing in the domain, slowly swapping trapped T.\n",
"\n",
Expand Down Expand Up @@ -1352,11 +1321,7 @@
"cell_type": "markdown",
"id": "e238c83e",
"metadata": {},
"source": [
"```{math}\n",
"\\ce{A ->[\\lambda] \\emptyset}\n",
"```"
]
"source": []
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -1468,9 +1433,7 @@
"\n",
"Another use case of this type of reaction is metal interstitial atoms recombining with vacancies (both forming a Frenkel pair) and annihilate.\n",
"\n",
"```{math}\n",
"\\ce{I + V ->[k] \\emptyset}\n",
"```\n",
"\n",
"\n",
"In this example, we define two mobile species I and V, both diffusing from one side of the 1D domain and annihilating."
]
Expand Down
26 changes: 24 additions & 2 deletions book/intro.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# The FESTIM tutorial
# FESTIM-workshop

Welcome to the FESTIM tutorial!
The FESTIM workshop is a tutorial covering many aspects of the hydrogen transport code FESTIM.
Check out the [website](https://festim-workshop.readthedocs.io).

## Launch in Binder

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/festim-dev/FESTIM-workshop/main)

[Run this workshop](https://mybinder.org/v2/gh/festim-dev/FESTIM-workshop/main) in BinderHub

## Local install

1. Clone this repo

```
git clone https://github.com/festim-dev/FESTIM-workshop
```
2. Create Conda environment (requires conda)

```
conda env create -f environment.yml
```

3. You should then be able to execute the notebooks with the ``festim-workshop`` environment
49 changes: 49 additions & 0 deletions book/myst.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: 1
project:
title: FESTIM workshop
authors:
- name: The FESTIM community
github: festim-dev/FESTIM-workshop
thebe:
binder:
repo: festim-dev/FESTIM-workshop
provider: github
url: https://mybinder.org
ref: festim2
toc:
- file: intro.md
- title: Getting started
children:
- file: content/applications/task01.ipynb
- title: Meshing
children:
- file: content/meshes/mesh_festim.ipynb
- file: content/meshes/mesh_fenics.ipynb
- file: content/meshes/mesh_gmsh.ipynb
- file: content/meshes/mesh_salome.ipynb
- title: Materials
children:
- file: content/material/material_basics.md
- file: content/material/material_htm.md
- file: content/material/material_advanced.md
- title: Species & Reactions
children:
- file: content/species_reactions/species.ipynb
- file: content/species_reactions/reactions.ipynb
- file: content/species_reactions/surface_reactions.ipynb
- title: Applications
children:
- file: content/applications/task02.ipynb
- file: content/applications/task03.ipynb
- file: content/applications/task04.ipynb
- file: content/applications/task07.ipynb
- file: content/applications/task08.ipynb
- file: content/applications/task06.ipynb
- file: content/applications/task10.ipynb
- file: content/applications/microstructure.md
site:
options:
logo: images/logo_light.png
logo_dark: images/logo_dark.svg
folders: true
template: "https://github.com/myst-templates/book-theme/archive/de4c1e9c09c6cd12fc529c1f22e8abf8e7f35381.zip"
6 changes: 4 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: festim-workshop
name: festim-workshop-jupyter2
channels:
- conda-forge
- defaults
dependencies:
- jupyter-book
- jupytext # necessary to open MyST files using BinderHub https://jupyterbook.org/en/stable/interactive/launchbuttons.html#launchbuttons-binder
- sphinx-tags
- nodejs
- matplotlib
- meshio[all]
- pip>=20.1
Expand All @@ -17,6 +17,8 @@ dependencies:
- shapely
- scipy
- pip:
- "jupyter-book>=2.0.0a0"
- "--pre"
- pyparsing
- h-transport-materials==0.16
- pyvista[all,trame] # trame cannot be installed on conda