13 #ifndef CT_ADSORBATE_H
14 #define CT_ADSORBATE_H
52 Adsorbate(
size_t n, doublereal tlow, doublereal thigh, doublereal pref,
53 const doublereal* coeffs) :
m_lowT(tlow),
56 m_nFreqs = int(coeffs[0]);
59 std::copy(coeffs+2, coeffs + 2 + m_nFreqs,
m_freq.begin());
69 m_nFreqs = b.m_nFreqs;
84 virtual void install(std::string name,
size_t index,
int type,
89 for (
size_t n = 0; n < m_nFreqs; n++) {
147 doublereal* s_R)
const {
148 h_RT[
m_index] = _energy_RT(temp);
150 - (temp-0.01)*_energy_RT(temp-0.01))/0.01;
169 doublereal& tlow, doublereal& thigh,
171 doublereal*
const coeffs)
const {
177 coeffs[0] =
static_cast<double>(m_nFreqs);
179 for (
size_t i = 2; i < m_nFreqs+2; i++) {
199 doublereal _energy_RT(
double T)
const {
200 doublereal x, hnu_kt, hnu, sum = 0.0;
202 for (
size_t i = 0; i < m_nFreqs; i++) {
206 sum += hnu_kt * x/(1.0 - x);
211 doublereal _free_energy_RT(
double T)
const {
212 doublereal x, hnu_kt, sum = 0.0;
214 for (
size_t i = 0; i < m_nFreqs; i++) {
222 doublereal _entropy_R(
double T)
const {
223 return _energy_RT(T) - _free_energy_RT(T);