IsothermalPhaseModel: Correct base thermo

An isothermal phase still needs to trigger a thermo update in it's base
classes, primarily to ensure that any inert species fractions get
updated. This will not trigger an actual update of the thermodynamics,
as that is done in AnisothermalPhaseModel.
This commit is contained in:
Will Bainbridge
2018-10-30 12:29:46 +00:00
parent e1c95941e7
commit 674bff4031

View File

@ -51,7 +51,21 @@ Foam::IsothermalPhaseModel<BasePhaseModel>::~IsothermalPhaseModel()
template<class BasePhaseModel>
void Foam::IsothermalPhaseModel<BasePhaseModel>::correctThermo()
{}
{
BasePhaseModel::correctThermo();
// If not pure, then the species fractions may have changed, so the thermo
// needs correcting, but without changing the temperature. Re-calculate the
// energy, then run the standard thermo correction. This could be made more
// efficient, as the THE steps in the thermo correction are not strictly
// necessary, but doing so would require expanding the thermo interface.
if (!this->pure())
{
this->thermo_->he() =
this->thermo().he(this->thermo().p(), this->thermo().T());
this->thermo_->correct();
}
}
template<class BasePhaseModel>