Functions | Variables
fdbedrock Namespace Reference

Functions

def tot_weight (compos)
 
def tot_fractions ()
 
def elem_frac (compos, elem)
 
def elem_frac_total (elem)
 
def fdbedrock_composition ()
 

Variables

dictionary compositions
 
float matrix_density = 2.81
 
float water_density = 1.00
 
float void_volume_fraction = 0.01
 
int rock_volume_fraction = 1
 
 water_volume_fraction = void_volume_fraction
 
 air_volume_fraction = void_volume_fraction-water_volume_fraction
 
 water_mass_fraction
 
int rock_mass_fraction = 1
 
tuple density
 
dictionary fractions
 

Function Documentation

def fdbedrock.elem_frac (   compos,
  elem 
)

Definition at line 81 of file fdbedrock.py.

References tot_weight().

Referenced by elem_frac_total().

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 
def elem_frac(compos, elem)
Definition: fdbedrock.py:81
def tot_weight(compos)
Definition: fdbedrock.py:69
def fdbedrock.elem_frac_total (   elem)

Definition at line 87 of file fdbedrock.py.

References elem_frac(), and tot_fractions().

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 
def elem_frac(compos, elem)
Definition: fdbedrock.py:81
def tot_fractions()
Definition: fdbedrock.py:75
def elem_frac_total(elem)
Definition: fdbedrock.py:87
def fdbedrock.fdbedrock_composition ( )

Definition at line 93 of file fdbedrock.py.

References util.make_composition().

94  return make_composition("fdbedrock", fractions, compositions)
95 
def fdbedrock_composition()
Definition: fdbedrock.py:93
def make_composition(name, fractions, compositions)
Definition: util.py:46
def fdbedrock.tot_fractions ( )

Definition at line 75 of file fdbedrock.py.

Referenced by elem_frac_total().

76  tions = 0
77  for material, fraction in fractions.items():
78  tions += fraction
79  return tions
80 
def tot_fractions()
Definition: fdbedrock.py:75
def fdbedrock.tot_weight (   compos)

Definition at line 69 of file fdbedrock.py.

Referenced by elem_frac().

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 
def tot_weight(compos)
Definition: fdbedrock.py:69

Variable Documentation

fdbedrock.air_volume_fraction = void_volume_fraction-water_volume_fraction

Definition at line 32 of file fdbedrock.py.

dictionary fdbedrock.compositions
Initial value:
1 = {
2  'SiO2': { 'Si' : 1, 'O': 2 },
3  'Al2O3': { 'Al' : 2, 'O': 3 },
4  'K2O': { 'K' : 2, 'O': 1 },
5  'Na2O': { 'Na' : 2, 'O': 1 },
6  'CaO' : { 'Ca' : 1, 'O': 1 },
7  'FeO': { 'Fe' : 1, 'O': 1 },
8  'Fe2O3': { 'Fe' : 2, 'O': 3 },
9  'MgO': { 'Mg' : 1, 'O': 1 },
10  'TiO2': { 'Ti' : 1, 'O': 2 },
11  'P2O5': { 'P' : 2, 'O': 5 },
12  'MnO': { 'Mn' : 1, 'O': 1 },
13  'water': { 'H' : 2, 'O': 1 },
14 }

Definition at line 6 of file fdbedrock.py.

tuple fdbedrock.density
Initial value:
1 = (matrix_density * rock_volume_fraction
2  + water_density * water_volume_fraction)

Definition at line 40 of file fdbedrock.py.

dictionary fdbedrock.fractions
Initial value:
1 = {
2  'water': water_mass_fraction,
3 
4  # From Wikipedia "Granite": Mineralogy: Chemical composition on 2017-11-27.
5  # This is the worldwide average for dry granite.
6 
7  'SiO2': 0.7204 * rock_mass_fraction,
8  'Al2O3': 0.1442 * rock_mass_fraction,
9  'K2O': 0.0412 * rock_mass_fraction,
10  'Na2O': 0.0369 * rock_mass_fraction,
11  'CaO' : 0.0182 * rock_mass_fraction,
12  'FeO': 0.0168 * rock_mass_fraction,
13  'Fe2O3': 0.0122 * rock_mass_fraction,
14  # Omit to avoid needing magnesium, which isn't in the path_length_list # file, and doesn't seem worth adding at ~0.4% with an unremarkable
15  # properties: near-average Z/A and neutron capture cross sections.
16  #'MgO': 0.0071,
17 
18  'TiO2': 0.0030 * rock_mass_fraction,
19  'P2O5': 0.0012 * rock_mass_fraction,
20  'MnO': 0.0005 * rock_mass_fraction,
21 }

Definition at line 45 of file fdbedrock.py.

float fdbedrock.matrix_density = 2.81

Definition at line 21 of file fdbedrock.py.

int fdbedrock.rock_mass_fraction = 1

Definition at line 38 of file fdbedrock.py.

int fdbedrock.rock_volume_fraction = 1

Definition at line 27 of file fdbedrock.py.

float fdbedrock.void_volume_fraction = 0.01

Definition at line 25 of file fdbedrock.py.

float fdbedrock.water_density = 1.00

Definition at line 22 of file fdbedrock.py.

fdbedrock.water_mass_fraction
Initial value:
1 = water_volume_fraction*water_density/(
2 water_volume_fraction*water_density + rock_volume_fraction*matrix_density)

Definition at line 34 of file fdbedrock.py.

fdbedrock.water_volume_fraction = void_volume_fraction

Definition at line 30 of file fdbedrock.py.