1#ifndef G_COMPONENT_TCAD_2D_H
2#define G_COMPONENT_TCAD_2D_H
18 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
19 double& ey,
double& ez,
double& v,
Medium*& m,
22 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
23 double& ey,
double& ez,
Medium*& m,
int& status) {
29 void WeightingField(
const double x,
const double y,
const double z,
30 double& wx,
double& wy,
double& wz,
31 const std::string& label);
36 bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
double& xmax,
37 double& ymax,
double& zmax);
38 void SetRangeZ(
const double zmin,
const double zmax);
41 bool Initialise(
const std::string& gridfilename,
42 const std::string& datafilename);
48 void GetRegion(
const unsigned int i, std::string& name,
bool& active)
const;
58 double& vol,
double& dmin,
double& dmax,
60 bool GetElement(
const unsigned int i,
double& vol,
double& dmin,
double& dmax,
61 int& type,
int& node1,
int& node2,
int& node3,
int& node4,
64 bool GetNode(
const unsigned int i,
double& x,
double& y,
double& v,
65 double& ex,
double& ey)
const;
68 bool GetMobility(
const double x,
const double y,
const double z,
double& emob,
73 double& vx,
double& vy,
double& vz,
75 void HoleVelocity(
const double x,
const double y,
const double z,
76 double& vx,
double& vy,
double& vz,
89 const unsigned int donorNumber,
90 double& occupationFraction);
92 const unsigned int acceptorNumber,
93 double& occupationFraction);
94 bool SetDonor(
const unsigned int donorNumber,
95 const double eXsec,
const double hxSec,
96 const double concentration);
98 const double eXsec,
const double hxSec,
99 const double concentration);
103 bool HoleAttachment(
const double x,
const double y,
const double z,
108 static const int nMaxVertices = 4;
118 std::vector<Region> m_regions;
134 std::vector<float> donorOcc;
135 std::vector<float> acceptorOcc;
137 std::vector<Vertex> m_vertices;
142 int vertex[nMaxVertices];
153 std::vector<int> neighbours;
158 std::vector<Element> m_elements;
168 std::vector<Defect> m_donors;
169 std::vector<Defect> m_acceptors;
174 bool m_hasElectronMobility;
175 bool m_hasHoleMobility;
176 bool m_hasElectronVelocity;
177 bool m_hasHoleVelocity;
178 bool m_hasElectronLifetime;
179 bool m_hasHoleLifetime;
185 double m_pMin, m_pMax;
189 double m_xMinBB, m_yMinBB, m_zMinBB;
190 double m_xMaxBB, m_yMaxBB, m_zMaxBB;
198 void UpdatePeriodicity();
202 bool CheckElement(
const double x,
const double y,
203 const Element& element,
double w[nMaxVertices])
const;
204 bool CheckRectangle(
const double x,
const double y,
const Element& element,
205 double w[nMaxVertices])
const;
206 bool CheckTriangle(
const double x,
const double y,
const Element& element,
207 double w[nMaxVertices])
const;
208 bool CheckLine(
const double x,
const double y,
const Element& element,
209 double w[nMaxVertices])
const;
211 bool LoadGrid(
const std::string& gridfilename);
212 bool LoadData(
const std::string& datafilename);
213 bool ReadDataset(std::ifstream& datafile,
const std::string& dataset);
214 void FindNeighbours();
217 int FindRegion(
const std::string& name)
const;
219 void MapCoordinates(
double& x,
double& y,
bool& xmirr,
bool& ymirr)
const;
220 bool CheckTraps()
const;
Abstract base class for components.
Interpolation in a two-dimensional field map created by Sentaurus Device.
unsigned int GetNumberOfElements() const
bool GetVoltageRange(double &vmin, double &vmax)
Calculate the voltage range [V].
bool GetDonorOccupation(const double x, const double y, const double z, const unsigned int donorNumber, double &occupationFraction)
void GetRegion(const unsigned int i, std::string &name, bool &active) const
bool GetNode(const unsigned int i, double &x, double &y, double &v, double &ex, double &ey) const
bool SetDonor(const unsigned int donorNumber, const double eXsec, const double hxSec, const double concentration)
bool Initialise(const std::string &gridfilename, const std::string &datafilename)
bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
Get the bounding box coordinates.
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status)
unsigned int GetNumberOfNodes() const
void SetRangeZ(const double zmin, const double zmax)
void PrintRegions() const
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)
bool GetHoleLifetime(const double x, const double y, const double z, double &htau)
void ElectronVelocity(const double x, const double y, const double z, double &vx, double &vy, double &vz, Medium *&m, int &status)
Get the electron drift velocity.
bool ElectronAttachment(const double x, const double y, const double z, double &eta)
Get the electron attachment coefficient.
bool GetElectronLifetime(const double x, const double y, const double z, double &etau)
bool GetAcceptorOccupation(const double x, const double y, const double z, const unsigned int acceptorNumber, double &occupationFraction)
unsigned int GetNumberOfRegions() const
bool GetElement(const unsigned int i, double &vol, double &dmin, double &dmax, int &type) const
int GetNumberOfAcceptors()
void UnsetDriftRegion(const unsigned int ireg)
void SetMedium(const unsigned int ireg, Medium *m)
void HoleVelocity(const double x, const double y, const double z, double &vx, double &vy, double &vz, Medium *&m, int &status)
Get the hole drift velocity.
bool HoleAttachment(const double x, const double y, const double z, double &eta)
Get the hole attachment coefficient.
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label)
void SetDriftRegion(const unsigned int ireg)
Medium * GetMedium(const double x, const double y, const double z)
Get the medium at a given location (x, y, z).
bool GetMobility(const double x, const double y, const double z, double &emob, double &hmob)
bool SetAcceptor(const unsigned int acceptorNumber, const double eXsec, const double hxSec, const double concentration)
Abstract base class for media.