ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
scharfetter_gummel.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_DD_SCHARFETTER_GUMMEL_HPP
2#define VIENNASHE_DD_SCHARFETTER_GUMMEL_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
19#include "viennashe/forwards.h"
20
24
30namespace viennashe
31{
34 {
35 public:
36 scharfetter_gummel(viennashe::carrier_type_id ctype) : carrier_type_id_(ctype) {}
37
51 double operator()(double np_i, double np_j,
52 double V_i, double V_j,
53 double dx, double mu, double T) const
54 {
55 //double T = 300.0; // Kelvin
57 const double D_ij = (V_j-V_i)/VT;
58
59 if (carrier_type_id_ == viennashe::ELECTRON_TYPE_ID)
60 return VT * viennashe::physics::constants::q * mu * VT * //constant: irrelevant if no recombination is used
61 (np_j*viennashe::math::Bernoulli(D_ij) - np_i*viennashe::math::Bernoulli(-D_ij)) / dx;
62 else
63 return - VT * viennashe::physics::constants::q * mu * VT * //constant: irrelevant if no recombination is used
64 (np_j*viennashe::math::Bernoulli(-D_ij) - np_i*viennashe::math::Bernoulli(D_ij)) / dx;
65 }
66
67 private:
68 viennashe::carrier_type_id carrier_type_id_;
69 };
70
71
72
74
75
76
77
80 {
81 public:
82 scharfetter_gummel_dVi(viennashe::carrier_type_id ctype) : carrier_type_id_(ctype) {}
83
97 double operator()(double np_i, double np_j,
98 double V_i, double V_j,
99 double dx, double mu, double T) const
100 {
102 const double D_ij = (V_j-V_i)/VT;
103
104 if (carrier_type_id_ == viennashe::ELECTRON_TYPE_ID)
105 return viennashe::physics::constants::q * mu * VT * //constant: irrelevant if no recombination is used
106 (- np_j*viennashe::math::Bernoulli_dx(D_ij) - np_i*viennashe::math::Bernoulli_dx(-D_ij)) / dx;
107 else
108 return - viennashe::physics::constants::q * mu * VT * //constant: irrelevant if no recombination is used
109 (np_j*viennashe::math::Bernoulli_dx(-D_ij) + np_i*viennashe::math::Bernoulli_dx(D_ij)) / dx;
110 }
111
112 private:
113 viennashe::carrier_type_id carrier_type_id_;
114 };
115
116
117
120 {
121 public:
122 scharfetter_gummel_dVj(viennashe::carrier_type_id ctype) : carrier_type_id_(ctype) {}
123
137 double operator()(double np_i, double np_j,
138 double V_i, double V_j,
139 double dx, double mu, double T) const
140 {
142 const double D_ij = (V_j-V_i)/VT;
143
144 if (carrier_type_id_ == viennashe::ELECTRON_TYPE_ID)
145 return viennashe::physics::constants::q * mu * VT * //constant: irrelevant if no recombination is used
146 (np_j*viennashe::math::Bernoulli_dx(D_ij) + np_i*viennashe::math::Bernoulli_dx(-D_ij)) / dx;
147 else
148 return viennashe::physics::constants::q * mu * VT * //constant: irrelevant if no recombination is used
149 (np_j*viennashe::math::Bernoulli_dx(-D_ij) + np_i*viennashe::math::Bernoulli_dx(D_ij)) / dx;
150 }
151
152 private:
153 viennashe::carrier_type_id carrier_type_id_;
154 };
155
156} //namespace viennashe
157
158#endif
Implementation of the Bernoulli function.
Generic dispatcher for partial derivatives of the Scharfetter-Gummel discretization of electron and h...
double operator()(double np_i, double np_j, double V_i, double V_j, double dx, double mu, double T) const
Scharfetter-Gummel stabilization of the electron flux.
scharfetter_gummel_dVi(viennashe::carrier_type_id ctype)
Generic dispatcher for Scharfetter-Gummel discretization of electron and hold fluxes.
scharfetter_gummel_dVj(viennashe::carrier_type_id ctype)
double operator()(double np_i, double np_j, double V_i, double V_j, double dx, double mu, double T) const
Scharfetter-Gummel stabilization of the electron/hole flux.
Dispatcher for Scharfetter-Gummel discretization of electron and hold fluxes.
double operator()(double np_i, double np_j, double V_i, double V_j, double dx, double mu, double T) const
Scharfetter-Gummel stabilization of the electron and/or hole flux.
scharfetter_gummel(viennashe::carrier_type_id ctype)
Contains forward declarations and definition of small classes that must be defined at an early stage.
NumericT Bernoulli_dx(NumericT x)
Derivative of the Bernoulli function. f'(x) = [exp(x) - 1 - x exp(x)] / (exp(x) - 1)^2....
Definition: bernoulli.hpp:49
NumericT Bernoulli(NumericT x)
The Bernoulli function f(x) = x / (exp(x) - 1). Avoids round-off errors near zero.
Definition: bernoulli.hpp:34
double get_thermal_potential(double T)
Returns the thermal potential for the provided temperature.
Definition: physics.hpp:61
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
@ ELECTRON_TYPE_ID
Definition: forwards.h:187
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 const double q
Elementary charge.
Definition: constants.hpp:44