-
Notifications
You must be signed in to change notification settings - Fork 0
/
layer_definitions.py
114 lines (88 loc) · 3.29 KB
/
layer_definitions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import srim
from srim import Ion, Layer, Target, TRIM
from srim.output import Phonons, Ioniz
from srim.output import Results
def setlayer(layer_label, gas_pressure, length):
pressure = 133.322*gas_pressure
R = 8.3144598*10**6
T = 273
if (layer_label == 'P10'):
molar_mass = 16.04
gas_density = molar_mass*pressure/(R*T)
p_ten = Layer(
{
'C': {
'stoich': 2.0,
'E_d': 28.0,
'lattice': 3.0,
'surface': 7.47
},
'H': {
'stoich': 8.0,
'E_d': 10.0,
'lattice': 3.0,
'surface': 2.0
},
'Ar': {
'stoich': 90.0,
'E_d': 5.0,
'lattice': 1.0,
'surface': 2.0
}
}, density=gas_density, width=length,phase=1)
return p_ten
if (layer_label == 'HELIUM'):
molar_mass = 4.002602
gas_density = molar_mass*pressure/(R*T)
helium = Layer(
{
'He': {
'stoich': 1.0,
'E_d': 5.0,
'lattice': 1.0,
'surface': 2.0
}
}, density=gas_density, width=length,phase=1)
return helium
if (layer_label == 'METHANE'):
molar_mass = 16.04
gas_density = molar_mass*pressure/(R*T)
methane = Layer(
{
'C': {
'stoich': 1.0,
'E_d': 28.0,
'lattice': 3.0,
'surface': 7.47
},
'H': {
'stoich': 4.0,
'E_d': 10.0,
'lattice': 3.0,
'surface': 2.0
}
}, density=gas_density, width=length,phase=1)
return methane
if (layer_label == 'MYLAR'):
mylar = Layer(
{
'C': {
'stoich': 10.0,
'E_d': 28.0,
'lattice': 3.0,
'surface': 7.47
},
'H': {
'stoich': 8.0,
'E_d': 10.0,
'lattice': 3.0,
'surface': 2.0
},
'O': {
'stoich': 4.0,
'E_d': 28.0,
'lattice': 3.0,
'surface': 2.0
}
},density=1.39, width=length,phase=0)
return mylar