Skip to content

Commit

Permalink
split initial and boundary conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Jan 18, 2024
1 parent 768628e commit 848a733
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,26 +154,3 @@ A convective heat flux can be set as :math:`\mathrm{flux} = - h (T - T_\mathrm{e
from festim import t
my_bc = ConvectiveFlux(surfaces=3, h_coeff=0.1, T_ext=600 + 10*t)
==================
Initial conditions
==================

The initial conditions are essential to transient FESTIM simulations. They describe the mathematical problem at the beginning of the simulation.
By default, the initial conditions are set to zero.
However, it is possible to set the initial conditions with the :class:`festim.InitialCondition` class.

.. code-block:: python
import festim as F
my_ic = F.InitialCondition(value=10, field=0)
The value can also be a function of space:

.. code-block:: python
import festim as F
from festim import x, y, z
my_ic = F.InitialCondition(value=x**2 + y**2 + z**2, field=0)
3 changes: 2 additions & 1 deletion docs/source/userguide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ User's Guide
beginners_guide
units
materials
boundary_and_initial_conditions
boundary_conditions
initial_conditions
sources
temperature
mesh
Expand Down
22 changes: 22 additions & 0 deletions docs/source/userguide/initial_conditions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
==================
Initial conditions
==================

The initial conditions are essential to transient FESTIM simulations. They describe the mathematical problem at the beginning of the simulation.
By default, the initial conditions are set to zero.
However, it is possible to set the initial conditions with the :class:`festim.InitialCondition` class.

.. code-block:: python
import festim as F
my_ic = F.InitialCondition(value=10, field=0)
The value can also be a function of space:

.. code-block:: python
import festim as F
from festim import x, y, z
my_ic = F.InitialCondition(value=x**2 + y**2 + z**2, field=0)

0 comments on commit 848a733

Please sign in to comment.