Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small update of Docs #699

Merged
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
4 changes: 4 additions & 0 deletions docs/source/api/temperature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Temperature
:members:
:show-inheritance:

.. autoclass:: TemperatureFromXDMF
:members:
:show-inheritance:

.. autoclass:: HeatTransferProblem
:members:
:show-inheritance:
20 changes: 15 additions & 5 deletions docs/source/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Continuity of local partial pressure :math:`P` at interfaces between materials h
.. math::
:label: eq_Sievert

P = \frac{c_\mathrm{m}^2}{K_S^2}
P = \left(\frac{c_\mathrm{m}}{K_S}\right)^2

where :math:`K_S` is the material solubility (or Sivert's constant).

Expand Down Expand Up @@ -94,8 +94,9 @@ In FESTIM, the conservation of chemical potential is obtained by a change of var

\theta =
\begin{cases}
\frac{c_\mathrm{m}^2}{K_S^2} & \text{in Sievert materials} \\
\frac{c_\mathrm{m}}{K_H} & \text{in Henry materials}
\left(\dfrac{c_\mathrm{m}}{K_S}\right)^2 & \text{in Sievert materials} \\
\\
\dfrac{c_\mathrm{m}}{K_H} & \text{in Henry materials}
\end{cases}

The variable :math:`\theta` is continuous at interfaces.
Expand Down Expand Up @@ -210,10 +211,19 @@ Assuming second order recombination, :math:`\varphi_{\mathrm{recomb}}` can also
By substituting Equation :eq:`eq_flux_balance_approx2` into :eq:`eq_flux_balance_approx1` one can obtain:

.. math::
:label: eq_DirichletBC_triangle_full
:label: eq_DirichletBC_triangle_recomb

c_\mathrm{m} = \frac{\varphi_{\mathrm{imp}} R_p}{D} + \sqrt{\frac{\varphi_{\mathrm{imp}}}{K_r}}

Similarly, dissociation can be accounted for:

.. math::
:label: eq_DirichletBC_triangle_full

c_\mathrm{m} = \frac{\varphi_{\mathrm{imp}} R_p}{D} + \sqrt{\frac{\varphi_{\mathrm{imp}}+K_d P}{K_r}}

where :math:`K_d` is the dissociation coefficient.

When recombination is fast (i.e. :math:`K_r\rightarrow\infty`), Equation :eq:`eq_DirichletBC_triangle_full` can be reduced to:

.. math::
Expand Down Expand Up @@ -252,7 +262,7 @@ Recombination and dissociation fluxes can also be applied:
J \cdot \mathrm{\textbf{n}} = -D\nabla c_\mathrm{m} \cdot \mathrm{\textbf{n}}
= K_d P - K_r c_\mathrm{m}^{\{1,2\}} ~\text{on}~\delta\Omega

where :math:`K_d` is the dissociation coefficient and :math:`K_r` is the recombination coefficient. In Equation :eq:`eq_NeumannBC_DisRec`, the exponent of :math:`c_\mathrm{m}` is either 1 or 2 depending on the reaction order.
In Equation :eq:`eq_NeumannBC_DisRec`, the exponent of :math:`c_\mathrm{m}` is either 1 or 2 depending on the reaction order.
These boundary conditions are Robin boundary conditions since the gradient is imposed as a function of the solution.

Finally, convective heat fluxes can be applied to boundaries:
Expand Down
2 changes: 2 additions & 0 deletions docs/source/userguide/boundary_conditions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ Plasma implantation can be approximated by a Dirichlet boundary condition with t
# non-instantaneous recombination
my_bc = ImplantationDirichlet(surfaces=3, phi=1e10 + t, R_p=1e-9, D_0=1, E_D=0.1, Kr_0=2, E_Kr=0.2)

# non-instantaneous recombination and dissociation
my_bc = ImplantationDirichlet(surfaces=3, phi=1e10 + t, R_p=1e-9, D_0=1, E_D=0.1, Kr_0=2, E_Kr=0.2, Kd_0=3, E_Kd=0.3, P=4)

-----------------
Heat transfer BCs
Expand Down
2 changes: 1 addition & 1 deletion festim/boundary_conditions/dirichlets/dc_imp.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ImplantationDirichlet(DirichletBC):
The details of the approximation can be found in
https://www.nature.com/articles/s41598-020-74844-w

c = phi*R_p/D + (phi+Kd*P/Kr)**0.5
c = phi*R_p/D + ((phi+Kd*P)/Kr)**0.5

Args:
surfaces (list or int): the surfaces of the BC
Expand Down
Loading