Cantera  2.0
SemiconductorPhase.h
Go to the documentation of this file.
1 /**
2  * @file SemiconductorPhase.h
3  */
4 
5 // Copyright 2003 California Institute of Technology
6 
7 #ifndef CT_SEMICONDPHASE_H
8 #define CT_SEMICONDPHASE_H
9 
10 #include "mix_defs.h"
11 #include "ThermoPhase.h"
12 //#include "SpeciesThermo.h"
13 
14 namespace Cantera
15 {
16 
17 const int cElectron = 0;
18 const int cHole = 1;
19 
20 /**
21  * @ingroup thermoprops
22  *
23  * Class SemiconductorPhase represents electrons and holes
24  * in a semiconductor.
25  *
26  */
28 {
29 
30 public:
31 
33  SemiconductorPhase(std::string infile, std::string id="");
34 
36  *this = operator=(right);
37  }
38 
39  SemiconductorPhase& operator=(const SemiconductorPhase& right) {
40  if (&right != this) {
42  m_press = right.m_press;
43  }
44  return *this;
45  }
46 
47  virtual ~SemiconductorPhase() {}
48 
49  //! Duplicator
51  SemiconductorPhase* idg = new SemiconductorPhase(*this);
52  return (ThermoPhase*) idg;
53  }
54 
55  // Overloaded methods of class ThermoPhase
56 
57  virtual int eosType() const {
58  return cSemiconductor;
59  }
60 
61 
62  virtual void setPressure(doublereal pres) {
63  m_press = pres;
64  }
65  virtual doublereal pressure() const {
66  return m_press;
67  }
68 
69 
70  virtual void setParametersFromXML(const XML_Node& eosdata) {
71  eosdata._require("model","Semiconductor");
72  doublereal rho = ctml::getFloat(eosdata, "density", "-");
73  setDensity(rho);
74  doublereal bandgap = ctml::getFloat(eosdata, "bandgap", "-");
75  doublereal e_mass = ctml::getFloat(eosdata, "electron_mass", "-");
76  doublereal h_mass = ctml::getFloat(eosdata, "hole_mass", "-");
77  doublereal e_donor = ctml::getFloat(eosdata, "donor_energy", "-");
78  doublereal n_donor = ctml::getFloat(eosdata, "donor_concentration", "-");
79  doublereal e_acceptor = ctml::getFloat(eosdata, "acceptor_energy", "-");
80  doublereal n_acceptor = ctml::getFloat(eosdata, "acceptor_concentration", "-");
81  setEffectiveMasses(e_mass, h_mass);
82  setDonorDoping(n_donor, e_donor);
83  setAcceptorDoping(n_acceptor, e_acceptor);
84  m_bandgap = bandgap;
85  }
86 
87  void setEffectiveMasses(doublereal e_mass, doublereal h_mass) {
88  m_emass = e_mass;
89  m_hmass = h_mass;
90  }
91 
92  void setDonorDoping(doublereal n_donor, doublereal e_donor) {
93  m_ndonor = n_donor;
94  m_edonor = e_donor;
95  }
96 
97  void setAcceptorDoping(doublereal n_acceptor, doublereal e_acceptor) {
98  m_nacceptor = n_acceptor;
99  m_eacceptor = e_acceptor;
100  }
101 
102  doublereal effectiveMass_e() const {
103  return m_emass;
104  }
105 
106  doublereal effectiveMass_h() const {
107  return m_hmass;
108  }
109 
110  doublereal fermiLevel() const {
111  return m_fermi_level;
112  }
113 
114  virtual void getChemPotentials(doublereal* mu) const;
115  doublereal nc() const;
116  doublereal nv() const;
117  doublereal ec() const;
118  doublereal ev() const;
119  doublereal bandgap() const {
120  return m_bandgap;
121  }
122 
123 protected:
124 
125 private:
126  doublereal m_press;
127  doublereal m_emass;
128  doublereal m_hmass;
129  doublereal m_ndonor;
130  doublereal m_edonor;
131  doublereal m_nacceptor;
132  doublereal m_eacceptor;
133  doublereal m_fermi_level;
134  doublereal m_bandgap;
135  mutable vector_fp m_work;
136 
137  void initLengths();
138 };
139 }
140 
141 #endif
142 
143 
144 
145 
146