momentumTransportModel: Corrected readModelDict backward-compatibility function

adds support for reading constant/momentumTransport if present otherwise
constant/turbulenceProperties in read.
This commit is contained in:
Henry Weller
2020-04-16 17:00:20 +01:00
parent 46f5de875d
commit c4e9f79a97

View File

@ -61,9 +61,9 @@ Foam::IOdictionary Foam::momentumTransportModel::readModelDict
}
else
{
IOobject momentumTransport
IOobject turbulenceProperties
(
IOobject::groupName("momentumTransport", group),
IOobject::groupName("turbulenceProperties", group),
obr.time().constant(),
obr,
IOobject::MUST_READ_IF_MODIFIED,
@ -71,9 +71,9 @@ Foam::IOdictionary Foam::momentumTransportModel::readModelDict
registerObject
);
if (momentumTransport.typeHeaderOk<IOdictionary>(true))
if (turbulenceProperties.typeHeaderOk<IOdictionary>(true))
{
return momentumTransport;
return turbulenceProperties;
}
else
{