Functions | Variables
soil Namespace Reference

Functions

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

Variables

dictionary compositions
 
float matrix_density = 2.7
 
float water_density = 1.00
 
float void_volume_fraction = 0.40
 
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
 
int clay_fraction = 1
 
int sand_fraction = 1
 
int silt_fraction = 1
 
dictionary fractions
 

Function Documentation

def soil.elem_frac (   compos,
  elem 
)

Definition at line 74 of file soil.py.

References tot_weight().

Referenced by elem_frac_total().

74 def elem_frac(compos, elem):
75  if elem in compos:
76  return compos[elem] * atomic_weight[elem] / tot_weight(compos)
77  else:
78  return 0
79 
def elem_frac(compos, elem)
Definition: soil.py:74
def tot_weight(compos)
Definition: soil.py:62
def soil.elem_frac_total (   elem)

Definition at line 80 of file soil.py.

References elem_frac(), and tot_fractions().

80 def elem_frac_total(elem):
81  frac = 0
82  for material, compos in compositions.items():
83  frac += elem_frac(compos, elem) * fractions[material]
84  return frac / tot_fractions()
85 
def tot_fractions()
Definition: soil.py:68
def elem_frac(compos, elem)
Definition: soil.py:74
def elem_frac_total(elem)
Definition: soil.py:80
def soil.soil_composition ( )

Definition at line 86 of file soil.py.

References util.make_composition().

87  return make_composition("soil", fractions, compositions)
88 
def soil_composition()
Definition: soil.py:86
def make_composition(name, fractions, compositions)
Definition: util.py:46
def soil.tot_fractions ( )

Definition at line 68 of file soil.py.

Referenced by elem_frac_total().

69  tions = 0
70  for material, fraction in fractions.items():
71  tions += fraction
72  return tions
73 
def tot_fractions()
Definition: soil.py:68
def soil.tot_weight (   compos)

Definition at line 62 of file soil.py.

Referenced by elem_frac().

62 def tot_weight(compos):
63  weight = 0
64  for element, number in compos.items():
65  weight += number * atomic_weight[element]
66  return weight
67 
def tot_weight(compos)
Definition: soil.py:62

Variable Documentation

soil.air_volume_fraction = void_volume_fraction-water_volume_fraction

Definition at line 31 of file soil.py.

int soil.clay_fraction = 1

Definition at line 44 of file soil.py.

dictionary soil.compositions
Initial value:
1 = {
2  # Very rough, not specific to Ash River site
3  'sand_silica': { 'Si' : 1, 'O': 2 },
4  'silt_silica': { 'Al' : 2, 'O': 3 },
5  'silt1': { 'K': 1, 'Al': 1, 'Si': 3, 'O': 8 },
6  'silt2': { 'Na': 1, 'Al': 1, 'Si': 3, 'O': 8 },
7  'silt3': { 'Ca': 1, 'Al': 2, 'Si': 2, 'O': 8 },
8  'clay': { 'Al': 2, 'Si': 2, 'O': 9, 'H': 4 },
9 
10  'water': { 'H' : 2, 'O': 1 },
11 }

Definition at line 4 of file soil.py.

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

Definition at line 39 of file soil.py.

dictionary soil.fractions
Initial value:
1 = {
2  'water': water_mass_fraction,
3 
4  'sand_silica': sand_fraction * rock_mass_fraction,
5 
6  'silt_silica': 0.5 * silt_fraction * rock_mass_fraction,
7  'silt1': 0.5/3 * silt_fraction * rock_mass_fraction,
8  'silt2': 0.5/3 * silt_fraction * rock_mass_fraction,
9  'silt3': 0.5/3 * silt_fraction * rock_mass_fraction,
10 
11  'clay': clay_fraction * rock_mass_fraction,
12 }

Definition at line 48 of file soil.py.

float soil.matrix_density = 2.7

Definition at line 16 of file soil.py.

int soil.rock_mass_fraction = 1

Definition at line 37 of file soil.py.

int soil.rock_volume_fraction = 1

Definition at line 22 of file soil.py.

int soil.sand_fraction = 1

Definition at line 45 of file soil.py.

int soil.silt_fraction = 1

Definition at line 46 of file soil.py.

float soil.void_volume_fraction = 0.40

Definition at line 20 of file soil.py.

float soil.water_density = 1.00

Definition at line 17 of file soil.py.

soil.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 33 of file soil.py.

soil.water_volume_fraction = void_volume_fraction

Definition at line 29 of file soil.py.