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:
@ -73,7 +73,23 @@ tmp<volScalarField> SpalartAllmarasBase<BasicEddyViscosityModel>::ft2
|
|||||||
const volScalarField& chi
|
const volScalarField& chi
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
if (ft2_)
|
||||||
|
{
|
||||||
return Ct3_*exp(-Ct4_*sqr(chi));
|
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)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -268,6 +284,15 @@ SpalartAllmarasBase<BasicEddyViscosityModel>::SpalartAllmarasBase
|
|||||||
0.07
|
0.07
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
ft2_
|
||||||
|
(
|
||||||
|
Switch::getOrAddToDict
|
||||||
|
(
|
||||||
|
"ft2",
|
||||||
|
this->coeffDict_,
|
||||||
|
false
|
||||||
|
)
|
||||||
|
),
|
||||||
Ct3_
|
Ct3_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensioned<scalar>::getOrAddToDict
|
||||||
@ -302,13 +327,13 @@ SpalartAllmarasBase<BasicEddyViscosityModel>::SpalartAllmarasBase
|
|||||||
|
|
||||||
y_(wallDist::New(this->mesh_).y())
|
y_(wallDist::New(this->mesh_).y())
|
||||||
{
|
{
|
||||||
if (mag(Ct3_.value()) > SMALL)
|
if (ft2_)
|
||||||
{
|
{
|
||||||
Info<< " ft2 term: active" << nl;
|
Info<< "ft2 term: active" << nl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< " ft2 term: inactive" << nl;
|
Info<< "ft2 term: inactive" << nl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,6 +358,7 @@ bool SpalartAllmarasBase<BasicEddyViscosityModel>::read()
|
|||||||
|
|
||||||
ck_.readIfPresent(this->coeffDict());
|
ck_.readIfPresent(this->coeffDict());
|
||||||
|
|
||||||
|
ft2_.readIfPresent("ft2", this->coeffDict());
|
||||||
Ct3_.readIfPresent(this->coeffDict());
|
Ct3_.readIfPresent(this->coeffDict());
|
||||||
Ct4_.readIfPresent(this->coeffDict());
|
Ct4_.readIfPresent(this->coeffDict());
|
||||||
|
|
||||||
|
|||||||
@ -91,7 +91,7 @@ protected:
|
|||||||
dimensionedScalar Cs_;
|
dimensionedScalar Cs_;
|
||||||
dimensionedScalar ck_;
|
dimensionedScalar ck_;
|
||||||
|
|
||||||
|
Switch ft2_;
|
||||||
dimensionedScalar Ct3_;
|
dimensionedScalar Ct3_;
|
||||||
dimensionedScalar Ct4_;
|
dimensionedScalar Ct4_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user