diff --git a/doc/content/verification_and_validation/figures/comparison_ver-1kb.py b/doc/content/verification_and_validation/figures/comparison_ver-1kb.py new file mode 120000 index 00000000..e48948f2 --- /dev/null +++ b/doc/content/verification_and_validation/figures/comparison_ver-1kb.py @@ -0,0 +1 @@ +../../../../test/tests/ver-1kb/comparison_ver-1kb.py \ No newline at end of file diff --git a/doc/content/verification_and_validation/index.md b/doc/content/verification_and_validation/index.md index 78e125b0..add6ac09 100644 --- a/doc/content/verification_and_validation/index.md +++ b/doc/content/verification_and_validation/index.md @@ -32,6 +32,7 @@ TMAP8 also contains [example cases](examples/tmap_index.md), which showcase how | 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) | +| ver-1kb | [Henry’s Law Boundaries with No Volumetric Source](ver-1kb.md) | # List of benchmarking cases diff --git a/doc/content/verification_and_validation/ver-1kb.md b/doc/content/verification_and_validation/ver-1kb.md new file mode 100644 index 00000000..c02f6087 --- /dev/null +++ b/doc/content/verification_and_validation/ver-1kb.md @@ -0,0 +1,88 @@ +# ver-1kb + +# Henry’s Law Boundaries with No Volumetric Source + +## General Case Description + +Two enclosures are separated by a membrane that allows diffusion according to Henry’s law, with no volumetric source present. Enclosure 2 has twice the volume of Enclosure 1. + +## Case Set Up + +This verification problem is taken from [!cite](ambrosek2008verification). + +This setup describes a diffusion system in which tritium T$_2$ is modeled across a one-dimensional domain split into two enclosures. The total system length is $2.5 \times 10^{-4}$ m, divided into 100 segments. The system operates at a constant temperature of 500 Kelvin. Initial tritium pressures are specified as $10^{5}$ Pa for Enclosure 1 and $10^{-10}$ Pa for Enclosure 2. + +Over time, the pressures of T$_2$, which diffuses across the membrane in accordance with Henry’s law, will gradually equilibrate between the two enclosures. + +The diffusion process in each of the two enclosures can be described by + +\begin{equation} +\frac{\partial C_1}{\partial t} = \nabla D \nabla C_1, +\end{equation} +and +\begin{equation} +\frac{\partial C_2}{\partial t} = \nabla D \nabla C_2, +\end{equation} + +where $C_1$ and $C_2$ represent the concentration fields in enclosures 1 and 2 respectively, $t$ is the time, and $D$ denotes the diffusivity. + +The concentration in Enclosure 1 is related to the partial pressure and concentration in Enclosure 2 via the interface sorption law: + +\begin{equation} +C_1 = K P_2^n = K \left( C_2 RT \right)^n +\end{equation} + +where $R$ is the ideal gas constant in J/mol/K, $T$ is the temperature in K, $K$ is the solubility, and $n$ is the exponent of the sorption law. For Henry’s law, $n=1$. + +## Results + +Two subcases are considered. In the first subcase, we assume that $K=1/RT$ as is done in [!cite](ambrosek2008verification), which is expected to lead to $C_1 = C_2$ at equilibrium. In the second, $K=10/RT$, which is expected to lead to $C_1 = 10 C_2$. This second case is added to exercise TMAP8 in a case with a concentration jump. +In the first subcase, consistent with the results from TMAP7, the pressure evolution in both enclosures is shown in [ver-1kb_comparison_time] as a function of time. Both pressures find equilibrium and become equal, which is consistent with $C_1 = K (RT C_2)^n$ for $K=1/RT$ and $n=1$. The concentration ratio between enclosures 1 and 2 in [ver-1kb_concentration_ratio] shows that the results obtained with TMAP8 are consistent with the analytical results derived from the sorption law for $K R T=1$. As shown in [ver-1kb_mass_conservation], mass is conserved between the two enclosures over time, with a variation in mass of only $1.0$ %. This variation in mass can be further minimized by refining the mesh, i.e., increasing the number of segments in the domain. + +!media comparison_ver-1kb.py + image_name=ver-1kb_comparison_time.png + style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto + id=ver-1kb_comparison_time + caption=Equilibration of species pressures under Henry’s law for $K = 1/RT$. + +!media comparison_ver-1kb.py + image_name=ver-1kb_concentration_ratio.png + style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto + id=ver-1kb_concentration_ratio + caption=Concentrations ratio between enclosures 1 and 2 at the interface for $K = 1/RT$. This verifies TMAP8's ability to apply the sorption law across the interface without a concentration jump. + +!media comparison_ver-1kb.py + image_name=ver-1kb_mass_conservation.png + style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto + id=ver-1kb_mass_conservation + caption=Total mass conservation across both enclosures over time for $K = 1/RT$. + +In the second subcase, the sorption law with $K=10/RT$ does not lead to equal pressure in both enclosure. As illustrated in [ver-1kb_comparison_time_k10], the pressure jump maintains a ratio of $C_1/C_2 \approx 10$, which is consistent with the relationship $C_1 = K (RT C_2)^n$ for $K=10/RT$ and $n=1$. The concentration ratio between enclosures 1 and 2 in [ver-1kb_concentration_ratio_k10] shows that the results obtained with TMAP8 are consistent with the analytical results derived from the sorption law for $K RT=10$. Additionally, [ver-1kb_mass_conservation_k10] verifies that mass is conserved between the two enclosures over time, with a variation in mass of only $0.25$ %. As in the previous case, this variation in mass can be further reduced by refining the mesh. + +!media comparison_ver-1kb.py + image_name=ver-1kb_comparison_time_k10.png + style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto + id=ver-1kb_comparison_time_k10 + caption=Pressures jump of species under Henry’s law for $K = 10/RT$. + +!media comparison_ver-1kb.py + image_name=ver-1kb_concentration_ratio_k10.png + style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto + id=ver-1kb_concentration_ratio_k10 + caption=Concentrations ratio between enclosures 1 and 2 at the interface for $K = 10/RT$. This verifies TMAP8's ability to apply the sorption law across the interface with a concentration jump. + +!media comparison_ver-1kb.py + image_name=ver-1kb_mass_conservation_k10.png + style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto + id=ver-1kb_mass_conservation_k10 + caption=Total mass conservation across both enclosures over time for $K = 10/RT$. + +!alert note title=A Comparison with TMAP7 Results: Impact of Diffusivity Variations on Kinetics +The kinetics observed in our results differ from those presented in TMAP7. We attribute this discrepancy to a variation in the diffusivity value used, which significantly affects the diffusion rate. + +## Input files + +!style halign=left +The input file for this case can be found at [/ver-1kb.i], which is also used as tests in TMAP8 at [/ver-1kb/tests]. + +!bibtex bibliography diff --git a/test/tests/ver-1kb/comparison_ver-1kb.py b/test/tests/ver-1kb/comparison_ver-1kb.py new file mode 100644 index 00000000..92fd228c --- /dev/null +++ b/test/tests/ver-1kb/comparison_ver-1kb.py @@ -0,0 +1,145 @@ +import numpy as np +import pandas as pd +import os +from matplotlib import gridspec +import matplotlib.pyplot as plt + +# Changes working directory to script directory (for consistent MooseDocs usage) +script_folder = os.path.dirname(__file__) +os.chdir(script_folder) + +# Extract columns for time, pressures, concentration_enclosure_1_at_interface, and concentration_enclosure_2_at_interface +if "/TMAP8/doc/" in script_folder: # if in documentation folder + csv_folder = "../../../../test/tests/ver-1kb/gold/ver-1kb_out_k1.csv" +else: # if in test folder + csv_folder = "./gold/ver-1kb_out_k1.csv" +expt_data = pd.read_csv(csv_folder) +TMAP8_time = expt_data['time'] +TMAP8_pressure_enclosure_1 = expt_data['pressure_enclosure_1'] +TMAP8_pressure_enclosure_2 = expt_data['pressure_enclosure_2'] +concentration_enclosure_1_at_interface = expt_data['concentration_enclosure_1_at_interface'] +pressure_enclosure_2_at_interface = expt_data['pressure_enclosure_2_at_interface'] +mass_conservation_sum_encl1_encl2 = expt_data['mass_conservation_sum_encl1_encl2'].values +concentration_ratio = expt_data['concentration_ratio'] + +# Subplot 1: Pressure vs time +fig = plt.figure(figsize=[6.5,5.5]) +gs = gridspec.GridSpec(1,1) +ax = fig.add_subplot(gs[0]) + +ax.plot(TMAP8_time, TMAP8_pressure_enclosure_1, label=r"T$_2$ Enclosure 1", c='tab:red', linestyle='-') +ax.plot(TMAP8_time, TMAP8_pressure_enclosure_2, label=r"T$_2$ Enclosure 2", c='tab:blue', linestyle='-') +ax.yaxis.set_major_formatter(plt.FuncFormatter(lambda val, pos: '{:.1e}'.format(val))) +ax.set_xlabel('Time (s)') +ax.set_ylabel('Pressure (Pa)') +ax.set_xlim(0, TMAP8_time.max()) +ax.set_ylim(bottom=0) +ax.legend(loc="best") +ax.grid(which='major', color='0.65', linestyle='--', alpha=0.3) +fig.savefig('ver-1kb_comparison_time.png', bbox_inches='tight', dpi=300) + +# Subplot 2: Solubility and concentration ratios vs time +fig = plt.figure(figsize=[6.5,5.5]) +gs = gridspec.GridSpec(1,1) +ax = fig.add_subplot(gs[0]) + +solubility_ratio = [1] * len(TMAP8_time[1:]) +ax.plot(TMAP8_time[1:], concentration_ratio[1:], label=r"Concentration Ratio (TMAP8)", color='tab:blue', linestyle='-') +ax.plot(TMAP8_time[1:], solubility_ratio, label=r"Solubility Ratio (Analytical)", color='tab:red', linestyle='--') +ax.set_yticks(np.arange(0, 3, 1)) +ax.set_xlim(0,TMAP8_time.max()) +ax.set_xlabel('Time (s)') +ax.set_ylabel(r"Concentrations ratio $C_{\text{encl1}} / C_{\text{encl2}}$") +ax.legend(loc="best") +ax.grid(which='major', color='0.65', linestyle='--', alpha=0.3) +RMSE = np.sqrt(np.mean((concentration_ratio[1:]-solubility_ratio)**2) ) +RMSPE = RMSE*100/np.mean(solubility_ratio) +x_pos = TMAP8_time.max() / 7200 +y_pos = 0.9 * ax.get_ylim()[1] +ax.text(x_pos, y_pos, 'RMSPE = %.3f ' % RMSPE + '%', fontweight='bold') +fig.savefig('ver-1kb_concentration_ratio.png', bbox_inches='tight', dpi=300) + +# Subplot 3: Mass Conservation Sum Encl 1 and 2 vs Time + +fig = plt.figure(figsize=[6.5,5.5]) +gs = gridspec.GridSpec(1,1) +ax = fig.add_subplot(gs[0]) + +ax.plot(TMAP8_time, mass_conservation_sum_encl1_encl2, c='tab:blue') +ax.yaxis.set_major_formatter(plt.FuncFormatter(lambda val, pos: '{:.3e}'.format(val))) +ax.set_xlabel('Time (s)') +ax.set_ylabel(r"Mass Conservation Sum Encl 1 and 2 (mol/m$^3$)") +ax.grid(which='major', color='0.65', linestyle='--', alpha=0.3) +mass_variation_percentage = (np.max(mass_conservation_sum_encl1_encl2)-np.min(mass_conservation_sum_encl1_encl2))/np.min(mass_conservation_sum_encl1_encl2)*100 +print("Percentage of mass variation: ", mass_variation_percentage) +fig.savefig('ver-1kb_mass_conservation.png', bbox_inches='tight', dpi=300) + +# Repeat the same for K=10/RT + +if "/TMAP8/doc/" in script_folder: # if in documentation folder + csv_folder_k10 = "../../../../test/tests/ver-1kb/gold/ver-1kb_out_k10.csv" +else: # if in test folder + csv_folder_k10 = "./gold/ver-1kb_out_k10.csv" +expt_data_k10 = pd.read_csv(csv_folder_k10) +TMAP8_time_k10 = expt_data_k10['time'] +TMAP8_pressure_enclosure_1_k10 = expt_data_k10['pressure_enclosure_1'] +TMAP8_pressure_enclosure_2_k10 = expt_data_k10['pressure_enclosure_2'] +concentration_enclosure_1_at_interface_k10 = expt_data_k10['concentration_enclosure_1_at_interface'] +pressure_enclosure_2_at_interface_k10 = expt_data_k10['pressure_enclosure_2_at_interface'] +mass_conservation_sum_encl1_encl2_k10 = expt_data_k10['mass_conservation_sum_encl1_encl2'].values +concentration_ratio_k10 = expt_data_k10['concentration_ratio'] + +# Subplot 1 : Pressure vs time + +fig = plt.figure(figsize=[6.5,5.5]) +gs = gridspec.GridSpec(1,1) +ax = fig.add_subplot(gs[0]) + +ax.plot(TMAP8_time_k10, TMAP8_pressure_enclosure_1_k10, label=r"T$_2$ Enclosure 1", c='tab:red', linestyle='-') +ax.plot(TMAP8_time_k10, TMAP8_pressure_enclosure_2_k10, label=r"T$_2$ Enclosure 2", c='tab:blue', linestyle='-') +ax.yaxis.set_major_formatter(plt.FuncFormatter(lambda val, pos: '{:.1e}'.format(val))) +ax.set_xlabel('Time (s)') +ax.set_ylabel('Pressure (Pa)') +ax.set_xlim(0, TMAP8_time.max()) +ax.set_ylim(bottom=0) +ax.legend(loc="best") +ax.grid(which='major', color='0.65', linestyle='--', alpha=0.3) +fig.savefig('ver-1kb_comparison_time_k10.png', bbox_inches='tight', dpi=300) + +# Subplot 2: Solubility and concentration ratios vs time + +fig = plt.figure(figsize=[6.5,5.5]) +gs = gridspec.GridSpec(1,1) +ax = fig.add_subplot(gs[0]) + +solubility_ratio = [10] * len(TMAP8_time[1:]) +ax.plot(TMAP8_time[1:], concentration_ratio_k10[1:], label=r"Concentration Ratio (TMAP8)", color='tab:blue', linestyle='-') +ax.plot(TMAP8_time[1:], solubility_ratio, label=r"Solubility Ratio (Analytical)", color='tab:red', linestyle='--') +ax.set_yticks(np.arange(0, 21, 10)) +ax.set_xlim(0,TMAP8_time.max()) +ax.set_xlabel('Time (s)') +ax.set_ylabel(r"Concentrations ratio $C_{\text{encl1}} / C_{\text{encl2}}$") +ax.legend(loc="best") +ax.grid(which='major', color='0.65', linestyle='--', alpha=0.3) +RMSE = np.sqrt(np.mean((concentration_ratio_k10[1:]-solubility_ratio)**2)) +RMSPE = RMSE*100/np.mean(solubility_ratio) +x_pos = TMAP8_time.max() / 7200 +y_pos = 0.9 * ax.get_ylim()[1] +ax.text(x_pos, y_pos, 'RMSPE = %.3f ' % RMSPE + '%', fontweight='bold') +fig.savefig('ver-1kb_concentration_ratio_k10.png', bbox_inches='tight', dpi=300) + +# Subplot 3 : Mass Conservation Sum Encl 1 and 2 vs Time + +fig = plt.figure(figsize=[6.5,5.5]) +gs = gridspec.GridSpec(1,1) +ax = fig.add_subplot(gs[0]) + +ax.plot(TMAP8_time_k10, mass_conservation_sum_encl1_encl2_k10, c='tab:blue') +ax.yaxis.set_major_formatter(plt.FuncFormatter(lambda val, pos: '{:.3e}'.format(val))) +ax.set_xlabel('Time (s)') +ax.set_ylabel(r"Mass Conservation Sum Encl 1 and 2 (mol/m$^3$)") +ax.grid(which='major', color='0.65', linestyle='--', alpha=0.3) +mass_variation_percentage = (np.max(mass_conservation_sum_encl1_encl2_k10)-np.min(mass_conservation_sum_encl1_encl2_k10))/np.min(mass_conservation_sum_encl1_encl2_k10)*100 +print("Percentage of mass variation: ", mass_variation_percentage) +fig.savefig('ver-1kb_mass_conservation_k10.png', bbox_inches='tight', dpi=300) + diff --git a/test/tests/ver-1kb/gold/ver-1kb_out_k1.csv b/test/tests/ver-1kb/gold/ver-1kb_out_k1.csv new file mode 100644 index 00000000..1e732a5e --- /dev/null +++ b/test/tests/ver-1kb/gold/ver-1kb_out_k1.csv @@ -0,0 +1,83 @@ +time,concentration_encl_1_inventory,concentration_encl_2_inventory,concentration_enclosure_1_at_interface,concentration_enclosure_2_at_interface,concentration_ratio,mass_conservation_sum_encl1_encl2,pressure_enclosure_1,pressure_enclosure_1_at_interface,pressure_enclosure_2,pressure_enclosure_2_at_interface,solubility +0,0.001984493858205,4.0291238939313e-18,24.054471008545,2.4054471008545e-14,1e+15,0.001984493858205,100000,100000,1e-10,1e-10,240544710085.45 +0.01,0.001827713875796,0.00014196315302109,11.43152132529,11.429953525466,1.0001371658967,0.0019696770288171,92099.749678703,52321.876379089,3523.4248625344,43172.043984948,0.00026478990268045 +0.0205,0.0017424139446284,0.00022714180805255,11.833185845787,11.832760387687,1.0000359559465,0.0019695557526809,87801.427927039,50881.962678335,5637.498722605,47319.216531723,0.00025007146595198 +0.031525,0.0016803773055468,0.00028915639485012,11.850511983713,11.850077182951,1.0000366918084,0.0019695337003969,84675.359341585,50735.93656209,7176.6568232278,47781.047156509,0.00024801700023224 +0.04310125,0.0016284552118248,0.00034106938775342,11.867655337182,11.867265290926,1.0000328674085,0.0019695245995782,82058.969600327,50654.901069181,8465.1005214096,48017.496020805,0.0002471527322466 +0.0552563125,0.001581795593347,0.00038771951635419,11.881393814395,11.881043059373,1.0000295222415,0.0019695151097012,79707.759578441,50579.002118573,9622.9236568818,48207.975491167,0.00024646116526035 +0.068019128125,0.0015383522401659,0.00043115087291504,11.889499011387,11.889180891487,1.0000267570914,0.0019695031130809,77518.619360069,50502.307258852,10700.859151153,48351.830360744,0.00024589553120703 +0.08142008453125,0.0014971160367035,0.00047236959196516,11.890251561922,11.889960589119,1.0000244721419,0.0019694856286687,75440.698922479,50413.518900349,11723.878550288,48446.623575785,0.00024542993266233 +0.095491088757813,0.0014575276810339,0.00051193132340107,11.881526962297,11.881259118678,1.0000225433699,0.001969459004435,73445.814659881,50298.834272474,12705.772690985,48488.487469756,0.00024503810249203 +0.1102656431957,0.0014192590390767,0.00055016051014209,11.860993811761,11.860746231754,1.000020873898,0.0019694195492188,71517.431671994,50144.685448211,13654.594016599,48471.603555231,0.00024469984365683 +0.12577892535549,0.0013821160956382,0.00058724805739122,11.826587236009,11.826357843446,1.000019396721,0.0019693641530294,69645.773400799,49939.849768019,14575.080658992,48390.043121748,0.00024440125432941 +0.14206787162326,0.0013459863212007,0.00062330440483197,11.77690200491,11.776689224955,1.0000180678925,0.0019692907260327,67825.169407084,49676.822655318,15469.973652853,48239.651244763,0.00024413323274572 +0.15917126520443,0.0013108059029918,0.00065839244530258,11.711361945618,11.711164505925,1.0000168591,0.0019691983482944,66052.404121697,49352.212497515,16340.833953859,48019.050760522,0.0002438899095283 +0.17712982846465,0.0012765386073206,0.00069254855238391,11.630173800136,11.629990608216,1.0000157516825,0.0019690871597045,64325.651704223,48966.287423411,17188.564328514,47729.706866575,0.00024366740471813 +0.19598631988788,0.0012431627127146,0.00072579539480344,11.534155116637,11.533985192416,1.0000147324813,0.001968958107518,62643.817594832,48522.073613669,18013.72739857,47375.397247333,0.00024346297417668 +0.21578563588227,0.0012106636296114,0.00075814904228609,11.424532974464,11.424375417324,1.0000137913132,0.0019688126718975,61006.166615524,48024.404496122,18816.722003213,46961.491297496,0.000243274492756 +0.23657491767639,0.0011790302623173,0.00078962237931865,11.302774219008,11.302628193481,1.0000129196081,0.0019686526416359,59412.139646718,47479.154774969,19597.867926275,46494.307043833,0.00024310017586351 +0.25840366356021,0.0011482536141321,0.00082022634601305,11.170466615788,11.170331345909,1.0000121097463,0.0019684799601451,57861.283338548,46892.719150149,20357.436693582,45980.646208849,0.00024293844338442 +0.28132384673822,0.0011183266106139,0.00084997002013836,11.029244692104,11.029119459086,1.0000113547613,0.0019682966307523,56353.241205064,46271.694021334,21095.653608929,45427.497070792,0.00024278785764747 +0.30539003907513,0.0010892445076003,0.00087886015346277,10.880745559025,10.880629699709,1.0000106482179,0.0019681046610631,54887.774184677,45622.691761295,21812.68624642,44841.853434766,0.00024264709697724 +0.33065954102888,0.0010610055124503,0.00090690051653013,10.726581517204,10.726474422201,1.0000099841755,0.0019679060289805,53464.791944987,44952.228136573,22508.62818828,44230.599671333,0.00024251494659603 +0.35719251808033,0.0010336114000173,0.00093409125920031,10.568320850984,10.568221962067,1.0000093571954,0.0019677026592176,52084.383922067,44266.645060412,23183.483153924,43600.42835322,0.00024239029867706 +0.38505214398434,0.0010070679913097,0.00096042841318961,10.40747232904,10.407381135691,1.0000087623724,0.0019674964044993,50746.843440503,43572.049028817,23837.152653365,42957.772972777,0.00024227215725628 +0.41430475118356,0.0009813854154484,0.00098590361361492,10.245471593038,10.245387628245,1.000008195375,0.0019672890290633,49452.680913615,42874.257108568,24469.42907613,42308.748792036,0.00024215964512207 +0.44501998874274,0.00095657811178883,0.0010105040820912,10.083669020844,10.083591856313,1.0000076524846,0.0019670821938801,48202.623950375,42178.748428486,25079.995271758,41659.100448629,0.00024205201053918 +0.47727098817988,0.00093266455627607,0.0010342128874985,9.923319238335,9.923248479371,1.000007130625,0.0019668774437745,46997.603566266,41490.621737479,25668.431021846,41014.157202414,0.00024194863225791 +0.51113453758887,0.00090966671730096,0.0010570094795273,9.7655725871998,9.7655078674835,1.0000066273784,0.0019666761968282,45838.726763497,40814.560268789,26234.226282278,40378.797136639,0.00024184902175649 +0.54669126446831,0.00088760926319093,0.0010788704731581,9.6114687728698,9.6114097493703,1.0000061409825,0.001966479736349,44727.236595924,40154.804883565,26776.80065344,39757.421201421,0.0002417528220499 +0.58402582769173,0.000866518557081,0.0010997706484265,9.4619327568864,9.4618791051097,1.0000056703088,0.0019662892055075,43664.461519915,39515.135851319,27295.528193683,39153.937275188,0.00024165980270093 +0.62322711907632,0.0008464214857793,0.0011196841187631,9.3177727969066,9.3177242066488,1.0000052148204,0.0019661056045424,42651.756380083,38898.862984472,27789.766416703,38571.753721607,0.00024156985093698 +0.66438847503013,0.00082734417738643,0.001138585612898,9.1796804106971,9.1796365824284,1.0000047745102,0.0019659297902845,41690.43778925,38308.823335074,28258.888107486,38013.781375009,0.00024148295903895 +0.70760789878164,0.00080931066759329,0.0011564518100543,9.0482319610451,9.0481926030099,1.0000043498229,0.0019657624776476,40781.716922285,37747.385341453,28702.314460872,37482.442547939,0.00024139920842866 +0.75298829372072,0.00079234157649565,0.0011732626662059,8.9238915276973,8.9238563537697,1.0000039415614,0.0019656042427015,39926.632839889,37216.458186232,29119.547998339,36979.685524856,0.00024131875112077 +0.80063770840676,0.00077645285634065,0.0011890026706115,8.8070147450233,8.8069834733167,1.0000035507852,0.0019654555269521,39125.989386682,36717.505172924,29510.203754279,36507.003064945,0.00024124178940013 +0.8506695938271,0.00076165466604201,0.0012036619764707,8.6978533310905,8.6978256832818,1.0000031787035,0.0019653166425127,38380.298477262,36251.560109037,29874.037338084,36065.453646849,0.00024116855471331 +0.90320307351845,0.00074795042100611,0.0012172373569259,8.5965601038654,8.5965358051636,1.000002826569,0.001965187777932,37689.732216286,35819.245953471,30210.968661434,35655.684500272,0.00024109928681357 +0.95836322719437,0.00073533605742948,0.0012297329471112,8.5031943607746,8.5031731404399,1.0000024955783,0.0019650690045406,37054.085825925,35420.795294954,30521.100355425,35277.955829526,0.00024103421416662 +1.0162813885541,0.00072379953948044,0.0012411607437897,8.4177275764354,8.417709168738,1.0000021867823,0.0019649602832702,36472.752812404,35056.072527255,30804.73017122,34932.165988078,0.00024097353651956 +1.0770954579818,0.0007133206263869,0.0012515408455891,8.3400494390688,8.3400335845705,1.0000019010113,0.001964861471976,35944.713229403,34724.597832879,31062.356942516,34617.87766314,0.00024091741036884 +1.1409502308809,0.0007038709050637,0.001260901428282,8.2699742906483,8.2699607376882,1.000001638818,0.0019647723333457,35468.535322169,34425.573247469,31294.67997202,34334.3453388,0.00024086593785444 +1.2079977424249,0.00069541408304629,0.0012692784604464,8.2072480544356,8.2072365607073,1.0000014004383,0.0019646925434927,35042.390288641,34157.911133884,31502.591974354,34080.544403959,0.00024081915937593 +1.2783976295462,0.00068790652652531,0.0012767151747989,8.151555725219,8.1515460593368,1.0000011857729,0.0019646217013242,34664.079391384,33920.265344322,31687.165954909,33855.202252474,0.00024077704999158 +1.3523175110235,0.00068129801943962,0.0012832613192865,8.102529464926,8.1025214078897,1.0000009943863,0.0019645593387261,34331.072208803,33711.065202039,31849.636622476,33656.831598255,0.00024073951944265 +1.4299333865747,0.00067553271202172,0.001288972219522,8.0597572948611,8.0597506413481,1.0000008255234,0.0019645049315437,34040.554432996,33528.552213783,31991.377119563,33483.766021112,0.00024070641545456 +1.5114300559034,0.00067055022098621,0.0012939076902721,8.0227923131521,8.0227868725762,1.0000006781404,0.0019644579112583,33789.483308995,33370.819160388,32113.872006294,33334.197501745,0.00024067752981701 +1.5970015586986,0.00066628683878576,0.0012981308383911,7.9911623004028,7.9911578977013,1.0000005509466,0.0019644176771768,33574.64857001,33235.850940081,32218.687550073,33206.215432091,0.00024065260664062 +1.6868516366335,0.00066267680613094,0.0013017068027457,7.9643795162044,7.9643759923276,1.0000004424548,0.0019643836088767,33392.736560563,33121.566289833,32307.440451419,33097.846334819,0.00024063135213199 +1.7811942184652,0.00065965360041181,0.0013047014781778,7.941950441061,7.9419476531537,1.0000003510357,0.0019643550785896,33240.395160934,33025.859313222,32381.766173607,33007.093322826,0.00024061344521872 +1.8802539293884,0.0006571511929204,0.0013071802702486,7.9233851877302,7.9233830090103,1.0000002749734,0.001964331463169,33114.297139463,32946.6396203,32443.288036326,32931.974198661,0.00024059854838743 +1.9842666258578,0.00065510522998577,0.0013092069252902,7.9082062961944,7.9082046155456,1.0000002125196,0.001964312155276,33011.199670748,32881.869849223,32493.588178367,32870.557048223,0.00024058631816286 +2.0934799571507,0.00065345409736013,0.0013108424760742,7.8959566385246,7.8959553598292,1.0000001619431,0.0019642965734343,32927.997970787,32829.599395164,32534.181389869,32820.992227449,0.00024057641474718 +2.2081539550083,0.00065213983338616,0.0013121443372605,7.8862061928088,7.8862052340593,1.000000121573,0.0019642841706466,32861.771312108,32787.9933155,32566.49266201,32781.539770944,0.00024056851044559 +2.3285616527587,0.00065110886442769,0.0013131655769038,7.8785574963462,7.8785567885769,1.0000000898349,0.0019642744413315,32809.82008262,32755.355599776,32591.839106306,32750.591456148,0.00024056229661975 +2.4549897353966,0.00065031254538533,0.001313954381036,7.8726496532409,7.8726491393285,1.0000000652782,0.0019642669264213,32769.69302256,32730.146271049,32611.416665918,32726.687018388,0.0002405574890247 +2.5877392221665,0.00064970749831121,0.0013145537182446,7.8681608451088,7.8681604784897,1.0000000465953,0.0019642612165558,32739.20428753,32710.992099649,32626.291790743,32708.524309419,0.00024055383149289 +2.7271261832748,0.00064925575252603,0.0013150012008775,7.8648093699322,7.8648091132866,1.0000000326321,0.0019642569534035,32716.440509083,32696.691036221,32637.397992604,32694.963500709,0.00024055109802345 +2.8734824924385,0.0006489246995021,0.0013153291297339,7.8623533071239,7.8623531310702,1.000000022392,0.001964253829236,32699.758521252,32686.210782571,32645.536954449,32685.025728171,0.00024054909341397 +3.0271566170604,0.00064868688439598,0.0013155647005644,7.8605889708962,7.8605888527365,1.0000000150319,0.0019642515849604,32687.774855737,32678.682192049,32651.383655537,32677.88683414,0.00024054765263107 +3.1885144479135,0.00064851966286733,0.0013157303440133,7.8593483642501,7.859348286799,1.0000000098546,0.0019642500068807,32679.348448774,32673.388405473,32655.494808563,32672.867065662,0.00024054663915644 +3.3579401703091,0.00064840475624468,0.0013158441662552,7.8584958788052,7.8584958293271,1.0000000062961,0.0019642489224999,32673.558225631,32669.750768983,32658.319795952,32669.417721281,0.00024054594256469 +3.5358371788246,0.00064832773994837,0.001315920455744,7.8579244994549,7.8579244687257,1.0000000039106,0.0019642481956924,32669.677321894,32667.31263894,32660.213247006,32667.105794241,0.00024054547559093 +3.7226290377658,0.00064827749936069,0.0013159702222082,7.8575517675051,7.8575517490066,1.0000000023542,0.0019642477215689,32667.14566439,32665.722156252,32661.448415383,32665.597638455,0.00024054517093099 +3.9187604896541,0.00064824568429358,0.0013160017370346,7.8573157334034,7.8573157226499,1.0000000013686,0.0019642474213282,32665.542481443,32664.714976286,32662.230591042,32664.642592352,0.00024054497798923 +4.1246985141368,0.00064822618831122,0.0013160210490322,7.857171093863,7.8571710878556,1.0000000007646,0.0019642472373434,32664.560065585,32664.097785608,32662.709901138,32664.057348828,0.00024054485975071 +4.3409334398437,0.00064821467303634,0.0013160324556368,7.8570856627195,7.8570856595155,1.0000000004078,0.0019642471286731,32663.979803025,32663.733242791,32662.99300498,32663.711675554,0.0002405447899113 +4.5679801118358,0.00064820815089785,0.0013160389162254,7.8570372753597,7.8570372737434,1.0000000002057,0.0019642470671233,32663.651148015,32663.526769324,32663.153352213,32663.51588961,0.00024054475035429 +4.8063791174276,0.0006482046332378,0.0013160424006891,7.8570111780477,7.8570111772877,1.0000000000967,0.0019642470339269,32663.473890724,32663.415409611,32663.239834132,32663.410294122,0.00024054472901935 +5.056698073299,0.00064820284487118,0.0013160441721788,7.8569979102615,7.8569979099369,1.0000000000413,0.00196424701705,32663.383773709,32663.358794705,32663.283801251,32663.356609729,0.00024054471817269 +5.319532976964,0.00064820200150336,0.0013160450075877,7.8569916533655,7.8569916532462,1.0000000000152,0.0019642470090911,32663.341275829,32663.332095935,32663.304535508,32663.331292946,0.00024054471305755 +5.5955096258122,0.00064820164308938,0.0013160453626193,7.8569889943133,7.8569889942813,1.0000000000041,0.0019642470057087,32663.323215104,32663.320749506,32663.313347141,32663.320533834,0.00024054471088372 +5.8852851071028,0.00064820151430195,0.0013160454901914,7.856988038847,7.8569880388463,1.0000000000001,0.0019642470044933,32663.316725417,32663.31667244,32663.316513389,32663.316667806,0.0002405447101026 +6.1895493624579,0.00064820148262845,0.001316045521566,7.8569878038632,7.8569878038702,0.99999999999911,0.0019642470041944,32663.315129368,32663.315669742,32663.317292084,32663.31571701,0.0002405447099105 +6.5090268305808,0.00064820148498667,0.00131604551923,7.8569878213587,7.8569878213651,0.99999999999918,0.0019642470042167,32663.3152482,32663.315744397,32663.317234107,32663.3157878,0.0002405447099248 +6.8444781721099,0.00064820149481933,0.0013160455094901,7.8569878943066,7.8569878943106,0.99999999999948,0.0019642470043095,32663.315743675,32663.316055673,32663.316992371,32663.316082964,0.00024054470998444 +7.1967020807154,0.00064820150307738,0.00131604550131,7.8569879555726,7.8569879555746,0.99999999999974,0.0019642470043874,32663.316159804,32663.3163171,32663.316789346,32663.31633086,0.00024054471003453 +7.5665371847511,0.00064820150805181,0.0013160454963825,7.8569879924776,7.8569879924784,0.99999999999989,0.0019642470044343,32663.316410469,32663.316474578,32663.316667049,32663.316480185,0.0002405447100647 +7.9548640439887,0.00064820151045682,0.0013160454940002,7.8569880103203,7.8569880103205,0.99999999999997,0.001964247004457,32663.316531659,32663.316550714,32663.316607922,32663.316552381,0.00024054471007928 +8.3626072461881,0.00064820151137629,0.0013160454930894,7.8569880171417,7.8569880171417,1,0.0019642470044657,32663.316577991,32663.316579822,32663.316585317,32663.316579982,0.00024054471008486 +8.7907376084975,0.00064820151137629,0.0013160454930894,7.8569880171417,7.8569880171417,1,0.0019642470044657,32663.316577991,32663.316579822,32663.316585317,32663.316579982,0.00024054471008486 +9.2402744889224,0.00064820151137629,0.0013160454930894,7.8569880171417,7.8569880171417,1,0.0019642470044657,32663.316577991,32663.316579822,32663.316585317,32663.316579982,0.00024054471008486 +9.7122882133685,0.00064820151137629,0.0013160454930894,7.8569880171417,7.8569880171417,1,0.0019642470044657,32663.316577991,32663.316579822,32663.316585317,32663.316579982,0.00024054471008486 +10,0.00064820151137629,0.0013160454930894,7.8569880171417,7.8569880171417,1,0.0019642470044657,32663.316577991,32663.316579822,32663.316585317,32663.316579982,0.00024054471008486 diff --git a/test/tests/ver-1kb/gold/ver-1kb_out_k10.csv b/test/tests/ver-1kb/gold/ver-1kb_out_k10.csv new file mode 100644 index 00000000..68095ed5 --- /dev/null +++ b/test/tests/ver-1kb/gold/ver-1kb_out_k10.csv @@ -0,0 +1,83 @@ +time,concentration_encl_1_inventory,concentration_encl_2_inventory,concentration_enclosure_1_at_interface,concentration_enclosure_2_at_interface,concentration_ratio,mass_conservation_sum_encl1_encl2,pressure_enclosure_1,pressure_enclosure_1_at_interface,pressure_enclosure_2,pressure_enclosure_2_at_interface,solubility +0,0.001984493858205,4.0291238939313e-18,24.054471008545,2.4054471008545e-14,1e+15,0.001984493858205,100000,100000,1e-10,1e-10,240544710085.45 +0.01,0.0019547811326795,2.6904660503426e-05,21.662187035187,2.1661889907932,10.000137165897,0.0019816857931829,98502.755480819,90964.107924045,667.7546089846,8181.9060927825,0.0026475721903354 +0.0205,0.0019393354564629,4.2408037587873e-05,21.807850512576,2.1807780253266,10.000032217543,0.0019817434940508,97724.437314062,90949.180565064,1052.5374424884,8738.8074499359,0.002495517911055 +0.031525,0.0019280551641109,5.368563472815e-05,21.809171568559,2.1809092192205,10.000036395992,0.0019817407988391,97156.015683259,90932.989055083,1332.4394121762,8797.9371129126,0.0024788960512744 +0.04310125,0.0019186155335617,6.312687770968e-05,21.814863266375,2.181479236287,10.000032502489,0.0019817424112714,96680.34625701,90929.202107616,1566.7643728891,8829.2448479545,0.0024707507427919 +0.0552563125,0.0019101290592135,7.1614146300286e-05,21.819358588099,2.1819294774969,10.000029246192,0.0019817432055137,96252.707022294,90923.820280677,1777.412365208,8855.215316208,0.0024640122017318 +0.068019128125,0.0019022193956404,7.9523055289015e-05,21.821937526076,2.1821879569528,10.000026558917,0.0019817424509294,95854.133676233,90914.695282075,1973.7058820354,8876.1018904681,0.0024585046223399 +0.08142008453125,0.0018946958476733,8.704341527292e-05,21.822001179868,2.1821948025327,10.000024358293,0.0019817392629462,95475.01695909,90898.659149893,2160.3558878898,8892.4024187605,0.002454005132947 +0.095491088757813,0.0018874460238699,9.4286538295069e-05,21.818821676444,2.181877251899,10.00002252989,0.001981732562165,95109.693389385,90871.840078536,2340.1250688043,8904.6591376483,0.00245027028426 +0.1102656431957,0.0018803963179202,0.00010132491530714,21.81161467327,2.1811568908503,10.000020981877,0.0019817212332273,94754.453894911,90830.304250762,2514.8125988321,8913.2172506753,0.0024471090583613 +0.12577892535549,0.0018734952247931,0.00010820910344536,21.799699492382,2.1799656661774,10.000019647377,0.0019817043282385,94406.703102006,90770.737793691,2685.6732702696,8918.2774667262,0.0024443845320709 +0.14206787162326,0.0018667051183851,0.00011497609895496,21.782626813083,2.1782586561712,10.000018478692,0.0019816812173401,94064.545005627,90690.932511688,2853.6253037077,8919.9934488663,0.0024420003151294 +0.15917126520443,0.001859997605679,0.00012165403550887,21.760227787324,2.1760189833945,10.000017441658,0.0019816516411879,93726.548862257,90589.945590017,3019.3669569732,8918.536192756,0.0024398878153343 +0.17712982846465,0.0018533506597452,0.00012826501482996,21.732590281747,2.173255439833,10.000016511367,0.0019816156745752,93391.604719888,90467.967507922,3183.4467791659,8914.117214716,0.0024379969163822 +0.19598631988788,0.001846746791931,0.00013482684925082,21.699994338577,2.1699960336617,10.000015669135,0.0019815736411819,93058.831313364,90326.03089911,3346.3068597592,8906.9844951035,0.0024362896725043 +0.21578563588227,0.0018401719029449,0.00014135411730521,21.662839909416,2.1662807630913,10.000014900424,0.0019815260202501,92727.518169765,90165.695202941,3508.3090276304,8897.4073978654,0.0024347362035612 +0.23657491767639,0.0018336145984516,0.00014785877134217,21.621586937237,2.1621556248747,10.000014193469,0.0019814733697937,92397.091120761,89988.788125958,3669.7499316134,8885.6612743964,0.00243331208219 +0.25840366356021,0.0018270658212375,0.00015435045242035,21.576713939151,2.1576684727767,10.000013538402,0.0019814162736578,92067.093767179,89797.227629692,3830.8688559524,8872.0161314802,0.0024319966983143 +0.28132384673822,0.0018205186906705,0.00016083661878124,21.528692912004,2.1528665082494,10.000012926723,0.0019813553094518,91737.179389268,89592.914121008,3991.8509089159,8856.7297179579,0.002430772259918 +0.30539003907513,0.0018139684669345,0.00016732256421392,21.477975727333,2.1477949199922,10.000012350998,0.0019812910311484,91407.109144456,89377.671924611,4152.8274785975,8840.0438523245,0.0024296232107135 +0.33065954102888,0.0018074125776598,0.0001738113831199,21.424987649115,2.1424962357593,10.000011804698,0.0019812239607797,91076.753409287,89153.22132955,4313.8753658505,8822.1827387455,0.0024285359171966 +0.35719251808033,0.0018008506608407,0.00018030392454968,21.370124967308,2.1370100857276,10.000011282133,0.0019811545853903,90746.093942038,88921.168310004,4475.0156435064,8803.3524255272,0.0024274985181033 +0.38505214398434,0.0017942845918999,0.00018679876502153,21.313754932218,2.1313731959381,10.000010778421,0.0019810833569214,90415.225246545,88683.004082051,4636.2129817574,8783.7409472765,0.002426500856543 +0.41430475118356,0.0017877184749098,0.00019329221878948,21.256216962024,2.1256195090517,10.000010289474,0.0019810106936993,90084.354129815,88440.110021145,4797.375903,8763.5189277234,0.0024255344385439 +0.44501998874274,0.0017811585880617,0.00019977839473429,21.197824556215,2.1197803756965,10.000009811984,0.001980936982796,89753.79695419,88193.765459799,4958.3581938295,8742.8405300992,0.0024245923831319 +0.47727098817988,0.0017746132811694,0.00020624930168557,21.138867599159,2.1138847848323,10.000009343383,0.0019808625828549,89423.97447249,87945.156996594,5118.9615190594,8721.8446801572,0.0024236693468357 +0.51113453758887,0.0017680928282524,0.0002126949988911,21.079614864094,2.1079596141606,10.000008881806,0.0019807878271435,89095.404399571,87695.388518355,5278.9391562634,8700.6564924929,0.0024227614183231 +0.54669126446831,0.0017616092413562,0.00021910378530857,21.020316581176,2.1020298869431,10.00000842602,0.0019807130266647,88768.692030601,87445.491386908,5438.0006938627,8679.3888251932,0.0024218659867112 +0.58402582769173,0.0017551760532032,0.00022546241998177,20.961206949169,2.0961190231868,10.000007975358,0.001980638473185,88444.519288702,87196.434321047,5595.8175007069,8658.1438816121,0.0024209815909488 +0.62322711907632,0.0017488080765151,0.00023175636552141,20.902506473266,2.090249073444,10.000007529642,0.0019805644420365,88123.632597027,86949.132519336,5752.0287690951,8637.0147762819,0.0024201077588366 +0.66438847503013,0.0017425211473157,0.00023797004724558,20.844424016323,2.0844409239515,10.000007089099,0.0019804911945613,87806.829943623,86704.455586612,5906.2479464584,8616.0869866582,0.0024192448438137 +0.70760789878164,0.0017363318585424,0.00024408712153417,20.787158464589,2.0787144632218,10.000006654291,0.0019804189800766,87494.947457937,86463.233878989,6058.0693957268,8595.4396237019,0.0024183938663554 +0.75298829372072,0.0017302572891054,0.00025009074816851,20.730899932958,2.0730887025832,10.000006226036,0.0019803480372739,87188.845757902,86226.262974818,6207.075154606,8575.146470926,0.002417556365159 +0.80063770840676,0.0017243147323339,0.00025596386266331,20.675830466098,2.0675818463071,10.000005805346,0.0019802785949972,86889.396266189,85994.306102603,6352.8416946632,8555.2767613861,0.0024167342615282 +0.8506695938271,0.0017185214266999,0.00026168944569255,20.622124226323,2.0622113104071,10.000005393362,0.0019802108723925,86597.467641163,85768.094494048,6494.9466082864,8535.8956827083,0.0024159297387032 +0.90320307351845,0.0017128942909134,0.0002672507875437,20.569947192405,2.0569936925315,10.000004991308,0.0019801450784571,86313.912428165,85548.325763606,6632.9751722512,8517.0646193847,0.0024151451364579 +0.95836322719437,0.0017074496650249,0.00027263174603066,20.519456422167,2.0519446982317,10.000004600441,0.0019800814110555,86039.554013501,85335.660531055,6766.5267489366,8498.8411574856,0.0024143828601966 +1.0162813885541,0.0017022030590615,0.00027781699643225,20.470798953625,2.0470790310834,10.000004222011,0.0019800200554938,85775.173958019,85130.717592036,6895.2209896226,8481.2788886465,0.0024136453030719 +1.0770954579818,0.0016971689109352,0.000282792271826,20.42411043378,2.0424102555728,10.000003857233,0.0019799611827612,85521.499797957,84934.068000024,7018.7037994027,8464.4270574038,0.0024129347793145 +1.1409502308809,0.0016923603558367,0.00028754459172419,20.379513571455,2.0379506423854,10.000003507249,0.0019799049475608,85279.193424536,84746.228453232,7136.6530117698,8448.3300990277,0.0024122534669663 +1.2079977424249,0.0016877890099548,0.0002920624762918,20.337116511749,2.033711005856,10.00000317311,0.0019798514862466,85048.840185448,84567.654385876,7248.7837053536,8433.0271146868,0.0024116033584583 +1.2783976295462,0.0016834647720409,0.00029633614274559,20.297011226441,2.0297005430126,10.000002855749,0.0019798009147865,84830.938885526,84398.733150989,7354.8530784057,8418.5513280284,0.0024109862178858 +1.3523175110235,0.0016793956469457,0.00030035767991392,20.259272008314,2.025926683012,10.000002555963,0.0019797533268596,84625.892894663,84239.777657239,7454.6647812522,8404.9295630183,0.0024104035443027 +1.4299333865747,0.0016755875957076,0.0003041211964794,20.223954149189,2.0223949549458,10.000002274398,0.001979708792187,84434.002593649,84091.020789733,7548.0725955703,8392.1817779142,0.0024098565408119 +1.5114300559034,0.0016720444169759,0.00030762293820822,20.191092872214,2.0191088810712,10.000002011532,0.0019796673551841,84255.459399019,83952.610907649,7634.9833439363,8380.3206850936,0.0024093460895988 +1.5970015586986,0.0016687676644634,0.00031086136954783,20.160702578975,2.016069901523,10.000001767669,0.0019796290340112,84090.341603416,83824.608671026,7715.3589150249,8369.3514813683,0.0024088727333123 +1.6868516366335,0.0016657566047076,0.00031383721537591,20.132776461324,2.0132773354976,10.000001542931,0.0019795938200835,83938.612247173,83706.985405245,7789.2172997859,8359.2717084583,0.0024084366633224 +1.7811942184652,0.0016630082186774,0.00031655345941302,20.107286516266,2.0107283827413,10.000001337253,0.0019795616780904,83800.11919924,83599.623163716,7856.6325520496,8350.0712583629,0.0024080377153821 +1.8802539293884,0.0016605172496991,0.00031901529685509,20.0841839895,2.008418167904,10.000001150388,0.0019795325465542,83674.597572253,83502.316596216,7917.7336128977,8341.7325332998,0.0024076753731105 +1.9842666258578,0.0016582762988419,0.00032123004010311,20.063400259201,2.0063398289154,10.000000981911,0.001979506338945,83561.674529035,83414.776671455,7972.7019709407,8334.2307645573,0.0024073487795087 +2.0934799571507,0.0016562759673297,0.00032320697801586,20.044848156278,2.0044846490092,10.000000831229,0.0019794829453456,83460.876458839,83336.636238036,8021.768169072,8327.5344889489,0.00240705675646 +2.2081539550083,0.0016545050438206,0.00032495719082016,20.02842370105,2.0028422303877,10.000000697595,0.0019794622346408,83371.638414499,83267.457339274,8065.2072106697,8321.6061756138,0.0024067978318588 +2.3285616527587,0.0016529507325884,0.00032649332459809,20.014008219427,2.0014007058363,10.000000580126,0.0019794440571865,83293.315610636,83206.740126444,8103.3329625296,8316.4029898256,0.0024065702737004 +2.4549897353966,0.0016515989168494,0.00032782933103947,20.001470785128,2.0001469829412,10.000000477823,0.0019794282478888,83225.196692888,83153.933145268,8136.4916957069,8311.8776744948,0.0024063721301509 +2.5877392221665,0.0016504344498149,0.0003289801797935,19.990670919053,1.9990670140226,10.000000389595,0.0019794146296084,83166.51840423,83108.444705536,8165.0549462876,8307.9795244944,0.0024062012743428 +2.7271261832748,0.0016494414646164,0.00032996155216778,19.981461463707,1.998146083572,10.000000314285,0.0019794030167842,83116.481202333,83069.654988001,8189.4119132144,8304.6554241669,0.0024060554524104 +2.8734824924385,0.0016486036931649,0.0003307895259983,19.973691540466,1.9973691039742,10.000000250692,0.0019793932191632,83074.265327086,83036.928500228,8209.9616369835,8301.8509147342,0.0024059323331158 +3.0271566170604,0.0016479047833554,0.00033148026215449,19.967209491499,1.9967209096943,10.000000197602,0.0019793850455099,83039.046784756,83009.626467802,8227.1052189227,8299.5112561678,0.0024058295573321 +3.1885144479135,0.0016473286038984,0.00033204970327272,19.961865706931,1.99618653999,10.000000153809,0.0019793783071711,83010.012708651,82987.118742189,8241.2383439698,8297.5824476374,0.0024057447856532 +3.3579401703091,0.0016468595264926,0.00033251329488329,19.95751524186,1.9957515006085,10.000000118139,0.0019793728213759,82986.375578013,82968.794823467,8252.7443592419,8296.0121721085,0.0024056757424921 +3.5358371788246,0.0016464826760612,0.00033288573810112,19.954020137176,1.9954019958646,10.000000089471,0.0019793684141623,82967.385827563,82954.073635472,8261.9881359944,8294.7506340273,0.0024056202552153 +3.7226290377658,0.0016461841413173,0.00033318078152261,19.951251372448,1.9951251239267,10.000000066753,0.0019793649228399,82952.342458056,82942.41175128,8269.3109046473,8293.7512642066,0.0024055762871201 +3.9187604896541,0.001645951139932,0.00033341105798898,19.949090397787,1.99490903,10.000000049018,0.001979362197921,82940.601359222,82933.309845299,8275.0262033681,8292.9712727404,0.0024055419633927 +4.1246985141368,0.0016457721349217,0.00033358796956054,19.947430213273,1.9947430142678,10.00000003539,0.0019793601044822,82931.581174575,82926.317239772,8279.4170232141,8292.3720386187,0.0024055155895533 +4.3409334398437,0.0016456369013933,0.00033372162155155,19.946175987991,1.9946175937939,10.000000025093,0.0019793585229449,82924.766664778,82921.03451212,8282.734170925,8291.9193331639,0.0024054956622908 +4.5679801118358,0.0016455365453155,0.00033382080397901,19.94524523412,1.9945245199312,10.000000017451,0.0019793573492945,82919.709653518,82917.114228194,8285.1958084935,8291.5833828681,0.0024054808729693 +4.8063791174276,0.0016454634783218,0.00033389301646434,19.944567573248,1.994456754954,10.000000011887,0.0019793564947861,82916.027757835,82914.259958009,8286.9880712095,8291.3387850453,0.0024054701044445 +5.056698073299,0.0016454113545384,0.00033394453066729,19.944084150478,1.9944084134688,10.000000007917,0.0019793558852057,82913.401204815,82912.223807988,8288.2666172235,8291.1642963565,0.0024054624221163 +5.319532976964,0.0016453749769071,0.00033398048286728,19.943746765618,1.9943746755354,10.000000005147,0.0019793554597743,82911.568111142,82910.802761585,8289.1589253516,8291.0425192178,0.0024054570603625 +5.5955096258122,0.0016453501813569,0.00033400498843689,19.943516798936,1.9943516792439,10.000000003258,0.0019793551697938,82910.318646447,82909.834154614,8289.7671362246,8290.9595140568,0.0024054534056189 +5.8852851071028,0.0016453337074198,0.00033402126971364,19.943364011172,1.9943364007177,10.000000002003,0.0019793549771334,82909.48851351,82909.190620984,8290.1712259766,8290.9043661855,0.0024054509774001 +6.1895493624579,0.0016453230635051,0.00033403178914923,19.943265294033,1.9943265291655,10.000000001192,0.0019793548526543,82908.952159383,82908.774829847,8290.4323109139,8290.8687347981,0.0024054494084954 +6.5090268305808,0.0016453163941379,0.00033403838051907,19.943203438893,1.9943203437528,10.000000000684,0.001979354774657,82908.61608542,82908.51429941,8290.5959040426,8290.8464085382,0.0024054484254291 +6.8444781721099,0.001645312355139,0.0003340423722825,19.94316597914,1.9943165978388,10.000000000377,0.0019793547274214,82908.412557506,82908.356520997,8290.6949767822,8290.8328876542,0.0024054478300771 +7.1967020807154,0.0016453100011554,0.00033404469873649,19.943144147086,1.9943144146692,10.000000000198,0.0019793546998919,82908.293938671,82908.264565593,8290.7527177218,8290.8250074991,0.002405447483097 +7.5665371847511,0.0016453086883043,0.00033404599623399,19.94313197103,1.9943131970835,10.000000000098,0.0019793546845383,82908.227783207,82908.213280716,8290.7849206903,8290.8206126211,0.0024054472895808 +7.9548640439887,0.0016453079931251,0.00033404668328316,19.94312552358,1.9943125523492,10.000000000045,0.0019793546764083,82908.192752653,82908.186124415,8290.8019727639,8290.8182854511,0.0024054471871102 +8.3626072461881,0.0016453076476917,0.00033404702467683,19.943122319853,1.9943122319816,10.000000000018,0.0019793546723685,82908.175346025,82908.172630491,8290.8104459128,8290.8171290839,0.0024054471361928 +8.7907376084975,0.0016453074896872,0.00033404718083345,19.943120854438,1.9943120854426,10.000000000006,0.0019793546705207,82908.167384072,82908.166458246,8290.8143216095,8290.8166001509,0.0024054471129026 +9.2402744889224,0.0016453074255474,0.00033404724422318,19.943120259572,1.994312025957,10.000000000001,0.0019793546697706,82908.164152022,82908.163952704,8290.8158948976,8290.8163854375,0.0024054471034483 +9.7122882133685,0.0016453074044135,0.00033404726510992,19.943120063566,1.9943120063566,9.9999999999997,0.0019793546695234,82908.163087071,82908.163127135,8290.8164132917,8290.81631469,0.0024054471003331 +10,0.0016453074025781,0.00033404726692382,19.943120046544,1.9943120046544,9.9999999999996,0.0019793546695019,82908.162994585,82908.163055438,8290.8164583116,8290.8163085459,0.0024054471000626 diff --git a/test/tests/ver-1kb/gold/ver-1kb_out_k10.e b/test/tests/ver-1kb/gold/ver-1kb_out_k10.e new file mode 100644 index 00000000..f2b1b5dd Binary files /dev/null and b/test/tests/ver-1kb/gold/ver-1kb_out_k10.e differ diff --git a/test/tests/ver-1kb/tests b/test/tests/ver-1kb/tests new file mode 100644 index 00000000..d7ac7808 --- /dev/null +++ b/test/tests/ver-1kb/tests @@ -0,0 +1,35 @@ +[Tests] + design = 'InterfaceSorption.md MatDiffusion.md TimeDerivative.md' + issues = '#12' + verification = 'ver-1kb.md' + [ver-1kb_csv_without_concentration_jump] + type = CSVDiff + input = ver-1kb.i + csvdiff = ver-1kb_out_k1.csv + requirement = 'The system shall be able to model the diffusion of T2 across a membrane separating two enclosures in accordance with Henry’s law without any concentration jump at the interface.' + [] + [ver-1kb_csv_concentration_jump] + type = CSVDiff + input = ver-1kb.i + cli_args = "solubility='${fparse 10/(R*temperature)}' + Outputs/file_base=ver-1kb_out_k10" + csvdiff = ver-1kb_out_k10.csv + requirement = 'The system shall be able to model the diffusion of T2 across a membrane separating two enclosures in accordance with Henry’s law with a concentration jump at the interface.' + [] + [ver-1kb_exodus_concentration_jump] + type = Exodiff + input = ver-1kb.i + exodiff = ver-1kb_out_k10.e + cli_args = "solubility='${fparse 10/(R*temperature)}' + Outputs/file_base=ver-1kb_out_k10" + prereq = ver-1kb_csv_concentration_jump + should_execute = false # this test relies on the output files from ver-1kb_csv_concentration_jump, so it shouldn't be run twice + requirement = 'The system shall be able to model the diffusion of T2 across a membrane separating two enclosures in accordance with Henry’s law with a concentration jump at the interface' + [] + [ver-1kb_comparison] + type = RunCommand + command = 'python3 comparison_ver-1kb.py' + requirement = 'The system shall be able to generate comparison plots between the analytical solution and simulated solution of verification case 1kb, modeling a diffusion across a membrane separating two enclosures in accordance with Henry’s law.' + required_python_packages = 'matplotlib numpy pandas os git' + [] +[] diff --git a/test/tests/ver-1kb/ver-1kb.i b/test/tests/ver-1kb/ver-1kb.i new file mode 100644 index 00000000..40c4f640 --- /dev/null +++ b/test/tests/ver-1kb/ver-1kb.i @@ -0,0 +1,247 @@ +nb_segments_TMAP7 = 20 +node_size_TMAP7 = '${units 1.25e-5 m}' +long_total = '${fparse nb_segments_TMAP7 * node_size_TMAP7}' # m +nb_segments_TMAP8 = 100 +simulation_time = '${units 10 s}' +temperature = '${units 500 K}' +R = '${units 8.31446261815324 J/mol/K}' # ideal gas constant from PhysicalConstants.h +initial_pressure_1 = '${units 1e5 Pa}' +initial_pressure_2 = '${units 1e-10 Pa}' +initial_concentration_1 = '${units ${fparse initial_pressure_1 / (R*temperature)} mol/m^3}' +initial_concentration_2 = '${units ${fparse initial_pressure_2 / (R*temperature)} mol/m^3}' +solubility = '${units ${fparse 1/(R*temperature)} mol/m^3/Pa}' # Henry's law solubility +diffusivity = '${units ${fparse 4.31e-6 * exp(-2818/temperature)} m^2/s}' +n_sorption = 1 # Henry's Law +unit_scale = 1 +unit_scale_neighbor = 1 + +[Mesh] + [generated] + type = GeneratedMeshGenerator + dim = 1 + nx = ${nb_segments_TMAP8} + xmax = ${long_total} + [] + [enclosure_1] + type = SubdomainBoundingBoxGenerator + input = generated + block_id = 1 + bottom_left = '0 0 0' + top_right = '${fparse 1/3 * long_total} 0 0' + [] + [enclosure_2] + type = SubdomainBoundingBoxGenerator + input = enclosure_1 + block_id = 2 + bottom_left = '${fparse 1/3 * long_total} 0 0' + top_right = '${fparse long_total} 0 0' + [] + [interface] + type = SideSetsBetweenSubdomainsGenerator + input = enclosure_2 + primary_block = 1 + paired_block = 2 + new_boundary = interface + [] + [interface2] + type = SideSetsBetweenSubdomainsGenerator + input = interface + primary_block = 2 + paired_block = 1 + new_boundary = interface2 + [] +[] + +[Variables] + [concentration_enclosure_1] + block = 1 + order = FIRST + family = LAGRANGE + initial_condition = '${initial_concentration_1}' + [] + [concentration_enclosure_2] + block = 2 + order = FIRST + family = LAGRANGE + initial_condition = '${initial_concentration_2}' + [] +[] + +[AuxVariables] + [pressure_enclosure_1] + order = CONSTANT + family = MONOMIAL + block = 1 + initial_condition = '${initial_pressure_1}' + [] + [pressure_enclosure_2] + order = CONSTANT + family = MONOMIAL + block = 2 + initial_condition = '${initial_pressure_2}' + [] +[] + +[Kernels] + [diffusion_enclosure_1] + type = MatDiffusion + variable = concentration_enclosure_1 + diffusivity = ${diffusivity} + block = '1' + [] + [time_enclosure_1] + type = TimeDerivative + variable = concentration_enclosure_1 + block = '1' + [] + [diffusion_enclosure_2] + type = MatDiffusion + variable = concentration_enclosure_2 + diffusivity = ${diffusivity} + block = '2' + [] + [time_enclosure_2] + type = TimeDerivative + variable = concentration_enclosure_2 + block = '2' + [] +[] + +[AuxKernels] + [pressure_enclosure_1] + type = ParsedAux + variable = pressure_enclosure_1 + coupled_variables = 'concentration_enclosure_1' + expression = '${fparse R*temperature}*concentration_enclosure_1' + block = 1 + execute_on = 'initial timestep_end' + [] + [pressure_enclosure_2] + type = ParsedAux + variable = pressure_enclosure_2 + coupled_variables = 'concentration_enclosure_2' + expression = '${fparse R*temperature}*concentration_enclosure_2' + block = 2 + execute_on = 'initial timestep_end' + [] +[] + +[InterfaceKernels] + [interface_sorption] + type = InterfaceSorption + K0 = ${solubility} + Ea = 0 + n_sorption = ${n_sorption} + diffusivity = ${diffusivity} + unit_scale = ${unit_scale} + unit_scale_neighbor = ${unit_scale_neighbor} + temperature = ${temperature} + variable = concentration_enclosure_1 + neighbor_var = concentration_enclosure_2 + sorption_penalty = 1e1 + boundary = interface + [] +[] + +[Postprocessors] + [pressure_enclosure_1] + type = ElementAverageValue + variable = pressure_enclosure_1 + block = 1 + execute_on = 'initial timestep_end' + [] + [pressure_enclosure_2] + type = ElementAverageValue + variable = pressure_enclosure_2 + block = 2 + execute_on = 'initial timestep_end' + [] + [concentration_enclosure_1_at_interface] + type = SideAverageValue + boundary = interface + variable = concentration_enclosure_1 + outputs = 'csv console' + execute_on = 'initial timestep_end' + [] + [concentration_enclosure_2_at_interface] + type = SideAverageValue + boundary = interface2 + variable = concentration_enclosure_2 + outputs = 'csv console' + execute_on = 'initial timestep_end' + [] + [concentration_ratio] + type = ParsedPostprocessor + expression = 'concentration_enclosure_1_at_interface / concentration_enclosure_2_at_interface' + pp_names = 'concentration_enclosure_1_at_interface concentration_enclosure_2_at_interface' + execute_on = 'initial timestep_end' + outputs = 'csv console' + [] + [solubility] + type = ParsedPostprocessor + expression = 'concentration_enclosure_1_at_interface / pressure_enclosure_2_at_interface' + pp_names = 'concentration_enclosure_1_at_interface pressure_enclosure_2_at_interface' + execute_on = 'initial timestep_end' + outputs = 'csv console' + [] + [pressure_enclosure_1_at_interface] + type = SideAverageValue + boundary = interface + variable = pressure_enclosure_1 + outputs = 'csv console' + execute_on = 'initial timestep_end' + [] + [pressure_enclosure_2_at_interface] + type = SideAverageValue + boundary = interface2 + variable = pressure_enclosure_2 + outputs = 'csv console' + execute_on = 'initial timestep_end' + [] + [concentration_encl_1_inventory] + type = ElementIntegralVariablePostprocessor + variable = concentration_enclosure_1 + block = 1 + execute_on = 'initial timestep_end' + [] + [concentration_encl_2_inventory] + type = ElementIntegralVariablePostprocessor + variable = concentration_enclosure_2 + block = 2 + execute_on = 'initial timestep_end' + [] + [mass_conservation_sum_encl1_encl2] + type = LinearCombinationPostprocessor + pp_names = 'concentration_encl_1_inventory concentration_encl_2_inventory' + pp_coefs = '1 1' + execute_on = 'initial timestep_end' + [] +[] + +[Executioner] + type = Transient + end_time = ${simulation_time} + dtmax = 10 + nl_abs_tol = 1e-12 + nl_rel_tol = 1e-8 + scheme = 'bdf2' + solve_type = NEWTON + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + nl_max_its = 6 + [TimeStepper] + type = IterationAdaptiveDT + dt = 0.01 + optimal_iterations = 5 + iteration_window = 3 + growth_factor = 1.05 + cutback_factor_at_failure = 0.8 + [] +[] + +[Outputs] + file_base = 'ver-1kb_out_k1' + csv = true + exodus = true + execute_on = 'initial timestep_end' +[]