Пример #1
0
void VPSSMgr_General::_updateStandardStateThermo()
{
    for (size_t k = 0; k < m_kk; k++) {
        PDSS* kPDSS = m_PDSS_ptrs[k];
        kPDSS->setState_TP(m_tlast, m_plast);
        m_hss_RT[k] = kPDSS->enthalpy_RT();
        m_sss_R[k]  = kPDSS->entropy_R();
        m_gss_RT[k] = m_hss_RT[k] - m_sss_R[k];
        m_cpss_R[k] = kPDSS->cp_R();
        m_Vss[k]    = kPDSS->molarVolume();
    }
}
Пример #2
0
void VPSSMgr_Water_HKFT::_updateStandardStateThermo()
{
    // Do the water
    m_waterSS->setState_TP(m_tlast, m_plast);
    m_hss_RT[0] = (m_waterSS->enthalpy_mole()) / (GasConstant * m_tlast);
    m_sss_R[0] = (m_waterSS->entropy_mole()) / GasConstant;
    m_cpss_R[0] = (m_waterSS->cp_mole()) / GasConstant;
    m_gss_RT[0] = (m_hss_RT[0] - m_sss_R[0]);
    m_Vss[0] = (m_vptp_ptr->molecularWeight(0)) / (m_waterSS->density());

    for (size_t k = 1; k < m_kk; k++) {
        PDSS* ps = m_vptp_ptr->providePDSS(k);
        ps->setState_TP(m_tlast, m_plast);
        m_cpss_R[k] = ps->cp_R();
        m_sss_R[k] = ps->entropy_R();
        m_gss_RT[k] = ps->gibbs_RT();
        m_hss_RT[k] = m_gss_RT[k] + m_sss_R[k];
        m_Vss[k] = ps->molarVolume();
    }
}