Skip to content

Commit

Permalink
(Ref. idaholab#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee authored and Lee committed Oct 4, 2024
1 parent 422a6fc commit b669053
Show file tree
Hide file tree
Showing 6 changed files with 108,120 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/content/verification_and_validation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TMAP8 also contains [example cases](examples/tmap_index.md), which showcase how
| ver-1ha | [Convective Gas Outflow Problem](ver-1ha.md) |
| ver-1ja | [Radioactive Decay of Mobile Tritium in a Slab](ver-1ja.md) |
| ver-1jb | [Radioactive Decay of Mobile Tritium in a Slab with a Distributed Trap Concentration](ver-1jb.md) |

| ver-1ka | [Simple Volumetric Source](ver-1ka.md)

# List of benchmarking cases

Expand Down
33 changes: 33 additions & 0 deletions doc/content/verification_and_validation/ver-1ka.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ver-1ka

# Simple Volumetric Source

## General Case Description

This problem involves two enclosures connected by a diffusive membrane that follows Sieverts law for diffusion. Both enclosures contain hydrogen (H$_2$), deuterium (T$_2$), and hydrogen deuteride (HT). In the first enclosure, there is an initial inventory of only hydrogen (H$_2$) along with a constant volumetric source rate of deuterium (T$_2$). The second enclosure starts out empty.

## Case Set up

This verification problem is taken from [!cite](longhurst1992verification).
The rise in pressure of T$_2$ molecules in the first enclosure can be monitored by using a non-flow type membrane between the two enclosures. Consequently, the rate of pressure increase can be expressed as:

\begin{equation}
\frac{dP_{T_2}}{dt} = \frac{S}{V} kT
\end{equation}

where $S$ represents the volumetric source rate, $V$ is the volume of the enclosure, $k$ is the Boltzmann constant, and $T$ is the temperature of the enclosure.

Comparison of the TMAP8 results and the analytical solution is shown in
[ver-1ka_comparison_time] as a function of time. The TMAP8 code predictions match very well with the analytical solution.

!media figures/ver-1ka_comparison_time.png
style=width:50%;margin-bottom:2%
id=ver-1ka_comparison_time
caption=Comparison of T$_2$ partial pressure in an enclosure with no loss pathways as function of time calculated through TMAP8 and analytically

## Input files

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

!bibtex bibliography
27 changes: 27 additions & 0 deletions test/tests/ver-1ka/comparison_ver-1ka.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('./gold/ver-1ka_out.csv')

S = 1e20 # m^-3 * s^-1
V = 1 # m^3
kb = 1.380649e-23 # Boltzmann constant (J/K)
T = 500 # K

t_csv = df['time']
v = df['v']
t = np.arange(0, 10801, 540)

expression = (S / V) * kb * T * t

plt.plot(t_csv/3600, v, linestyle='-', color='magenta', label='TMAP8', linewidth=3)
plt.plot(t/3600, expression, marker='+', linestyle='', color='black', label=r"theory", markersize=10)

plt.gca().yaxis.set_major_formatter(plt.FuncFormatter(lambda val, pos: '{:.1e}'.format(val)))

plt.xlabel('Time (hr)')
plt.ylabel('Pressure (Pa)')
plt.legend()
plt.grid(True)
plt.savefig('ver-1ka_comparison_time.png', bbox_inches='tight')
Loading

0 comments on commit b669053

Please sign in to comment.