mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: vanDriest: change calcInterval to updateInterval
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020,2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -133,16 +133,14 @@ Foam::LESModels::vanDriestDelta::vanDriestDelta
|
||||
"Cdelta",
|
||||
0.158
|
||||
)
|
||||
),
|
||||
calcInterval_
|
||||
(
|
||||
dict.optionalSubDict(type() + "Coeffs").getOrDefault<label>
|
||||
(
|
||||
"calcInterval",
|
||||
1
|
||||
)
|
||||
)
|
||||
{
|
||||
const dictionary& coeffsDict(dict.optionalSubDict(type() + "Coeffs"));
|
||||
if (!coeffsDict.readIfPresent("calcInterval", calcInterval_))
|
||||
{
|
||||
coeffsDict.readIfPresent("updateInterval", calcInterval_);
|
||||
}
|
||||
|
||||
delta_ = geometricDelta_();
|
||||
}
|
||||
|
||||
@ -157,7 +155,10 @@ void Foam::LESModels::vanDriestDelta::read(const dictionary& dict)
|
||||
dict.readIfPresent<scalar>("kappa", kappa_);
|
||||
coeffsDict.readIfPresent<scalar>("Aplus", Aplus_);
|
||||
coeffsDict.readIfPresent<scalar>("Cdelta", Cdelta_);
|
||||
coeffsDict.readIfPresent<label>("calcInterval", calcInterval_);
|
||||
if (!coeffsDict.readIfPresent<label>("calcInterval", calcInterval_))
|
||||
{
|
||||
coeffsDict.readIfPresent("updateInterval", calcInterval_);
|
||||
}
|
||||
|
||||
calcDelta();
|
||||
}
|
||||
@ -165,7 +166,7 @@ void Foam::LESModels::vanDriestDelta::read(const dictionary& dict)
|
||||
|
||||
void Foam::LESModels::vanDriestDelta::correct()
|
||||
{
|
||||
if (turbulenceModel_.mesh().time().timeIndex() % calcInterval_ == 0)
|
||||
if ((turbulenceModel_.mesh().time().timeIndex() % calcInterval_) == 0)
|
||||
{
|
||||
geometricDelta_().correct();
|
||||
calcDelta();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019,2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -30,6 +30,25 @@ Class
|
||||
Description
|
||||
Simple cube-root of cell volume delta used in incompressible LES models.
|
||||
|
||||
Example of the delta specification in turbulenceProperties:
|
||||
\verbatim
|
||||
delta vanDriest;
|
||||
|
||||
vanDriestCoeffs
|
||||
{
|
||||
// Underlying geometric delta
|
||||
delta cubeRootVol;
|
||||
// Coefficients for geometric delta
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 2.0;
|
||||
}
|
||||
// Optional update interval
|
||||
// Default is 1 (update every step)
|
||||
updateInterval 1000;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
vanDriestDelta.C
|
||||
|
||||
|
||||
Reference in New Issue
Block a user