Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
MediumGaAs.cc
Go to the documentation of this file.
1#include <algorithm>
2#include <cmath>
3#include <fstream>
4#include <iostream>
5#include <sstream>
6
10#include "Garfield/Random.hh"
11
12namespace Garfield {
13
15 m_className = "MediumGaAs";
16 m_name = "GaAs";
17
18 SetTemperature(300.);
21 SetAtomicWeight(72.32);
22 SetMassDensity(5.317);
23
26 m_microscopic = false;
27
28 m_w = 4.35;
29 m_fano = 0.1;
30}
31
32void MediumGaAs::GetComponent(const unsigned int i, std::string& label,
33 double& f) {
34 if (i == 0) {
35 label = "Ga";
36 f = 0.5;
37 } else if (i == 1) {
38 label = "As";
39 f = 0.5;
40 }
41}
42
43bool MediumGaAs::ElectronVelocity(const double ex, const double ey,
44 const double ez, const double bx,
45 const double by, const double bz, double& vx,
46 double& vy, double& vz) {
47 vx = vy = vz = 0.;
48 if (m_isChanged) {
49 UpdateTransportParameters();
50 m_isChanged = false;
51 }
52 if (!m_eVelE.empty()) {
53 // Interpolation in user table.
54 return Medium::ElectronVelocity(ex, ey, ez, bx, by, bz, vx, vy, vz);
55 }
56 // Calculate the mobility.
57 // - J. J. Barnes, R. J. Lomax, G. I. Haddad,
58 // IEEE Trans. Electron Devices ED-23 (1976), 1042.
59 const double e2 = ex * ex + ey * ey + ez * ez;
60 // Inverse of the critical field.
61 constexpr double r = 1. / 4000.;
62 constexpr double r4 = r * r * r * r;
63 const double er4 = e2 * e2 * r4;
64 const double mu = -(m_eMobility + er4 * m_eSatVel / sqrt(e2)) / (1. + er4);
65 const double bmag = sqrt(bx * bx + by * by + bz * bz);
66 if (bmag < Small) {
67 vx = mu * ex;
68 vy = mu * ey;
69 vz = mu * ez;
70 } else {
71 // Hall mobility
72 const double muH = m_eHallFactor * mu;
73 const double mu2 = muH * muH;
74 const double eb = bx * ex + by * ey + bz * ez;
75 const double f = muH / (1. + mu2 * bmag * bmag);
76 // Compute the drift velocity using the Langevin equation.
77 vx = f * (ex + muH * (ey * bz - ez * by) + mu2 * bx * eb);
78 vy = f * (ey + muH * (ez * bx - ex * bz) + mu2 * by * eb);
79 vz = f * (ez + muH * (ex * by - ey * bx) + mu2 * bz * eb);
80 }
81 return true;
82}
83
84bool MediumGaAs::ElectronTownsend(const double ex, const double ey,
85 const double ez, const double bx,
86 const double by, const double bz,
87 double& alpha) {
88 alpha = 0.;
89 if (m_isChanged) {
90 UpdateTransportParameters();
91 m_isChanged = false;
92 }
93 if (!m_eAlp.empty()) {
94 // Interpolation in user table.
95 return Medium::ElectronTownsend(ex, ey, ez, bx, by, bz, alpha);
96 }
97 const double emag = sqrt(ex * ex + ey * ey + ez * ez);
98 if (emag > Small) {
99 alpha = m_eImpactA * exp(-pow(m_eImpactB / emag, 1.82));
100 }
101 return true;
102}
103
104bool MediumGaAs::ElectronAttachment(const double ex, const double ey,
105 const double ez, const double bx,
106 const double by, const double bz,
107 double& eta) {
108 eta = 0.;
109 if (!m_eAtt.empty()) {
110 // Interpolation in user table.
111 return Medium::ElectronAttachment(ex, ey, ez, bx, by, bz, eta);
112 }
113 return true;
114}
115
116bool MediumGaAs::HoleVelocity(const double ex, const double ey, const double ez,
117 const double bx, const double by, const double bz,
118 double& vx, double& vy, double& vz) {
119 vx = vy = vz = 0.;
120 if (m_isChanged) {
121 UpdateTransportParameters();
122 m_isChanged = false;
123 }
124 if (!m_hVelE.empty()) {
125 // Interpolation in user table.
126 return Medium::HoleVelocity(ex, ey, ez, bx, by, bz, vx, vy, vz);
127 }
128 // Calculate the mobility.
129 // - J. J. Barnes, R. J. Lomax, G. I. Haddad,
130 // IEEE Trans. Electron Devices ED-23 (1976), 1042–1048.
131 const double emag = sqrt(ex * ex + ey * ey + ez * ez);
132 // Inverse of the critical field.
133 constexpr double r = 1. / 4000.;
134 const double mu = (m_hMobility + m_hSatVel * r) / (1. + emag * r);
135 const double bmag = sqrt(bx * bx + by * by + bz * bz);
136 if (bmag < Small) {
137 vx = mu * ex;
138 vy = mu * ey;
139 vz = mu * ez;
140 } else {
141 // Hall mobility
142 const double muH = m_hHallFactor * mu;
143 const double mu2 = muH * muH;
144 const double eb = bx * ex + by * ey + bz * ez;
145 const double f = mu / (1. + mu2 * bmag * bmag);
146 // Compute the drift velocity using the Langevin equation.
147 vx = f * (ex + muH * (ey * bz - ez * by) + mu2 * bx * eb);
148 vy = f * (ey + muH * (ez * bx - ex * bz) + mu2 * by * eb);
149 vz = f * (ez + muH * (ex * by - ey * bx) + mu2 * bz * eb);
150 }
151 return true;
152}
153
154bool MediumGaAs::HoleTownsend(const double ex, const double ey, const double ez,
155 const double bx, const double by, const double bz,
156 double& alpha) {
157 alpha = 0.;
158 if (m_isChanged) {
159 UpdateTransportParameters();
160 m_isChanged = false;
161 }
162 if (!m_hAlp.empty()) {
163 // Interpolation in user table.
164 return Medium::HoleTownsend(ex, ey, ez, bx, by, bz, alpha);
165 }
166 const double emag = sqrt(ex * ex + ey * ey + ez * ez);
167 if (emag > Small) {
168 // alpha = m_hImpactA * exp(-m_hImpactB / emag);
169 alpha = m_hImpactA * exp(-pow(m_hImpactB / emag, 1.75));
170 }
171 return true;
172}
173
174bool MediumGaAs::HoleAttachment(const double ex, const double ey,
175 const double ez, const double bx,
176 const double by, const double bz, double& eta) {
177 eta = 0.;
178 if (!m_hAtt.empty()) {
179 // Interpolation in user table.
180 return Medium::HoleAttachment(ex, ey, ez, bx, by, bz, eta);
181 }
182 return true;
183}
184
185void MediumGaAs::SetLowFieldMobility(const double mue, const double muh) {
186
187 if (mue <= 0. || muh <= 0.) {
188 std::cerr << m_className << "::SetLowFieldMobility:\n"
189 << " Mobility must be greater than zero.\n";
190 return;
191 }
192 m_eMobility = mue;
193 m_hMobility = muh;
194 m_userMobility = true;
195 m_isChanged = true;
196}
197
199 m_userMobility = false;
200 m_isChanged = true;
201}
202
203void MediumGaAs::UpdateTransportParameters() {
204
205 const double t = m_temperature / 300.;
206 // Update the low field lattice mobility.
207 if (!m_userMobility) {
208 // Temperature dependence as in Sentaurus Device and Silvaco Atlas.
209 constexpr double eMu0 = 8.0e-6;
210 constexpr double hMu0 = 0.4e-6;
211 m_eMobility = eMu0 / t;
212 m_hMobility = hMu0 * pow(t, -2.1);
213 }
214 // - J. S. Blakemore, Journal of Applied Physics 53, R123 (1982)
215 // https://doi.org/10.1063/1.331665
216 // m_eMobility = 8.0e-6 * pow(t, -2.3);
217
218 // Update the saturation velocity.
219 // - M. J. Littlejohn, J. R. Hauser, T. H. Glisson,
220 // J. Appl. Phys. 48 (1977), 4587
221 m_eSatVel = std::max(1.13e-2 - 3.6e-3 * t, 5.e-4);
222 m_hSatVel = std::max(1.13e-2 - 3.6e-3 * t, 5.e-4);
223
224 // Update the impact ionization parameters.
225 // Selberherr model parameters from Silvaco Atlas.
226 m_eImpactA = 1.889e5 * (1. + 0.588 * (t - 1));
227 m_hImpactA = 2.215e5 * (1. + 0.588 * (t - 1));
228 m_eImpactB = 5.75e5 * (1. + 0.248 * (t - 1));
229 m_hImpactB = 6.57e5 * (1. + 0.248 * (t - 1));
230}
231}
void UnsetLowFieldMobility()
Definition: MediumGaAs.cc:198
bool ElectronAttachment(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &eta) override
Attachment coefficient [cm-1].
Definition: MediumGaAs.cc:104
bool HoleVelocity(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &vx, double &vy, double &vz) override
Drift velocity [cm / ns].
Definition: MediumGaAs.cc:116
bool ElectronTownsend(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &alpha) override
Ionisation coefficient [cm-1].
Definition: MediumGaAs.cc:84
MediumGaAs()
Constructor.
Definition: MediumGaAs.cc:14
bool HoleTownsend(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &alpha) override
Ionisation coefficient [cm-1].
Definition: MediumGaAs.cc:154
void GetComponent(const unsigned int i, std::string &label, double &f) override
Get the name and fraction of a given component.
Definition: MediumGaAs.cc:32
bool ElectronVelocity(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &vx, double &vy, double &vz) override
Drift velocity [cm / ns].
Definition: MediumGaAs.cc:43
bool HoleAttachment(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &eta) override
Attachment coefficient [cm-1].
Definition: MediumGaAs.cc:174
void SetLowFieldMobility(const double mue, const double muh)
Definition: MediumGaAs.cc:185
Abstract base class for media.
Definition: Medium.hh:13
void SetTemperature(const double t)
Set the temperature [K].
Definition: Medium.cc:71
bool m_microscopic
Definition: Medium.hh:531
virtual bool HoleTownsend(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &alpha)
Ionisation coefficient [cm-1].
Definition: Medium.cc:534
double m_fano
Definition: Medium.hh:537
virtual bool HoleVelocity(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &vx, double &vy, double &vz)
Drift velocity [cm / ns].
Definition: Medium.cc:513
std::vector< std::vector< std::vector< double > > > m_eAlp
Definition: Medium.hh:558
std::vector< std::vector< std::vector< double > > > m_hAlp
Definition: Medium.hh:570
virtual void EnableDrift(const bool on=true)
Switch electron/ion/hole on/off.
Definition: Medium.hh:67
std::string m_name
Definition: Medium.hh:513
virtual bool ElectronVelocity(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &vx, double &vy, double &vz)
Drift velocity [cm / ns].
Definition: Medium.cc:379
virtual void EnablePrimaryIonisation(const bool on=true)
Make the medium ionisable or non-ionisable.
Definition: Medium.hh:69
virtual void SetAtomicNumber(const double z)
Set the effective atomic number.
Definition: Medium.cc:114
std::vector< std::vector< std::vector< double > > > m_eVelE
Definition: Medium.hh:553
void SetDielectricConstant(const double eps)
Set the relative static dielectric constant.
Definition: Medium.cc:91
virtual bool ElectronTownsend(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &alpha)
Ionisation coefficient [cm-1].
Definition: Medium.cc:403
std::vector< std::vector< std::vector< double > > > m_eAtt
Definition: Medium.hh:559
virtual void SetMassDensity(const double rho)
Set the mass density [g/cm3].
Definition: Medium.cc:144
std::vector< std::vector< std::vector< double > > > m_hVelE
Definition: Medium.hh:565
virtual bool ElectronAttachment(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &eta)
Attachment coefficient [cm-1].
Definition: Medium.cc:416
std::vector< std::vector< std::vector< double > > > m_hAtt
Definition: Medium.hh:571
virtual void SetAtomicWeight(const double a)
Set the effective atomic weight.
Definition: Medium.cc:124
std::string m_className
Definition: Medium.hh:506
bool m_isChanged
Definition: Medium.hh:540
virtual bool HoleAttachment(const double ex, const double ey, const double ez, const double bx, const double by, const double bz, double &eta)
Attachment coefficient [cm-1].
Definition: Medium.cc:547
double m_temperature
Definition: Medium.hh:515