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));
    }
}
예제 #2
0
 /*
  * 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;
   }
 }
예제 #3
0
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));
    }
}
예제 #4
0
 /*
  * 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));
   }
 }
예제 #5
0
doublereal IdealGasPhase::entropy_mole() const
{
    return GasConstant * (mean_X(entropy_R_ref()) - sum_xlogx() - std::log(pressure() / m_spthermo->refPressure()));
}
예제 #6
0
void IdealGasPhase::getEntropy_R_ref(doublereal* er) const
{
    const vector_fp& _s = entropy_R_ref();
    copy(_s.begin(), _s.end(), er);
}
예제 #7
0
/**
 *  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);

}
예제 #8
0
 /*
  *  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);
}
예제 #11
0
void IdealSolidSolnPhase::getEntropy_R(doublereal* sr) const
{
    const vector_fp& _s = entropy_R_ref();
    copy(_s.begin(), _s.end(), sr);
}
예제 #12
0
doublereal IdealSolidSolnPhase::entropy_mole() const
{
    return GasConstant * (mean_X(entropy_R_ref()) - sum_xlogx());
}