diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C index e34759e3ed..63881bb1e6 100644 --- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C +++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C @@ -25,8 +25,7 @@ License #include "DispersionRASModel.H" #include "demandDrivenData.H" -#include "turbulentTransportModel.H" -#include "turbulentFluidThermoModel.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -35,18 +34,17 @@ Foam::tmp Foam::DispersionRASModel::kModel() const { const objectRegistry& obr = this->owner().mesh(); - const word turbName = turbulenceModel::propertiesName; + const word turbName = + IOobject::groupName + ( + turbulenceModel::propertiesName, + this->owner().U().group() + ); - if (obr.foundObject(turbName)) + if (obr.foundObject(turbName)) { - const compressible::turbulenceModel& model = - obr.lookupObject(turbName); - return model.k(); - } - else if (obr.foundObject(turbName)) - { - const incompressible::turbulenceModel& model = - obr.lookupObject(turbName); + const turbulenceModel& model = + obr.lookupObject(turbName); return model.k(); } else @@ -70,18 +68,17 @@ Foam::tmp Foam::DispersionRASModel::epsilonModel() const { const objectRegistry& obr = this->owner().mesh(); - const word turbName = turbulenceModel::propertiesName; + const word turbName = + IOobject::groupName + ( + turbulenceModel::propertiesName, + this->owner().U().group() + ); - if (obr.foundObject(turbName)) + if (obr.foundObject(turbName)) { - const compressible::turbulenceModel& model = - obr.lookupObject(turbName); - return model.epsilon(); - } - else if (obr.foundObject(turbName)) - { - const incompressible::turbulenceModel& model = - obr.lookupObject(turbName); + const turbulenceModel& model = + obr.lookupObject(turbName); return model.epsilon(); } else