Example #1
0
void IdealGasPhase::getIntEnergy_RT_ref(doublereal* urt) const
{
    const vector_fp& _h = enthalpy_RT_ref();
    for (size_t k = 0; k < m_kk; k++) {
        urt[k] = _h[k] - 1.0;
    }
}
Example #2
0
void IdealGasPhase::getPartialMolarIntEnergies(doublereal* ubar) const
{
    const vector_fp& _h = enthalpy_RT_ref();
    for (size_t k = 0; k < m_kk; k++) {
        ubar[k] = RT() * (_h[k] - 1.0);
    }
}
Example #3
0
 /*
  * Get the array of partial molar internal energies of the species 
  * units = J / kmol
  */
 void PecosGasPhase::getPartialMolarIntEnergies(doublereal* ubar) const {
   const array_fp& _h = enthalpy_RT_ref();
   doublereal rt = GasConstant * temperature();
   for (int k = 0; k < m_kk; k++) {
     ubar[k] =  rt * (_h[k] - 1.0);
   }
 }
Example #4
0
 doublereal LatticePhase::
 enthalpy_mole() const {
   doublereal p0 = m_spthermo->refPressure();
   return GasConstant * temperature() * 
     mean_X(&enthalpy_RT_ref()[0]) 
     + (pressure() - p0)/molarDensity();
 }
void LatticePhase::getEnthalpy_RT(doublereal* hrt) const
{
    const vector_fp& _h = enthalpy_RT_ref();
    doublereal delta_prt = (m_Pcurrent - m_Pref) / RT();
    for (size_t k = 0; k < m_kk; k++) {
        hrt[k] = _h[k] + delta_prt * m_speciesMolarVolume[k];
    }
}
Example #6
0
 void LatticePhase::getEnthalpy_RT(doublereal* hrt) const {
   const array_fp& _h = enthalpy_RT_ref();
   std::copy(_h.begin(), _h.end(), hrt);
   doublereal tmp = (pressure() - m_p0) / (molarDensity() * GasConstant * temperature());
   for (size_t k = 0; k < m_kk; k++) {
     hrt[k] += tmp;
   }
 }
void IdealSolidSolnPhase::getIntEnergy_RT_ref(doublereal* urt) const
{
    const vector_fp& _h = enthalpy_RT_ref();
    doublereal prefrt = m_Pref / (GasConstant * temperature());
    for (size_t k = 0; k < m_kk; k++) {
        urt[k] = _h[k] - prefrt * m_speciesMolarVolume[k];
    }
}
Example #8
0
void IdealGasPhase::getEnthalpy_RT_ref(doublereal* hrt) const
{
    const vector_fp& _h = enthalpy_RT_ref();
    copy(_h.begin(), _h.end(), hrt);
}
Example #9
0
void IdealGasPhase::getPartialMolarEnthalpies(doublereal* hbar) const
{
    const vector_fp& _h = enthalpy_RT_ref();
    doublereal rt = GasConstant * temperature();
    scale(_h.begin(), _h.end(), hbar, rt);
}
Example #10
0
/**
 * Return the difference in enthalpy between current p
 * and ref p0, in mks units of
 * in units of J kmol-1
 */
doublereal PDSS::
enthalpyDelp_mole() const {
    doublereal RT = m_temp * GasConstant;
    doublereal tmp = enthalpy_RT_ref();
    return(enthalpy_mole() - RT * tmp);
}
Example #11
0
void IdealGasPhase::getPartialMolarEnthalpies(doublereal* hbar) const
{
    const vector_fp& _h = enthalpy_RT_ref();
    scale(_h.begin(), _h.end(), hbar, RT());
}
Example #12
0
 /*
  *  Returns the vector of nondimensional
  *  internal Energies of the reference state at the current temperature
  *  of the solution and the reference pressure for each species.
  */
 void PecosGasPhase::getIntEnergy_RT_ref(doublereal *urt) const {
   const array_fp& _h = enthalpy_RT_ref();
   for (int k = 0; k < m_kk; k++) {
     urt[k] = _h[k] - 1.0;
   }
 }
Example #13
0
 /*
  *  Returns the vector of nondimensional
  *  enthalpies of the reference state at the current temperature
  *  and reference presssure.
  */
 void PecosGasPhase::getEnthalpy_RT_ref(doublereal *hrt) const {
   const array_fp& _h = enthalpy_RT_ref();
   copy(_h.begin(), _h.end(), hrt);
 }
Example #14
0
 /*
  * Molar internal energy. J/kmol. For an ideal gas mixture,
  * \f[
  * \hat u(T) = \sum_k X_k \hat h^0_k(T) - \hat R T,
  * \f]
  * and is a function only of temperature.
  * The reference-state pure-species enthalpies 
  * \f$ \hat h^0_k(T) \f$ are computed by the species thermodynamic 
  * property manager.
  * @see SpeciesThermo
  */
 doublereal PecosGasPhase::intEnergy_mole() const {
   return GasConstant * temperature()
     * ( mean_X(&enthalpy_RT_ref()[0]) - 1.0);
 }
doublereal LatticePhase::enthalpy_mole() const
{
    return RT() * mean_X(enthalpy_RT_ref()) +
            (pressure() - m_Pref)/molarDensity();
}
doublereal IdealSolidSolnPhase::enthalpy_mole() const
{
    doublereal htp = GasConstant * temperature() * mean_X(enthalpy_RT_ref());
    return htp + (pressure() - m_Pref)/molarDensity();
}