Skip to content

Commit

Permalink
Merge pull request #185 from idaholab/ver-1jb
Browse files Browse the repository at this point in the history
Add Ver 1jb to TMAP8's V&V suite
  • Loading branch information
cticenhour authored Oct 24, 2024
2 parents db7a621 + 6eee844 commit ddd32a5
Show file tree
Hide file tree
Showing 14 changed files with 1,096 additions and 14 deletions.
2 changes: 1 addition & 1 deletion doc/content/verification_and_validation/ver-1d.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This verification problem is taken from [!cite](longhurst1992verification). It m
\end{equation}
and
\begin{equation}
C_T^{empty} = (C_{T0} \cdot N - \text{trap\_per\_free} \cdot C_T ) ,
C_T^{empty} = C_{T0} \cdot N - \text{trap\_per\_free} \cdot C_T ,
\end{equation}
where $C_M$ and $C_T$ are the concentrations of the mobile and trapped species respectively, $D$ is the diffusivity of the mobile species, $\alpha_t$ and $\alpha_r$ are the trapping and release rate coefficients, $\text{trap\_per\_free}$ is a factor converting the magnitude of $C_T$ to be closer to $C_M$ for better numerical convergence, $C_{T0}$ is the fraction of host sites that can contribute to trapping, $C_T^{empty}$ is the concentration of empty trapping sites, and $N$ is the host density.

Expand Down
6 changes: 3 additions & 3 deletions doc/content/verification_and_validation/ver-1ja.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ver-1ja

Two problems (ver-1ja and [ver-1jb](ver-1jb.md)) demonstrate tritium decay, though any other isotope could have been chosen.
The first (ver-1ja) is simple decay of mobile species in a slab.
The second ([ver-1jb](ver-1jb.md)) is decay of trapped atoms in a similar slab but with a distributed trap concentration.
The first (ver-1ja) models simple decay of mobile species in a slab.
The second ([ver-1jb](ver-1jb.md)) models decay of trapped atoms in a similar slab but with a distributed trap concentration.
This page presents ver-1ja.

# Radioactive Decay of Mobile Tritium in a Slab
Expand Down Expand Up @@ -66,6 +66,6 @@ The TMAP8 predictions match the analytical solution, with root mean square perce
### Input file

!style halign=left
The input file for this case can be found at [/ver-1ja.i].
The input file for this case can be found at [/ver-1ja.i], which is also used as test in TMAP8 at [/ver-1ja/tests].

!bibtex bibliography
141 changes: 136 additions & 5 deletions doc/content/verification_and_validation/ver-1jb.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,140 @@
# ver-1jb

Two problems ([ver-1ja](ver-1ja.md) and ver-1jb) demonstrate tritium decay, though any other isotope could have been chosen.
The first ([ver-1ja](ver-1ja.md)) is simple decay of mobile species in a slab.
The second (ver-1jb) is decay of trapped atoms in a similar slab but with a distributed trap concentration.
This page presents ver-1jb.
The first ([ver-1ja](ver-1ja.md)) models simple decay of mobile species in a slab.
The second (ver-1jb) models decay of trapped atoms in a similar slab but with a distributed trap concentration.
This page presents ver-1jb, based on the case published in the TMAP7 verification and validation suite [!citep](ambrosek2008verification).

# Radioactive Decay of Tritium in a Distributed Trap

## General Case Description

This verification case is an extension of[ver-1ja](ver-1ja.md), which tests radioactive decay capabilities of TMAP8 on their own.
In ver-1jb, tritium decay is coupled with trapping, which itself was verified in several TMAP8 verification cases including [ver-1d](ver-1d.md).
Similarly to [ver-1ja](ver-1ja.md), the model assumes pre-charging of an $l=1.5$ m long slab (with an assumed width and thickness of 1 m) with tritium. Further complexity is added to the problem by introducing mobile tritium and trapping sites whose locations follow a normal distribution centered at the mid-plane of the slab with a standard deviation of $l/4$.
The peak atomic fraction of traps is $C_{trap} = 0.001$, and the trap energy is $E=4.2$ eV. The material density used to calculate the number of traps is based on tungsten, and is defined as 6.34 $\times 10^{28}$ atoms/m$^3$. The traps are initially filled with trapped tritium to 50% of trap concentration.

The evolution of the mobile tritium, trapped tritium, and helium concentrations, i.e.,
$C_M$, $C_T$, and $C_{He}$, respectively, is governed by

\begin{equation}
\label{eqn:diffusion_mobile}
\frac{dC_M}{dt} = - \nabla D_T \nabla C_M - \text{trap\_per\_free} \cdot \left(\frac{dC_T}{dt} + k C_T \right) - k C_M,
\end{equation}
\begin{equation}
\label{eqn:trapped_rate}
\frac{dC_T}{dt} = \alpha_t \frac {C_T^{empty} C_M } {(N \cdot \text{trap\_per\_free})} - \alpha_r C_T - k C_T,
\end{equation}
and
\begin{equation}
C_T^{empty} = C_{T0} \cdot N - \text{trap\_per\_free} \cdot C_T,
\end{equation}
\begin{equation}
\frac{d C_{He}}{dt} = k (C_M + C_T),
\end{equation}
where $t$ is the time in s, concentrations are in atoms/m$^3$,
$D_T$ is the tritium diffusivity in m$^2$/s,
$\text{trap\_per\_free}$ is a factor converting the magnitude of $C_T$ to be closer to $C_M$ for better numerical convergence,
$k= 0.693/t_{1/2}$ is the decay rate constant in 1/s, $t_{1/2} = 12.3232$ years is the half life of tritium decay to $^3$He,
$C_T^{empty}$ is the concentration of empty trapping sites,
$N$ is the host density,
$\alpha_t$ and $\alpha_r$ are the trapping and release rate coefficients,
and $C_{T0}$ is the fraction of host sites that can contribute to trapping.

The tritium diffusivity is defined as
\begin{equation}
D_T = 1.58 \times 10^{-4} \exp \left(- \frac{308 \times 10^{3}}{RT}\right),
\end{equation}
where $R$ is the ideal gas constant in J/K/mol from [Physical Constants](utils/PhysicalConstants.md) and $T=300$ K is the temperature of the domain.
The trapping frequency is defined as
\begin{equation}
\alpha_t = 2.096 \times 10^{15} \exp \left(- \frac{308 \times 10^{3}}{RT}\right),
\end{equation}
and the release frequency is equal to
\begin{equation}
\alpha_r = 1 \times 10^{13} \exp \left(- \frac{4.2}{k_bT}\right),
\end{equation}
where $k_b$ is the Boltzmann constant in eV/K from [Physical Constants](utils/PhysicalConstants.md).

!alert warning title=TMAP8 uses different model parameters than TMAP7
$k$ is defined as $k= 0.693/t_{1/2}=1.78199 \times 10^{-9}$ 1/s instead of $1.78241 \times 10^{-9}$ 1/s to be fully consistent with the half-life value (assuming 365.25 days in a year).
Note also that TMAP7 uses a temperature of $T = 273$ K instead of $T = 300$ K.


We define two different initial conditions for the mobile tritium concentration $C_M^0$:

- $C_M^0 = 1$ atoms/m$^3$, which is much lower than the initial trapped tritium concentration. This case corresponds to the TMAP7 case in [!citep](ambrosek2008verification).
- $C_M^0 = 1 \times 10^{25}$ atoms/m$^3$, which makes it equivalent to the initial trapped tritium concentration. This new case demonstrates TMAP8's improved ability (over TMAP7) to model the decay, trapping, detrapping, and diffusion of tritium when the concentration of mobile tritium is non-negligible.

To limit the computational challenges related to the orders-of-magnitude difference in trapped and mobile tritium in the first case, we make the concentration dimensionless by dividing them by $1 \times 10^{25}$ atoms/m$^3$ and setting $\text{trap\_per\_free} = 1 \times 10^{25}$ (-). In the second case, when the concentrations are equivalent, $\text{trap\_per\_free} = 1$ (-).

## Analytical Solution

The total inventory of T in atoms, $I_{tot} = I_M + I_T$ where $I_M$ and $I_T$ are the mobile and trapped tritium inventories, respectively, is given at any given time by

\begin{equation}
I_{tot} = I_{tot}^0 \exp(-kt),
\end{equation}

where $I_{tot}^0 = I_M^0 + I_T^0$ atoms/m is the initial total inventory of tritium
($I_M^0$ and $I_T^0$ are the initial mobile and trapped tritium inventories, respectively).
Applying a mass balance over the system, the inventory of helium in atoms, $I_{He}$, is given by
\begin{equation}
I_{He} = I_{tot}^0 \left[1- \exp(-kt) \right].
\end{equation}

### Results

#### With a small concentration of mobile tritium compared to trapped tritium

[ver-1jb_results_comparison_analytical_time_evolution_1] shows the TMAP8 predictions and how they compare to the analytical solution
for the decay of tritium and associated growth of $^3$He in a distributed trap.
TMAP8 matches the analytical solution, with a root mean square percentage error
(RMSPE) of 0.82% and 0.20% for the $I_{tot}$ and $I_{He}$ concentration curves, respectively,
and can also provide the trapped and mobile tritium concentrations.

!media comparison_ver-1jb.py
image_name=ver-1jb_comparison_analytical_time_evolution.png
style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto
id=ver-1jb_results_comparison_analytical_time_evolution_1
caption=Comparison of TMAP8 predictions against the analytical solution for the decay of tritium and associated growth of $^3$He in a distributed trap with a small concentration of mobile tritium compared to trapped tritium.

[ver-1jb_results_profile_1] shows the depth profile of the initial trapped atoms of tritium, the concentration of trapped atoms of
tritium after 45 years, and the distribution of $^3$He at the end of that time period across the distributed trapping sites as predicted by TMAP8. The concentration of mobile tritium remains very low.

Note that because $^3$He is given a null diffusivity in this verification problem, the shape of the $^3$He concentration does not broaden.
This could be easily implemented with existing TMAP8 diffusive capabilities, as was shown in many other TMAP8 cases,
including [ver-1d](ver-1d.md).

!media comparison_ver-1jb.py
image_name=ver-1jb_profile.png
style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto
id=ver-1jb_results_profile_1
caption=Concentration profiles of initially trapped tritium that decayed to $^3$He over 45 years with a small concentration of mobile tritium compared to trapped tritium.

#### With equivalent mobile and trapped tritium initial concentrations

[ver-1jb_results_comparison_analytical_time_evolution_2] and [ver-1jb_results_profile_2] show the results of the simulations when the initial concentrations of mobile and trapped tritium are equivalent.
[ver-1jb_results_comparison_analytical_time_evolution_2] shows TMAP8's time predictions of the inventories and how they compare to the analytical solution. The RMSPE values are as low as in the previous case.

!media comparison_ver-1jb.py
image_name=ver-1jb_equivalent_concentrations_comparison_analytical_time_evolution.png
style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto
id=ver-1jb_results_comparison_analytical_time_evolution_2
caption=Comparison of TMAP8 predictions against the analytical solution for the decay of tritium and associated growth of $^3$He in a distributed trap with equivalent initial concentrations of mobile and trapped tritium.

[ver-1jb_results_profile_2] shows the depth profile of the initial trapped atoms of tritium, the concentration of mobile and trapped atoms of
tritium after 45 years, and the distribution of $^3$He at the end of that time period across the distributed trapping sites as predicted by TMAP8.

!media comparison_ver-1jb.py
image_name=ver-1jb_equivalent_concentrations_profile.png
style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto
id=ver-1jb_results_profile_2
caption=Concentration profiles of initially trapped tritium that decayed to $^3$He over 45 years with equivalent initial concentrations of mobile and trapped tritium.

### Input file

The input file for this case can be found at [/ver-1jb.i], which is also used as test in TMAP8 at [/ver-1jb/tests]. The case with equivalent mobile and trapped tritium initial concentrations was based on [/ver-1jb.i] with slight modifications made in [/ver-1jb/tests] to adjust the initial mobile tritium concentration.

!bibtex bibliography

!alert construction title=Under development verification case to come
ver-1jb has not yet been merged in TMAP8. Stay tuned.
1 change: 0 additions & 1 deletion test/tests/ver-1ja/comparison_ver-1ja.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from matplotlib import gridspec
import pandas as pd
import os
from numpy import sin,tan,sqrt,exp

# Changes working directory to script directory (for consistent MooseDocs usage)
script_folder = os.path.dirname(__file__)
Expand Down
4 changes: 2 additions & 2 deletions test/tests/ver-1ja/tests
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Tests]
design = 'ver-1ja.md'
design = 'ver-1ja.md MatReaction.md'
verification = 'ver-1ja.md'
issues = '#145'
issues = '#145 #12'
[ver-1ja_csvdiff]
type = CSVDiff
input = ver-1ja.i
Expand Down
4 changes: 2 additions & 2 deletions test/tests/ver-1ja/ver-1ja.i
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Verification Problem #1a from TMAP7 V&V document
# Verification Problem #1ja from TMAP7 V&V document
# Radioactive Decay of Mobile Tritium in a Slab

# Case and model parameters (adapted from TMAP7)
Expand Down Expand Up @@ -37,7 +37,7 @@ dt_start = ${fparse end_time/250} # s
v = tritium_concentration
reaction_rate = '${fparse -decay_rate_constant}'
[]
# kernels for the tritium concentration equation
# kernels for the helium concentration equation
[time_helium]
type = TimeDerivative
variable = helium_concentration
Expand Down
Loading

0 comments on commit ddd32a5

Please sign in to comment.