void LatticePhase::getPartialMolarEntropies(doublereal* sbar) const { const vector_fp& _s = entropy_R_ref(); for (size_t k = 0; k < m_kk; k++) { double xx = std::max(SmallNumber, moleFraction(k)); sbar[k] = GasConstant * (_s[k] - log(xx)); } }
/* * Get the array of nondimensional entropy functions for the * standard state species * at the current <I>T</I> and <I>P</I> of the solution. */ void PecosGasPhase::getEntropy_R(doublereal* sr) const { const array_fp& _s = entropy_R_ref(); copy(_s.begin(), _s.end(), sr); double tmp = log (pressure() /m_spthermo->refPressure()); for (int k = 0; k < m_kk; k++) { sr[k] -= tmp; } }
void IdealGasPhase::getPartialMolarEntropies(doublereal* sbar) const { const vector_fp& _s = entropy_R_ref(); scale(_s.begin(), _s.end(), sbar, GasConstant); doublereal logp = log(pressure() / m_spthermo->refPressure()); for (size_t k = 0; k < m_kk; k++) { doublereal xx = std::max(SmallNumber, moleFraction(k)); sbar[k] += GasConstant * (-logp - log(xx)); } }
/* * Get the array of partial molar entropies of the species * units = J / kmol / K */ void PecosGasPhase::getPartialMolarEntropies(doublereal* sbar) const { const array_fp& _s = entropy_R_ref(); doublereal r = GasConstant; scale(_s.begin(), _s.end(), sbar, r); doublereal logp = log(pressure()/m_spthermo->refPressure()); for (int k = 0; k < m_kk; k++) { doublereal xx = fmaxx(SmallNumber, moleFraction(k)); sbar[k] += r * (- logp - log(xx)); } }
doublereal IdealGasPhase::entropy_mole() const { return GasConstant * (mean_X(entropy_R_ref()) - sum_xlogx() - std::log(pressure() / m_spthermo->refPressure())); }
void IdealGasPhase::getEntropy_R_ref(doublereal* er) const { const vector_fp& _s = entropy_R_ref(); copy(_s.begin(), _s.end(), er); }
/** * Return the difference in entropy between current p * and ref p0, in mks units of * J kmol-1 K-1 */ doublereal PDSS::entropyDelp_mole() const { doublereal tmp = entropy_R_ref(); return(entropy_mole() - GasConstant * tmp); }
/* * Returns the vector of nondimensional * entropies of the reference state at the current temperature * and reference pressure. */ void PecosGasPhase::getEntropy_R_ref(doublereal *er) const { const array_fp& _s = entropy_R_ref(); copy(_s.begin(), _s.end(), er); }
doublereal LatticePhase::entropy_mole() const { return GasConstant * (mean_X(entropy_R_ref()) - sum_xlogx()); }
void LatticePhase::getEntropy_R(doublereal* sr) const { const vector_fp& _s = entropy_R_ref(); std::copy(_s.begin(), _s.end(), sr); }
void IdealSolidSolnPhase::getEntropy_R(doublereal* sr) const { const vector_fp& _s = entropy_R_ref(); copy(_s.begin(), _s.end(), sr); }
doublereal IdealSolidSolnPhase::entropy_mole() const { return GasConstant * (mean_X(entropy_R_ref()) - sum_xlogx()); }