mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'bug-1560-kEpsilonPhitF' into 'master'
BUG: add switch for nu:DphitEff in kEpsilonPhitF (fixes #1560) Closes #1560 See merge request Development/openfoam!329
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -121,9 +121,18 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
kEpsilonPhitFBase(),
|
kEpsilonPhitFBase(),
|
||||||
|
|
||||||
|
includeNu_
|
||||||
|
(
|
||||||
|
Switch::getOrAddToDict
|
||||||
|
(
|
||||||
|
"includeNu",
|
||||||
|
this->coeffDict_,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
),
|
||||||
Cmu_
|
Cmu_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"Cmu",
|
"Cmu",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -132,7 +141,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
Ceps1a_
|
Ceps1a_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"Ceps1a",
|
"Ceps1a",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -141,7 +150,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
Ceps1b_
|
Ceps1b_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"Ceps1b",
|
"Ceps1b",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -150,7 +159,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
Ceps1c_
|
Ceps1c_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"Ceps1c",
|
"Ceps1c",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -159,7 +168,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
Ceps2_
|
Ceps2_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"Ceps2",
|
"Ceps2",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -168,7 +177,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
Cf1_
|
Cf1_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"Cf1",
|
"Cf1",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -177,7 +186,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
Cf2_
|
Cf2_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"Cf2",
|
"Cf2",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -186,7 +195,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
CL_
|
CL_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"CL",
|
"CL",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -195,7 +204,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
Ceta_
|
Ceta_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"Ceta",
|
"Ceta",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -204,7 +213,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
CT_
|
CT_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"CT",
|
"CT",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -213,7 +222,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
sigmaK_
|
sigmaK_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"sigmaK",
|
"sigmaK",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -222,7 +231,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
sigmaEps_
|
sigmaEps_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"sigmaEps",
|
"sigmaEps",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -231,7 +240,7 @@ kEpsilonPhitF<BasicTurbulenceModel>::kEpsilonPhitF
|
|||||||
),
|
),
|
||||||
sigmaPhit_
|
sigmaPhit_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensionedScalar::getOrAddToDict
|
||||||
(
|
(
|
||||||
"sigmaPhit",
|
"sigmaPhit",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
@ -341,6 +350,7 @@ bool kEpsilonPhitF<BasicTurbulenceModel>::read()
|
|||||||
{
|
{
|
||||||
if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
|
if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
|
||||||
{
|
{
|
||||||
|
includeNu_.readIfPresent("includeNu", this->coeffDict());
|
||||||
Cmu_.readIfPresent(this->coeffDict());
|
Cmu_.readIfPresent(this->coeffDict());
|
||||||
Ceps1a_.readIfPresent(this->coeffDict());
|
Ceps1a_.readIfPresent(this->coeffDict());
|
||||||
Ceps1b_.readIfPresent(this->coeffDict());
|
Ceps1b_.readIfPresent(this->coeffDict());
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -34,11 +34,15 @@ Description
|
|||||||
compressible flows.
|
compressible flows.
|
||||||
|
|
||||||
The model is a three-transport-equation linear-eddy-viscosity turbulence
|
The model is a three-transport-equation linear-eddy-viscosity turbulence
|
||||||
closure model alongside an elliptic relaxation equation:
|
closure model alongside an elliptic relaxation equation.
|
||||||
- Turbulent kinetic energy, \c k,
|
|
||||||
- Turbulent kinetic energy dissipation rate, \c epsilon,
|
\heading Input fields
|
||||||
- Normalised wall-normal fluctuating velocity scale, \c phit,
|
\plaintable
|
||||||
- Elliptic relaxation factor, \c f.
|
k | Turbulent kinetic energy [m2/s2]
|
||||||
|
epsilon | Turbulent kinetic energy dissipation rate [m2/s3]
|
||||||
|
phit | Normalised wall-normal fluctuating velocity scale [-]
|
||||||
|
f | Elliptic relaxation factor [1/s]
|
||||||
|
\endplaintable
|
||||||
|
|
||||||
Reference:
|
Reference:
|
||||||
\verbatim
|
\verbatim
|
||||||
@ -53,19 +57,20 @@ Description
|
|||||||
\verbatim
|
\verbatim
|
||||||
kEpsilonPhitFCoeffs
|
kEpsilonPhitFCoeffs
|
||||||
{
|
{
|
||||||
Cmu 0.22, // Turbulent viscosity constant
|
includeNu true; // include nu in (LUU: Eq. 17), see Notes
|
||||||
Ceps1a 1.4, // Model constant for epsilon
|
Cmu 0.22; // Turbulent viscosity constant
|
||||||
Ceps1b 1.0, // Model constant for epsilon
|
Ceps1a 1.4; // Model constant for epsilon
|
||||||
Ceps1c 0.05, // Model constant for epsilon
|
Ceps1b 1.0; // Model constant for epsilon
|
||||||
Ceps2 1.9, // Model constant for epsilon
|
Ceps1c 0.05; // Model constant for epsilon
|
||||||
Cf1 1.4, // Model constant for f
|
Ceps2 1.9; // Model constant for epsilon
|
||||||
Cf2 0.3, // Model constant for f
|
Cf1 1.4; // Model constant for f
|
||||||
CL 0.25, // Model constant for L
|
Cf2 0.3; // Model constant for f
|
||||||
Ceta 110.0, // Model constant for L
|
CL 0.25; // Model constant for L
|
||||||
CT 6.0, // Model constant for T
|
Ceta 110.0; // Model constant for L
|
||||||
sigmaK 1.0, // Turbulent Prandtl number for k
|
CT 6.0; // Model constant for T
|
||||||
sigmaEps 1.3, // Turbulent Prandtl number for epsilon
|
sigmaK 1.0; // Turbulent Prandtl number for k
|
||||||
sigmaPhit 1.0, // Turbulent Prandtl number for phit = sigmaK
|
sigmaEps 1.3; // Turbulent Prandtl number for epsilon
|
||||||
|
sigmaPhit 1.0; // Turbulent Prandtl number for phit = sigmaK
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
@ -74,6 +79,14 @@ Note
|
|||||||
However, the name 'phi' preexisted in OpenFOAM; therefore, this name was
|
However, the name 'phi' preexisted in OpenFOAM; therefore, this name was
|
||||||
replaced by 'phit' herein.
|
replaced by 'phit' herein.
|
||||||
|
|
||||||
|
Including \c nu in \c DphitEff even though it is not present in (LUU:Eq. 17)
|
||||||
|
provided higher level of resemblance to benchmarks for the tests considered,
|
||||||
|
particularly for the peak skin friction (yet, pressure-related predictions
|
||||||
|
were unaffected). Users can switch off \c nu in \c DphitEff by using
|
||||||
|
\c includeNu entry in \c kEpsilonPhitFCoeffs as shown above in order to
|
||||||
|
follow the reference paper thereat. \c includeNu is left \c true by default.
|
||||||
|
See GitLab issue #1560.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
kEpsilonPhitF.C
|
kEpsilonPhitF.C
|
||||||
|
|
||||||
@ -119,6 +132,8 @@ protected:
|
|||||||
|
|
||||||
// Protected Data
|
// Protected Data
|
||||||
|
|
||||||
|
Switch includeNu_;
|
||||||
|
|
||||||
// Model coefficients
|
// Model coefficients
|
||||||
|
|
||||||
dimensionedScalar Cmu_;
|
dimensionedScalar Cmu_;
|
||||||
@ -210,7 +225,7 @@ public:
|
|||||||
//- Re-read model coefficients if they have changed
|
//- Re-read model coefficients if they have changed
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|
||||||
//- Return the effective diffusivity for k
|
//- Return the effective diffusivity for k (LUU:Eq. 3)
|
||||||
tmp<volScalarField> DkEff() const
|
tmp<volScalarField> DkEff() const
|
||||||
{
|
{
|
||||||
return tmp<volScalarField>
|
return tmp<volScalarField>
|
||||||
@ -223,7 +238,7 @@ public:
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the effective diffusivity for epsilon
|
//- Return the effective diffusivity for epsilon (LUU:Eq. 4)
|
||||||
tmp<volScalarField> DepsilonEff() const
|
tmp<volScalarField> DepsilonEff() const
|
||||||
{
|
{
|
||||||
return tmp<volScalarField>
|
return tmp<volScalarField>
|
||||||
@ -236,17 +251,18 @@ public:
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the effective diffusivity for phit
|
//- Return the effective diffusivity for phit (LUU:Eq. 17)
|
||||||
tmp<volScalarField> DphitEff() const
|
tmp<volScalarField> DphitEff() const
|
||||||
{
|
{
|
||||||
return tmp<volScalarField>
|
auto tfld =
|
||||||
(
|
tmp<volScalarField>::New("DphitEff", this->nut_/sigmaPhit_);
|
||||||
new volScalarField
|
|
||||||
(
|
if (includeNu_)
|
||||||
"DphitEff",
|
{
|
||||||
this->nut_/sigmaPhit_ + this->nu()
|
tfld.ref() += this->nu();
|
||||||
)
|
}
|
||||||
);
|
|
||||||
|
return tfld;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the turbulent kinetic energy field
|
//- Return the turbulent kinetic energy field
|
||||||
|
|||||||
Reference in New Issue
Block a user