From 2536655ddcbcdd89aea1dc00c149ed7cb1c2ebc3 Mon Sep 17 00:00:00 2001 From: Pierre-Clement Simon Date: Wed, 23 Oct 2024 14:35:34 -0600 Subject: [PATCH] Clean up: - add #12 as issue number - increase figure resolution --- .../ver-1jb_new.md | 132 ------------------ test/tests/val-2b/comparison_val-2b.py | 2 +- test/tests/val-2c/tests | 2 +- test/tests/ver-1b/comparison_ver-1b.py | 6 +- test/tests/ver-1dd/comparison_ver-1dd.py | 2 +- test/tests/ver-1fa/comparison_ver-1fa.py | 2 +- test/tests/ver-1fb/comparison_ver-1fb.py | 2 +- test/tests/ver-1fc/comparison_ver-1fc.py | 6 +- test/tests/ver-1fd/comparison_ver-1fd.py | 2 +- test/tests/ver-1gc/comparison_ver-1gc.py | 2 +- test/tests/ver-1ka/comparison_ver-1ka.py | 2 +- 11 files changed, 14 insertions(+), 146 deletions(-) delete mode 100644 doc/content/verification_and_validation/ver-1jb_new.md diff --git a/doc/content/verification_and_validation/ver-1jb_new.md b/doc/content/verification_and_validation/ver-1jb_new.md deleted file mode 100644 index 406ce02c..00000000 --- a/doc/content/verification_and_validation/ver-1jb_new.md +++ /dev/null @@ -1,132 +0,0 @@ -# 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)) 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. - -# 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 the first order radioactive decay capabilities of TMAP8. -In ver-1jb, however, tritium decay is coupled with trapping, which was verified in several verification cases, -including [ver-1d](ver-1d.md). -As [ver-1ja](ver-1ja.md), ver-1jb is based on the case published in the TMAP7 V&V suite [!citep](ambrosek2008verification). -The model assumes pre-charging of an $l=1.5$ m long slab with tritium. -As opposed to [ver-1ja](ver-1ja.md), however, traps at $C_{trap} = 0.1$\% atom fraction -and $E=4.2$ eV trap energy are distributed in a normal distribution centered at the mid-plane of the slab and standard deviation of $l/4$. -The traps are initially filled to 50\% of trap concentration and the initial mobile atom concentration is set to $C_T^0 = 1$ atom/m$^3$. - - -The evolution of the mobile tritium, trapped tritium, and helium concentration, 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 \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} -\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$, and $k= 0.693/t_{1/2}$ is the decay rate constant in 1/s. - - -The material properties are set to: - -WARNING: -$ (1) Diffusivity for t -y=1.58e-4*exp(-308000.0/(8.314*temp)),end -$ (2) Trap release frequency -y=1.0e13*exp(-4.2/8.124e-5/temp),end -$ (3) Trapping frequency for t -y=2.096e15*exp(-308000.0/(8.314*temp)),end -temperature: -tempd=17*273.0 - - - - - - - - - - - - -###### TBW -The tritium (T) is uniformly distributed over the thickness of the slab with an initial concentration of $C_T^0 = 1.5 \times 10^{5}$ atoms/m$^3$. -The tritium decays to $^3$He with a half-life of $t_{1/2} = 12.3232$ years. -The concentrations of the two species are calculated. - -The evolution of the tritium and helium concentration, $C_T$ and C_{He}, respectively, -are governed by - -\begin{equation} - \label{eqn:diffusion_mobile} - \frac{dC_M}{dt} = - \nabla D \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} -\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$, and $k= 0.693/t_{1/2}$ is the decay rate constant in 1/s. - -!alert warning title=TMAP8 uses different model parameters than TMAP7 -The initial tritium concentration in TMAP7 was defined as $C_T^0 = 1.5$ atoms/m$^3$. To use a more realistic values, TMAP8 uses $C_T^0 = 1.5 \times 10^{5}$ atoms/m$^3$. -Moreover, $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). - -## Analytical Solution - -###### TBW -The concentration of T in atoms/m$^3$, $C_T$, at any given time is given by - -\begin{equation} - C_T = C_T^0 \exp(-kt), -\end{equation} - -where $T$ is the time in seconds, $C_T^0 = 1.5 \times 10^{5}$ atoms/m$^3$ is the initial concentration of tritium, and . -Applying a mass balance over the system, the concentration of helium in atoms/m$^3$, $C_{He}$, is given by -\begin{equation} - C_{He} = C_T^0 \left[1- \exp(-kt) \right]. -\end{equation} - - - -### Results - -[ver-1jb_results_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 and can also provide the details of trapped and mobile tritium concentration - -!media figures/ver-1jb_comparison_analytical_time_evolution.png - style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto - id=ver-1jb_results_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. - -[ver-1jb_results_2] shows the depth profile of the initial trapped atoms of tritium, the final trapped atoms of -tritium after 45 years, and the distribution of $^3$He at the end of that time across the distributed trap as predicted by TMAP8. - -Note that because of $^3$He is given a null diffusivity in this verification problem, the shape of the $^3$He 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 figures/ver-1jb_comparison_analytical_x_profile.png - style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto - id=ver-1jb_results_2 - caption= Concentration profiles of initially trapped tritium that decayed to $^3$He over 45 years. - - -### Input file - -The input file for this case can be found at [/ver-1jb.i]. - -!bibtex bibliography diff --git a/test/tests/val-2b/comparison_val-2b.py b/test/tests/val-2b/comparison_val-2b.py index 1bd64edb..436e11b1 100644 --- a/test/tests/val-2b/comparison_val-2b.py +++ b/test/tests/val-2b/comparison_val-2b.py @@ -73,5 +73,5 @@ def numerical_solution_on_experiment_input(experiment_input, tmap_input, tmap_ou RMSPE = RMSE*100/np.mean(expt_flux) ax.text(870,3e16, 'RMSPE = %.2f '%RMSPE+'%',fontweight='bold') ax.minorticks_on() -plt.savefig('val-2b_comparison.png', bbox_inches='tight') +plt.savefig('val-2b_comparison.png', bbox_inches='tight', dpi=300) plt.close(fig) diff --git a/test/tests/val-2c/tests b/test/tests/val-2c/tests index 6fea12cd..b25befc8 100644 --- a/test/tests/val-2c/tests +++ b/test/tests/val-2c/tests @@ -1,6 +1,6 @@ [Tests] design = 'val-2c.md' - issues = '#98' + issues = '#12 #98' [val-2c_immediate_injection_csv] type = CSVDiff input = val-2c_immediate_injection.i diff --git a/test/tests/ver-1b/comparison_ver-1b.py b/test/tests/ver-1b/comparison_ver-1b.py index 224b870b..0a297460 100644 --- a/test/tests/ver-1b/comparison_ver-1b.py +++ b/test/tests/ver-1b/comparison_ver-1b.py @@ -44,7 +44,7 @@ RMSPE = RMSE*100/np.mean(analytical_conc[idx:]) ax.text(5,0.9, 'RMSPE = %.2f '%RMSPE+'%',fontweight='bold') ax.minorticks_on() -plt.savefig('ver-1b_comparison_time.png', bbox_inches='tight') +plt.savefig('ver-1b_comparison_time.png', bbox_inches='tight', dpi=300) plt.close(fig) @@ -82,7 +82,7 @@ RMSPE = RMSE*100/np.mean(analytical_conc[idx:]) ax.text(10,0.4, 'RMSPE = %.2f '%RMSPE+'%',fontweight='bold') ax.minorticks_on() -plt.savefig('ver-1b_comparison_dist.png', bbox_inches='tight') +plt.savefig('ver-1b_comparison_dist.png', bbox_inches='tight', dpi=300) plt.close(fig) #================== Comparison of flux as a function of time =================== @@ -119,5 +119,5 @@ RMSPE = RMSE*100/np.mean(analytical_flux[idx:]) ax.text(10,0.25, 'RMSPE = %.2f '%RMSPE+'%',fontweight='bold') ax.minorticks_on() -plt.savefig('ver-1b_comparison_flux.png', bbox_inches='tight') +plt.savefig('ver-1b_comparison_flux.png', bbox_inches='tight', dpi=300) plt.close(fig) diff --git a/test/tests/ver-1dd/comparison_ver-1dd.py b/test/tests/ver-1dd/comparison_ver-1dd.py index c7689e54..d79534eb 100644 --- a/test/tests/ver-1dd/comparison_ver-1dd.py +++ b/test/tests/ver-1dd/comparison_ver-1dd.py @@ -67,5 +67,5 @@ def summation_term(num_terms, time): ax.text(0.15,0.05e18, 'Numerical breakthrough time = %.2f '%tmap_intercept + 's',fontweight='bold') ax.text(0.153,0.18e18, 'Analytical breakthrough time = %.2f '%tau_be + 's',fontweight='bold') ax.minorticks_on() -plt.savefig('ver-1dd_comparison_diffusion.png', bbox_inches='tight') +plt.savefig('ver-1dd_comparison_diffusion.png', bbox_inches='tight', dpi=300) plt.close(fig) diff --git a/test/tests/ver-1fa/comparison_ver-1fa.py b/test/tests/ver-1fa/comparison_ver-1fa.py index 7e1880eb..0efd2740 100644 --- a/test/tests/ver-1fa/comparison_ver-1fa.py +++ b/test/tests/ver-1fa/comparison_ver-1fa.py @@ -40,5 +40,5 @@ RMSPE = RMSE*100/np.mean(analytical_temp) ax.text(0.5,1000, 'RMSPE = %.2f '%RMSPE+'%',fontweight='bold') ax.minorticks_on() -plt.savefig('ver-1fa_comparison_temperature.png', bbox_inches='tight'); +plt.savefig('ver-1fa_comparison_temperature.png', bbox_inches='tight', dpi=300); plt.close(fig) diff --git a/test/tests/ver-1fb/comparison_ver-1fb.py b/test/tests/ver-1fb/comparison_ver-1fb.py index ea543e4b..1c2f46bc 100644 --- a/test/tests/ver-1fb/comparison_ver-1fb.py +++ b/test/tests/ver-1fb/comparison_ver-1fb.py @@ -97,5 +97,5 @@ def summation_terms(n, x, t, alph): RMSPE = RMSE*100/np.mean(analytical_temp[3]) ax.text(2.75,340, 'RMSPE = %.2f '%RMSPE+'%',fontweight='bold',c='c') ax.minorticks_on() -plt.savefig('ver-1fb_comparison_temperature.png', bbox_inches='tight') +plt.savefig('ver-1fb_comparison_temperature.png', bbox_inches='tight', dpi=300) plt.close(fig) diff --git a/test/tests/ver-1fc/comparison_ver-1fc.py b/test/tests/ver-1fc/comparison_ver-1fc.py index 5fe8cb92..373ae31e 100644 --- a/test/tests/ver-1fc/comparison_ver-1fc.py +++ b/test/tests/ver-1fc/comparison_ver-1fc.py @@ -110,7 +110,7 @@ def get_analytical_solution_steady_state(x): RMSE = np.linalg.norm(tmap8_sol_steady_state_temperature-analytical_sol_steady_state_x) err_percent = RMSE*100/np.mean(analytical_sol_steady_state_x) ax.text(0.55, 400, 'RMSPE = %.2f '%err_percent+'% \n',fontweight='bold') -plt.savefig('ver-1fc_comparison_temperature_steady_state.png', bbox_inches='tight'); +plt.savefig('ver-1fc_comparison_temperature_steady_state.png', bbox_inches='tight', dpi=300); plt.close(fig) #=============================================================================== @@ -130,7 +130,7 @@ def get_analytical_solution_steady_state(x): ax.set_ylim(bottom=0) plt.grid(which='major', color='0.65', linestyle='--', alpha=0.3) ax.minorticks_on() -plt.savefig('ver-1fc_comparison_temperature_transient_t150.png', bbox_inches='tight'); +plt.savefig('ver-1fc_comparison_temperature_transient_t150.png', bbox_inches='tight', dpi=300); plt.close(fig) #=============================================================================== @@ -150,6 +150,6 @@ def get_analytical_solution_steady_state(x): ax.set_ylim(bottom=0) plt.grid(which='major', color='0.65', linestyle='--', alpha=0.3) ax.minorticks_on() -plt.savefig('ver-1fc_comparison_temperature_transient_x0.09.png', bbox_inches='tight'); +plt.savefig('ver-1fc_comparison_temperature_transient_x0.09.png', bbox_inches='tight', dpi=300); plt.close(fig) diff --git a/test/tests/ver-1fd/comparison_ver-1fd.py b/test/tests/ver-1fd/comparison_ver-1fd.py index 024bfccb..f098af5e 100644 --- a/test/tests/ver-1fd/comparison_ver-1fd.py +++ b/test/tests/ver-1fd/comparison_ver-1fd.py @@ -65,5 +65,5 @@ def get_analytical_solution(x,t_vect): RMSE = np.linalg.norm(tmap8_sol_temperature-analytical_sol_temperature) err_percent = RMSE*100/np.mean(analytical_sol_temperature) ax.text(900, 151, 'RMSPE = %.2f '%err_percent+'%',fontweight='bold') -plt.savefig('ver-1fd_comparison_convective_heating.png', bbox_inches='tight'); +plt.savefig('ver-1fd_comparison_convective_heating.png', bbox_inches='tight', dpi=300); plt.close(fig) diff --git a/test/tests/ver-1gc/comparison_ver-1gc.py b/test/tests/ver-1gc/comparison_ver-1gc.py index db83ee88..37056536 100644 --- a/test/tests/ver-1gc/comparison_ver-1gc.py +++ b/test/tests/ver-1gc/comparison_ver-1gc.py @@ -79,6 +79,6 @@ def get_analytical_solution(t_vect): RMSE_C = np.linalg.norm(tmap8_sol_concentration_C-concentration_C) err_percent_C = RMSE_C*100/np.mean(concentration_C) ax.text(1010, 2.05e14, '(C) RMSPE = %.2f '%err_percent_C+'%',fontweight='bold',color = 'tab:green') -plt.savefig('ver-1gc_comparison_diff_conc.png', bbox_inches='tight'); +plt.savefig('ver-1gc_comparison_diff_conc.png', bbox_inches='tight', dpi=300); plt.close(fig) diff --git a/test/tests/ver-1ka/comparison_ver-1ka.py b/test/tests/ver-1ka/comparison_ver-1ka.py index 0e8b1123..2fed7852 100644 --- a/test/tests/ver-1ka/comparison_ver-1ka.py +++ b/test/tests/ver-1ka/comparison_ver-1ka.py @@ -61,4 +61,4 @@ plt.grid(which='major', color='0.65', linestyle='--', alpha=0.3) # Save the plot as a PNG file -plt.savefig('ver-1ka_comparison_time.png', bbox_inches='tight') +plt.savefig('ver-1ka_comparison_time.png', bbox_inches='tight', dpi=300)