fdbedrock.py
Go to the documentation of this file.
1 from atomicdata import *
2 from util import *
3 
4 # FD bedrock (solidish granite)
5 
6 compositions = {
7  'SiO2': { 'Si' : 1, 'O': 2 },
8  'Al2O3': { 'Al' : 2, 'O': 3 },
9  'K2O': { 'K' : 2, 'O': 1 },
10  'Na2O': { 'Na' : 2, 'O': 1 },
11  'CaO' : { 'Ca' : 1, 'O': 1 },
12  'FeO': { 'Fe' : 1, 'O': 1 },
13  'Fe2O3': { 'Fe' : 2, 'O': 3 },
14  'MgO': { 'Mg' : 1, 'O': 1 },
15  'TiO2': { 'Ti' : 1, 'O': 2 },
16  'P2O5': { 'P' : 2, 'O': 5 },
17  'MnO': { 'Mn' : 1, 'O': 1 },
18  'water': { 'H' : 2, 'O': 1 },
19 }
20 
21 matrix_density = 2.81 # doc-637 measurement of NOvA granite
22 water_density = 1.00
23 
24 # A guess
25 void_volume_fraction = 0.01
26 
27 rock_volume_fraction = 1 - void_volume_fraction
28 
29 # Assume saturation
30 water_volume_fraction = void_volume_fraction
31 
32 air_volume_fraction = void_volume_fraction - water_volume_fraction
33 
34 water_mass_fraction = water_volume_fraction * water_density /(
35 water_volume_fraction*water_density + rock_volume_fraction*matrix_density)
36 
37 # Mass of air in the voids is neglected
38 rock_mass_fraction = 1 - water_mass_fraction
39 
40 density = (matrix_density * rock_volume_fraction
41  + water_density * water_volume_fraction)
42 
43 print('<D value="{0:.2f}" unit="g/cm3"/>'.format(density))
44 
45 fractions = {
46  'water': water_mass_fraction,
47 
48  # From Wikipedia "Granite": Mineralogy: Chemical composition on 2017-11-27.
49  # This is the worldwide average for dry granite.
50 
51  'SiO2': 0.7204 * rock_mass_fraction,
52  'Al2O3': 0.1442 * rock_mass_fraction,
53  'K2O': 0.0412 * rock_mass_fraction,
54  'Na2O': 0.0369 * rock_mass_fraction,
55  'CaO' : 0.0182 * rock_mass_fraction,
56  'FeO': 0.0168 * rock_mass_fraction,
57  'Fe2O3': 0.0122 * rock_mass_fraction,
58  # Omit to avoid needing magnesium, which isn't in the path_length_list
59  # file, and doesn't seem worth adding at ~0.4% with an unremarkable
60  # properties: near-average Z/A and neutron capture cross sections.
61  #'MgO': 0.0071,
62 
63  'TiO2': 0.0030 * rock_mass_fraction,
64  'P2O5': 0.0012 * rock_mass_fraction,
65  'MnO': 0.0005 * rock_mass_fraction,
66 }
67 
68 
69 def tot_weight(compos):
70  weight = 0
71  for element, number in compos.items():
72  weight += number * atomic_weight[element]
73  return weight
74 
76  tions = 0
77  for material, fraction in fractions.items():
78  tions += fraction
79  return tions
80 
81 def elem_frac(compos, elem):
82  if elem in compos:
83  return compos[elem] * atomic_weight[elem] / tot_weight(compos)
84  else:
85  return 0
86 
87 def elem_frac_total(elem):
88  frac = 0
89  for material, compos in compositions.items():
90  frac += elem_frac(compos, elem) * fractions[material]
91  return frac / tot_fractions()
92 
94  return make_composition("fdbedrock", fractions, compositions)
def elem_frac(compos, elem)
Definition: fdbedrock.py:81
def tot_weight(compos)
Definition: fdbedrock.py:69
def fdbedrock_composition()
Definition: fdbedrock.py:93
bool print
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14
def tot_fractions()
Definition: fdbedrock.py:75
def make_composition(name, fractions, compositions)
Definition: util.py:46
def elem_frac_total(elem)
Definition: fdbedrock.py:87