ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
surface_scattering.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_SHE_SCATTERING_SURFACE_SCATTERING_HPP
2#define VIENNASHE_SHE_SCATTERING_SURFACE_SCATTERING_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// viennashe
24
26
27#include "viennashe/log/log.hpp"
30
31// viennagrid
32#include "viennagrid/forwards.hpp"
33#include "viennagrid/algorithm/inner_prod.hpp"
34#include "viennagrid/algorithm/norm.hpp"
35
40namespace viennashe
41{
42 namespace she
43 {
44
49 template <typename DeviceType, typename ElectricFieldAccessor>
50 class surface_scattering : public scattering_base<DeviceType>
51 {
53 typedef typename base_type::FacetType FacetType;
54 typedef typename base_type::CellType CellType;
55
56 public:
59
60 explicit surface_scattering(DeviceType const & device,
61 viennashe::config const & conf,
62 ElectricFieldAccessor const & Efield)
63 : base_type(device, conf), params_(conf.scattering().surface()), _Efield(Efield) { }
64
66 double kinetic_energy,
68 {
69 return get(elem, kinetic_energy, ctype);
70 }
71
73 double kinetic_energy,
75 {
76 return get(elem, kinetic_energy, ctype);
77 }
78
80
81 protected:
82
91 template <typename ElementType>
92 scatter_processes_type get(ElementType const & elem,
93 double kinetic_energy,
95 {
96 scatter_processes_type result(1);
97
98 // Final energy is always equal to initial energy:
99 result[0].initial_energy(kinetic_energy);
100 result[0].final_energy(kinetic_energy);
101 result[0].rate(getScatteringRate(elem, kinetic_energy, ctype));
102
103 return result;
104 }
105
106
107 template <typename ElementType>
108 double getScatteringRate(ElementType const & elem,
109 double kinetic_energy,
110 viennashe::carrier_type_id ctype) const
111 {
112 (void)kinetic_energy; //avoid unused parameter warnings
113 const double temp = base_type::device_.get_lattice_temperature(elem);
114 const double Ep = this->get_electric_field_n(elem);
115
116 const double totaldoping = base_type::device_.get_doping_n(elem) + base_type::device_.get_doping_p(elem);
117
118 double rate = this->getScatteringRate(temp, totaldoping, Ep, ctype);
119
120 // check if the rate is numerically zero
121 if ( std::abs(rate) < std::numeric_limits<double>::epsilon() ) rate = 0.0; // assign zero to ensure matrix sparsity
122
123 return rate;
124 }
125
126 double get_electric_field_n(CellType const &) const
127 {
128 throw std::runtime_error("get_charged_trap_density(): TODO");
129 /*
130 typedef typename DeviceType::mesh_type MeshType;
131 typedef typename viennagrid::result_of::point<MeshType>::type PointType;
132
133 PointType n = base_type::device_.vector_to_next_insulator(vt);
134 const double distance = viennagrid::norm_2(n);
135 if ( distance > 0) n /= distance; // normalise
136
137 if ( distance > params_.cutoff_distance() ) return 0.0;
138
139 PointType E;
140 typename ElectricFieldAccessor::value_type Eacc = _Efield(vt);
141 for ( std::size_t i = 0; i < static_cast<std::size_t>(PointType::dim); i++) E[i] = Eacc[i];
142
143 return viennagrid::inner_prod(E, n); // projection on the vector towards the interface
144 */
145 }
146
147 double get_electric_field_n(FacetType const & /*edge*/) const
148 {
149 throw std::runtime_error("get_charged_trap_density(): TODO");
150 /*
151 typedef typename DeviceType::mesh_type MeshType;
152 typedef typename viennagrid::result_of::point<MeshType>::type PointType;
153
154 VertexType const & vt1 = viennagrid::vertices(edge)[0];
155 VertexType const & vt2 = viennagrid::vertices(edge)[1];
156
157 PointType n = 0.5 * ( base_type::device_.vector_to_next_insulator(vt1) + base_type::device_.vector_to_next_insulator(vt2) );
158 const double distance = viennagrid::norm_2(n);
159 if ( distance > 0) n /= distance; // normalise
160
161 if ( distance > params_.cutoff_distance() ) return 0.0;
162
163 const double Emag = _Efield(edge); // field along the edge
164
165 PointType E = (viennagrid::point(vt2) - viennagrid::point(vt1)) ;
166 if (viennagrid::norm_2(E) > 0) E /= viennagrid::norm_2(E);
167 E *= Emag;
168 return viennagrid::inner_prod(E, n); // projection on the vector towards the interface
169 */
170 }
171
172 double getScatteringRate(const double T, const double totaldoping, const double Ep, viennashe::carrier_type_id ctype) const
173 {
174 (void)T; //avoid unused parameter warnings
175 //const double kB = viennashe::physics::constants::kB;
176 //const double hbar = viennashe::physics::constants::hbar;
177 const double pi = viennashe::math::constants::pi;
178
179 const double dos_mass = viennashe::materials::si::dos_effective_mass(ctype);
180
181 const double prefactor = ( std::sqrt(2.0) / std::pow((2.0*pi),3.0) ) * std::pow(dos_mass, 1.5) * 2.0/std::sqrt(pi);
182
183 if (Ep <= 0.0) return 0.0; // avoid division by zero and Nan
184
185 double rate = 1.0 / ( params_.first_factor(ctype) / Ep
186 + params_.second_factor(ctype) * std::pow(totaldoping, 0.125) * 3.0 / std::pow(Ep, 1.0/3.0) )
187 + params_.third_factor(ctype) * Ep * Ep;
188 rate *= 4.0 * pi;
189
190 return params_.get_fit_factor(ctype) * prefactor * rate;
191 }
192
193 private:
194
196 ElectricFieldAccessor const & _Efield;
197
198
199 };
200
201 } //namespace she
202} //namespace viennashe
203
204
205
206#endif
Contains the definition of per-device accessors (read-only!) for various quantities.
The main SHE configuration class. To be adjusted by the user for his/her needs.
Definition: config.hpp:124
Defines the physical properties of a device, e.g. doping. This is the implementation for 2d and highe...
Definition: device.hpp:818
std::vector< scatter_process_descriptor > scatter_processes_type
Definition: common.hpp:90
viennagrid::result_of::cell< MeshType >::type CellType
Definition: common.hpp:87
viennagrid::result_of::facet< MeshType >::type FacetType
Definition: common.hpp:86
DeviceType const & device_
Definition: common.hpp:108
double second_factor(viennashe::carrier_type_id) const
Definition: config.hpp:295
double first_factor(viennashe::carrier_type_id) const
Definition: config.hpp:292
double get_fit_factor(viennashe::carrier_type_id ctype) const
Definition: config.hpp:302
double third_factor(viennashe::carrier_type_id) const
Definition: config.hpp:298
double get_electric_field_n(CellType const &) const
double getScatteringRate(ElementType const &elem, double kinetic_energy, viennashe::carrier_type_id ctype) const
double getScatteringRate(const double T, const double totaldoping, const double Ep, viennashe::carrier_type_id ctype) const
scatter_processes_type operator()(FacetType const &elem, double kinetic_energy, viennashe::carrier_type_id ctype) const
surface_scattering(DeviceType const &device, viennashe::config const &conf, ElectricFieldAccessor const &Efield)
scatter_processes_type get(ElementType const &elem, double kinetic_energy, viennashe::carrier_type_id ctype) const
Returns all possible final scattering states for a carrier with initial kinetic energy 'kin_energy' f...
base_type::scatter_processes_type scatter_processes_type
double get_electric_field_n(FacetType const &) const
scatter_processes_type operator()(CellType const &elem, double kinetic_energy, viennashe::carrier_type_id ctype) const
Contains the dispersion relations for different materials and different polarities.
A logging facility providing fine-grained control over logging in ViennaSHE.
A very simple material database. Needs to be replaced by something more versatile soon.
Provides a number of fundamental math constants.
@ SURFACE_SCATTERING
Definition: common.hpp:46
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
Provides a number of fundamental constants. All constants in SI units.
Returns a few helper routines for computing physical quantities. To be replaced in the future.
static double dos_effective_mass(viennashe::carrier_type_id ctype)
Definition: all.hpp:58
static const double pi
Pi.
Definition: constants.hpp:34
Defines the log keys used within the viennashe::she namespace.
Common classes for scattering operators.