ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
physics.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_PHYSICS_PHYSICS_HPP
2#define VIENNASHE_PHYSICS_PHYSICS_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 <math.h>
20#include <cmath>
21
22// viennashe
23#include "viennashe/forwards.h"
28
29
34namespace viennashe
35{
36 namespace physics
37 {
38
42 namespace convert
43 {
44
45 //
46 // Replace this by a sane unit framework!
47 //
48
49 inline double joule_to_eV(const double eps)
50 {
52 }
53
54 inline double eV_to_joule(const double eps)
55 {
57 }
58 }
59
61 inline double get_thermal_potential(double T)
62 {
63 return (constants::kB * T) / constants::q;
64 }
65
71 inline double get_optical_phonon_number(double eps_optical, double temperature = 300.0 /* Kelvin */)
72 {
73 const double kB = constants::kB;
74 return 1.0 / (std::exp(eps_optical / (kB * temperature)) - 1.0);
75 }
76
84 inline double get_band_weight(double temperature, viennashe::carrier_type_id ctype)
85 {
86 const double Ncv0 = 2.50933670314359713002e19 * 100 * 100 * 100;
87 // Insert carrier mass model here
88 const double me = (ctype == viennashe::ELECTRON_TYPE_ID) ? 0.33 : 0.6;
89 return Ncv0 * std::pow(me * (temperature / 300.0), 1.5) * 6.0;
90 }
91
98 inline double get_band_edge(viennashe::carrier_type_id const & ctype)
99 {
100 return ((ctype == viennashe::ELECTRON_TYPE_ID) ? 1.0 : -1.0) * viennashe::materials::si::band_gap() * 0.5;
101 }
102
103
110 inline double get_thermal_velocity(double temperature, viennashe::carrier_type_id ctype)
111 {
112 // TODO: use carrier mass model
113 (void)ctype; // fix unused parameter warning
114 const double kBT = viennashe::physics::constants::kB * temperature;
116 }
117
124 inline double get_auxilary_concentration(double temperature, viennashe::carrier_type_id ctype)
125 {
126 const double kbT = viennashe::physics::constants::kB * temperature;
127 const double band_edge = viennashe::physics::get_band_edge(ctype);
128 const double band_weight = viennashe::physics::get_band_weight(temperature, ctype);
129 const double polarity = (ctype == viennashe::ELECTRON_TYPE_ID) ? -1.0 : 1.0;
130
131 return band_weight * std::exp(polarity * band_edge / kbT);
132 }
133
141 inline double built_in_potential(double temperature, double doping_n, double doping_p)
142 {
143 if (doping_n <= 0 && doping_p <= 0) return 0;
144
145 const double net_doping = (doping_n - doping_p);
146 const double T = temperature;
149
150 double x = std::sqrt(net_doping * net_doping + 4.0 * naux * paux);
151
152 if ( net_doping >= 0.0 )
153 {
154 x = (x + net_doping) * 0.5 / naux;
156 }
157 else
158 {
159 x = (x - net_doping) * 0.5 / paux;
161 }
162
163 }
164
173 inline double contact_carrier_ohm(double temperature, double doping_n, double doping_p, viennashe::carrier_type_id ctype)
174 {
175 const double q = viennashe::physics::constants::q;
176 const double kbT = viennashe::physics::constants::kB * temperature;
177 const double phiB = viennashe::physics::built_in_potential(temperature, doping_n, doping_p);
178
179 const double band_edge = viennashe::physics::get_band_edge(ctype);
180 const double band_weight = viennashe::physics::get_band_weight(temperature, ctype);
181 const double polarity = (ctype == viennashe::ELECTRON_TYPE_ID) ? -1.0 : 1.0;
182
183 return band_weight * std::exp( polarity * ( band_edge - q * phiB ) / kbT ) ;
184 }
185
186
187 } //namespace physics
188} //namespace viennashe
189
190#endif
Contains forward declarations and definition of small classes that must be defined at an early stage.
A very simple material database. Needs to be replaced by something more versatile soon.
Provides a number of fundamental math constants.
double eV_to_joule(const double eps)
Definition: physics.hpp:54
double joule_to_eV(const double eps)
Definition: physics.hpp:49
double get_optical_phonon_number(double eps_optical, double temperature=300.0)
Returns the optical phonon number for use with optical phonon scattering.
Definition: physics.hpp:71
double get_thermal_velocity(double temperature, viennashe::carrier_type_id ctype)
Returns the thermal velocity at the given lattice temperature for a given carrier type.
Definition: physics.hpp:110
double get_thermal_potential(double T)
Returns the thermal potential for the provided temperature.
Definition: physics.hpp:61
double contact_carrier_ohm(double temperature, double doping_n, double doping_p, viennashe::carrier_type_id ctype)
Consistently calculates the contact carrier concentrations for thermal bath contacts.
Definition: physics.hpp:173
double get_band_edge(viennashe::carrier_type_id const &ctype)
Returns the band edge relative to the reference energy (mid-gap)
Definition: physics.hpp:98
double get_band_weight(double temperature, viennashe::carrier_type_id ctype)
Returns the band weight (N_c or N_v)
Definition: physics.hpp:84
double get_auxilary_concentration(double temperature, viennashe::carrier_type_id ctype)
Returns the auxilary carrier concentration.
Definition: physics.hpp:124
double built_in_potential(double temperature, double doping_n, double doping_p)
Computes the built-in potential for a given temperature and given doping.
Definition: physics.hpp:141
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
@ HOLE_TYPE_ID
Definition: forwards.h:188
@ ELECTRON_TYPE_ID
Definition: forwards.h:187
Provides a number of fundamental constants. All constants in SI units.
All the exceptions used within the viennashe::physics namespace.
static double band_gap()
Definition: all.hpp:99
static const double pi
Pi.
Definition: constants.hpp:34
static const double q
Elementary charge.
Definition: constants.hpp:44
static const double kB
Boltzmann constant.
Definition: constants.hpp:46
static const double mass_electron
Electron rest mass.
Definition: constants.hpp:42