8 static doublereal JoyceDixon(doublereal r)
10 return log(r) + 1.0/sqrt(8.0)*r - (3.0/16.0 - sqrt(3.0)/9.0)*r*r;
14 SemiconductorPhase::SemiconductorPhase(std::string infile,
17 void SemiconductorPhase::getChemPotentials(doublereal* mu)
const
19 getActivityConcentrations(
DATA_PTR(m_work));
20 mu[0] = ec() + GasConstant*temperature()*(JoyceDixon(m_work[0]/nc()));
21 mu[1] = ev() + GasConstant*temperature()*(log(m_work[1]/nv()));
25 doublereal SemiconductorPhase::nc()
const
27 doublereal fctr = effectiveMass_e() *
Boltzmann * temperature()/
28 (2.0*
Pi*Planck_bar*Planck_bar);
32 doublereal SemiconductorPhase::nv()
const
34 doublereal fctr = effectiveMass_h() *
Boltzmann * temperature()/
35 (2.0*
Pi*Planck_bar*Planck_bar);
39 doublereal SemiconductorPhase::ev()
const
49 doublereal SemiconductorPhase::ec()
const
51 return ev() + bandgap();
56 void SemiconductorPhase::initLengths()
58 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].