34 std::cerr <<
m_className <<
"::GetComponent: Index out of range.\n";
39 const double ex,
const double ey,
const double ez,
40 const double bx,
const double by,
const double bz,
41 double& vx,
double& vy,
double& vz) {
44 UpdateTransportParameters();
52 const double emag = sqrt(ex * ex + ey * ey + ez * ez);
53 const double mu = -m_eMobility / (1. + m_eMobility * emag / m_eSatVel);
54 const double b2 = bx * bx + by * by + bz * bz;
61 const double muH = m_eHallFactor * mu;
62 const double muH2 = muH * muH;
63 const double eb = bx * ex + by * ey + bz * ez;
64 const double f = mu / (1. + muH2 * b2);
66 vx = f * (ex + muH * (ey * bz - ez * by) + muH2 * bx * eb);
67 vy = f * (ey + muH * (ez * bx - ex * bz) + muH2 * by * eb);
68 vz = f * (ez + muH * (ex * by - ey * bx) + muH2 * bz * eb);
74 const double ex,
const double ey,
const double ez,
75 const double bx,
const double by,
const double bz,
double& alpha) {
85 const double ex,
const double ey,
const double ez,
86 const double bx,
const double by,
const double bz,
double& eta) {
96 const double ex,
const double ey,
const double ez,
97 const double bx,
const double by,
const double bz,
98 double& vx,
double& vy,
double& vz) {
101 UpdateTransportParameters();
109 const double emag = sqrt(ex * ex + ey * ey + ez * ez);
110 const double mu = m_hMobility / (1. + m_hMobility * emag / m_hSatVel);
111 const double b2 = bx * bx + by * by + bz * bz;
118 const double muH = m_hHallFactor * mu;
119 const double muH2 = muH * muH;
120 const double eb = bx * ex + by * ey + bz * ez;
121 const double f = muH / (1. + muH2 * b2);
123 vx = f * (ex + muH * (ey * bz - ez * by) + muH2 * bx * eb);
124 vy = f * (ey + muH * (ez * bx - ex * bz) + muH2 * by * eb);
125 vz = f * (ez + muH * (ex * by - ey * bx) + muH2 * bz * eb);
131 const double ex,
const double ey,
const double ez,
132 const double bx,
const double by,
const double bz,
double& alpha) {
142 const double ex,
const double ey,
const double ez,
143 const double bx,
const double by,
const double bz,
double& eta) {
153 if (mue <= 0. || muh <= 0.) {
154 std::cerr <<
m_className <<
"::SetLowFieldMobility:\n"
155 <<
" Mobility must be greater than zero.\n";
160 m_userMobility =
true;
165 m_userMobility =
false;
170 const double vsath) {
171 std::lock_guard<std::mutex> guard(m_mutex);
172 if (vsate <= 0. || vsath <= 0.) {
173 std::cerr <<
m_className <<
"::SetSaturationVelocity:\n"
174 <<
" Velocity must be greater than zero.\n";
182 std::lock_guard<std::mutex> guard(m_mutex);
187void MediumDiamond::UpdateTransportParameters() {
188 std::lock_guard<std::mutex> guard(m_mutex);
195 if (!m_userMobility) {
197 m_eMobility = 4.551e-6 * pow(t, -1.5);
198 m_hMobility = 2.750e-6 * pow(t, -1.5);
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].
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].
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].
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].
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].
void UnsetSaturationVelocity()
void SetSaturationVelocity(const double vsate, const double vsath)
void UnsetLowFieldMobility()
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].
void GetComponent(const unsigned int i, std::string &label, double &f) override
Get the name and fraction of a given component.
MediumDiamond()
Constructor.
void SetLowFieldMobility(const double mue, const double muh)
Abstract base class for media.
void SetTemperature(const double t)
Set the temperature [K].
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].
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].
std::vector< std::vector< std::vector< double > > > m_eAlp
std::vector< std::vector< std::vector< double > > > m_hAlp
virtual void EnableDrift(const bool on=true)
Switch electron/ion/hole on/off.
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].
virtual void EnablePrimaryIonisation(const bool on=true)
Make the medium ionisable or non-ionisable.
virtual void SetAtomicNumber(const double z)
Set the effective atomic number.
std::vector< std::vector< std::vector< double > > > m_eVelE
void SetDielectricConstant(const double eps)
Set the relative static dielectric constant.
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].
std::vector< std::vector< std::vector< double > > > m_eAtt
virtual void SetMassDensity(const double rho)
Set the mass density [g/cm3].
std::vector< std::vector< std::vector< double > > > m_hVelE
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].
std::vector< std::vector< std::vector< double > > > m_hAtt
virtual void SetAtomicWeight(const double a)
Set the effective atomic weight.
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].