mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Spalart-Allmaras DES, DDES and IDDES model updates
Included option to use the low Reynolds number correction, with a
default value of 'on'. Further details can be found in the reference:
Spalart, P. R., Deck, S., Shur, M.L., Squires, K.D., Strelets, M.Kh,
Travin, A. (2006).
A new version of detached-eddy simulation, resistant to ambiguous grid
densities.
Theor. Comput. Fluid Dyn., 20, 181-195.
Set using the entry:
lowReCorrection on; // off
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -88,7 +88,7 @@ tmp<volScalarField> SpalartAllmarasDDES<BasicTurbulenceModel>::dTilda
|
|||||||
- fd(mag(gradU))
|
- fd(mag(gradU))
|
||||||
*max
|
*max
|
||||||
(
|
(
|
||||||
this->y_ - this->CDES_*this->delta(),
|
this->y_ - this->psi(chi, fv1)*this->CDES_*this->delta(),
|
||||||
dimensionedScalar("zero", dimLength, 0)
|
dimensionedScalar("zero", dimLength, 0)
|
||||||
),
|
),
|
||||||
dimensionedScalar("small", dimLength, SMALL)
|
dimensionedScalar("small", dimLength, SMALL)
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -63,6 +63,16 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::fv2
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::ft2
|
||||||
|
(
|
||||||
|
const volScalarField& chi
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return Ct3_*exp(-Ct4_*sqr(chi));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::S
|
tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::S
|
||||||
(
|
(
|
||||||
@ -148,6 +158,53 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::fw
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::psi
|
||||||
|
(
|
||||||
|
const volScalarField& chi,
|
||||||
|
const volScalarField& fv1
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> tpsi
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
type() + ":psi",
|
||||||
|
this->time().timeName(),
|
||||||
|
this->mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
this->mesh(),
|
||||||
|
dimensionedScalar("one", dimless, 1)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (lowReCorrection_)
|
||||||
|
{
|
||||||
|
volScalarField& psi = tpsi();
|
||||||
|
|
||||||
|
const volScalarField fv2(this->fv2(chi, fv1));
|
||||||
|
const volScalarField ft2(this->ft2(chi));
|
||||||
|
|
||||||
|
psi =
|
||||||
|
sqrt
|
||||||
|
(
|
||||||
|
min
|
||||||
|
(
|
||||||
|
scalar(100),
|
||||||
|
(1 - Cb1_/(Cw1_*sqr(kappa_)*fwStar_)*(ft2 + (1 - ft2)*fv2))
|
||||||
|
/max(SMALL, (fv1*max(1e-10, 1 - ft2)))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tpsi;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::dTilda
|
tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::dTilda
|
||||||
(
|
(
|
||||||
@ -156,7 +213,7 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::dTilda
|
|||||||
const volTensorField& gradU
|
const volTensorField& gradU
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
tmp<volScalarField> tdTilda(CDES_*this->delta());
|
tmp<volScalarField> tdTilda(psi(chi, fv1)*CDES_*this->delta());
|
||||||
min(tdTilda().dimensionedInternalField(), tdTilda(), y_);
|
min(tdTilda().dimensionedInternalField(), tdTilda(), y_);
|
||||||
return tdTilda;
|
return tdTilda;
|
||||||
}
|
}
|
||||||
@ -300,6 +357,42 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES
|
|||||||
0.07
|
0.07
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
lowReCorrection_
|
||||||
|
(
|
||||||
|
Switch::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"lowReCorrection",
|
||||||
|
this->coeffDict_,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Ct3_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"Ct3",
|
||||||
|
this->coeffDict_,
|
||||||
|
1.2
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Ct4_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"Ct4",
|
||||||
|
this->coeffDict_,
|
||||||
|
0.5
|
||||||
|
)
|
||||||
|
),
|
||||||
|
fwStar_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"fwStar",
|
||||||
|
this->coeffDict_,
|
||||||
|
0.424
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
nuTilda_
|
nuTilda_
|
||||||
(
|
(
|
||||||
@ -345,6 +438,11 @@ bool SpalartAllmarasDES<BasicTurbulenceModel>::read()
|
|||||||
CDES_.readIfPresent(this->coeffDict());
|
CDES_.readIfPresent(this->coeffDict());
|
||||||
ck_.readIfPresent(this->coeffDict());
|
ck_.readIfPresent(this->coeffDict());
|
||||||
|
|
||||||
|
lowReCorrection_.readIfPresent("lowReCorrection", this->coeffDict());
|
||||||
|
Ct3_.readIfPresent(this->coeffDict());
|
||||||
|
Ct4_.readIfPresent(this->coeffDict());
|
||||||
|
fwStar_.readIfPresent(this->coeffDict());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -418,6 +516,7 @@ void SpalartAllmarasDES<BasicTurbulenceModel>::correct()
|
|||||||
|
|
||||||
const volScalarField chi(this->chi());
|
const volScalarField chi(this->chi());
|
||||||
const volScalarField fv1(this->fv1(chi));
|
const volScalarField fv1(this->fv1(chi));
|
||||||
|
const volScalarField ft2(this->ft2(chi));
|
||||||
|
|
||||||
tmp<volTensorField> tgradU = fvc::grad(U);
|
tmp<volTensorField> tgradU = fvc::grad(U);
|
||||||
const volScalarField Omega(this->Omega(tgradU()));
|
const volScalarField Omega(this->Omega(tgradU()));
|
||||||
@ -431,10 +530,11 @@ void SpalartAllmarasDES<BasicTurbulenceModel>::correct()
|
|||||||
- fvm::laplacian(alpha*rho*DnuTildaEff(), nuTilda_)
|
- fvm::laplacian(alpha*rho*DnuTildaEff(), nuTilda_)
|
||||||
- Cb2_/sigmaNut_*alpha*rho*magSqr(fvc::grad(nuTilda_))
|
- Cb2_/sigmaNut_*alpha*rho*magSqr(fvc::grad(nuTilda_))
|
||||||
==
|
==
|
||||||
Cb1_*alpha*rho*Stilda*nuTilda_
|
Cb1_*alpha*rho*Stilda*nuTilda_*(scalar(1) - ft2)
|
||||||
- fvm::Sp
|
- fvm::Sp
|
||||||
(
|
(
|
||||||
Cw1_*alpha*rho*fw(Stilda, dTilda)*nuTilda_/sqr(dTilda),
|
(Cw1_*fw(Stilda, dTilda) - Cb1_/sqr(kappa_)*ft2)
|
||||||
|
*alpha*rho*nuTilda_/sqr(dTilda),
|
||||||
nuTilda_
|
nuTilda_
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -39,6 +39,15 @@ Description
|
|||||||
Advances in DNS/LES, 1, 4-8.
|
Advances in DNS/LES, 1, 4-8.
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
|
Including the low Reynolds number correction documented in
|
||||||
|
\verbatim
|
||||||
|
Spalart, P. R., Deck, S., Shur, M.L., Squires, K.D., Strelets, M.Kh,
|
||||||
|
Travin, A. (2006).
|
||||||
|
A new version of detached-eddy simulation, resistant to ambiguous grid
|
||||||
|
densities.
|
||||||
|
Theor. Comput. Fluid Dyn., 20, 181-195.
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
SpalartAllmarasDES.C
|
SpalartAllmarasDES.C
|
||||||
|
|
||||||
@ -91,6 +100,15 @@ protected:
|
|||||||
dimensionedScalar CDES_;
|
dimensionedScalar CDES_;
|
||||||
dimensionedScalar ck_;
|
dimensionedScalar ck_;
|
||||||
|
|
||||||
|
|
||||||
|
// Low Reynolds number correction
|
||||||
|
|
||||||
|
Switch lowReCorrection_;
|
||||||
|
dimensionedScalar Ct3_;
|
||||||
|
dimensionedScalar Ct4_;
|
||||||
|
dimensionedScalar fwStar_;
|
||||||
|
|
||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
|
|
||||||
volScalarField nuTilda_;
|
volScalarField nuTilda_;
|
||||||
@ -113,6 +131,8 @@ protected:
|
|||||||
const volScalarField& fv1
|
const volScalarField& fv1
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
tmp<volScalarField> ft2(const volScalarField& chi) const;
|
||||||
|
|
||||||
tmp<volScalarField> S(const volTensorField& gradU) const;
|
tmp<volScalarField> S(const volTensorField& gradU) const;
|
||||||
|
|
||||||
tmp<volScalarField> Omega(const volTensorField& gradU) const;
|
tmp<volScalarField> Omega(const volTensorField& gradU) const;
|
||||||
@ -138,6 +158,12 @@ protected:
|
|||||||
const volScalarField& dTilda
|
const volScalarField& dTilda
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
tmp<volScalarField> psi
|
||||||
|
(
|
||||||
|
const volScalarField& chi,
|
||||||
|
const volScalarField& fv1
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Length scale
|
//- Length scale
|
||||||
virtual tmp<volScalarField> dTilda
|
virtual tmp<volScalarField> dTilda
|
||||||
(
|
(
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -140,7 +140,7 @@ tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::dTilda
|
|||||||
(
|
(
|
||||||
dimensionedScalar("SMALL", dimLength, SMALL),
|
dimensionedScalar("SMALL", dimLength, SMALL),
|
||||||
fHyb*(1 + fRestore*Psi)*this->y_
|
fHyb*(1 + fRestore*Psi)*this->y_
|
||||||
+ (1 - fHyb)*this->CDES_*Psi*this->delta()
|
+ (1 - fHyb)*this->psi(chi, fv1)*this->CDES_*Psi*this->delta()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user