Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions book/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ sphinx:
- "sphinx.ext.autodoc"
- "sphinx.ext.intersphinx"
- "sphinx_codeautolink"
# - "sphinx_design"

parse:
myst_enable_extensions:
Expand Down
3 changes: 2 additions & 1 deletion book/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@ parts:
- file: content/applications/task08
- file: content/applications/task06
- file: content/applications/task10
- file: content/applications/microstructure
- file: content/applications/microstructure
- file: content/applications/ml
17 changes: 17 additions & 0 deletions book/content/applications/ml.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
jupytext:
formats: ipynb,md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.18.1
kernelspec:
display_name: festim-workshop
language: python
name: python3
---

# Training a FESTIM surrogate model

Coming soon!
231 changes: 45 additions & 186 deletions book/content/applications/task01.ipynb

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions book/content/applications/task02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"\n",
"where $\\varphi =2.5 \\times 10^{19} \\text{m}^{-2}\\text{s}^{-1}$ and $f(x)$ is a Gaussian spatial distribution with a mean value of $4.5 \\: \\text{nm}$ and a width of $2.5 \\: \\text{nm}$.\n",
"\n",
"FESTIM has a special class for this case: `ImplantationFlux`.\n",
"FESTIM has a special class for this case: {py:class}`ParticleSource<festim.source.ParticleSource>`.\n",
"\n",
"The ion flux is temporally defined using a Sympy Piecewise expression, to be active for the `implantation_time`.\n",
"\n",
Expand Down Expand Up @@ -186,7 +186,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Boundary conditions (BCs) can be of several types in FESTIM, the most simple of them being the `FixedConcentrationBC` where an analytical expression is given in the argument: `value`. The argument `subdomain` is the subdomain on which the BC is applied. If no BC is applied on a surface, it will be considered as a non flux surface (ie $\\frac{\\partial c}{\\partial\\textbf{n}} = 0$).\n",
"Boundary conditions (BCs) can be of several types in FESTIM, the most simple of them being the {py:class}`FixedConcentrationBC<festim.boundary_conditions.FixedConcentrationBC>` where an analytical expression is given in the argument: `value`. The argument `subdomain` is the subdomain on which the BC is applied. If no BC is applied on a surface, it will be considered as a non flux surface (ie $\\frac{\\partial c}{\\partial\\textbf{n}} = 0$).\n",
"\n",
"In this case, the solute concentration is set to zero on the left and right surface."
]
Expand Down Expand Up @@ -273,7 +273,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The `Stepsize` object defines the simulation stepsize.\n",
"The {py:class}`Stepsize<festim.stepsize.Stepsize>` object defines the simulation stepsize.\n",
"\n",
"The argument `initial_value` is the initial stepsize is expressed in $\\text{s}$.\n",
"\n",
Expand All @@ -294,7 +294,7 @@
"To do so, we'll use 'derived quantities' objects.\n",
"There is a wide range of derived quantities available in FESTIM.\n",
"\n",
"Here, we'll use `TotalVolume` (volume integration) and `HydrogenFlux`."
"Here, we'll use {py:class}`TotalVolume<festim.exports.TotalVolume>` (volume integration) and {py:class}`SurfaceFlux<festim.exports.SurfaceFlux>`."
]
},
{
Expand Down Expand Up @@ -556,7 +556,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.5"
"version": "3.13.12"
},
"orig_nbformat": 4
},
Expand Down
2 changes: 1 addition & 1 deletion book/content/applications/task03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The first step is to create a model using a `Simulation` object."
"The first step is to create a model using a {py:class}`HydrogenTransportProblem<festim.hydrogen_transport_problem.HydrogenTransportProblem>` object."
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions book/content/applications/task04.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1) Model with barrier\n",
"## Model with barrier\n",
"\n",
"Let's first create a model where tungsten is coated with 1 micron of barrier material on both sides."
]
Expand Down Expand Up @@ -328,7 +328,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2) Model without barrier\n",
"## Model without barrier\n",
"\n",
"We can also run the equivalent model without permeation barriers with bare tungsten.\n",
"Let's make a few modifications:"
Expand Down Expand Up @@ -387,7 +387,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## 3) Calculate the PRF"
"## Calculate the PRF"
]
},
{
Expand Down Expand Up @@ -516,7 +516,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.5"
"version": "3.13.12"
},
"orig_nbformat": 4
},
Expand Down
2 changes: 1 addition & 1 deletion book/content/boundary_conditions/bc_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jupytext:
jupytext_version: 1.19.1
---

# Fixed value and flux boundary condition mathematics
# Backgrounc

This section discusses the math behind fixed temperature/concentration and flux boundary conditions (BCs).

Expand Down
1 change: 1 addition & 0 deletions book/content/meshes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ kernelspec:
name: python3
---

(meshes)=
# Meshes
2 changes: 1 addition & 1 deletion book/content/meshes/mesh_festim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"\n",
"## Uniform 1D meshes\n",
"\n",
"The `Mesh1D` class in FESTIM allows you to define 1D meshes by simply specifying the coordinates of the mesh vertices. This makes it easy to construct uniform or structured meshes over a given interval.\n",
"The {py:class}`Mesh1D<festim.mesh.Mesh1D>` class in FESTIM allows you to define 1D meshes by simply specifying the coordinates of the mesh vertices. This makes it easy to construct uniform or structured meshes over a given interval.\n",
"\n",
"A **uniform mesh** is one where the spacing between points is constant. This type of mesh is ideal for problems where the physical properties or expected solution gradients are evenly distributed across the domain.\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion book/content/misc/dolfinx_steady.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ from dolfinx import fem
import basix
```

We then create a mesh using `create_unit_square()`
We then create a mesh using {py:func}`create_unit_square<dolfinx.mesh.create_unit_square>`

```{code-cell} ipython3
nx = ny = 96
Expand Down
2 changes: 1 addition & 1 deletion book/content/species_reactions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ kernelspec:
name: python3
---

# Meshes
# Species and reactions
47 changes: 46 additions & 1 deletion book/intro.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
---
jupytext:
formats: ipynb,md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.18.1
kernelspec:
display_name: festim-workshop
language: python
name: python3
---


# The FESTIM tutorial

Welcome to the FESTIM tutorial!
Welcome to the FESTIM tutorial! 🎉

Here you can learn to run FESTIM simulations from complete application cases and from the fundamental building blocks of the code!

Comments and corrections to this webpage should be submitted to the issue tracker by going to the relevant page in the tutorial, then click the {fab}`github` repository symbol in the top right corner and either {fas}`lightbulb` “open issue” or {fas}`pencil` "suggest edit".

## Interactive tutorials

You don't have to install FESTIM locally to be able to run these examples yourself.

Press the {fas}`rocket` button on the toolbar, then the {fas}`play` button to edit and run the code.

```{note}
This might take a while to load after new releases of the book.
```

```{code-cell} ipython3
import festim as F

print(F.__version__)
```

## Clickable API links

You can directly click modules, functions, and classes to have access to their API documentation.

```{code-cell} ipython3
from festim import Mesh1D # click Mesh1D
import matplotlib # click matplotlib
from dolfinx import fem # click fem
```