Skip to content

Commit

Permalink
Merge PR 817 (doc)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanGSDUFOUR committed Jul 24, 2024
2 parents 7d680de + a9d6147 commit aba4540
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/source/devguide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,26 @@ By forking the repository, you create a copy where you can safely make changes.

2) Make your changes
3) `Open a PR <https://github.com/festim-dev/FESTIM/compare>`_
4) Wait for a maintainer to review your PR
4) Wait for a :ref:`maintainer<Maintainers>` to review your PR

Before merging your changes, they have to be reviewed. We ensure the changes don't break anything during the review and eventually propose/request improvements.
The time before the review will depend on the maintainers' availability.

5) When everything is in order, the maintainers will merge your PR!

-----------
Maintainers
-----------

The maintainers are the people who have the right to merge PRs to the repository.
They consist of the following individuals:

- Remi Delaporte-Mathurin (`@RemDelaporteMathurin <https://github.com/RemDelaporteMathurin>`_)
- James Dark (`@jhdark <https://github.com/jhdark>`_)
- Vladimir Kulagin (`@KulaginVladimir <https://github.com/KulaginVladimir>`_)

The project lead is Remi Delaporte-Mathurin.

----------
Test suite
----------
Expand Down
13 changes: 13 additions & 0 deletions docs/source/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,19 @@ According to the latter, the rate :math:`k(T)` of a thermally activated process
where :math:`k_0` is the pre-exponential factor, :math:`E_k` is the process activation energy, and :math:`T` is the temperature.

Radioactive decay
^^^^^^^^^^^^^^^^^

Radioactive decay can be included in FESTIM. Neglecting other terms (diffusion, trapping...), the temporal evolution of the concentration of a species :math:`c` is governed by:

.. math::
:label: eq_radioactive_decay
\frac{\partial c}{ \partial t} = -\lambda c
where :math:`\lambda\,[\mathrm{s}^{-1}]` is the decay constant.
In FESTIM it is possible to include radioactive decay in the evolution of the mobile hydrogen concentration and/or the trapped hydrogen concentrations.

Heat transfer
^^^^^^^^^^^^^^
To properly account for the temperature-dependent parameters, an accurate representation of the temperature field is often required. FESTIM can solve a heat transfer problem governed by the heat equation:
Expand Down
58 changes: 58 additions & 0 deletions docs/source/userguide/export_post_processing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ First, you want to create a :class:`festim.DerivedQuantities` object. This will
Then, you can add the derived quantities you want to compute to this object.
Finally, you can add the :class:`festim.DerivedQuantities` object to the simulation object.


.. testcode::

my_derived_quantities = F.DerivedQuantities(
Expand All @@ -169,7 +170,12 @@ Finally, you can add the :class:`festim.DerivedQuantities` object to the simulat

The complete list of derived quantities can be found at: :ref:`Exports`.

^^^^^^^^^^^^^^^^^^
Accessing the data
^^^^^^^^^^^^^^^^^^

The data can be accessed in three different ways:

- directly from the :class:`festim.DerivedQuantities` (plural) object:

.. testcode::
Expand Down Expand Up @@ -227,6 +233,54 @@ The data can be accessed in three different ways:

...

In the previous case, we created a variable ``flux_surf_3`` that is a :class:`festim.DerivedQuantity` object.
If this is not possible, the :class:`festim.DerivedQuantity` object can be accessed with the :meth:`festim.DerivedQuantities.filter` method:

.. testcode::

my_derived_quantities = F.DerivedQuantities(
[
F.SurfaceFlux(field="solute", surface=3),
F.AverageVolume(field="T", volume=1),
F.AverageVolume(field="retention", volume=1),
F.TotalVolume(field="retention", volume=2),
]
)

my_model.exports = [my_derived_quantities]

my_model.initialise()
my_model.run()

flux_surf_3 = my_derived_quantities.filter(fields="solute", surfaces=3)
print(flux_surf_3.data)

.. testoutput::
:options: +ELLIPSIS
:hide:

...


It is also possible to filter for several attributes values. For example:

.. testcode::

total_vol = my_derived_quantities.filter(
fields="retention",
volumes=[1, 2],
instances=F.TotalVolume,
)

print(total_vol.data)

.. testoutput::
:options: +ELLIPSIS
:hide:

...


- export and read from a .csv file:

.. testcode::
Expand All @@ -252,6 +306,10 @@ The data can be accessed in three different ways:

...

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compute and export every N timesteps
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

By default, the derived quantities will be computed at each timestep and exported at the last timestep.
This behaviour can be changed by setting the ``nb_iterations_between_compute`` and ``nb_iterations_between_exports`` attributes of the :class:`festim.DerivedQuantities` object.

Expand Down

0 comments on commit aba4540

Please sign in to comment.