Merge branch 'master' of bitbucket.org:zaher-salman/trimsp

This commit is contained in:
2023-01-04 09:50:44 +01:00
8 changed files with 474 additions and 72 deletions

118
.gitignore vendored Normal file
View File

@@ -0,0 +1,118 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
.env.production
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

View File

@@ -2,40 +2,83 @@
### Contents ###
This is the fortran source code and GUI of TrimSP Monte-Carlo simulations.
This repository contains the [Fortran] source code and an accompanying
graphical user interface ([GUI]) for TrimSP -
an application for performing [Monte Carlo] simulations of ion implantation.
* This code is specifically tuned to simulate implantation of low energy projectiles in materials.
* The code is maintained by the Low Energy Muons group at PSI.
* The GUI is written in Node.js, JavaScript and Electron.
* The binary (statically linked) from the fortran code is also included.
* RPM and DEB packages are also included
* This code is specifically tuned to simulate implantation of low-energy projectiles in materials.
* The code is maintained by the Low Energy Muons ([LEM]) group at the Paul Scherrer Institute ([PSI]).
* The [GUI] is written in [Node.js], [JavaScript] and [Electron].
* The binary (statically linked) from the [Fortran] code is also included.
* [RPM] and [DEB] packages are also included.
Further information can be found in the following publications:
- J. P. Biersack and W. Eckstein,
<i>Sputtering studies with the Monte Carlo program TRIM.SP</i>,
Appl. Phys. A <b>34</b> (2), 73-94 (1984).
<https://doi.org/10.1007/BF00614759>
- W. Eckstein,
<i>Computer Simulation of Ion-Solid Interactions</i>,
Springer Series in Materials Science Vol. 10
(Springer-Verlag, Berlin, Heidelberg, 1991).
<https://doi.org/10.1007/978-3-642-73513-4>
- W. Eckstein,
<i>Backscattering and sputtering with the Monte-Carlo program TRIM.SP</i>,
Radiat. Eff. Defects Solids <b>130-131</b> (1), 239-250 (1994).
<https://doi.org/10.1080/10420159408219787>
- E. Morenzoni et al.,
<i>Implantation studies of keV positive muons in thin metallic layers</i>,
Nucl. Instrum. Methods Phys. Res., Sect. B <b>192</b> (3), 245-266 (2002).
<https://doi.org/10.1016/S0168-583X(01)01166-1>
### Supported platforms ###
* Linux
* [Linux]
* Online at: http://musruser.psi.ch/cgi-bin/TrimSP.cgi
### Installation ###
###### Fortran code compilation ######
Install gfortran compiler, then:
Install the `gfortran` compiler, then:
cd trimsp/fortran
make
make install
```bash
cd trimsp/fortran
make
make install
```
This will install the `trimspNL` in `/usr/local/bin`, but can be moved to any other directory in your `PATH`.
This will install the `trimspNL` binary in `/usr/local/bin`,
but it can be moved to any other directory in your `PATH`.
###### Running the GUI ######
Install Node.js (nodejs, nodejs-libs and npm), then
Install [Node.js] (`nodejs`, `nodejs-libs` and `npm`),
then run:
cd trimsp
npm install
npm start
```bash
cd trimsp
npm install
npm start
```
You do not need to run `npm install` every time. Next time you can simply run `npm start` only.
Note: you do not need to run `npm install` every time.
Next time you can simply run `npm start` only.
### Contact ###
Zaher Salman <zaher.salman@psi.ch>
[Fortran]: https://fortran-lang.org/
[Node.js]: https://nodejs.org/en/
[JavaScript]: https://www.javascript.com/
[Electron]: https://www.electronjs.org/
[PSI]: https://www.psi.ch/en
[LEM]: https://www.psi.ch/en/low-energy-muons
[RPM]: https://rpm.org/
[DEB]: https://en.wikipedia.org/wiki/Deb_(file_format)
[Linux]: https://en.wikipedia.org/wiki/Linux
[Monte Carlo]: https://en.wikipedia.org/wiki/Monte_Carlo_method
[GUI]: https://en.wikipedia.org/wiki/Graphical_user_interface

View File

@@ -24,7 +24,7 @@
<button class="tablinks" onclick="openTab(event,'Layers')" id="btnLayers">Layers</button>
<button class="tablinks" onclick="openTab(event,'Scans')" id="btnScans">Scans</button>
<button class="tablinks" onclick="openTab(event,'Plots')" id="btnPlots">Plots</button>
<button class="tablinks" onclick="openTab(event,'Other')" id="btnOther">Other Params</button>
<button class="tablinks" onclick="openTab(event,'Other')" id="btnOther">Other Parameters</button>
</div>
<div id="Layers" class="tabcontent">
<table style="width: 100%;">
@@ -51,7 +51,7 @@
</tr>
<tr><td colspan="2">
<table id="LTable" border="2" cellpadding="10">
<tr><td><b>Layer #</b></td><td><b>Composition</b></td><td><b>Density [g/cm<sup>3</sup>]</b></td><td><b>Thickness [A]</b></td></tr>
<tr><td><b>Layer #</b></td><td><b>Composition</b></td><td><b>Density [g/cm<sup>3</sup>]</b></td><td><b>Thickness [Å]</b></td></tr>
</table>
</td></tr>
</table>
@@ -61,22 +61,23 @@
<tr><td collspan="2"><b>Projectile parameters</b></td></tr>
<tr><td>Projectile</td>
<td><select name="ProjType" id="ProjType" onchange="ProjSmartDefaults()" onload="ProjSmartDefaults()">
<option selected="selected" value="Muon">Muon</option>
<option value="Li8">Li8</option>
<option value="B12">B12</option>
<option value="H">H</option>
<option value="He">He</option>
<option selected="selected" value="muon">muon</option>
<option value="lithium-8">lithium-8</option>
<option value="boron-12">boron-12</option>
<option value="magnesium-31">magnesium-31</option>
<option value="H">H</option>
<option value="He">He</option>
</select>
</td>
</tr>
<tr><td>Number of projectiles</td>
<td><input name="numberProj" id="numberProj" type="text" size="7" value="1000" onchange="//ProjNumberLimit()"></td>
</tr>
<tr><td>Starting depth [A]</td><td><input name="z0" id="z0" type="text" size="7" value="0"></td></tr>
<tr><td>Depth increment [A]</td><td><input name="dz" id="dz" type="text" size="7" value="20"></td></tr>
<tr><td>Starting depth [Å]</td><td><input name="z0" id="z0" type="text" size="7" value="0"></td></tr>
<tr><td>Depth increment [Å]</td><td><input name="dz" id="dz" type="text" size="7" value="20"></td></tr>
<tr><td>Energy [eV]</td><td><input name="valEnergy" id="valEnergy" type="text" size="7" value="2000"></td></tr>
<tr><td>Energy sigma [eV]</td><td><input name="sigEnergy" id="sigEnergy" type="text" size="7" value="450"></td></tr>
<tr><td>Angel [deg]</td><td><input name="valAngle" id="valAngle" type="text" size="7" value="0"></td></tr>
<tr><td>Angle [deg]</td><td><input name="valAngle" id="valAngle" type="text" size="7" value="0"></td></tr>
<tr><td>Angle sigma [deg]</td><td><input name="sigAngle" id="sigAngle" type="text" size="7" value="15"></td></tr>
<tr><td>Random seed</td><td><input name="ranSeed" id="ranSeed" type="text" size="7" value="78741"></td></tr>
<tr><td><button onclick="document.getElementById('btnPlots').click();tester();">Start</button></td><td></td></tr>
@@ -89,22 +90,22 @@
<input type="checkbox" name="scanSeq" id="scanSeq" onChange="adjust_scans();"> Enable scan on
<select name="scanType" id="scanType" onchange="adjust_scans();">
<option value="scanLoop">Loop</option>
<option value="scanVals">Set of Values</option>
<option value="scanVals">Set of values</option>
</select>
<div id="ScansLine" style="visibility: hidden;">
<br>Set of Values: <input name="scanList" id="scanList" type="text" value="1000">
corresponding depth increment <input name="scanListdz" id="scanListdz" type="text" value="">
<br>Set of values: <input name="scanList" id="scanList" type="text" value="1000">
Corresponding depth increment: <input name="scanListdz" id="scanListdz" type="text" value="">
</div>
<table id="ScansTable" style="width: 100%;visibility: hidden;">
<tr>
<td colspan="3">Scan parameter
<select name="comboScan" id="comboScan" onchange="">
<option value="EScan">Energy</option>
<option value="SigEScan">Energy Sigma</option>
<option value="AngleScan">Angle</option>
<option value="SigAngleScan">Angle Sigma</option>
<option value="NProjScan">Number of Projectiles</option>
<option value="dScan">Thickness of layer1</option>
<option value="EScan">Energy [eV]</option>
<option value="SigEScan">Energy sigma [eV]</option>
<option value="AngleScan">Angle [deg]</option>
<option value="SigAngleScan">Angle sigma [deg]</option>
<option value="NProjScan">Number of projectiles</option>
<option value="dScan">Thickness of layer # 1</option>
</select>
</td>
</tr>
@@ -134,61 +135,188 @@
<div id="Other" class="tabcontent">
<table cellpadding="5">
<tr>
<td>EF</td>
<td>
<details>
<summary>EF</summary>
Cutoff energy of projectiles (in eV);
must be greater than zero.
Used for low projectile energies (< 1000 eV) and ESB = 0.
EF should be of the order of ~0.2 eV,
but not above SBE (for sputtering data).
With increasing projectile energy,
EF can be increased to save computing time.
</details>
</td>
<td>
<input name="parEF" id="parEF" type="number" size="7" step="0.1" value="0.5">
</td>
<td>KK0</td>
<td>
<details>
<summary>KK0</summary>
Maximum order of weak (simultaneous) collisions between projectile and target atoms:
<ol>
<li value="0">No weak collisions included.</li>
<li value="1">???</li>
<li value="2">Sufficient for most calculations.</li>
<li value="3">Only useful for very heavy particles; increases computing time.</li>
<li value="4">Only useful for very heavy particles; increases computing time.</li>
</ol>
</details>
</td>
<td>
<input name="parKK0" id="parKK0" type="number" step="1" min="0" max="4" value="2">
</td>
</tr>
<tr>
<td>ESB</td>
<td>
<details>
<summary>ESB</summary>
Surface binding energy for projectiles (in eV).
This value is zero for the noble gases,
but ESB should be larger than zero if the projectile is an active
chemically species.
ESB = SBE for self-sputtering calculations.
</details>
</td>
<td>
<input name="parESB" id="parESB" type="number" size="7" step="0.1" value="0.0">
</td>
<td>KK0R</td>
<td>
<details>
<summary>KK0R</summary>
Maximum order of weak (simultaneous) collisions between target atoms:
<ol>
<li value="0">No weak collisions included.</li>
<li value="1">???</li>
<li value="2">Sufficient for most calculations.</li>
<li value="3">Only useful for very heavy particles; increases computing time.</li>
<li value="4">Only useful for very heavy particles; increases computing time.</li>
</ol>
</details>
</td>
<td>
<input name="parKK0R" id="parKK0R" type="number" step="1" min="0" max="4" value="2">
</td>
</tr>
<tr>
<td>SHEATH</td>
<td>
<details>
<summary>SHEATH</summary>
Sheath potential (in eV);
typically 3 * kT (i.e., 3 * |projectile energy|).
</details>
</td>
<td>
<input name="parSHEATH" id="parSHEATH" type="number" size="7" step="0.1" value="0.0">
</td>
<td>KDEE1</td>
<td>
<details>
<summary>KDEE1</summary>
Inelastic energy loss model for projectiles:
<ol>
<li value="1">Nonlocal (Lindhard-Scharff).</li>
<li value="2">Local (Oen-Robinson).</li>
<li value="3">
Equipartition of local and nonlocal models (i.e., options 1 & 2).
</li>
<li value="4">
Nonlocal (Anderson-Ziegler tables for hydrogen);
must be used for hydrogen-like projectile with energies > 10 keV.
</li>
<li value="5">
Nonlocal (Ziegler tables for helium);
must be used for helium-like projectiles with energies > 50 keV.
</li>
</ol>
Note: options 1, 2, and 3 can only be used at energies below the stopping power maximum.
</details>
</td>
<td>
<input name="parKDEE1" id="parKDEE1" type="number" step="1" min="1" max="5" value="4">
</td>
</tr>
<tr>
<td>ERC</td>
<td>
<details>
<summary>ERC</summary>
Recoil cutoff energy (in eV);
usually equal to the surface binding energy.
</details>
</td>
<td>
<input name="parERC" id="parERC" type="number" size="7" step="0.1" value="0.0">
</td>
<td>KDEE2</td>
<td>
<details>
<summary>KDEE2</summary>
Inelastic energy loss for target atoms:
<ol>
<li value="1">Nonlocal (Lindhard-Scharff).</li>
<li value="2">Local (Oen-Robinson).</li>
<li value="3">
Equipartition of local and nonlocal models (i.e., options 1 & 2).
</li>
</ol>
Note: options 1, 2, and 3 can only be used at energies below the stopping power maximum.
</details>
</td>
<td>
<input name="parKDEE2" id="parKDEE2" type="number" step="1" min="1" max="3" value="3">
</td>
</tr>
<tr>
<td>RD</td>
<td>
<details>
<summary>RD</summary>
Depth (in Å) to which recoils are followed.
RD = 50 is usually sufficient for sputtering
(if the projectile energy is not too high).
Use RD = 100 * CW (i.e., the depth increment)
for following the full collision cascade.
</details>
</td>
<td>
<input name="parRD" id="parRD" type="number" size="7" step="0.1" value="50.0">
</td>
<td>IPOT</td>
<td>
<details>
<summary>IPOT</summary>
Interaction potential between projectile and target atoms:
<ol>
<li value="1">Krypton-Carbon (Kr-C) potential.</li>
<li value="2">Molière potential.</li>
<li value="3">Ziegler-Biersack-Littmark (ZBL) potential.</li>
</ol>
</details>
</td>
<td>
<input name="parIPOT" id="parIPOT" type="number" step="1" min="1" max="3" value="2">
</td>
</tr>
<tr>
<td>CA</td>
<td>
<details>
<summary>CA</summary>
Correction factor to the Firsov screening length for
collisions between projectile and target atoms
(only used in the application of the Molière potential);
usually on the order of ~1.0.
</details>
</td>
<td>
<input name="parCA" id="parCA" type="number" size="7" step="0.1" value="1.0">
</td>
<td>IPOTR</td>
<td>
<details>
<summary>IPOTR</summary>
Interaction potential between target atoms:
<ol>
<li value="1">Krypton-Carbon (Kr-C) potential.</li>
<li value="2">Molière potential.</li>
<li value="3">Ziegler-Biersack-Littmark (ZBL) potential.</li>
</ol>
</details>
</td>
<td>
<input name="parIPOTR" id="parIPOTR" type="number" step="1" min="0" max="3" value="1">
</td>
@@ -196,12 +324,34 @@
<tr>
<td></td>
<td></td>
<td>IRL</td>
<td>
<input name="parIRL" id="parIRL" type="number" step="1" min="0" max="2" value="0">
<details>
<summary>IRL</summary>
Collision recoils:
<ol>
<li value="0">
No recoils are generated (i.e., no sputtering effects);
used to speed up the calculation if only projectile ranges are of interest.
</li>
<li value="1">Calculate collision recoils.</li>
</ol>
</details>
</td>
<td>
<input name="parIRL" id="parIRL" type="number" step="1" min="0" max="1" value="0">
</td>
</tr>
</table>
<p>
For further details see:
</p>
<p>
W. Eckstein, <i>Computer Simulation of Ion-Solid Interactions</i>,<br>
Springer Series in Materials Science, Vol. 10 (Springer-Verlag, Berlin, 1991).<br>
<a href="https://doi.org/10.1007/978-3-642-73513-4">
https://doi.org/10.1007/978-3-642-73513-4
</a>
</p>
</div>
</div>
</td></tr>

View File

@@ -47,9 +47,10 @@ function parse_formula (mf) {
function Zof(Element)
{
var ElementsZ = {
"Muon":1,
"Li8":3,
"B12":5,
"muon":1,
"lithium-8":3,
"boron-12":5,
"magnesium-31":12,
"H":1,
"He":2,
"Li":3,
@@ -150,9 +151,10 @@ function Zof(Element)
function Massof(Element)
{
var ElementsA = {
"Muon":0.113,
"Li8":8.0,
"B12":12.0,
"muon":0.1134289259,
"lithium-8":8.02248624,
"boron-12":12.0143526,
"magnesium-31":30.996648,
"H":1.00800,
"He":4.00300,
"Li":6.93900,
@@ -349,9 +351,9 @@ function Elastof(Element) {
return Elast[Element];
}
function Stopicru(Element)
function StoppingCoefficients(Element)
{
var Stopicru = {
var StoppingCoefficientsICRU = {
"H":"1.25400,1.44000,242.60001,12000.00000,0.11590",
"He":"1.22900,1.39700,484.50000,5873.00000,0.05225",
"Li":"1.41100,1.60000,725.59998,3013.00000,0.04578",
@@ -446,7 +448,75 @@ function Stopicru(Element)
"U":"7.29000,8.20400,19180.00000,586.29999,0.00267",
"":"0.00000,0.00000,0.00000,0.00000,0.00000"
};
return Stopicru[Element];
// Updated Anderson-Ziegler table values for hydrogen projectiles using
// up-to-date stopping data from the IAEA database (https://www-nds.iaea.org/stopping/).
// For further details on their determination, see e.g.:
// R. M. L. McFadden at al., arXiv:2212.11081 [cond-mat.supr-con]
// https://doi.org/10.48550/arXiv.2212.11081
var StoppingCoefficientsIAEA = {
"H": "1.21941306,1.39705253,316.72610292,3622.08960714,0.03609996",
"Li": "2.55867734,2.98398784,672.22623329,223.63937274,0.05756479",
"Be": "2.13846776,2.43024550,1353.80005691,500.78353377,0.01143076",
"B": "2.92598306,3.33271910,1523.83401267,574.31712932,0.01671298",
"C": "2.51057212,2.84874359,1325.63086028,2111.57332043,0.03815981",
"N": "3.03231463,3.44621744,1287.27189959,3445.25706665,0.06909550",
"O": "2.58218404,2.91913321,2066.69556610,1937.28839450,0.01708201",
"Mg": "4.32219620,4.95332934,2711.05757349,99.32422512,0.01692829",
"Al": "4.16266645,4.73942640,3007.21967155,192.15430476,0.01478852",
"Si": "4.56277193,5.17964542,3812.93366288,249.45105835,0.00951865",
"Cl": "5.18954121,5.87010049,5726.20198003,338.90592713,0.00527894",
"Ca": "7.38419020,8.41800474,4257.94547049,311.84732092,0.01482602",
"Sc": "6.27366940,7.11486087,5202.32117316,349.64931132,0.00808596",
"Ti": "4.89215322,5.52996090,4733.05002706,821.54929980,0.01141794",
"V": "4.39418898,4.95984106,5216.28902299,873.00768319,0.00982301",
"Cr": "4.22355616,4.76724205,4805.40719904,1062.25237873,0.01508696",
"Mn": "3.45870888,3.89580224,5452.18588822,1778.16054656,0.01057380",
"Fe": "3.69846643,4.16916938,5392.90710239,1040.38447053,0.01152298",
"Co": "3.55890909,4.00775461,6796.04145497,933.86447935,0.00558368",
"Ni": "3.42262695,3.86234880,4759.65515188,520.18934465,0.02026669",
"Cu": "3.54912421,4.02142201,4344.22605325,128.32905834,0.02886218",
"Zn": "4.31895518,4.91763977,5346.03925560,46.16548699,0.01518164",
"Ga": "4.11015447,4.63998531,7681.41419449,149.38563152,0.00628772",
"Ge": "5.80984815,6.60667983,6039.04808738,87.19744473,0.01158192",
"Se": "5.58734301,6.31119973,8423.01872583,221.61559131,0.00530434",
"Br": "6.28480648,7.09489448,11732.76411988,150.96205589,0.00281298",
"Kr": "6.47378266,7.31581518,9199.06183849,216.98680923,0.00437111",
"Rb": "8.48759187,9.62951209,7271.11124671,272.67996745,0.00818815",
"Sr": "8.66447838,9.84912713,5979.31960977,334.15705556,0.01184544",
"Y": "7.54854264,8.54789357,6885.34110669,429.53252110,0.00930644",
"Zr": "6.24168401,7.04236496,10674.06252597,269.66181445,0.00339805",
"Nb": "5.96194954,6.72632300,10250.57513827,275.25886405,0.00386599",
"Mo": "5.58867862,6.29983727,9573.16605660,523.57577519,0.00473082",
"Pd": "4.74762031,5.34871025,8086.17802763,942.05721488,0.00842671",
"Ag": "5.42052240,6.17824432,4642.18214950,90.75350922,0.06061521",
"Cd": "4.89128643,5.50754704,11831.77188508,396.06905848,0.00412049",
"In": "5.98978289,6.77050040,6343.54720062,564.65410792,0.02270520",
"Sn": "6.73191335,7.61854414,6946.18830598,347.19391310,0.01677246",
"Sb": "7.92400389,8.99628409,5736.29881090,403.11722206,0.02973016",
"Xe": "8.96826400,10.16224223,8543.27304860,283.90067433,0.01019984",
"La": "8.16949326,9.21144395,13933.96869212,429.99442382,0.00347440",
"Nd": "8.60801371,10.26060598,6798.65217629,7.06731816,0.02713704",
"Gd": "8.38379061,9.50012183,10804.38767518,110.71066098,0.00761735",
"Tb": "8.69907359,10.36476708,5985.09307671,7.76175759,0.04237031",
"Dy": "6.69350026,7.81543484,5289.65107666,12.11560717,0.05746489",
"Er": "4.31497049,4.85346547,12995.54504003,691.00380321,0.00499022",
"Yb": "6.38304258,7.21491284,12327.74719685,82.30064162,0.00516845",
"Lu": "7.00205766,8.09268611,4589.67801229,31.06321362,0.11142124",
"Hf": "5.32763157,6.00140558,13853.49562768,206.93150053,0.00411522",
"Ta": "5.15280708,5.80545310,12417.25115167,231.48549646,0.00530723",
"W": "4.81261962,5.41579909,15245.84079976,286.09077182,0.00344862",
"Re": "4.26021967,4.80273372,3191.05524918,76051.48730893,0.00003161",
"Ir": "4.16543126,4.68849191,6887.94139926,4263.90641919,0.00000004",
"Pt": "4.62228847,5.20033612,16308.49878855,266.02263275,0.00309560",
"Au": "4.84253074,5.44769072,15602.21662947,412.25485588,0.00331383",
"Pb": "9.42473604,17.46235676,11946.86905435,0.00000001,0.00652912",
"Bi": "10.25823796,12.26670424,7765.05387481,7.37274504,0.02310050"
};
// prefer using stopping coefficients derived from data in the IAEA database;
// however, if they are unavailable, return those from ICRU Report 49
return (Element in StoppingCoefficientsIAEA) ? StoppingCoefficientsIAEA[Element] : StoppingCoefficientsICRU[Element];
}
@@ -579,6 +649,27 @@ function rho_fun()
"":""
}
document.getElementById(rhoLi).value = rhos[chem];
// suggest a material density based on composition (when it's undefined)
if (!isFinite(document.getElementById(rhoLi).value)) {
let layer_formula = parse_formula(chem);
// determine the stoichiometry sum (for normalization)
let stoichiometry_sum = 0;
for (key of Object.keys(layer_formula)) {
stoichiometry_sum = stoichiometry_sum + layer_formula[key];
}
// determine the density using on a weighted average of the elemental densities
let density_estimate = 0;
for (key of Object.keys(layer_formula)) {
if (layer_formula[key] != null) {
density_estimate = density_estimate + (layer_formula[key] / stoichiometry_sum) * rhos[key];
}
}
document.getElementById(rhoLi).value = density_estimate;
}
}
function openTab(event, tabName) {
@@ -676,7 +767,7 @@ function ProjSmartDefaults()
var sigEnergy = document.getElementById("sigEnergy");
var sigAngle = document.getElementById("sigAngle");
if (Proj == "Muon") {
if (Proj == "muon") {
sigEnergy.value = "450";
sigAngle.value = "15";
} else {
@@ -899,7 +990,7 @@ function CreateInpFile(All) {
All[LEkey+"E"+NEl]=ElE; // sprintf("%8.4f",$ElE);
All["L"+i+"030"+NEl]=El030; // sprintf("%8.4f",$El030);
let ElST = Stopicru(El);
let ElST = StoppingCoefficients(El);
let ElSTs = ElST.split(',');
let j=1;
for (let iElST of ElSTs) {

View File

@@ -3,7 +3,7 @@
}
td {
white-space: nowrap;
white-space: wrap;
}
.guitable {

View File

@@ -7,19 +7,19 @@
# generator in the code. Use gfortran which is now
# a standard part of gcc in moder systems.
#
FC=gfortran
#DEBUG = -g -O -fbacktrace -ffpe-trap='underflow'
DEBUG =
#WARN= -Wall -W
WARN=
DIALECT =
FC = gfortran
DEBUG = # -g -O -fbacktrace -ffpe-trap='underflow'
WARN = # -Wall -Wextra
DIALECT = -std=gnu
prefix = /usr/local
OPS=-c $(DIALECT) $(WARN) $(DEBUG)
# OPS = -c $(DIALECT) $(WARN) $(DEBUG)
FCFLAGS = $(DIALECT) $(WARN) $(DEBUG) -O3 -mcmodel=medium
all : trimspNL
trimspNL : trimspNL.F
$(FC) -o $@ $<
$(FC) $(FCFLAGS) -o $@ $<
clean:
rm -f *.o *~ \#* .#* trimspNL

View File

@@ -55,7 +55,7 @@ C and maximum number of points in the depth distribution MAXD
C This is the only point where the number of layers and depth
C profile are changed. All other parameters should be changed
C accordingly.
PARAMETER (MAXD=500)
PARAMETER (MAXD=10000)
PARAMETER (MAXNL=100)
C Maximum number of elements in each layer, was limited to 5.
PARAMETER (MAXEL=20)
@@ -2739,7 +2739,7 @@ C size!
Dmid=(D2-D1)/2+D1
WRITE(22,701) Dmid,IRP(I)
700 FORMAT(1X,F6.0,1H-,F6.0,I10,E12.4,I10,1P1E14.4,5E12.4,I8)
701 FORMAT(1X,F6.0,2x,I10)
701 FORMAT(1X, F16.4, 2X, I10)
D1=D2
11 D2=D2+CW
WRITE(21,604) D2-CW,IRP(MAXD1),RIRP(MAXD1)