phaseSystem::correctKinematics:: Ensure pressure is requested only for moving phase

The pressure field is not available from stationary solid phases.
This commit is contained in:
Henry Weller
2023-10-16 19:41:39 +01:00
parent d3c2a16d0e
commit 6dc6d3d089

View File

@ -600,13 +600,12 @@ void Foam::phaseSystem::correctKinematics()
{
phaseModels_[phasei].correctKinematics();
updateDpdt = updateDpdt || phaseModels_[phasei].thermo().dpdt();
}
// Update the pressure time-derivative if required
if (updateDpdt)
{
dpdt_ = fvc::ddt(phaseModels_.begin()().fluidThermo().p());
// Update the pressure time-derivative if required
if (!updateDpdt && phaseModels_[phasei].thermo().dpdt())
{
dpdt_ = fvc::ddt(phaseModels_[phasei].fluidThermo().p());
updateDpdt = true;
}
}
}