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 "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>
|
|||||||
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 =
|
const turbulenceModel& model =
|
||||||
obr.lookupObject<compressible::turbulenceModel>(turbName);
|
obr.lookupObject<turbulenceModel>(turbName);
|
||||||
return model.k();
|
|
||||||
}
|
|
||||||
else if (obr.foundObject<incompressible::turbulenceModel>(turbName))
|
|
||||||
{
|
|
||||||
const incompressible::turbulenceModel& model =
|
|
||||||
obr.lookupObject<incompressible::turbulenceModel>(turbName);
|
|
||||||
return model.k();
|
return model.k();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user