Skip to content

Commit

Permalink
added sources
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Jan 16, 2024
1 parent 4e127a2 commit 02a27a0
Showing 1 changed file with 59 additions and 1 deletion.
60 changes: 59 additions & 1 deletion docs/source/userguide/sources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,62 @@ Sources
=======


WIP
Volumetric sources
------------------

Volumetric sources can be set in a simulation by using the :class:`festim.Source` class.

.. code:: python
import festim as F
my_model = F.Simulation()
my_model.sources = [
F.Source(value=1e20, volume=1, field=0),
F.Source(value=1e19 * F.x, volume=2, field=0),
]
For more information, see :class:`festim.Source`.

Implantation flux
-----------------

Hydrogen implanted in a material can be simulated by a gaussian-shaped volumetric source with the :class:`festim.ImplantationFlux` class.

.. code:: python
import festim as F
my_model = F.Simulation()
my_model.sources = [
F.ImplantationFlux(
flux=1e20,
imp_depth=1e-9,
width=1e-9,
volume=1,
),
]
This class is used in `this tutorial <https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task2.ipynb>`_.


Radioactive decay
-----------------

Radioactive decay can be simulated by a volumetric source with the :class:`festim.RadioactiveDecay` class.

.. code:: python
import festim as F
my_model = F.Simulation()
my_model.sources = [
F.RadioactiveDecay(
decay_constant=1.78e-9,
volume=1,
fields="all",
),
]

0 comments on commit 02a27a0

Please sign in to comment.