From 02a27a01cec80b189c1334bf9571e33203f014c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Delaporte-Mathurin?= <40028739+RemDelaporteMathurin@users.noreply.github.com> Date: Tue, 16 Jan 2024 22:30:22 +0000 Subject: [PATCH] added sources --- docs/source/userguide/sources.rst | 60 ++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/docs/source/userguide/sources.rst b/docs/source/userguide/sources.rst index d0ccbc192..05cf83124 100644 --- a/docs/source/userguide/sources.rst +++ b/docs/source/userguide/sources.rst @@ -5,4 +5,62 @@ Sources ======= -WIP \ No newline at end of file +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 `_. + + +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", + ), + ]