From 933bf2ba8ad30723f370b7c3d9ff2ef215afbd1f Mon Sep 17 00:00:00 2001 From: Henry <Henry> Date: Thu, 30 Apr 2015 17:38:12 +0100 Subject: [PATCH] BrownianMotionForce: Updated interface to turbulence model --- .../BrownianMotion/BrownianMotionForce.C | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C index 02641346151..d33b3057a3e 100644 --- a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C +++ b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C @@ -26,8 +26,7 @@ License #include "BrownianMotionForce.H" #include "mathematicalConstants.H" #include "demandDrivenData.H" -#include "turbulentTransportModel.H" -#include "turbulentFluidThermoModel.H" +#include "turbulenceModel.H" using namespace Foam::constant; @@ -57,18 +56,17 @@ Foam::tmp<Foam::volScalarField> Foam::BrownianMotionForce<CloudType>::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<compressible::turbulenceModel>(turbName)) - { - const compressible::turbulenceModel& model = - obr.lookupObject<compressible::turbulenceModel>(turbName); - return model.k(); - } - else if (obr.foundObject<incompressible::turbulenceModel>(turbName)) + if (obr.foundObject<turbulenceModel>(turbName)) { - const incompressible::turbulenceModel& model = - obr.lookupObject<incompressible::turbulenceModel>(turbName); + const turbulenceModel& model = + obr.lookupObject<turbulenceModel>(turbName); return model.k(); } else @@ -76,7 +74,7 @@ Foam::BrownianMotionForce<CloudType>::kModel() const FatalErrorIn ( "Foam::tmp<Foam::volScalarField>" - "Foam::BrownianMotionForce<CloudType>::kModel() const" + "Foam::DispersionRASModel<CloudType>::kModel() const" ) << "Turbulence model not found in mesh database" << nl << "Database objects include: " << obr.sortedToc() -- GitLab