mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: turbulenceFields FO - added LESRegion and DES shielding function, fd
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2021 OpenCFD Ltd.
|
Copyright (C) 2015-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -29,6 +29,7 @@ License
|
|||||||
#include "turbulenceFields.H"
|
#include "turbulenceFields.H"
|
||||||
#include "turbulentTransportModel.H"
|
#include "turbulentTransportModel.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
|
#include "DESModelBase.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -60,6 +61,8 @@ Foam::functionObjects::turbulenceFields::compressibleFieldNames_
|
|||||||
{ compressibleField::cfDevRhoReff, "devRhoReff" },
|
{ compressibleField::cfDevRhoReff, "devRhoReff" },
|
||||||
{ compressibleField::cfL, "L" },
|
{ compressibleField::cfL, "L" },
|
||||||
{ compressibleField::cfI, "I" },
|
{ compressibleField::cfI, "I" },
|
||||||
|
{ compressibleField::cfLESRegion, "LESRegion" },
|
||||||
|
{ compressibleField::cffd, "fd" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -79,6 +82,8 @@ Foam::functionObjects::turbulenceFields::incompressibleFieldNames_
|
|||||||
{ incompressibleField::ifDevReff, "devReff" },
|
{ incompressibleField::ifDevReff, "devReff" },
|
||||||
{ incompressibleField::ifL, "L" },
|
{ incompressibleField::ifL, "L" },
|
||||||
{ incompressibleField::ifI, "I" },
|
{ incompressibleField::ifI, "I" },
|
||||||
|
{ incompressibleField::ifLESRegion, "LESRegion" },
|
||||||
|
{ incompressibleField::iffd, "fd" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -267,6 +272,36 @@ bool Foam::functionObjects::turbulenceFields::execute()
|
|||||||
processField<scalar>(f, I(model));
|
processField<scalar>(f, I(model));
|
||||||
break;
|
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:
|
default:
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
@ -334,6 +369,36 @@ bool Foam::functionObjects::turbulenceFields::execute()
|
|||||||
processField<scalar>(f, I(model));
|
processField<scalar>(f, I(model));
|
||||||
break;
|
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:
|
default:
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
|
|||||||
@ -182,7 +182,9 @@ public:
|
|||||||
cfR, //!< "Reynolds stress tensor"
|
cfR, //!< "Reynolds stress tensor"
|
||||||
cfDevRhoReff, //!< "Divergence of the Reynolds stress"
|
cfDevRhoReff, //!< "Divergence of the Reynolds stress"
|
||||||
cfL, //!< "Integral-length/Mixing-length scale"
|
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
|
//- Names for compressibleField turbulence fields
|
||||||
@ -200,7 +202,9 @@ public:
|
|||||||
ifR, //!< "Reynolds stress tensor"
|
ifR, //!< "Reynolds stress tensor"
|
||||||
ifDevReff, //!< "Deviatoric part of the effective Reynolds stress"
|
ifDevReff, //!< "Deviatoric part of the effective Reynolds stress"
|
||||||
ifL, //!< "Integral-length/Mixing-length scale"
|
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
|
//- Names for incompressibleField turbulence fields
|
||||||
|
|||||||
Reference in New Issue
Block a user