Revert to standardarized elemnt naming to allow expanding to any projectile element. Give warning when density is estimated from weighted average to make sure the user is are aware.
This commit is contained in:
+3
-3
@@ -62,9 +62,9 @@
|
||||
<tr><td>Projectile</td>
|
||||
<td><select name="ProjType" id="ProjType" onchange="ProjSmartDefaults()" onload="ProjSmartDefaults()">
|
||||
<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="Li-8">Li-8</option>
|
||||
<option value="B-12">B-12</option>
|
||||
<option value="Mg-31">Mg-31</option>
|
||||
<option value="H">H</option>
|
||||
<option value="He">He</option>
|
||||
</select>
|
||||
|
||||
+19
-10
@@ -48,9 +48,9 @@ function Zof(Element)
|
||||
{
|
||||
var ElementsZ = {
|
||||
"muon":1,
|
||||
"lithium-8":3,
|
||||
"boron-12":5,
|
||||
"magnesium-31":12,
|
||||
"Li-8":3,
|
||||
"B-12":5,
|
||||
"Mg-31":12,
|
||||
"H":1,
|
||||
"He":2,
|
||||
"Li":3,
|
||||
@@ -152,9 +152,9 @@ function Massof(Element)
|
||||
{
|
||||
var ElementsA = {
|
||||
"muon":0.1134289259,
|
||||
"lithium-8":8.02248624,
|
||||
"boron-12":12.0143526,
|
||||
"magnesium-31":30.996648,
|
||||
"Li-8":8.02248624,
|
||||
"B-12":12.0143526,
|
||||
"Mg-31":30.996648,
|
||||
"H":1.00800,
|
||||
"He":4.00300,
|
||||
"Li":6.93900,
|
||||
@@ -351,8 +351,10 @@ function Elastof(Element) {
|
||||
return Elast[Element];
|
||||
}
|
||||
|
||||
function StoppingCoefficients(Element)
|
||||
function StoppingCoefficients(Element,flag)
|
||||
{
|
||||
// flag = 1 prefer ICRU
|
||||
// otherwise prefer IAEA
|
||||
var StoppingCoefficientsICRU = {
|
||||
"H":"1.25400,1.44000,242.60001,12000.00000,0.11590",
|
||||
"He":"1.22900,1.39700,484.50000,5873.00000,0.05225",
|
||||
@@ -514,9 +516,15 @@ function StoppingCoefficients(Element)
|
||||
"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];
|
||||
if (flag) {
|
||||
console.log("ICRU");
|
||||
return StoppingCoefficientsICRU[Element];
|
||||
} else {
|
||||
console.log("IAEA");
|
||||
// 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];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -669,6 +677,7 @@ function rho_fun()
|
||||
}
|
||||
|
||||
document.getElementById(rhoLi).value = density_estimate;
|
||||
alert("Warning: Density for this layer is only an estimate!")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user