ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
lineshape.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_MODELS_LINESHAPE_HPP
2#define VIENNASHE_MODELS_LINESHAPE_HPP
3/* ============================================================================
4 Copyright (c) 2011-2022, Institute for Microelectronics,
5 Institute for Analysis and Scientific Computing,
6 TU Wien.
7
8 -----------------
9 ViennaSHE - The Vienna Spherical Harmonics Expansion Boltzmann Solver
10 -----------------
11
12 http://viennashe.sourceforge.net/
13
14 License: MIT (X11), see file LICENSE in the base directory
15=============================================================================== */
16
17
22// viennashe
23#include "viennashe/forwards.h"
24
25// exceptions
27
30
32
33
34namespace viennashe
35{
36 namespace models
37 {
38
40
42
43 struct lsf_forward_tag {};
44
45 struct lsf_reverse_tag {};
46
47 template < typename TrapTypeTag, typename DirectionTypeTag >
49 {
50 public:
51
52 lineshape_classic(double cA, double cB, double qA, double qB, double Et, double epsT2s, double T)
53 : cA_(cA), cB_(cB), qA_(qA), qB_(qB), Et_(Et), epsT2s_(epsT2s), T_(T) { }
54
55 void set_temperature(double T) { T_ = T; }
56
57 double operator()(double E) const { return this->operator ()(E, TrapTypeTag(), DirectionTypeTag()); }
58
59 private:
60
61 double cA_, cB_, qA_, qB_, Et_, epsT2s_, T_;
62
63 double operator()(double E, lsf_electron_trap_tag, lsf_forward_tag) const { double ETc = Et_ + epsT2s_; return this->calcLS(cA_, cB_, qB_ - qA_, ETc-E); }
64 double operator()(double E, lsf_electron_trap_tag, lsf_reverse_tag) const { double ETc = Et_ + epsT2s_; return this->calcLS(cB_, cA_, qA_ - qB_, E-ETc); }
65
66 double operator()(double E, lsf_hole_trap_tag, lsf_forward_tag) const { double ETc = Et_ - epsT2s_; return this->calcLS(cA_, cB_, qB_ - qA_, E-ETc); }
67 double operator()(double E, lsf_hole_trap_tag, lsf_reverse_tag) const { double ETc = Et_ - epsT2s_; return this->calcLS(cB_, cA_, qA_ - qB_, ETc-E); }
68
69 double calcLS(double ci, double cf, double qs, double Es) const
70 {
71 const double pi = viennashe::math::constants::pi;
72 const double beta = 1.0/(viennashe::physics::constants::kB * T_);
73
74 double nominator1, nominator2, denominator, q1, q2;
75
76 if (ci == cf)
77 {
78 q1 = (Es/ci + qs*qs) / (2.*qs);
79 return std::sqrt(ci*beta/pi)/2.0 * std::exp(-beta*(ci*q1*q1)) / std::fabs(ci*qs);
80 }
81 else
82 {
83 nominator2 = std::sqrt(ci*cf*qs*qs + (ci-cf)*Es);
84
85 if (viennashe::util::is_NaN(nominator2))
86 return 0;
87
88 nominator1 = cf*qs;
89 denominator = cf-ci;
90 q1 = (nominator1 + nominator2)/denominator;
91 q2 = (nominator1 - nominator2)/denominator;
92
93 if (std::fabs(q1) < std::fabs(q2))
94 return std::sqrt(ci*beta/pi)/2.0 * std::exp(-beta*(ci*q1*q1)) / std::fabs(ci*q1 + cf*(qs-q1));
95 else
96 return std::sqrt(ci*beta/pi)/2.0 * std::exp(-beta*(ci*q2*q2)) / std::fabs(ci*q2 + cf*(qs-q2));
97 }
98 }
99 };
100
101
102 } // namespace models
103} // namespace viennashe
104
105#endif /* VIENNASHE_MODELS_LINESHAPE_HPP */
106
Defines a set of checker functors for micro-tests within ViennaSHE.
double operator()(double E) const
Definition: lineshape.hpp:57
lineshape_classic(double cA, double cB, double qA, double qB, double Et, double epsT2s, double T)
Definition: lineshape.hpp:52
Contains forward declarations and definition of small classes that must be defined at an early stage.
Provides a number of fundamental math constants.
Contains exceptions for viennashe::models.
bool is_NaN(const ValueType &val)
Checks if a value of type ValueType is NaN using value != value.
Definition: checks.hpp:97
The main ViennaSHE namespace. All functionality resides inside this namespace.
Definition: accessors.hpp:40
Provides a number of fundamental constants. All constants in SI units.
static const double pi
Pi.
Definition: constants.hpp:34
static const double kB
Boltzmann constant.
Definition: constants.hpp:46