9 const doublereal JD_const1 = 1.0/sqrt(8.0);
10 const doublereal JD_const2 = 3.0/16.0 - sqrt(3.0)/9.0;
12 static doublereal JoyceDixon(doublereal r)
14 return log(r) + JD_const1*r - JD_const2*r*r;
18 SemiconductorPhase::SemiconductorPhase(std::string infile,
35 void SemiconductorPhase::getChemPotentials(doublereal* mu)
const
37 getActivityConcentrations(
DATA_PTR(m_work));
38 doublereal r = m_work[0]/nc();
39 mu[0] = ec() + GasConstant*temperature()*(JoyceDixon(r));
40 mu[1] = ev() + GasConstant*temperature()*(log(m_work[1]/nv()));
44 doublereal SemiconductorPhase::nc()
const
46 doublereal fctr = effectiveMass_e() *
Boltzmann * temperature()/
47 (2.0*
Pi*Planck_bar*Planck_bar);
51 doublereal SemiconductorPhase::nv()
const
53 doublereal fctr = effectiveMass_h() *
Boltzmann * temperature()/
54 (2.0*
Pi*Planck_bar*Planck_bar);
58 doublereal SemiconductorPhase::ev()
const
68 doublereal SemiconductorPhase::ec()
const
70 return ev() + bandgap();
75 void SemiconductorPhase::initLengths()
77 m_work.resize(nSpecies());
const doublereal Avogadro
Avogadro's Number [number/kmol].
#define DATA_PTR(vec)
Creates a pointer to the start of the raw data for a vector.
const doublereal Boltzmann
Boltzmann's constant [J/K].