ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
surface_roughness_scattering.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_SHE_SCATTERING_SURFACE_ROUGHNESS_SCATTERING_HPP
2#define VIENNASHE_SHE_SCATTERING_SURFACE_ROUGHNESS_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#ifdef VIENNASHE_USE_DISABLED_CODE
19
20// viennashe
26
28
29#include "viennashe/log/log.hpp"
32
33// viennagrid
34#include "viennagrid/forwards.hpp"
35#include "viennagrid/algorithm/inner_prod.hpp"
36#include "viennagrid/algorithm/norm.hpp"
37
42namespace viennashe
43{
44 namespace she
45 {
46
51 template <typename DeviceType, typename ControllerType, typename ElectricFieldAccessor>
52 class surface_roughness_scattering : public scattering_base<DeviceType, ControllerType>
53 {
54 typedef scattering_base<DeviceType, ControllerType> base_type;
55 typedef typename base_type::VertexType VertexType;
56 typedef typename base_type::EdgeType EdgeType;
57
58 public:
59 typedef typename base_type::scatter_processes_type scatter_processes_type;
60 typedef scatter_processes_type value_type;
61
62 explicit surface_roughness_scattering(const viennashe::materials::surface_roughness_scattering_parameters & params,
63 ElectricFieldAccessor const & Efield)
64 : _params(params), _Efield(Efield) { }
65
66 scatter_processes_type operator()(DeviceType const & device,
67 ControllerType const & controller,
68 VertexType const & elem,
69 double kinetic_energy,
71 {
72 return get(device, controller, elem, kinetic_energy, ctype);
73 }
74
75 scatter_processes_type operator()(DeviceType const & device,
76 ControllerType const & controller,
77 EdgeType const & elem,
78 double kinetic_energy,
80 {
81 return get(device, controller, elem, kinetic_energy, ctype);
82 }
83
85
86 protected:
87
99 template <typename ElementType>
100 scatter_processes_type get(DeviceType const & device,
101 ControllerType const & controller,
102 ElementType const & elem,
103 double kinetic_energy,
104 viennashe::carrier_type_id ctype) const
105 {
106 scatter_processes_type result(1);
107
108 // Final energy is always equal to initial energy:
109 result[0].initial_energy(kinetic_energy);
110 result[0].final_energy(kinetic_energy);
111 result[0].rate(getScatteringRate(device, controller, elem, kinetic_energy, ctype));
112
113 return result;
114 }
115
116 template <typename DeviceType, typename ControllerType, typename ElementType>
117 double getScatteringRate(DeviceType const & device,
118 ControllerType const & controller,
119 ElementType const & elem,
120 double kinetic_energy,
121 viennashe::carrier_type_id ctype) const
122 {
123 const double temp = device.get_lattice_temperature(elem);
124 const double Ep = this->get_electric_field_n(device, elem, ctype);
125
126 //std::cout << " the rate is " << this->getScatteringRate(temp, Ep, ctype) << std::endl << std::endl;
127
128 return this->getScatteringRate(temp, Ep, ctype);
129 }
130
131 template < typename DeviceType>
132 double get_electric_field_n(DeviceType const & device,
133 typename viennagrid::result_of::ncell<typename DeviceType::mesh_type::config_type, 0 > ::type const & vt,
134 viennashe::carrier_type_id ctype) const
135 {
136 typedef typename DeviceType::mesh_type MeshType;
137 typedef typename MeshType::config_type Config;
138 typedef typename Config::cell_tag CellTag;
139 typedef typename viennagrid::result_of::point<Config>::type PointType;
140
141 PointType E;
142 typename ElectricFieldAccessor::value_type Eacc = _Efield(vt);
143 for ( std::size_t i = 0; i < PointType::dim; i++) E[i] = Eacc[i];
144
145 PointType n = device.vector_to_next_insulator(vt);
146 const double distance = viennagrid::norm_2(n);
147
148 if ( this->_params.get_correlation_length(tag) < distance )
149 {
150 if ( distance > 0) n /= distance; // normalise
151 //std::cout << vt.id() << " => " << distance << " with (" << n << ") | " << E << " projected " << viennagrid::inner_prod(E, n) << std::endl;
152 //std::cout << " SURFACE ROUGHNESS SCATTERING Ep = " << viennagrid::inner_prod(E, n) << " AT " << vt << std::endl;
153 return viennagrid::inner_prod(E, n); // projection on the vector towards the interface
154 }
155
156 return 0.0; // outside of the correlation length the scattering rate is zero
157 }
158
159 template < typename DeviceType>
160 double get_electric_field_n(DeviceType const & device,
161 typename viennagrid::result_of::ncell<typename DeviceType::mesh_type::config_type, 1 > ::type const & edge,
162 viennashe::carrier_type_id ctype) const
163 {
164 // TODO: CHECK THIS ... is this a good idea?
165 return 0.5 * (this->get_electric_field_n(device, viennagrid::ncells < 0 > (edge)[0], tag) +
166 this->get_electric_field_n(device, viennagrid::ncells < 0 > (edge)[1], tag));
167 }
168
169 double getEffectiveField(const double T, const double Ep, viennashe::carrier_type_id ctype) const
170 {
171 return Ep; // TODO: maybe introduce a fit formula here
172 }
173
174 double getScatteringRate(const double T, const double Ep, viennashe::carrier_type_id ctype) const
175 {
176 const double hbar = viennashe::physics::constants::hbar;
177 const double pi = viennashe::math::constants::pi;
178 const double q = viennashe::physics::constants::q;
179 const double drms = _params.get_rms_height(ctype);
180 const double L = _params.get_correlation_length(ctype);
181 const double esi = viennashe::materials::si::permittivity();
182 const double Eeff = this->getEffectiveField(T, Ep, ctype);
183
184 //double scattering_rate = 2.0 * pi * q * q / hbar * (esi / (esi+eox)) * (esi / (esi+eox)) * drms * drms * L * L; // TODO: Use improved rate ?
185 double scattering_rate = 2.0 * pi * q * q / hbar * (esi * esi) * drms * drms * L * L;
186 scattering_rate = scattering_rate * Eeff * Eeff;
187
188 return _params.get_fit_factor() * scattering_rate;
189 }
190
191 private:
192
193 viennashe::materials::surface_roughness_scattering_parameters _params;
194 ElectricFieldAccessor const & _Efield;
195
196 };
197
198 } //namespace she
199} //namespace viennashe
200
201#endif
202
203#endif /* VIENNASHE_SHE_SCATTERING_SURFACE_ROUGHNESS_SCATTERING_HPP */
204
Contains the definition of per-device accessors (read-only!) for various quantities.
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.
VectorType::value_type norm_2(VectorType const &v)
Definition: linalg_util.hpp:37
@ SURFACE_ROUGHNESS_SCATTERING
Definition: common.hpp:45
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 permittivity()
Definition: all.hpp:53
static const double pi
Pi.
Definition: constants.hpp:34
static const double q
Elementary charge.
Definition: constants.hpp:44
static const double hbar
Modified Planck constant.
Definition: constants.hpp:50
Defines the log keys used within the viennashe::she namespace.
Common classes for scattering operators.