atomicWeights.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "atomicWeights.H"
27 
28 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
29 
31 Foam::atomicWeightTable::atomicWeights[atomicWeightTable::nElements] =
32 {
33  {"E", 0},
34  {"e", 5.45e-4},
35  {"H", 1.00797},
36  {"D", 2.01410},
37  {"T", 3.01604},
38  {"He", 4.00260},
39  {"Li", 6.93900},
40  {"Be", 9.01220},
41  {"B", 10.81100},
42  {"C", 12.01115},
43  {"N", 14.00670},
44  {"O", 15.99940},
45  {"F", 18.99840},
46  {"Ne", 20.18300},
47  {"Na", 22.98980},
48  {"Mg", 24.31200},
49  {"Al", 26.98150},
50  {"Si", 28.08600},
51  {"P", 30.97380},
52  {"S", 32.06400},
53  {"Cl", 35.45300},
54  {"Ar", 39.94800},
55  {"K", 39.10200},
56  {"Ca", 40.08000},
57  {"Sc", 44.95600},
58  {"Ti", 47.90000},
59  {"V", 50.94200},
60  {"Cr", 51.99600},
61  {"Mn", 54.93800},
62  {"Fe", 55.84700},
63  {"Co", 58.93320},
64  {"Ni", 58.71000},
65  {"Cu", 63.54000},
66  {"Zn", 65.37000},
67  {"Ga", 69.72000},
68  {"Ge", 72.59000},
69  {"As", 74.92160},
70  {"Se", 78.96000},
71  {"Br", 79.90090},
72  {"Kr", 83.80000},
73  {"Rb", 85.47000},
74  {"Sr", 87.62000},
75  {"Y", 88.90500},
76  {"Zr", 91.22000},
77  {"Nb", 92.90600},
78  {"Mo", 95.94000},
79  {"Tc", 99.00000},
80  {"Ru", 101.07000},
81  {"Rh", 102.90500},
82  {"Pd", 106.40000},
83  {"Ag", 107.87000},
84  {"Cd", 112.40000},
85  {"In", 114.82000},
86  {"Sn", 118.69000},
87  {"Sb", 121.75000},
88  {"Te", 127.60000},
89  {"I", 126.90440},
90  {"Xe", 131.30000},
91  {"Cs", 132.90500},
92  {"Ba", 137.34000},
93  {"La", 138.91000},
94  {"Ce", 140.12000},
95  {"Pr", 140.90700},
96  {"Nd", 144.24000},
97  {"Pm", 145.00000},
98  {"Sm", 150.35000},
99  {"Eu", 151.96000},
100  {"Gd", 157.25000},
101  {"Tb", 158.92400},
102  {"Dy", 162.50000},
103  {"Ho", 164.93000},
104  {"Er", 167.26000},
105  {"Tm", 168.93400},
106  {"Yb", 173.04000},
107  {"Lu", 174.99700},
108  {"Hf", 178.49000},
109  {"Ta", 180.94800},
110  {"W", 183.85000},
111  {"Re", 186.20000},
112  {"Os", 190.20000},
113  {"Ir", 192.20000},
114  {"Pt", 195.09000},
115  {"Au", 196.96700},
116  {"Hg", 200.59000},
117  {"Tl", 204.37000},
118  {"Pb", 207.19000},
119  {"Bi", 208.98000},
120  {"Po", 210.00000},
121  {"At", 210.00000},
122  {"Rn", 222.00000},
123  {"Fr", 223.00000},
124  {"Ra", 226.00000},
125  {"Ac", 227.00000},
126  {"Th", 232.03800},
127  {"Pa", 231.00000},
128  {"U", 238.03000},
129  {"Np", 237.00000},
130  {"Pu", 242.00000},
131  {"Am", 243.00000},
132  {"Cm", 247.00000},
133  {"Bk", 249.00000},
134  {"Cf", 251.00000},
135  {"Es", 254.00000},
136  {"Fm", 253.00000}
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
141 
143 {
144  for (int i=0; i<nElements; i++)
145  {
146  insert(word(atomicWeights[i].name), atomicWeights[i].weight);
147  }
148 }
149 
150 
151 // * * * * * * * * * * * * * * * * Global data * * * * * * * * * * * * * * //
152 
154 
155 
156 // ************************************************************************* //
static const int nElements
Definition: atomicWeights.H:65
atomicWeightTable()
Construct from atomicWeights_.
bool insert(const word &, const scalar &newElmt)
Insert a new hashedEntry.
Definition: HashTableI.H:80
A class for handling words, derived from string.
Definition: word.H:59
static const atomicWeight atomicWeights[nElements]
Static table of the weights of all known elements.
Definition: atomicWeights.H:68
atomicWeightTable atomicWeights
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
Structure to hold the element name and atomic weight pair.
Definition: atomicWeights.H:59
A table of atomic weights for all the elements.
Definition: atomicWeights.H:49