Skip to content
Snippets Groups Projects
Commit 933bf2ba authored by Henry's avatar Henry
Browse files

BrownianMotionForce: Updated interface to turbulence model

parent 841b303a
No related merge requests found
...@@ -26,8 +26,7 @@ License ...@@ -26,8 +26,7 @@ License
#include "BrownianMotionForce.H" #include "BrownianMotionForce.H"
#include "mathematicalConstants.H" #include "mathematicalConstants.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "turbulentTransportModel.H" #include "turbulenceModel.H"
#include "turbulentFluidThermoModel.H"
using namespace Foam::constant; using namespace Foam::constant;
...@@ -57,18 +56,17 @@ Foam::tmp<Foam::volScalarField> ...@@ -57,18 +56,17 @@ Foam::tmp<Foam::volScalarField>
Foam::BrownianMotionForce<CloudType>::kModel() const Foam::BrownianMotionForce<CloudType>::kModel() const
{ {
const objectRegistry& obr = this->owner().mesh(); 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)) if (obr.foundObject<turbulenceModel>(turbName))
{
const compressible::turbulenceModel& model =
obr.lookupObject<compressible::turbulenceModel>(turbName);
return model.k();
}
else if (obr.foundObject<incompressible::turbulenceModel>(turbName))
{ {
const incompressible::turbulenceModel& model = const turbulenceModel& model =
obr.lookupObject<incompressible::turbulenceModel>(turbName); obr.lookupObject<turbulenceModel>(turbName);
return model.k(); return model.k();
} }
else else
...@@ -76,7 +74,7 @@ Foam::BrownianMotionForce<CloudType>::kModel() const ...@@ -76,7 +74,7 @@ Foam::BrownianMotionForce<CloudType>::kModel() const
FatalErrorIn FatalErrorIn
( (
"Foam::tmp<Foam::volScalarField>" "Foam::tmp<Foam::volScalarField>"
"Foam::BrownianMotionForce<CloudType>::kModel() const" "Foam::DispersionRASModel<CloudType>::kModel() const"
) )
<< "Turbulence model not found in mesh database" << nl << "Turbulence model not found in mesh database" << nl
<< "Database objects include: " << obr.sortedToc() << "Database objects include: " << obr.sortedToc()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment