mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Spalart-Allmaras model - added user switch for ft2 term (default = off)
This commit is contained in:
@ -72,10 +72,26 @@ tmp<volScalarField> SpalartAllmarasBase<BasicEddyViscosityModel>::ft2
|
||||
(
|
||||
const volScalarField& chi
|
||||
) const
|
||||
{
|
||||
if (ft2_)
|
||||
{
|
||||
return Ct3_*exp(-Ct4_*sqr(chi));
|
||||
}
|
||||
|
||||
return tmp<volScalarField>::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"ft2",
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ
|
||||
),
|
||||
this->mesh_,
|
||||
dimensionedScalar(dimless, Zero)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class BasicEddyViscosityModel>
|
||||
tmp<volScalarField> SpalartAllmarasBase<BasicEddyViscosityModel>::Omega
|
||||
@ -268,6 +284,15 @@ SpalartAllmarasBase<BasicEddyViscosityModel>::SpalartAllmarasBase
|
||||
0.07
|
||||
)
|
||||
),
|
||||
ft2_
|
||||
(
|
||||
Switch::getOrAddToDict
|
||||
(
|
||||
"ft2",
|
||||
this->coeffDict_,
|
||||
false
|
||||
)
|
||||
),
|
||||
Ct3_
|
||||
(
|
||||
dimensioned<scalar>::getOrAddToDict
|
||||
@ -302,7 +327,7 @@ SpalartAllmarasBase<BasicEddyViscosityModel>::SpalartAllmarasBase
|
||||
|
||||
y_(wallDist::New(this->mesh_).y())
|
||||
{
|
||||
if (mag(Ct3_.value()) > SMALL)
|
||||
if (ft2_)
|
||||
{
|
||||
Info<< "ft2 term: active" << nl;
|
||||
}
|
||||
@ -333,6 +358,7 @@ bool SpalartAllmarasBase<BasicEddyViscosityModel>::read()
|
||||
|
||||
ck_.readIfPresent(this->coeffDict());
|
||||
|
||||
ft2_.readIfPresent("ft2", this->coeffDict());
|
||||
Ct3_.readIfPresent(this->coeffDict());
|
||||
Ct4_.readIfPresent(this->coeffDict());
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ protected:
|
||||
dimensionedScalar Cs_;
|
||||
dimensionedScalar ck_;
|
||||
|
||||
|
||||
Switch ft2_;
|
||||
dimensionedScalar Ct3_;
|
||||
dimensionedScalar Ct4_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user