ENH: turbulenceFields FO - added LESRegion and DES shielding function, fd
This commit is contained in:
parent
7db69fc22e
commit
81f783286c
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -29,6 +29,7 @@ License
|
||||
#include "turbulenceFields.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "DESModelBase.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -60,6 +61,8 @@ Foam::functionObjects::turbulenceFields::compressibleFieldNames_
|
||||
{ compressibleField::cfDevRhoReff, "devRhoReff" },
|
||||
{ compressibleField::cfL, "L" },
|
||||
{ compressibleField::cfI, "I" },
|
||||
{ compressibleField::cfLESRegion, "LESRegion" },
|
||||
{ compressibleField::cffd, "fd" },
|
||||
});
|
||||
|
||||
|
||||
@ -79,6 +82,8 @@ Foam::functionObjects::turbulenceFields::incompressibleFieldNames_
|
||||
{ incompressibleField::ifDevReff, "devReff" },
|
||||
{ incompressibleField::ifL, "L" },
|
||||
{ incompressibleField::ifI, "I" },
|
||||
{ incompressibleField::ifLESRegion, "LESRegion" },
|
||||
{ incompressibleField::iffd, "fd" },
|
||||
});
|
||||
|
||||
|
||||
@ -267,6 +272,36 @@ bool Foam::functionObjects::turbulenceFields::execute()
|
||||
processField<scalar>(f, I(model));
|
||||
break;
|
||||
}
|
||||
case cfLESRegion:
|
||||
{
|
||||
auto* DESPtr = mesh_.cfindObject<DESModelBase>(modelName_);
|
||||
if (!DESPtr)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Turbulence model is not a DES model - "
|
||||
<< "skipping request for LESRegion" << endl;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
processField<scalar>(f, DESPtr->LESRegion());
|
||||
break;
|
||||
}
|
||||
case cffd:
|
||||
{
|
||||
auto* DESPtr = mesh_.cfindObject<DESModelBase>(modelName_);
|
||||
if (!DESPtr)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Turbulence model is not a DES model - "
|
||||
<< "skipping request for fd" << endl;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
processField<scalar>(f, DESPtr->fd());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorInFunction
|
||||
@ -334,6 +369,36 @@ bool Foam::functionObjects::turbulenceFields::execute()
|
||||
processField<scalar>(f, I(model));
|
||||
break;
|
||||
}
|
||||
case ifLESRegion:
|
||||
{
|
||||
auto* DESPtr = mesh_.cfindObject<DESModelBase>(modelName_);
|
||||
if (!DESPtr)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Turbulence model is not a DES model - "
|
||||
<< "skipping request for LESRegion" << endl;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
processField<scalar>(f, DESPtr->LESRegion());
|
||||
break;
|
||||
}
|
||||
case iffd:
|
||||
{
|
||||
auto* DESPtr = mesh_.cfindObject<DESModelBase>(modelName_);
|
||||
if (!DESPtr)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Turbulence model is not a DES model - "
|
||||
<< "skipping request for fd" << endl;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
processField<scalar>(f, DESPtr->fd());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorInFunction
|
||||
|
@ -182,7 +182,9 @@ public:
|
||||
cfR, //!< "Reynolds stress tensor"
|
||||
cfDevRhoReff, //!< "Divergence of the Reynolds stress"
|
||||
cfL, //!< "Integral-length/Mixing-length scale"
|
||||
cfI //!< "Turbulence intensity"
|
||||
cfI, //!< "Turbulence intensity"
|
||||
cfLESRegion, //!< "DES model LES region indicator field"
|
||||
cffd //!< "DES model shielding function"
|
||||
};
|
||||
|
||||
//- Names for compressibleField turbulence fields
|
||||
@ -200,7 +202,9 @@ public:
|
||||
ifR, //!< "Reynolds stress tensor"
|
||||
ifDevReff, //!< "Deviatoric part of the effective Reynolds stress"
|
||||
ifL, //!< "Integral-length/Mixing-length scale"
|
||||
ifI //!< "Turbulence intensity"
|
||||
ifI, //!< "Turbulence intensity"
|
||||
ifLESRegion, //!< "DES model LES region indicator field"
|
||||
iffd //!< "DES model shielding function"
|
||||
};
|
||||
|
||||
//- Names for incompressibleField turbulence fields
|
||||
|
Loading…
Reference in New Issue
Block a user