Functions | Variables
pvc Namespace Reference

Functions

def totalstopppingpower (compos, name)
 
def tot_weight (compos)
 
def tot_fractions ()
 
def elem_frac (compos, elem)
 
def elem_frac_total (elem)
 
def pvc_composition ()
 

Variables

dictionary compositions
 
dictionary fractions
 

Function Documentation

def pvc.elem_frac (   compos,
  elem 
)

Definition at line 113 of file pvc.py.

References tot_weight().

Referenced by elem_frac_total().

113 def elem_frac(compos, elem):
114  if elem in compos:
115  return compos[elem] * atomic_weight[elem] / tot_weight(compos)
116  else:
117  return 0
118 
def elem_frac(compos, elem)
Definition: pvc.py:113
def tot_weight(compos)
Definition: pvc.py:101
def pvc.elem_frac_total (   elem)

Definition at line 119 of file pvc.py.

References elem_frac(), and tot_fractions().

119 def elem_frac_total(elem):
120  frac = 0
121  for material, compos in compositions.items():
122  frac += elem_frac(compos, elem) * fractions[material]
123  return frac / tot_fractions()
124 
def tot_fractions()
Definition: pvc.py:107
def elem_frac(compos, elem)
Definition: pvc.py:113
def elem_frac_total(elem)
Definition: pvc.py:119
def pvc.pvc_composition ( )

Definition at line 125 of file pvc.py.

References util.make_composition().

126  return make_composition("pvc", fractions, compositions)
127 
def pvc_composition()
Definition: pvc.py:125
def make_composition(name, fractions, compositions)
Definition: util.py:46
def pvc.tot_fractions ( )

Definition at line 107 of file pvc.py.

Referenced by elem_frac_total().

108  tions = 0
109  for material, fraction in fractions.items():
110  tions += fraction
111  return tions
112 
def tot_fractions()
Definition: pvc.py:107
def pvc.tot_weight (   compos)

Definition at line 101 of file pvc.py.

Referenced by elem_frac().

101 def tot_weight(compos):
102  weight = 0
103  for element, number in compos.items():
104  weight += number * atomic_weight[element]
105  return weight
106 
def tot_weight(compos)
Definition: pvc.py:101
def pvc.totalstopppingpower (   compos,
  name 
)

Definition at line 5 of file pvc.py.

References novadaq::HexUtils.format(), and print.

5 def totalstopppingpower(compos, name):
6  totstop = 0
7  totcomp = 0
8  for elem in elemlist:
9  if elem in compos:
10  totstop += compos[elem]*stoppingpower[elem]
11  totcomp += compos[elem]
12  answer = totstop/totcomp
13  print("{0:12s} stopping power: {1:.3f} MeV/cm^2/g".format(name, answer))
14  return answer
15 
16 # From http://arxiv.org/abs/1601.00908
17 # These are number fractions.
def totalstopppingpower(compos, name)
Definition: pvc.py:5
bool print
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14

Variable Documentation

dictionary pvc.compositions

Definition at line 18 of file pvc.py.

dictionary pvc.fractions
Initial value:
1 = {
2  'pvc' :100,
3 
4  # Advastab TM-181 data sheet says that these are 20-30%, 60-70%
5  # and 1-10%, respectively. An analysis at SpecialChem.com claims
6  # an overall tin content higher than the highest one can get from
7  # those numbers, so maximize the tin within the datasheet range.
8  'tin stabilizer monomethyl': 2.5*0.19,
9  'tin stabilizer dimethyl' : 2.5*0.80,
10  'tin stabilizer ehtg' : 2.5*0.01,
11 
12  'titanium dioxide' : 19,
13 
14  'calcium stearate' : 0.8,
15  'paraffin wax' : 1.1,
16  'oxidized polyethylene' : 0.2,
17  'glycerol monostearate' : 0.3,
18 
19  # Took middle-of-the-road guesses on the fractions.
20  'acrlyic impact modifier polymer' : 4*0.95,
21  'acrlyic impact modifier surfactant' : 4*0.025,
22  'acrlyic impact modifier cacarbonate' : 4*0.025,
23 
24  'processing aid polymer' : 1*0.985, # 98-99%
25  'processing aid detergent' : 1*0.015, # 1- 2%
26 }

Definition at line 73 of file pvc.py.