ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
all.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_MATERIALS_MATERIALS_HPP
2#define VIENNASHE_MATERIALS_MATERIALS_HPP
3
4/* ============================================================================
5 Copyright (c) 2011-2022, Institute for Microelectronics,
6 Institute for Analysis and Scientific Computing,
7 TU Wien.
8
9 -----------------
10 ViennaSHE - The Vienna Spherical Harmonics Expansion Boltzmann Solver
11 -----------------
12
13 http://viennashe.sourceforge.net/
14
15 License: MIT (X11), see file LICENSE in the base directory
16=============================================================================== */
17
18// std
19#include <stdexcept>
20#include <string>
21#include <algorithm>
22
23// viennashe::materials
25
26// viennashe
27#include "viennashe/forwards.h"
28
29// viennashe::physics
31
32
37namespace viennashe
38{
40 namespace materials
41 {
43 struct metal
44 {
45 enum { id = 100 };
46 };
47
49 struct si
50 {
51 enum { id = 0 }; //Note that this is the default material!
52
53 static double permittivity() { return 11.9 * viennashe::physics::constants::eps_0; }
54
55 //
56 // carrier type agnostic versions:
57 //
59 {
60 if (ctype == ELECTRON_TYPE_ID)
62 else
64 }
65
67 {
68 if (ctype == ELECTRON_TYPE_ID)
70 else
72 }
73
75 {
76 if (ctype == ELECTRON_TYPE_ID)
78 else
80 }
81
83 {
84 if (ctype == ELECTRON_TYPE_ID)
85 {
86 return 3.0 / ( 1.0/longitudinal_effective_mass(ctype)
87 + 1.0/transverse_effective_mass(ctype)
88 + 1.0/transverse_effective_mass(ctype) );
89 }
90 else
91 {
92 // return 3.0 / ( 1.0/longitudinal_effective_mass(viennashe::hole_tag())
93 // + 1.0/transverse_effective_mass(viennashe::hole_tag())
94 // + 1.0/transverse_effective_mass(viennashe::hole_tag()) );
95 return 0.36 * viennashe::physics::constants::mass_electron; //Note: This should be the harmonic mean for consistency...
96 }
97 }
98
99 static double band_gap() { return 1.11 * viennashe::physics::constants::q; /* in Joule @ 300 K */ }
100
101 static double get_mass_density() { return 2330.0; /* kg/m^3 */ }
102
103 static double specific_heat() { return 1.6e6; /* J m^-3 K^-1 */ }
104 static double reference_temperature() { return 300.0; /* K */ }
105
106 static double diffusivity() { return 10; /* TODO: real values */ }
107 };
108
110 struct sio2
111 {
112 enum { id = 1 };
113 static double permittivity() { return 3.9 * viennashe::physics::constants::eps_0; }
114 static double diffusivity() { return 100; /* TODO: real values */ }
115 };
116
118 struct hfo2
119 {
120 enum { id = 2 };
121 static double permittivity() { return 25.0 * viennashe::physics::constants::eps_0; }
122 static double diffusivity() { return 100; /* TODO: real values */ }
123 };
124
126 struct sion
127 {
128 // Find a way to incorporate nitrogen and oxygen content. The relative permitivity of SiO_xN_y depends on x and y!
129 enum { id = 3 };
130 static double permittivity() { return 10.0 * viennashe::physics::constants::eps_0; }
131 static double diffusivity() { return 100; /* TODO: real values */ }
132 };
133
135 struct gas
136 {
137 enum { id = 4 };
138 static double permittivity() { return 1.0 * viennashe::physics::constants::eps_0; }
139 static double diffusivity() { return 100; /* TODO: real values */ }
140 };
141
142 //
143 // Convenience functions:
144 //
145
147 inline bool is_conductor(long material_id)
148 {
149 if (material_id == metal::id)
150 return true;
151
152 return false;
153 }
154
156 inline bool is_semiconductor(long material_id)
157 {
158 if (material_id == si::id)
159 return true;
160
161 return false;
162 }
163
165 inline bool is_insulator(long material_id)
166 {
167 if (material_id == sio2::id)
168 return true;
169 if (material_id == hfo2::id)
170 return true;
171 if (material_id == sion::id)
172 return true;
173 if (material_id == gas::id)
174 return true;
175
176 return false;
177 }
178
184 {
185 public:
186 checker(material_category_id category) : category_(category) {}
187
188 bool operator()(long material_id) const
189 {
190 switch (category_)
191 {
192 case MATERIAL_CONDUCTOR_ID: return is_conductor(material_id);
193 case MATERIAL_NO_CONDUCTOR_ID: return !is_conductor(material_id);
194 case MATERIAL_SEMICONDUCTOR_ID: return is_semiconductor(material_id);
195 case MATERIAL_NO_SEMICONDUCTOR_ID: return !is_semiconductor(material_id);
196 case MATERIAL_INSULATOR_ID: return is_insulator(material_id);
197 default: return !is_insulator(material_id); //only remaining option
198 }
199
200 //std::stringstream ss;
201 //ss << "Invalid material category encountered!" << std::endl;
202 //throw invalid_material_exception(ss.str());
203 }
204 private:
205 material_category_id category_;
206 };
207
208
209 //
210 // Permittivity accessor:
211 //
212
214 inline double permittivity(long material_id)
215 {
216 switch (material_id)
217 {
218 case si::id:
219 return si::permittivity();
220 case sio2::id:
221 return sio2::permittivity();
222 case hfo2::id:
223 return hfo2::permittivity();
224 case sion::id:
225 return sion::permittivity();
226 case gas::id:
227 return gas::permittivity();
228 };
229
230 std::stringstream ss;
231 ss << "Cannot retrieve permittivity from material with id: " << material_id << std::endl;
232 throw invalid_material_exception(ss.str());
233 }
234
235 inline double diffusivity(long material_id)
236 {
237 switch (material_id)
238 {
239 case si::id:
240 return si::diffusivity();
241 case sio2::id:
242 return sio2::diffusivity();
243 case hfo2::id:
244 return hfo2::diffusivity();
245 case sion::id:
246 return sion::diffusivity();
247 };
248
249 std::stringstream ss;
250 ss << "Cannot retrieve diffusivity from material with id: " << material_id << std::endl;
251 throw invalid_material_exception(ss.str());
252 }
253
254
259 inline long get_material_id(std::string material_name)
260 {
261 // to upper to ease the comparison and to be case insensitive
262 std::transform(material_name.begin(), material_name.end(), material_name.begin(), ::toupper);
263
264 if (material_name == "SI")
265 {
266 return si::id;
267 }
268 else if (material_name == "SIO2")
269 {
270 return sio2::id;
271 }
272 else if (material_name == "HFO2")
273 {
274 return hfo2::id;
275 }
276 else if (material_name == "SION")
277 {
278 return sion::id;
279 }
280 else if (material_name == "GAS")
281 {
282 return gas::id;
283 }
284 else if (material_name == "METAL")
285 {
286 return metal::id;
287 }
288 else
289 {
290 std::stringstream ss;
291 ss << "Cannot retrieve material ID for material named: '" << material_name << "'" << std::endl;
292 throw invalid_material_exception(ss.str());
293 }
294 }
295
296 } //namespace materials
297} //namespace viennashe
298
299#endif
300
Simple checker class for checking whether a certain material is of a given type (conductor,...
Definition: all.hpp:184
checker(material_category_id category)
Definition: all.hpp:186
bool operator()(long material_id) const
Definition: all.hpp:188
Exception for the case that an invalid material is in use.
Definition: exception.hpp:33
Contains forward declarations and definition of small classes that must be defined at an early stage.
Contains all the exceptions used for accessing materials.
bool is_semiconductor(long material_id)
Convenience function for checking whether the supplied material ID refers to a semiconductor.
Definition: all.hpp:156
double permittivity(long material_id)
Convenience function for returning the permittivity of the material identified by the ID provided.
Definition: all.hpp:214
bool is_insulator(long material_id)
Convenience function for checking whether the supplied material ID refers to an oxide.
Definition: all.hpp:165
long get_material_id(std::string material_name)
Returns the material ID for a material identified by a string.
Definition: all.hpp:259
double diffusivity(long material_id)
Definition: all.hpp:235
bool is_conductor(long material_id)
Convenience function for checking whether the supplied material ID refers to a metal.
Definition: all.hpp:147
The main ViennaSHE namespace. All functionality resides inside this namespace.
Definition: accessors.hpp:40
carrier_type_id
Enumeration type for selecting the carrier type.
Definition: forwards.h:185
@ ELECTRON_TYPE_ID
Definition: forwards.h:187
material_category_id
Definition: forwards.h:134
@ MATERIAL_NO_SEMICONDUCTOR_ID
Definition: forwards.h:138
@ MATERIAL_SEMICONDUCTOR_ID
Definition: forwards.h:137
@ MATERIAL_NO_CONDUCTOR_ID
Definition: forwards.h:136
@ MATERIAL_CONDUCTOR_ID
Definition: forwards.h:135
@ MATERIAL_INSULATOR_ID
Definition: forwards.h:139
Provides a number of fundamental constants. All constants in SI units.
A class referring to an ideal gas.
Definition: all.hpp:136
static double permittivity()
Definition: all.hpp:138
static double diffusivity()
Definition: all.hpp:139
A class referring to hafnium dioxide.
Definition: all.hpp:119
static double diffusivity()
Definition: all.hpp:122
static double permittivity()
Definition: all.hpp:121
A class referring to any metal contact.
Definition: all.hpp:44
A class referring to silicon and providing certain material parameters Note that this is the default ...
Definition: all.hpp:50
static double permittivity()
Definition: all.hpp:53
static double longitudinal_effective_mass(viennashe::carrier_type_id ctype)
Definition: all.hpp:66
static double band_gap()
Definition: all.hpp:99
static double diffusivity()
Definition: all.hpp:106
static double get_mass_density()
Definition: all.hpp:101
static double transverse_effective_mass(viennashe::carrier_type_id ctype)
Definition: all.hpp:74
static double conductivity_effective_mass(viennashe::carrier_type_id ctype)
Definition: all.hpp:82
static double specific_heat()
Definition: all.hpp:103
static double dos_effective_mass(viennashe::carrier_type_id ctype)
Definition: all.hpp:58
static double reference_temperature()
Definition: all.hpp:104
A class referring to silicon dioxide.
Definition: all.hpp:111
static double permittivity()
Definition: all.hpp:113
static double diffusivity()
Definition: all.hpp:114
A class referring to silicon oxynitride
Definition: all.hpp:127
static double permittivity()
Definition: all.hpp:130
static double diffusivity()
Definition: all.hpp:131
static const double eps_0
Permittivity of vacuum.
Definition: constants.hpp:52
static const double q
Elementary charge.
Definition: constants.hpp:44
static const double mass_electron
Electron rest mass.
Definition: constants.hpp:42