mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BrownianMotionForce: Updated interface to turbulence model
This commit is contained in:
@ -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))
|
||||
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 =
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user