Skip to content

Commit

Permalink
update RMSPE
Browse files Browse the repository at this point in the history
  • Loading branch information
lin-yang-ly committed Nov 18, 2024
1 parent 345e3b6 commit 64194a8
Show file tree
Hide file tree
Showing 7 changed files with 138 additions and 140 deletions.
2 changes: 1 addition & 1 deletion doc/content/verification_and_validation/val-2d.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ TMAP7 ([!cite](ambrosek2008verification)) adjusts the maximum atom fraction as 0
## Results

In this case, there is a general background drift on desorption flux due to an increasing source of atoms going into the gas phase as the heated region spread with time. Thus, we add a ramped signal peaking at 4.87 $\times 10^{17}$ H$_2$/m$^2$/s to the results of the TMAP8 during the thermal desorption.
[val-2d_comparison] shows the comparison of the TMAP8 calculation and the experimental data. There is reasonable agreement between the TMAP predictions and the experimental data with the root mean square percentage error of RMSPE = 33.31 %.
[val-2d_comparison] shows the comparison of the TMAP8 calculation and the experimental data. There is reasonable agreement between the TMAP predictions and the experimental data with the root mean square percentage error of RMSPE = 32.83 %.
Note that the agreement could be improved by adjusting the model parameters and adding more potential traps. TMAP7 is limited to three traps, but TMAP8 can introduce an arbitrarily number of trapping populations. It is also possible to perform this optimization with [MOOSE's stochastic tools module](https://mooseframework.inl.gov/modules/stochastic_tools/index.html).

There are several reasons for the no exact fit with the data from [!cite](hino1998hydrogen): the most prominent one is the two-dimensionality of the experiment arising from beam non-uniformity and radial diffusion [!citep](anderl1992deuterium). The actual trap energies are probably a little lower than the ones indicated above if the time lag caused by two-dimensionality is significant. Exchange of hydrogen with chamber surfaces, particularly the sample support structure, may also be a factor.
Expand Down
2 changes: 1 addition & 1 deletion test/tests/val-2d/comparison_val-2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def numerical_solution_on_experiment_input(experiment_input, tmap_input, tmap_ou
ax.set_ylabel(u"Desorption flux (H$_2$/m$^2$/s)")
ax.legend(loc="best")
ax.set_ylim(bottom=0, top=1.8e18)
ax.set_xlim(left=5000,right=6800)
ax.set_xlim(left=5014,right=6800)
plt.grid(visible=True, which='major', color='0.65', linestyle='--', alpha=0.3)
tmap_flux_for_rmspe = numerical_solution_on_experiment_input(experiment_time, simulation_time_TMAP7, simulation_flux_left_TMAP7/2 + flux_environment)
RMSE = np.sqrt(np.mean((tmap_flux_for_rmspe-experiment_flux)**2) )
Expand Down
2 changes: 0 additions & 2 deletions test/tests/val-2d/gold/experiment_data_paper.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
time (s),flux (atom/m^2/s)
5005.498364679925, 2678922634204928
5014.991025249909, 4707782125333760
5014.991025249909, 4707782125333760
5029.1874481202685, 10247810694987904
5045.56548020234, 20706788398236160
Expand Down
Binary file modified test/tests/val-2d/gold/val-2d_limited_out.e
Binary file not shown.
260 changes: 130 additions & 130 deletions test/tests/val-2d/gold/val-2d_out.csv
Original file line number Diff line number Diff line change
@@ -1,131 +1,131 @@
time,scaled_flux_surface_left
4007.5283639171,9.1920962497614e+18
4022.5283639171,9.1923151809337e+18
4037.5283639171,9.192532889248e+18
4052.5283639171,9.192749386046e+18
4067.5283639171,9.1929646825226e+18
4082.5283639171,9.1931787897285e+18
4097.5283639171,9.1933917185724e+18
4112.5283639171,9.1936034798235e+18
4127.5283639171,9.1938140841136e+18
4142.5283639171,9.1940235419395e+18
4157.5283639171,9.1942318636652e+18
4172.5283639171,9.1944390595241e+18
4187.5283639171,9.1946451396207e+18
4202.5283639171,9.1948501139334e+18
4217.5283639171,9.1950539923158e+18
4232.5283639171,9.1952567844991e+18
4247.5283639171,9.1954585000941e+18
4262.5283639171,9.1956591485927e+18
4277.5283639171,9.1958587393703e+18
4292.5283639171,9.1960572816873e+18
4307.5283639171,9.1962547846909e+18
4322.5283639171,9.1964512574169e+18
4337.5283639171,9.1966467087916e+18
4352.5283639171,9.1968411476327e+18
4367.5283639171,9.1970345826495e+18
4382.5283639171,9.1972270224391e+18
4397.5283639171,9.1974184754659e+18
4412.5283639171,9.1976089499814e+18
4427.5283639171,9.1977984537184e+18
4442.5283639171,9.1979869927514e+18
4457.5283639171,9.1981745673106e+18
4472.5283639171,9.1983611567931e+18
4487.5283639171,9.1985466684769e+18
4502.5283639171,9.198730777156e+18
4517.5283639171,9.1989125099959e+18
4532.5283639171,9.1990895802949e+18
4547.5283639171,9.1992588268885e+18
4562.5283639171,9.1994222920453e+18
4577.5283639171,9.1996029372171e+18
4592.5283639171,9.1998521534557e+18
4607.5283639171,9.2001711153283e+18
4622.5283639171,9.2004004522214e+18
4637.5283639171,9.2004834271208e+18
4652.5283639171,9.200520413669e+18
4667.5283639171,9.2006011318686e+18
4682.5283639171,9.2007866744083e+18
4697.5283639171,9.2011107066309e+18
4712.5283639171,9.201429299071e+18
4727.5283639171,9.2015806086096e+18
4742.5283639171,9.2016287871237e+18
4757.5283639171,9.2016938354418e+18
4772.5283639171,9.2018536250462e+18
4787.5283639171,9.2021523562161e+18
4802.5283639171,9.2024763546179e+18
4817.5283639171,9.2026474932716e+18
4832.5283639171,9.2027011493276e+18
4847.5283639171,9.2027555478964e+18
4862.5283639171,9.2028899900776e+18
4877.5283639171,9.2031566942534e+18
4892.5283639171,9.2034843027354e+18
4907.5283639171,9.2036845567132e+18
4922.5283639171,9.2037505001899e+18
4937.5283639171,9.203795129825e+18
4952.5283639171,9.2039022880042e+18
4967.5283639171,9.2041290289605e+18
4982.5283639171,9.2044507288492e+18
4997.5283639171,9.204687435344e+18
5012.5283639171,5.1508698945912e+16
5029.0283639171,12413320138178
5036.8413437786,2.226136237368e+14
5043.873025654,6.1366399652381e+14
5051.6078757169,1.3214880868267e+15
5060.1162107861,2.9167613128639e+15
5069.4753793621,6.4798226544049e+15
5079.7704647958,1.4013407261653e+16
5091.0950587729,2.865773296009e+16
5103.5521121477,5.5206080217647e+16
5117.2548708599,1.0132164920346e+17
5132.3279054434,1.7742497370484e+17
5148.9082434853,2.9093552107089e+17
5167.1466153313,4.3437391603795e+17
5187.2088243619,5.8676814698878e+17
5209.2772542956,7.0982336968296e+17
5233.5525272226,6.7035164990812e+17
5260.2553274423,3.0902158679108e+17
5286.6910996599,2.853578358062e+16
5313.1268718774,6.8281711398589e+16
5342.2062213167,1.8053082763076e+17
5374.1935057,3.3771715226903e+17
5409.3795185215,5.9283386586491e+17
5440.7302559455,8.9148051371962e+17
5468.9459196271,1.1828843860169e+18
5497.1615833087,1.4305648945841e+18
5525.3772469903,1.5465998963335e+18
5543.7044209624,1.4089750922184e+18
5562.0315949345,1.243690091426e+18
5582.1914863038,9.5945867377678e+17
5595.2861219839,6.4830415862073e+17
5608.3807576641,3.9814117644088e+17
5622.7848569122,1.7945209664249e+17
5638.6293660851,2.8028909645189e+16
5656.0583261754,246862290674.66
5675.2301822746,48743505326261
5694.4020383739,1.484141170843e+15
5715.4910800831,2.5433999410929e+15
5738.6890259632,4.1328343145822e+15
5764.2067664313,6.640538854612e+15
5792.2762809463,1.0641005567277e+16
5823.1527469127,1.7156840796722e+16
5857.1168594757,2.7946970949529e+16
5894.4773832951,4.5917498771633e+16
5935.5739594964,7.5638103647748e+16
5980.7801933179,1.2451072915197e+17
6030.5070505215,2.0527122505269e+17
6080.5070505215,3.2326473183601e+17
6130.5070505215,4.8215349659471e+17
6180.5070505215,5.6910833334096e+17
6230.5070505215,3.9420218269292e+17
6280.5070505215,3.0527635713389e+17
6330.5070505215,2.5249283772563e+17
6380.5070505215,2.1730820043929e+17
6430.5070505215,1.9187920095277e+17
6480.5070505215,1.7245088768007e+17
6530.5070505215,1.570146741863e+17
6580.5070505215,1.443923237785e+17
6630.5070505215,1.3384074569518e+17
6680.5070505215,1.2486444015034e+17
6730.5070505215,1.1711842997878e+17
6780.5070505215,1.1035416823164e+17
6800,1.0794992639781e+17
4007.5283639171,9.0839560979745e+18
4022.5283639171,9.084087529681e+18
4037.5283639171,9.0841774195172e+18
4052.5283639171,9.084362179644e+18
4067.5283639171,9.0846951109855e+18
4082.5283639171,9.0850209742894e+18
4097.5283639171,9.0851846322519e+18
4112.5283639171,9.085267324449e+18
4127.5283639171,9.0854085170123e+18
4142.5283639171,9.0856931740056e+18
4157.5283639171,9.0860383205428e+18
4172.5283639171,9.0862488883062e+18
4187.5283639171,9.0863388203989e+18
4202.5283639171,9.0864431074999e+18
4217.5283639171,9.0866673908064e+18
4232.5283639171,9.0870060062482e+18
4247.5283639171,9.0872718306521e+18
4262.5283639171,9.0873896854693e+18
4277.5283639171,9.0874704962368e+18
4292.5283639171,9.0876334731206e+18
4307.5283639171,9.0879318446436e+18
4322.5283639171,9.0882432400034e+18
4337.5283639171,9.0884114957389e+18
4352.5283639171,9.0884892609967e+18
4367.5283639171,9.0886059157374e+18
4382.5283639171,9.0888622598258e+18
4397.5283639171,9.089221026695e+18
4412.5283639171,9.0894461950171e+18
4427.5283639171,9.0894878755894e+18
4442.5283639171,9.089464283044e+18
4457.5283639171,9.0894456317153e+18
4472.5283639171,9.0894398112884e+18
4487.5283639171,9.0894394089145e+18
4502.5283639171,9.0894399726424e+18
4517.5283639171,9.089440336252e+18
4532.5283639171,9.0894404792727e+18
4547.5283639171,9.0894405354772e+18
4562.5283639171,9.0894405756522e+18
4577.5283639171,9.08944061932e+18
4592.5283639171,9.0894406675314e+18
4607.5283639171,9.0894407183249e+18
4622.5283639171,9.0894407705632e+18
4637.5283639171,9.0894408239311e+18
4652.5283639171,9.0894408784368e+18
4667.5283639171,9.0894409341507e+18
4682.5283639171,9.0894409911346e+18
4697.5283639171,9.0894410494394e+18
4712.5283639171,9.0894411091121e+18
4727.5283639171,9.089441170201e+18
4742.5283639171,9.0894412327567e+18
4757.5283639171,9.0894412968327e+18
4772.5283639171,9.0894413624849e+18
4787.5283639171,9.0894414297722e+18
4802.5283639171,9.0894414987566e+18
4817.5283639171,9.0894415695031e+18
4832.5283639171,9.0894416420799e+18
4847.5283639171,9.0894417165591e+18
4862.5283639171,9.0894417930166e+18
4877.5283639171,9.089441871532e+18
4892.5283639171,9.0894419521898e+18
4907.5283639171,9.0894420350787e+18
4922.5283639171,9.0894421202926e+18
4937.5283639171,9.0894422079307e+18
4952.5283639171,9.0894422980981e+18
4967.5283639171,9.0894423909057e+18
4982.5283639171,9.0894424864712e+18
4997.5283639171,9.0894425849195e+18
5012.5283639171,4.9040712020578e+16
5029.0283639171,10051425059163
5047.1783639171,7.1061276076526e+14
5067.1433639171,5.0892665597937e+15
5089.1048639171,2.3369477311469e+16
5113.2625139171,7.6795436716408e+16
5139.8359289171,1.992536451954e+17
5169.0666854171,4.1577281590561e+17
5201.2205175671,6.6752601351218e+17
5236.5897329321,6.7686652562562e+17
5275.4958698336,1.5365264924041e+17
5318.2926204253,1.5150173936473e+16
5365.3690460761,2.4851779321114e+17
5371.3690460761,2.954245097494e+17
5377.3690460761,3.3835955822438e+17
5383.3690460761,3.8105723598482e+17
5389.3690460761,4.2511610632294e+17
5395.3690460761,4.711813362613e+17
5401.3690460761,5.1937036478063e+17
5407.3690460761,5.696384022398e+17
5413.3690460761,6.2187583078645e+17
5419.3690460761,6.7590868979266e+17
5425.9690460761,7.3714041567167e+17
5433.2290460761,8.0618948797815e+17
5441.2150460761,8.8341072565806e+17
5449.9996460761,9.6869078025697e+17
5459.6627060761,1.0612127902422e+18
5470.2920720761,1.1593620961635e+18
5481.9843746761,1.261086542705e+18
5494.8459075361,1.3645557248705e+18
5508.9935936821,1.4667248483875e+18
5524.5560484427,1.5548670859875e+18
5541.6747486794,1.59117997369e+18
5560.5053189397,1.5056359695897e+18
5581.2189462261,1.2196213909713e+18
5604.0039362411,7.1984533834981e+17
5629.0674252575,1.7739410169249e+17
5656.6372631757,-261640604.26633
5686.9640848856,5042283701839.3
5720.3235887666,2.3475717566543e+15
5757.0190430357,5.2492848999098e+15
5797.3840427316,1.0824305237312e+16
5841.7855423972,2.1522938177304e+16
5890.6271920293,4.2082254723836e+16
5940.6271920293,7.767349656086e+16
5990.6271920293,1.3466358599498e+17
6040.6271920293,2.2157603918563e+17
6090.6271920293,3.4636914860243e+17
6140.6271920293,5.1365659973104e+17
6190.6271920293,5.2572656409355e+17
6240.6271920293,3.7798616321084e+17
6290.6271920293,3.0025097256878e+17
6340.6271920293,2.5295570841678e+17
6390.6271920293,2.2080969314843e+17
6440.6271920293,1.9717592570856e+17
6490.6271920293,1.7882785250819e+17
6540.6271920293,1.6402755765157e+17
6590.6271920293,1.517533268904e+17
6640.6271920293,1.413597392971e+17
6690.6271920293,1.324147823577e+17
6740.6271920293,1.2461560587359e+17
6790.6271920293,1.1774193656165e+17
6800,1.1654761343728e+17
Binary file modified test/tests/val-2d/gold/val-2d_out.e
Binary file not shown.
12 changes: 6 additions & 6 deletions test/tests/val-2d/val-2d.i
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ temperature_rate = '${units ${fparse 50 / 60} K/s}'
[Mesh]
active = 'cartesian_mesh'
[cartesian_mesh]
nx_scale = 5
nx_scale = 2
type = CartesianMeshGenerator
dim = 1
dx = '${fparse 10 * ${units 1.5e-9 m -> mum}}
${units 1e-9 m -> mum} ${units 1e-8 m -> mum} ${units 1e-7 m -> mum}
${units 4e-6 m -> mum} ${units 4.407e-6 m -> mum} ${fparse 11 * ${units 7.407e-6 m -> mum}}'
${units 4e-6 m -> mum} ${units 4.407e-6 m -> mum} ${fparse 11 * ${units 7.407e-6 m -> mum}}'
ix = '${fparse 10 * ${nx_scale}}
${fparse 1 * ${nx_scale}} ${fparse 1 * ${nx_scale}} ${fparse 1 * ${nx_scale}}
${fparse 100 * ${nx_scale}} ${fparse 20 * ${nx_scale}} ${fparse 11 * ${nx_scale}}'
${fparse 50 * ${nx_scale}} ${fparse 2} ${fparse 1}'
subdomain_id = '0 1 1 1 1 1 1'
[]

Expand All @@ -69,7 +69,7 @@ temperature_rate = '${units ${fparse 50 / 60} K/s}'
${units 4e-6 m -> mum} ${units 4.407e-6 m -> mum} ${fparse 11 * ${units 7.407e-6 m -> mum}}'
ix = '${fparse 10 * ${nx_scale}}
${fparse 1 * ${nx_scale}} ${fparse 1 * ${nx_scale}} ${fparse 1 * ${nx_scale}}
${fparse 6 * ${nx_scale}} ${fparse 1 * ${nx_scale}} ${fparse 1 * ${nx_scale}}'
${fparse 6 * ${nx_scale}} ${fparse 1} ${fparse 1}'
subdomain_id = '0 1 1 1 1 1 1'
[]
[]
Expand Down Expand Up @@ -424,7 +424,7 @@ temperature_rate = '${units ${fparse 50 / 60} K/s}'
line_search = 'none'
automatic_scaling = true
nl_abs_tol = 1e-8
nl_rel_tol = 1e-6 # 2e-8
nl_rel_tol = 1e-6
nl_max_its = 30
[TimeStepper]
type = IterationAdaptiveDT
Expand All @@ -448,6 +448,6 @@ temperature_rate = '${units ${fparse 50 / 60} K/s}'
type = Exodus
start_time = ${outputs_initial_time}
output_material_properties = true
time_step_interval = 43
time_step_interval = 10
[]
[]

0 comments on commit 64194a8

Please sign in to comment.