mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: yPlus: add a flag to enable/disable wall-function predictions
This commit is contained in:
committed by
Andrew Heather
parent
91439bb30d
commit
f3d0db18bb
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -70,7 +70,8 @@ Foam::functionObjects::yPlus::yPlus
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fvMeshFunctionObject(name, runTime, dict),
|
fvMeshFunctionObject(name, runTime, dict),
|
||||||
writeFile(obr_, name, typeName, dict)
|
writeFile(obr_, name, typeName, dict),
|
||||||
|
useWallFunction_(true)
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
|
|
||||||
@ -101,12 +102,16 @@ Foam::functionObjects::yPlus::yPlus
|
|||||||
|
|
||||||
bool Foam::functionObjects::yPlus::read(const dictionary& dict)
|
bool Foam::functionObjects::yPlus::read(const dictionary& dict)
|
||||||
{
|
{
|
||||||
fvMeshFunctionObject::read(dict);
|
if (fvMeshFunctionObject::read(dict) && writeFile::read(dict))
|
||||||
writeFile::read(dict);
|
{
|
||||||
|
useWallFunction_ = dict.getOrDefault("useWallFunction", true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::functionObjects::yPlus::execute()
|
bool Foam::functionObjects::yPlus::execute()
|
||||||
{
|
{
|
||||||
@ -139,7 +144,11 @@ bool Foam::functionObjects::yPlus::execute()
|
|||||||
{
|
{
|
||||||
const fvPatch& patch = patches[patchi];
|
const fvPatch& patch = patches[patchi];
|
||||||
|
|
||||||
if (isA<nutWallFunctionFvPatchScalarField>(nutBf[patchi]))
|
if
|
||||||
|
(
|
||||||
|
isA<nutWallFunctionFvPatchScalarField>(nutBf[patchi])
|
||||||
|
&& useWallFunction_
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const nutWallFunctionFvPatchScalarField& nutPf =
|
const nutWallFunctionFvPatchScalarField& nutPf =
|
||||||
dynamic_cast<const nutWallFunctionFvPatchScalarField&>
|
dynamic_cast<const nutWallFunctionFvPatchScalarField&>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -50,6 +50,9 @@ Usage
|
|||||||
type yPlus;
|
type yPlus;
|
||||||
libs (fieldFunctionObjects);
|
libs (fieldFunctionObjects);
|
||||||
|
|
||||||
|
// Optional entries
|
||||||
|
useWallFunction true;
|
||||||
|
|
||||||
// Optional (inherited) entries
|
// Optional (inherited) entries
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
@ -60,6 +63,10 @@ Usage
|
|||||||
Property | Description | Type | Req'd | Dflt
|
Property | Description | Type | Req'd | Dflt
|
||||||
type | Type name: yPlus | word | yes | -
|
type | Type name: yPlus | word | yes | -
|
||||||
libs | Library name: fieldFunctionObjects | word | yes | -
|
libs | Library name: fieldFunctionObjects | word | yes | -
|
||||||
|
useWallFunction | Flag to use the local expressions of <!--
|
||||||
|
--> the selected nut wall function to compute yPlus, <!--
|
||||||
|
--> otherwise directly compute yPlus from flow field <!--
|
||||||
|
--> | bool | no | true
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
The inherited entries are elaborated in:
|
The inherited entries are elaborated in:
|
||||||
@ -106,6 +113,12 @@ class yPlus
|
|||||||
public fvMeshFunctionObject,
|
public fvMeshFunctionObject,
|
||||||
public writeFile
|
public writeFile
|
||||||
{
|
{
|
||||||
|
// Private Data
|
||||||
|
|
||||||
|
//- Flag to use the wall function expressions to compute yPlus
|
||||||
|
bool useWallFunction_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- File header information
|
//- File header information
|
||||||
|
|||||||
Reference in New Issue
Block a user