pvc.py
Go to the documentation of this file.
1 from atomicdata import *
2 from util import *
3 
4 # takes a mass fraction composition
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.
18 compositions = {
19 
20  # Pure PVC is just C2H3Cl. This is the polymer unit and does not change
21  # upon polymerization
22  'pvc' : { 'C':2, 'H':3, 'Cl':1 },
23 
24  # Rohm & Haas Advastab TM-181 tin stabilizer
25  # From the safety data sheet, we learn that "monomethyl tin" is actually
26  # 2-ethylhexyl 10-ethyl-4-[[2-[(2- ethylhexyl)oxy]-2-oxoethyl]thio]-4-
27  # methyl-7-oxo-8-oxa-3,5-dithia-4-stannatetradecanoate,
28  # CAS 57583-34-3
29  'tin stabilizer monomethyl': { 'Sn':1, 'C':22, 'H':44, 'O':4, 'S':2 },
30 
31  # And this is 2-ethylhexyl 10-ethyl-4,4-dimethyl-7-oxo-8-oxa-3,5- dithia-
32  # 4-stannatetradecanoate, CAS 57583-35-4
33  'tin stabilizer dimethyl' : { 'Sn':1, 'C':31, 'H':60, 'O':6, 'S':3 },
34 
35  # And this is Ethylhexyl thioglycolate, CAS 7659-86-1
36  'tin stabilizer ehtg' : { 'S':1, 'O':2, 'C':9, 'H':20 },
37 
38  # Easy!
39  'titanium dioxide' : { 'Ti':1, 'O':2 },
40 
41  # Also easy!
42  'calcium stearate' : { 'Ca':1, 'C':36, 'H':70, 'O':4 },
43 
44  # Annoying. Have to guess at the average chain length and amount of
45  # branching. Wikipedia suggests 30 for the chain length, and
46  # a page at chemicalland21.com suggests 99% straight chains.
47  'paraffin wax' : { 'C':30, 'H':61.97 },
48 
49  # Has many names. In IUPAC, 6-hydroxy-5-methyl-4,11-dioxoundecanoic acid
50  # See pubchem.ncbi.nlm.nih.gov
51  'oxidized polyethylene' : { 'C':12, 'H':20, 'O':5 },
52 
53  # Also look this one up at pubchem.ncbi.nlm.nih.gov
54  'glycerol monostearate' : { 'C':21, 'H':42, 'O':4 },
55 
56  # I could not find the composition of the impact modifier, but
57  # based on my reading, methylmethacrylate is not a crazy guess
58  'acrlyic impact modifier polymer' :{ 'C': 5, 'H':8, 'O':2 },
59 
60  # The datasheet lists this just as "proprietary", guess sodium lauryl sulfate
61  'acrlyic impact modifier surfactant' :{ 'C':12, 'H':25, 'Na':1, 'O':4, 'S':1 },
62 
63  # Just calcium carbonate
64  'acrlyic impact modifier cacarbonate':{ 'Ca':1, 'C':1, 'O':3 },
65 
66  # Datasheet says the processing aid is
67  # 98-99% CAS 9010-88-2, 1-2% Sodium lauryl sulfate
68  'processing aid polymer' : { 'C':10, 'H':16,'O':4 },
69  'processing aid detergent': { 'C':12, 'H':25, 'Na':1, 'O':4, 'S':1 },
70 }
71 
72 
73 fractions = {
74  'pvc' :100,
75 
76  # Advastab TM-181 data sheet says that these are 20-30%, 60-70%
77  # and 1-10%, respectively. An analysis at SpecialChem.com claims
78  # an overall tin content higher than the highest one can get from
79  # those numbers, so maximize the tin within the datasheet range.
80  'tin stabilizer monomethyl': 2.5*0.19,
81  'tin stabilizer dimethyl' : 2.5*0.80,
82  'tin stabilizer ehtg' : 2.5*0.01,
83 
84  'titanium dioxide' : 19,
85 
86  'calcium stearate' : 0.8,
87  'paraffin wax' : 1.1,
88  'oxidized polyethylene' : 0.2,
89  'glycerol monostearate' : 0.3,
90 
91  # Took middle-of-the-road guesses on the fractions.
92  'acrlyic impact modifier polymer' : 4*0.95,
93  'acrlyic impact modifier surfactant' : 4*0.025,
94  'acrlyic impact modifier cacarbonate' : 4*0.025,
95 
96  'processing aid polymer' : 1*0.985, # 98-99%
97  'processing aid detergent' : 1*0.015, # 1- 2%
98 }
99 
100 
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 
108  tions = 0
109  for material, fraction in fractions.items():
110  tions += fraction
111  return tions
112 
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 
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 
126  return make_composition("pvc", fractions, compositions)
def pvc_composition()
Definition: pvc.py:125
def tot_fractions()
Definition: pvc.py:107
def elem_frac(compos, elem)
Definition: pvc.py:113
def totalstopppingpower(compos, name)
Definition: pvc.py:5
bool print
def elem_frac_total(elem)
Definition: pvc.py:119
def tot_weight(compos)
Definition: pvc.py:101
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14
def make_composition(name, fractions, compositions)
Definition: util.py:46