diff --git a/report/_toc.yml b/report/_toc.yml index e79cb82..5e72eb4 100644 --- a/report/_toc.yml +++ b/report/_toc.yml @@ -33,6 +33,7 @@ parts: - file: validation/plasma-driven-permeation/plasma-driven-permeation - file: validation/thermodesorption_spectra/ogorodnikova/ogorodnikova-tds - file: validation/thermodesorption_spectra/dark/dark_tds + - file: validation/thermodesorption_spectra/oya/oya_tds - file: validation/thermodesorption_spectra/baldwin/baldwin_tds - caption: Appendices chapters: diff --git a/report/references.bib b/report/references.bib index cb16874..f9832fe 100644 --- a/report/references.bib +++ b/report/references.bib @@ -327,3 +327,18 @@ @article{holzner_2020 journal = {Physica Scripta}, abstract = {The diffusion of protium and deuterium in tungsten is measured in gas loading experiments as a function of temperature for a hydrogen isotope loading pressure of 500 mbar and temperatures between 1600 K and 2600 K. The diffusion parameters are measured from the degassing rates of both a single-crystalline and a polycrystalline tungsten cylinder by mass spectrometry. The data are analysed assuming an Arrhenius-like temperature dependence of the diffusivity and following the classical analysis approach of Frauenfelder (1969 J. Vac Sci. Technol. 6, 388). For deuterium in tungsten an activation energy of 0.06 eV is obtained. For protium the activation energy is identical within the uncertainty limits.} } + +@article{oya_thermal_2015, + title = {Thermal desorption behavior of deuterium for 6 {MeV} {Fe} ion irradiated {W} with various damage concentrations}, + volume = {461}, + issn = {00223115}, + url = {https://linkinghub.elsevier.com/retrieve/pii/S0022311515001798}, + doi = {10.1016/j.jnucmat.2015.03.032}, + language = {en}, + urldate = {2024-08-08}, + journal = {Journal of Nuclear Materials}, + author = {Oya, Yasuhisa and Li, Xiaochun and Sato, Misaki and Yuyama, Kenta and Zhang, Long and Kondo, Sosuke and Hinoki, Tatsuya and Hatano, Yuji and Watanabe, Hideo and Yoshida, Naoaki and Chikada, Takumi}, + month = jun, + year = {2015}, + pages = {336--340}, +} diff --git a/report/validation/thermodesorption_spectra/oya/oya_data.csv b/report/validation/thermodesorption_spectra/oya/oya_data.csv new file mode 100644 index 0000000..86a9feb --- /dev/null +++ b/report/validation/thermodesorption_spectra/oya/oya_data.csv @@ -0,0 +1,274 @@ +T ,flux ,_ ,dpa +321.43708753841247 ,1875703178787936 ,0 ,0 +327.1061778979362 ,6589310003190528 ,1 ,0 +343.97911034239564 ,13509428892881728 ,2 ,0 +354.40042988362916 ,23655354234185856 ,3 ,0 +364.80831556145154 ,33079209417138270 ,4 ,0 +379.7870732649326 ,38187435979244670 ,5 ,0 +391.90105959597656 ,39314201272858560 ,6 ,0 +404.83787006095616 ,34667763765511904 ,7 ,0 +415.8737888532518 ,27848398851404670 ,8 ,0 +431.5746167150846 ,21767896424913056 ,9 ,0 +444.4979933166529 ,16399388759214784 ,10 ,0 +455.6010814260046 ,13190374636865888 ,11 ,0 +470.4455004953737 ,11077899615455616 ,12 ,0 +480.65859515373376 ,10031737502308960 ,13 ,0 +496.07999865661367 ,8932175782102720 ,14 ,0 +510.3877348827056 ,7972997934543488 ,15 ,0 +521.5311245822909 ,6930194287249568 ,16 ,0 +535.458682473846 ,5536430958338208 ,17 ,0 +546.6020721734312 ,4493627311044288 ,18 ,0 +560.5296300649863 ,3099863982132960 ,19 ,0 +573.5268929153162 ,1702742187368800 ,20 ,0 +587.461167738577 ,670013937633280 ,21 ,0 +602.3324545347685 ,1679232926368 ,22 ,0 +329.0429042904291 ,15679106372175712 ,0 ,0.0003 +336.963696369637 ,49022594567149060 ,18 ,0.0003 +347.5247524752475 ,73651518998053680 ,-1 ,0.0003 +354.12541254125415 ,90839468562240880 ,-1 ,0.0003 +364.6864686468647 ,105468392993145520 ,1 ,0.0003 +373.26732673267327 ,107017855631717060 ,19 ,0.0003 +383.82838283828386 ,97287805703647330 ,-1 ,0.0003 +391.0891089108911 ,82681729711432740 ,-1 ,0.0003 +402.31023102310235 ,71157654226961180 ,2 ,0.0003 +412.8712871287129 ,60914783786070940 ,33 ,0.0003 +419.4719471947195 ,48871964119488900 ,-1 ,0.0003 +430.69306930693074 ,39655580942709660 ,-1 ,0.0003 +441.25412541254127 ,31976813065921984 ,3 ,0.0003 +448.51485148514854 ,28652788355758656 ,20 ,0.0003 +461.0561056105611 ,25335533553355360 ,-1 ,0.0003 +470.957095709571 ,24322586104764350 ,-1 ,0.0003 +482.1782178217822 ,25106202927985120 ,4 ,0.0003 +488.11881188118815 ,23831767792163810 ,22 ,0.0003 +500.6600660066007 ,23078615553863070 ,-1 ,0.0003 +511.2211221122113 ,22322924600152320 ,-1 ,0.0003 +518.4818481848185 ,24383515274604416 ,5 ,0.0003 +527.7227722772277 ,25677413895235680 ,21 ,0.0003 +538.943894389439 ,29794364051789824 ,-1 ,0.0003 +546.2046204620463 ,31854954726241890 ,-1 ,0.0003 +558.0858085808582 ,31613776762291616 ,6 ,0.0003 +568.6468646864687 ,29832444782939840 ,23 ,0.0003 +575.9075907590759 ,25226368790725216 ,-1 ,0.0003 +587.7887788778878 ,19856985698569856 ,-1 ,0.0003 +597.6897689768978 ,13459422865363456 ,7 ,0.0003 +604.950495049505 ,9622577642379616 ,24 ,0.0003 +614.8514851485149 ,5789117373275776 ,-1 ,0.0003 +625.4125412541255 ,2212913599052224 ,-1 ,0.0003 +633.3333333333334 ,2992299229922976 ,8 ,0.0003 +643.2343234323432 ,2748582550562752 ,25 ,0.0003 +655.1155115511551 ,3020225099432992 ,-1 ,0.0003 +663.0363036303631 ,3286790217483264 ,-1 ,0.0003 +673.5973597359737 ,2787509520182784 ,9 ,0.0003 +684.8184818481848 ,3571126343403552 ,26 ,0.0003 +691.4191419141914 ,502665651180480 ,-1 ,0.0003 +703.3003300330033 ,517897943640480 ,-1 ,0.0003 +713.2013201320133 ,274181264280224 ,10 ,0.0003 +723.7623762376238 ,800541592620768 ,27 ,0.0003 +730.3630363036305 ,1578234746551552 ,-1 ,0.0003 +740.924092409241 ,2617415587712576 ,-1 ,0.0003 +753.4653465346535 ,1351442836591296 ,11 ,0.0003 +760.7260726072609 ,1104341203351072 ,28 ,0.0003 +769.9669966996701 ,1116188541931072 ,-1 ,0.0003 +779.2079207920792 ,358805111280320 ,-1 ,0.0003 +790.4290429042906 ,-139629347550176 ,12 ,0.0003 +801.6501650165017 ,387577219260352 ,29 ,0.0003 +810.2310231023102 ,142168062960096 ,-1 ,0.0003 +819.4719471947196 ,-102394854870144 ,-1 ,0.0003 +828.0528052805282 ,-91393754760128 ,13 ,0.0003 +838.6138613861388 ,-77853939240128 ,35 ,0.0003 +847.1947194719473 ,702377930100672 ,-1 ,0.0003 +859.075907590759 ,204789709740160 ,-1 ,0.0003 +869.6369636963698 ,987560294490944 ,14 ,0.0003 +878.8778877887789 ,486587120250432 ,34 ,0.0003 +887.4587458745875 ,1779639502411744 ,-1 ,0.0003 +898.019801980198 ,767538292290720 ,-1 ,0.0003 +909.90099009901 ,1039180841160992 ,15 ,0.0003 +917.8217821782177 ,792925446390752 ,30 ,0.0003 +927.0627062706271 ,1317593297791264 ,-1 ,0.0003 +934.9834983498351 ,558517390200512 ,-1 ,0.0003 +946.2046204620463 ,572903444190496 ,16 ,0.0003 +956.7656765676568 ,73622746890016 ,31 ,0.0003 +963.3663366336634 ,338495388000288 ,-1 ,0.0003 +975.9075907590759 ,867394431750816 ,-1 ,0.0003 +985.8085808580859 ,623677752390560 ,17 ,0.0003 +997.029702970297 ,1663704832021600 ,32 ,0.0003 +326.40264026402645 ,7727003469577760 ,0 ,0.03 +336.3036303630363 ,30303799610730336 ,1 ,0.03 +347.5247524752475 ,49292544639079330 ,2 ,0.03 +357.42574257425747 ,62382161293052420 ,3 ,0.03 +366.00660066006606 ,76495726495726530 ,4 ,0.03 +371.947194719472 ,82657188795802700 ,5 ,0.03 +383.82838283828386 ,78057036472878100 ,6 ,0.03 +394.38943894389445 ,70121858339680160 ,7 ,0.03 +406.2706270627063 ,65008885503935040 ,8 ,0.03 +412.2112211221122 ,56298552932216320 ,9 ,0.03 +423.4323432343234 ,49389862063129410 ,10 ,0.03 +430.03300330033005 ,43757298806803780 ,11 ,0.03 +440.59405940594064 ,41206736058221220 ,12 ,0.03 +451.1551155115512 ,38656173309638660 ,13 ,0.03 +463.0363036303631 ,34825251755944830 ,14 ,0.03 +470.957095709571 ,32527714309892544 ,15 ,0.03 +481.51815181518157 ,31772023356181790 ,16 ,0.03 +490.09900990099015 ,30757383430650784 ,17 ,0.03 +500.6600660066007 ,33078615553863070 ,18 ,0.03 +509.9009900990099 ,35398155200135424 ,19 ,0.03 +522.4422442244224 ,37978336295167970 ,20 ,0.03 +528.3828382838284 ,43114157569603100 ,21 ,0.03 +538.2838283828384 ,47998646018448000 ,22 ,0.03 +550.1650165016501 ,50321570618600350 ,23 ,0.03 +557.4257425742574 ,54689853600744700 ,24 ,0.03 +567.3267326732673 ,57010239485487040 ,25 ,0.03 +581.1881188118812 ,58566472031818560 ,26 ,0.03 +589.1089108910892 ,60884319201150880 ,27 ,0.03 +596.3696369636964 ,64226961157654210 ,28 ,0.03 +606.9306930693069 ,63727680460353730 ,29 ,0.03 +614.1914191419143 ,60147245493780160 ,30 ,0.03 +626.072607260726 ,54521452145214530 ,31 ,0.03 +637.2937293729374 ,48894812558178910 ,32 ,0.03 +648.5148514851485 ,42242531945502240 ,33 ,0.03 +655.7755775577558 ,37892866209697890 ,34 ,0.03 +666.3366336633663 ,35085893204705090 ,35 ,0.03 +676.897689768977 ,35355843276635360 ,36 ,0.03 +684.1584158415842 ,37160023694677120 ,37 ,0.03 +696.0396039603961 ,38713717525598720 ,38 ,0.03 +705.9405940594061 ,39495641871879490 ,39 ,0.03 +713.2013201320133 ,37966488956587940 ,40 ,0.03 +724.4224422442244 ,35673182702885664 ,41 ,0.03 +731.6831683168318 ,30041465685030050 ,42 ,0.03 +743.5643564356435 ,23646441567233600 ,43 ,0.03 +752.8052805280529 ,17760853008377728 ,44 ,0.03 +764.026402640264 ,12647033934162656 ,45 ,0.03 +770.6270627062706 ,7527291190657504 ,46 ,0.03 +783.1683168316833 ,2671574849792640 ,47 ,0.03 +794.3894389438944 ,1403909621731360 ,48 ,0.03 +800.9900990099011 ,130320724380096 ,49 ,0.03 +347.5247524752475 ,36215621562156260 ,0 ,0.3 +358.0858085808581 ,52895828044342940 ,1 ,0.3 +366.00660066006606 ,75982905982906020 ,2 ,0.3 +372.60726072607264 ,95478547854785500 ,3 ,0.3 +379.8679867986799 ,106257087247186300 ,4 ,0.3 +391.7491749174918 ,110118473385800180 ,5 ,0.3 +401.65016501650166 ,106028602860286060 ,6 ,0.3 +416.1716171617162 ,98098502157908130 ,7 ,0.3 +422.11221122112215 ,92465092663112510 ,8 ,0.3 +430.69306930693074 ,86835068122196860 ,9 ,0.3 +441.25412541254127 ,79925531014639950 ,10 ,0.3 +449.83498349834986 ,74551916730134580 ,11 ,0.3 +461.0561056105611 ,67899636117457920 ,12 ,0.3 +472.2772277227723 ,63555047812473570 ,13 ,0.3 +482.1782178217822 ,58952356774138980 ,14 ,0.3 +489.43894389438947 ,58705255140898690 ,15 ,0.3 +500.6600660066007 ,57181179656427200 ,16 ,0.3 +511.2211221122113 ,57707539984767740 ,17 ,0.3 +517.1617161716172 ,58227976643818210 ,18 ,0.3 +529.0429042904291 ,59525260218329540 ,19 ,0.3 +540.924092409241 ,60053313023610050 ,20 ,0.3 +548.1848184818482 ,60319031903190300 ,21 ,0.3 +556.7656765676568 ,62124904798172130 ,22 ,0.3 +568.6468646864687 ,64447829398324450 ,23 ,0.3 +577.887788778878 ,64716086993314750 ,24 ,0.3 +589.1089108910892 ,66012524329356030 ,25 ,0.3 +598.3498349834983 ,65255140898705280 ,26 ,0.3 +604.950495049505 ,67827705847507840 ,27 ,0.3 +616.1716171617162 ,69124143183549120 ,28 ,0.3 +627.3927392739274 ,71189811288821200 ,29 ,0.3 +635.3135313531354 ,71969196919691980 ,30 ,0.3 +645.2145214521452 ,74033172548024030 ,31 ,0.3 +656.4356435643565 ,74047558602014050 ,32 ,0.3 +666.3366336633663 ,75598713717525600 ,33 ,0.3 +673.5973597359737 ,78428535161208450 ,34 ,0.3 +684.8184818481848 ,84083946856224100 ,35 ,0.3 +691.4191419141914 ,92041127189642060 ,36 ,0.3 +703.3003300330033 ,100517897943640530 ,37 ,0.3 +713.2013201320133 ,107453668443767470 ,38 ,0.3 +724.4224422442244 ,113878310908013890 ,39 ,0.3 +732.3432343234324 ,120811542692730830 ,40 ,0.3 +742.2442244224424 ,128516543962088540 ,41 ,0.3 +749.5049504950496 ,134679698739104700 ,42 ,0.3 +761.3861386138615 ,140079546416180100 ,43 ,0.3 +771.947194719472 ,141375137513751400 ,44 ,0.3 +781.848184818482 ,141387831090801400 ,45 ,0.3 +790.4290429042906 ,139603960396039620 ,46 ,0.3 +802.970297029703 ,136799526106456800 ,47 ,0.3 +812.2112211221122 ,133221629855293250 ,48 ,0.3 +818.1518151815183 ,128613861386138620 ,49 ,0.3 +829.3729372937294 ,120935939747820940 ,50 ,0.3 +839.9339933993399 ,109923838537699920 ,51 ,0.3 +847.1947194719473 ,94035711263434050 ,52 ,0.3 +858.4158415841584 ,77896251163577890 ,53 ,0.3 +870.2970297029703 ,61501227045781470 ,54 ,0.3 +875.5775577557756 ,46636202081746590 ,55 ,0.3 +888.1188118811883 ,32549716510112510 ,56 ,0.3 +900 ,21026487264111010 ,57 ,0.3 +906.6006600660066 ,12829821443682816 ,58 ,0.3 +917.8217821782177 ,6433951087416416 ,59 ,0.3 +927.7227722772277 ,2856901074722816 ,60 ,0.3 +936.9636963696371 ,3637979182533600 ,61 ,0.3 +329.70297029702976 ,2603029533722592 ,-1 ,1.0 +336.3036303630363 ,10560209867140608 ,-1 ,1.0 +343.5643564356436 ,19800287721079810 ,-1 ,1.0 +356.1056105610561 ,30842007277650850 ,-1 ,1.0 +361.38613861386136 ,42130828467462140 ,-1 ,1.0 +369.96699669966995 ,59577727003469570 ,-1 ,1.0 +379.8679867986799 ,76257087247186290 ,-1 ,1.0 +391.7491749174918 ,90118473385800160 ,-1 ,1.0 +408.91089108910893 ,99627655073199660 ,-1 ,1.0 +420.13201320132015 ,98359989845138400 ,-1 ,1.0 +426.73267326732673 ,91445375306761490 ,-1 ,1.0 +437.95379537953795 ,86844376745366880 ,-1 ,1.0 +449.83498349834986 ,81987814166032030 ,-1 ,1.0 +455.7755775577558 ,77380045696877400 ,-1 ,1.0 +465.6765676567657 ,72777354658542820 ,-1 ,1.0 +478.87788778877893 ,70230176863840260 ,-1 ,1.0 +485.4785478547855 ,68956587966488960 ,-1 ,1.0 +496.03960396039605 ,68200897012778240 ,-1 ,1.0 +505.94059405940595 ,68470000846238500 ,-1 ,1.0 +515.1815181518152 ,70276719979690300 ,-1 ,1.0 +525.0825082508252 ,71315054582381340 ,-1 ,1.0 +534.3234323432343 ,72865363459422900 ,-1 ,1.0 +547.5247524752476 ,74420749767284430 ,-1 ,1.0 +554.7854785478548 ,75199289159685220 ,-1 ,1.0 +566.006600660066 ,76752136752136770 ,-1 ,1.0 +571.947194719472 ,77528983667597550 ,-1 ,1.0 +583.8283828382839 ,81390369806211410 ,-1 ,1.0 +593.7293729372938 ,84479986460184500 ,-1 ,1.0 +605.6105610561057 ,86290090547516300 ,-1 ,1.0 +612.871287128713 ,90401963273250420 ,-1 ,1.0 +624.0924092409241 ,94518913429804530 ,-1 ,1.0 +635.3135313531354 ,97097402047897120 ,-1 ,1.0 +641.914191419142 ,100439197765930450 ,-1 ,1.0 +651.8151815181518 ,104041634932724060 ,-1 ,1.0 +663.6963696369637 ,107133790302107150 ,-1 ,1.0 +669.6369636963697 ,112526021832952540 ,-1 ,1.0 +692.0792079207922 ,123067614453753090 ,-1 ,1.0 +698.6798679867986 ,131281205043581300 ,-1 ,1.0 +710.5610561056105 ,139501565541169520 ,-1 ,1.0 +721.1221122112211 ,146951002792586980 ,-1 ,1.0 +727.0627062706271 ,153625285605483650 ,-1 ,1.0 +737.6237623762377 ,161331133113311360 ,-1 ,1.0 +748.1848184818482 ,167498519082677540 ,-1 ,1.0 +758.0858085808582 ,173665058813573700 ,-1 ,1.0 +768.6468646864687 ,177524752475247550 ,-1 ,1.0 +779.86798679868 ,177282728272827330 ,-1 ,1.0 +789.7689768976898 ,180115934670390140 ,-1 ,1.0 +798.3498349834983 ,178844884488448900 ,-1 ,1.0 +808.2508250825083 ,176549885757806600 ,-1 ,1.0 +814.1914191419144 ,171429296775831460 ,-1 ,1.0 +826.7326732673268 ,165804349665735800 ,-1 ,1.0 +837.2937293729374 ,155305068968435330 ,-1 ,1.0 +848.5148514851485 ,141729711432681730 ,-1 ,1.0 +854.4554455445545 ,124814250655834830 ,-1 ,1.0 +866.3366336633665 ,106367944486756370 ,-1 ,1.0 +876.2376237623762 ,87919099602267920 ,-1 ,1.0 +882.8382838283828 ,69466023525429440 ,-1 ,1.0 +894.7194719471947 ,53583819920453600 ,-1 ,1.0 +905.2805280528053 ,37956334094947900 ,-1 ,1.0 +913.8613861386139 ,26941694169416930 ,-1 ,1.0 +925.0825082508252 ,19520182787509470 ,-1 ,1.0 +934.9834983498351 ,14404671236354400 ,-1 ,1.0 +942.9042904290429 ,10312261995430272 ,-1 ,1.0 +953.4653465346535 ,7761699246847712 ,-1 ,1.0 +960.7260726072609 ,4950495049504896 ,-1 ,1.0 +973.2673267326734 ,5735804349665696 ,-1 ,1.0 +982.5082508250828 ,5234831175425184 ,-1 ,1.0 +993.0693069306931 ,2940678683252896 ,-1 ,1.0 \ No newline at end of file diff --git a/report/validation/thermodesorption_spectra/oya/oya_tds.md b/report/validation/thermodesorption_spectra/oya/oya_tds.md new file mode 100644 index 0000000..5813a1b --- /dev/null +++ b/report/validation/thermodesorption_spectra/oya/oya_tds.md @@ -0,0 +1,264 @@ +--- +jupytext: + formats: ipynb,md:myst + text_representation: + extension: .md + format_name: myst + format_version: 0.13 + jupytext_version: 1.16.4 +kernelspec: + display_name: vv-festim-report-env + language: python + name: python3 +--- + +# Deuterium retention in Fe-damaged tungsten + +```{tags} 1D, TDS, trapping, transient +``` + +This validation case is a thermo-desorption spectrum measurement perfomed by Oya et al. {cite}`oya_thermal_2015`. + +Deuterium ions at 500 eV were implanted in a 0.5 mm thick sample of tungsten damaged by Fe ions at different _dpa_ doses. + +The ion beam with an incident flux of $1.0 \times 10^{18} \ \mathrm{D \ m^{-2} \ s^{-1}}$ was turned on for 5000 s which corresponds to a fluence of $5.0 \times 10^{21} \ \mathrm{D \ m^{-2}}$ + +The diffusivity of tungsten in the FESTIM model is as measured by Frauenfelder {cite}`frauenfelder_permeation_1968`. + +To reproduce this experiment, eight traps are needed: 1 intrinsic trap and 7 damage-induced traps. + ++++ + +## FESTIM code + +```{code-cell} ipython3 +:tags: [hide-cell] + +import festim as F +import numpy as np +import sympy as sp +import matplotlib.pyplot as plt + +energies = [0.87, 1.0, 1.2, 1.35, 1.55, 1.73, 1.9] +dpa_to_densities = { + 0 : [], + 0.0003 : [1.8e-4, 0, 2.9e-5, 7.5e-5, 0, 0, 0], + 0.03 : [8.8e-5, 6.0e-5, 3.8e-5, 1.3e-4, 8.0e-5, 1.2e-4, 0], + 0.3 : [8.4e-5, 2.2e-4, 9.0e-5, 1.5e-4, 1.5e-4, 2.2e-4, 4.8e-4], + 1 : [8.5e-5, 5.2e-4, 2.8e-4, 2.2e-4, 2.4e-4, 3.4e-4, 5.9e-4], +} + +sample_depth = 5e-4 +vertices = np.concatenate([ + np.linspace(0, 30e-9, num=700), + np.linspace(30e-9, 3e-6, num=400), + np.linspace(3e-6, sample_depth, num=200), +]) + +# TODO: try with James' diffusivity +tungsten = F.Material( + id=1, + D_0=4.1e-07, # m2/s + E_D=0.39, # eV +) + +import sympy as sp + +imp_fluence = 5e21 +incident_flux = 1e18 # beam strength from paper + +imp_time = imp_fluence / incident_flux # s + +print(imp_time) + +ion_flux = sp.Piecewise((incident_flux, F.t <= imp_time), (0, True)) + +source_term = F.ImplantationFlux( + flux=ion_flux, imp_depth=10e-9, width=1e-9, volume=1 # H/m2/s # m # m +) + +implantation_temp = 300 # K +temperature_ramp = 0.5 # K/s +start_tds = imp_time + 60 # s + +min_temp, max_temp = implantation_temp, 1173 + +def TDS(dpa): + model = F.Simulation() + + model.mesh = F.MeshFromVertices(vertices) + model.materials = tungsten + model.sources = [source_term] + + # trap settings + w_atom_density = 6.3e28 # atom/m3 + k_0 = tungsten.D_0 / (1.1e-10**2 * 6 * w_atom_density) + + damage_depth = 1.1e-6 + damage_dist = sp.Piecewise( + (1 , F.x <= damage_depth), + (0, True) + ) + + intrinsic_trap = F.Trap( + k_0=k_0, + E_k=tungsten.E_D, + p_0=1e13, + E_p=0.85, + density=1.2e-5* w_atom_density, + materials=tungsten, + ) + + densities = dpa_to_densities[dpa] + + damage_induced_traps = [ + F.Trap( + k_0=k_0, + E_k=tungsten.E_D, + p_0=1e13, + E_p=e, + density=d * w_atom_density * damage_dist, + materials=tungsten, + ) for e, d in zip(energies, densities) + ] + + model.traps = [intrinsic_trap] + damage_induced_traps + + # boundary conditions + model.boundary_conditions = [F.DirichletBC(surfaces=[1, 2], value=0, field=0)] + # SiervertsBC doesn't change the result much, and the pressure isn't specified + # model.boundary_conditions = [F.SievertsBC(surfaces=[1, 2], S_0=4.52e21, E_S=0.3, pressure=1e-8)] + + model.T = F.Temperature( + value=sp.Piecewise( + (implantation_temp, F.t < start_tds), + (implantation_temp + temperature_ramp * (F.t - start_tds), True), + ) + ) + + model.dt = F.Stepsize( + initial_value=0.5, + stepsize_change_ratio=1.2, + max_stepsize=lambda t: 10 if t >= start_tds else None, + dt_min=1e-05, + milestones=[start_tds], + ) + + model.settings = F.Settings( + absolute_tolerance=1e7, + relative_tolerance=1e-10, + final_time=start_tds + + (max_temp - implantation_temp) / temperature_ramp, # time to reach max temp + ) + + derived_quantities = F.DerivedQuantities( + [ + F.TotalVolume("solute", volume=1), + F.TotalVolume("retention", volume=1), + F.HydrogenFlux(surface=1), + F.HydrogenFlux(surface=2), + ] + + [F.TotalVolume(f"{i + 1}", volume=1) for i, _ in enumerate(model.traps)], + show_units=True + ) + + model.exports = [derived_quantities] + + model.initialise() + model.run() + + return derived_quantities + +dpa_to_dq = {} +for dpa in dpa_to_densities: + dpa_to_dq[dpa] = TDS(dpa) +``` + +```{code-cell} ipython3 +for col, energy in enumerate(energies): + densities = [] + for dpa in dpa_to_densities: + if(dpa == 0): + continue + densities.append(dpa_to_densities[dpa][col]) + plt.plot(list(dpa_to_densities.keys())[1:],densities, label=energies[col]) +plt.legend() +``` + +## Comparison with experimental data + +The results produced by FESTIM are in good agreement with the experimental data. + +```{code-cell} ipython3 +:tags: [hide-input] + +""" # plotting trap contributions +traps = [derived_quantities.filter(fields=f"{i}").data for i in range(1, len(model.traps) + 1)] +contributions = [-np.diff(trap) / np.diff(t) for trap in traps] +for i, cont in enumerate(contributions): + plt.plot(temp[1:], cont, linestyle="--", color=colors[i], label=f"trap{i}") + plt.fill_between(temp[1:], 0, cont, facecolor="grey", alpha=0.1) """ + +dpa_values = dpa_to_densities.keys() + +# color setup +colors = [(0.9 * (i % 2), 0.2 * (i % 4), 0.4 * (i % 3)) for i in range(1, len(dpa_values) + 1)] + +experimental_tds = np.genfromtxt("oya_data.csv", delimiter=",", names=True) +data = list(enumerate(zip(experimental_tds["T"], experimental_tds["flux"]))) +experiment_dpa = experimental_tds["dpa"] + +for j, dpa in enumerate(dpa_values): + + # plotting simulation data + derived_quantities = dpa_to_dq[dpa] + + t = np.array(derived_quantities.t) + + flux_left = derived_quantities.filter(fields="solute", surfaces=1).data + flux_right = derived_quantities.filter(fields="solute", surfaces=2).data + flux_total = -np.array(flux_left) - np.array(flux_right) + + temp = implantation_temp + temperature_ramp * (t - start_tds) + + plt.plot(temp, flux_total, linewidth=3, label="FESTIM", color=colors[j]) + + + # plot experimental + x, y = list(zip(*((T, flux) for (i, (T, flux)) in data if np.isclose(experiment_dpa[i], dpa)))) + plt.scatter(x, y, color=colors[j], label=f"{dpa} dpa", s=16) + +plt.legend() +plt.xlim(min_temp, max_temp) +plt.ylim(bottom=0, top=2e17) +plt.ylabel(r"Desorption flux (m$^{-2}$ s$^{-1}$)") +plt.xlabel(r"Temperature (K)") + +plt.show() +``` + +```{note} +The experimental data was taken from Figure 3 of the original experiment paper {cite}`oya_thermal_2015` using [WebPlotDigitizer](https://automeris.io/) +``` + +## Trap Parameters + +### Damage-induced trap parameters + +This table displays the neutron-induced traps' detrapping energy $E_p$ and their density per dpa dose in $m^{-3}$. + +```{code-cell} ipython3 +:tags: [hide-input] + +import pandas as pd + +dpa_no_zero = dpa_to_densities | {} +dpa_no_zero.pop(0) +data = {"E_p (eV)" : energies} | dpa_no_zero +dpa_frame = pd.DataFrame(data) + +dpa_frame.columns = dpa_frame.columns.map(lambda s: f"{s:.1e} dpa" if not isinstance(s, str) else s) +dpa_frame.style \ + .relabel_index([f"Trap D{i}" for i,_ in enumerate(energies, 1)], axis=0) \ + .format("{:.2e}".format) +```