Skip to content

IdealSolidSolnPhase::getPartialMolarEnthalpies - needs pressure dependence? #1080

@decaluwe

Description

@decaluwe

Problem description
The getPartialMolarEnthalpies routine in IdealSolidSolnPhase would appear to be missing the required pressure dependence implemented elsewhere in the model.

All other enthalpy (and, by association, chemical potential) calculations involve some form of (P - Pref)*molarVolume (where molarVolume is of either the phase or the individual species).

IdealSolidSolnPhase::getPartialMolarEnthalpies does not:

void IdealSolidSolnPhase::getPartialMolarEnthalpies(doublereal* hbar) const
{
    const vector_fp& _h = enthalpy_RT_ref();
    scale(_h.begin(), _h.end(), hbar, RT());
}

I think this ought to be replaced with:

void IdealSolidSolnPhase::getPartialMolarEnthalpies(doublereal* hbar) const
{
    const vector_fp& _h = enthalpy_RT_ref();
    scale(_h.begin(), _h.end(), hbar, RT());
    double delta_p = (m_Pcurrent - m_Pref);
    for (size_t k = 0; k < m_kk; k++) {
        hbar[k] += delta_p * m_speciesMolarVolume[k];
    }
}

System information

  • Cantera version: 2.6.0a2

Wanted to check if I was missing something, before fixing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions