1#ifndef VIENNASHE_TRAPPED_CHARGE_SCATTERING_HPP
2#define VIENNASHE_TRAPPED_CHARGE_SCATTERING_HPP
22#include "viennagrid/mesh/mesh.hpp"
23#include "viennagrid/mesh/coboundary_iteration.hpp"
51 template <
typename DeviceType,
typename TimeStepQuantitiesT>
64 TimeStepQuantitiesT
const & quantities)
65 :
base_type(
device, conf), params_(conf.scattering().trapped_charge()), quantities_(quantities)
69 double kinetic_energy,
72 return get(elem, kinetic_energy, ctype);
76 double kinetic_energy,
79 return get(elem, kinetic_energy, ctype);
94 template <
typename ElementType>
96 double kinetic_energy,
102 result[0].initial_energy(kinetic_energy);
103 result[0].final_energy(kinetic_energy);
110 template <
typename ElementType>
112 double kinetic_energy,
122 if ( std::abs(rate) < std::numeric_limits<double>::epsilon() ) rate = 0.0;
131 typedef typename DeviceType::trap_level_container_type trap_level_container_type;
132 typedef typename trap_level_container_type::const_iterator trap_iterator_type;
136 trap_level_container_type
const & traps = this->
device_.get_trap_levels(cell);
138 const std::size_t num_trap_unknowns = quantities_.num_trap_unknown_indices(cell);
140 if (num_trap_unknowns <= 0)
143 if (num_trap_unknowns != traps.size())
144 throw viennashe::invalid_value_exception(
"The number of traps configured in the device does not match the number of unknowns for traps!",
static_cast<double>(num_trap_unknowns));
146 std::size_t index = 0;
147 for (trap_iterator_type tit = traps.begin(); tit != traps.end(); ++tit, ++index)
149 const double occupancy = quantities_.trap_occupancy(cell, index);
150 N += tit->charge_sign() * occupancy * tit->density() ;
160 typedef typename viennagrid::result_of::const_coboundary_range<typename base_type::MeshType, FacetType, CellType>::type CellOnFacetContainer;
164 CellType const & c1 = *(cells_on_facet.begin());
182 double lambda_sq = 0.0;
183 double scattering_rate = 0.0;
187 if (norm_k <= 0.0 || NI <= 0.0)
return 0.0;
189 const double prefactor = (2.0 * pi * NI * q * q * q * q) / (hbar * eps * eps);
191 lambda_sq = (eps * kB * T) / (q * q * NI) ;
193 const double a = 4.0 * lambda_sq * norm_k * norm_k;
196 * 0.5 * (std::log(1.0 + a) - (a / (1.0 + a)) ) / 4.0 / std::pow(norm_k, 4.0);
200 return scattering_rate;
207 TimeStepQuantitiesT
const & quantities_;
The main SHE configuration class. To be adjusted by the user for his/her needs.
viennashe::physics::dispersion_proxy dispersion_relation(viennashe::carrier_type_id ctype) const
Returns the dispersion relation for electrons.
Defines the physical properties of a device, e.g. doping. This is the implementation for 2d and highe...
Exception for the case that an invalid value (depends on the method called) is encountered.
double norm_k(double ekin, double theta=0, double phi=0) const
Returns the norm of the k-vector as a function of energy (and angles, eventually)....
std::vector< scatter_process_descriptor > scatter_processes_type
viennagrid::result_of::cell< MeshType >::type CellType
viennagrid::result_of::facet< MeshType >::type FacetType
viennashe::config const & conf_
DeviceType const & device_
double get_fit_factor(viennashe::carrier_type_id ctype) const
Trapped charge scattering process.
double get_scattering_rate(double NI, double kinetic_energy, double T, viennashe::carrier_type_id ctype) const
scatter_processes_type value_type
double get_charged_trap_density(CellType const &cell, viennashe::carrier_type_id) const
scatter_processes_type operator()(CellType const &elem, double kinetic_energy, viennashe::carrier_type_id ctype) const
scatter_processes_type operator()(FacetType const &elem, double kinetic_energy, viennashe::carrier_type_id ctype) const
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...
trapped_charge_scattering(DeviceType const &device, viennashe::config const &conf, TimeStepQuantitiesT const &quantities)
base_type::scatter_processes_type scatter_processes_type
double getScatteringRate(ElementType const &elem, double kinetic_energy, viennashe::carrier_type_id ctype) const
scatter_process_id id() const
double get_charged_trap_density(FacetType const &facet, 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.
@ TRAPPED_CHARGE_SCATTERING
CellT const * get_other_cell_of_facet(MeshT const &mesh, FacetT const &facet, CellT const &cell)
Helper function returning a const-pointer to the 'second cell' of a facet, or NULL if there is no sec...
The main ViennaSHE namespace. All functionality resides inside this namespace.
carrier_type_id
Enumeration type for selecting the carrier type.
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()
static const double pi
Pi.
static const double q
Elementary charge.
static const double kB
Boltzmann constant.
static const double hbar
Modified Planck constant.
Defines the log keys used within the viennashe::she namespace.
Common classes for scattering operators.