ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
constants.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_PHYSICS_CONSTANTS_HPP
2#define VIENNASHE_PHYSICS_CONSTANTS_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//
19// ALL UNITS ARE SI !
20//
21
22
27namespace viennashe
28{
30 namespace physics
31 {
33 namespace detail
34 {
36 template <bool dummy = true> //template argument in order to control linkage
37 struct constants
38 {
40 static const double c_0;
42 static const double mass_electron;
44 static const double q;
46 static const double kB;
48 static const double h;
50 static const double hbar;
52 static const double eps_0;
54 static const double mu_0;
56 static const double ni;
57 };
58
59 template <bool b>
60 const double constants<b>::c_0 = 299792458.0; // m / s
61 template <bool b>
62 const double constants<b>::mass_electron = 9.10938291e-31; // kg
63 template <bool b>
64 const double constants<b>::q = 1.602176565e-19; // As
65 template <bool b>
66 const double constants<b>::kB = 1.3806488e-23; // J/K
67 template <bool b>
68 const double constants<b>::h = 6.62606896e-34; // Js
69 template <bool b>
70 const double constants<b>::hbar = 6.62606896e-34 / (2.0 * 3.1415926535897932384626433832795); // Js
71 template <bool b>
72 const double constants<b>::eps_0 = 1.0e7 / ( 4.0 * 3.1415926535897932384626433832795 * 299792458.0 * 299792458.0) ; // = 10^7 / (4*pi*c_0^2) ~ 8.854e-12 As / Vm
73 template <bool b>
74 const double constants<b>::mu_0 = ( 4.0 * 3.1415926535897932384626433832795 ) * 1.0e-7 ; // = 10^-7 * (4*pi) ~ 12.56e-7 Vs / Am
75 template <bool b>
76 const double constants<b>::ni = 1.08e16; // m^-3
77 }
78
80
81 } //namespace physics
82} //namespace viennashe
83#endif
detail::constants constants
Definition: constants.hpp:79
The main ViennaSHE namespace. All functionality resides inside this namespace.
Definition: accessors.hpp:40
Implementation class holding basic physics constants.
Definition: constants.hpp:38
static const double eps_0
Permittivity of vacuum.
Definition: constants.hpp:52
static const double ni
Intrinsic carrier concentration in silicon.
Definition: constants.hpp:56
static const double h
Planck constant.
Definition: constants.hpp:48
static const double mu_0
Permeability of vacuum.
Definition: constants.hpp:54
static const double q
Elementary charge.
Definition: constants.hpp:44
static const double kB
Boltzmann constant.
Definition: constants.hpp:46
static const double c_0
Speed of light in vacuum.
Definition: constants.hpp:40
static const double hbar
Modified Planck constant.
Definition: constants.hpp:50
static const double mass_electron
Electron rest mass.
Definition: constants.hpp:42