ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
trap_level.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_TRAP_LEVEL_HPP
2#define VIENNASHE_TRAP_LEVEL_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
20#include "log/log.hpp"
21
26namespace viennashe
27{
28
31 {
32 public:
33 explicit trap_level() : collision_cross_section_(0), //inactive by default.
34 density_(0), energy_(0),
35 sign_(-1) { }
36
37 //
38 // Collision cross section
39 //
40
42 void collision_cross_section(double ccs)
43 {
44 if(ccs < 0) throw viennashe::invalid_value_exception("trap_level.collision_cross_section: collision cross sections have to be >= 0 !", ccs);
45 collision_cross_section_ = ccs;
46 }
47
48
50 double collision_cross_section() const { return collision_cross_section_; }
51
52 //
53 // Trap density
54 //
55
57 void density(double d)
58 {
59 if(d < 0) throw viennashe::invalid_value_exception("trap_level.density: trap densities have to be >= 0 !", d);
60 density_ = d;
61 }
62
64 double density() const { return density_; }
65 double charge_sign() const { return sign_; }
66
67 void set_charge_sign(double new_sign) { sign_ = new_sign; }
68
69 void set_donor_like() { sign_ = -1; }
70 void set_acceptor_like() { sign_ = +1; }
71
72 //
73 // Trap energy
74 //
75
77 void energy(double e) { energy_ = e; }
78
80 double energy() const { return energy_; }
81
82 private:
83 double collision_cross_section_;
84 double density_;
85 double energy_;
86 double sign_;
87 };
88
89
91 inline std::ostream & operator<<(std::ostream & os, viennashe::trap_level const & rhs)
92 {
93 os << "Trap @ " << viennashe::physics::convert::joule_to_eV(rhs.energy()) << " eV "
94 << " with css = " << rhs.collision_cross_section() << " m^2 repesentative for "
95 << rhs.density() << " m^-3 or m^-2 ";
96 return os;
97 }
98
99} // namespace viennashe
100
101#endif
102
Exception for the case that an invalid value (depends on the method called) is encountered.
Definition: exception.hpp:76
Describes a SRH trap.
Definition: trap_level.hpp:31
void energy(double e)
Returns the trap energy in Joule (zero energy refers to the center of the band gap.
Definition: trap_level.hpp:77
void collision_cross_section(double ccs)
Sets the collision cross section (SI units)
Definition: trap_level.hpp:42
void density(double d)
Returns the trap density for the trap level.
Definition: trap_level.hpp:57
void set_charge_sign(double new_sign)
Definition: trap_level.hpp:67
double collision_cross_section() const
Returns the collision cross section (SI units)
Definition: trap_level.hpp:50
double density() const
Returns the trap density for the trap level.
Definition: trap_level.hpp:64
double charge_sign() const
Definition: trap_level.hpp:65
double energy() const
Returns the trap energy in Joule (zero energy refers to the center of the band gap.
Definition: trap_level.hpp:80
Provides the exceptions used in the main viennashe namespace.
A logging facility providing fine-grained control over logging in ViennaSHE.
double joule_to_eV(const double eps)
Definition: physics.hpp:49
The main ViennaSHE namespace. All functionality resides inside this namespace.
Definition: accessors.hpp:40
std::ostream & operator<<(std::ostream &os, viennashe::trap_level const &rhs)
Convenience function for outputting a trap level.
Definition: trap_level.hpp:91
Returns a few helper routines for computing physical quantities. To be replaced in the future.