mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Turbulence - moved DES models to DES directory
SpalartAllmarasDES now derived from DESModel class
This commit is contained in:
@ -68,7 +68,7 @@ tmp<volScalarField> SpalartAllmarasDDES<BasicTurbulenceModel>::fd
|
|||||||
const volScalarField& magGradU
|
const volScalarField& magGradU
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return 1 - tanh(pow3(8*rd(magGradU)));
|
return 1 - tanh(pow(fdFactor_*rd(magGradU), fdExponent_));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -120,10 +120,46 @@ SpalartAllmarasDDES<BasicTurbulenceModel>::SpalartAllmarasDDES
|
|||||||
phi,
|
phi,
|
||||||
transport,
|
transport,
|
||||||
propertiesName
|
propertiesName
|
||||||
|
),
|
||||||
|
fdFactor_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"fdFactor",
|
||||||
|
this->coeffDict_,
|
||||||
|
8
|
||||||
|
)
|
||||||
|
),
|
||||||
|
fdExponent_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"fdExponent",
|
||||||
|
this->coeffDict_,
|
||||||
|
3
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
bool SpalartAllmarasDDES<BasicTurbulenceModel>::read()
|
||||||
|
{
|
||||||
|
if (SpalartAllmarasDES<BasicTurbulenceModel>::read())
|
||||||
|
{
|
||||||
|
fdFactor_.readIfPresent(this->coeffDict());
|
||||||
|
fdExponent_.readIfPresent(this->coeffDict());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace LESModels
|
} // End namespace LESModels
|
||||||
@ -79,6 +79,15 @@ class SpalartAllmarasDDES
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
//- fd function pre-factor
|
||||||
|
dimensionedScalar fdFactor_;
|
||||||
|
|
||||||
|
//- fd function exponent
|
||||||
|
dimensionedScalar fdExponent_;
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- Length scale
|
//- Length scale
|
||||||
@ -120,6 +129,12 @@ public:
|
|||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~SpalartAllmarasDDES()
|
virtual ~SpalartAllmarasDDES()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Read from dictionary
|
||||||
|
virtual bool read();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES
|
|||||||
const word& type
|
const word& type
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
LESeddyViscosity<BasicTurbulenceModel>
|
DESModel<BasicTurbulenceModel>
|
||||||
(
|
(
|
||||||
type,
|
type,
|
||||||
alpha,
|
alpha,
|
||||||
@ -329,7 +329,7 @@ SpalartAllmarasDES<BasicTurbulenceModel>::SpalartAllmarasDES
|
|||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
bool SpalartAllmarasDES<BasicTurbulenceModel>::read()
|
bool SpalartAllmarasDES<BasicTurbulenceModel>::read()
|
||||||
{
|
{
|
||||||
if (LESeddyViscosity<BasicTurbulenceModel>::read())
|
if (DESModel<BasicTurbulenceModel>::read())
|
||||||
{
|
{
|
||||||
sigmaNut_.readIfPresent(this->coeffDict());
|
sigmaNut_.readIfPresent(this->coeffDict());
|
||||||
kappa_.readIfPresent(*this);
|
kappa_.readIfPresent(*this);
|
||||||
@ -414,7 +414,7 @@ void SpalartAllmarasDES<BasicTurbulenceModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
|
|
||||||
LESeddyViscosity<BasicTurbulenceModel>::correct();
|
DESModel<BasicTurbulenceModel>::correct();
|
||||||
|
|
||||||
const volScalarField chi(this->chi());
|
const volScalarField chi(this->chi());
|
||||||
const volScalarField fv1(this->fv1(chi));
|
const volScalarField fv1(this->fv1(chi));
|
||||||
@ -47,7 +47,7 @@ SourceFiles
|
|||||||
#ifndef SpalartAllmarasDES_H
|
#ifndef SpalartAllmarasDES_H
|
||||||
#define SpalartAllmarasDES_H
|
#define SpalartAllmarasDES_H
|
||||||
|
|
||||||
#include "LESeddyViscosity.H"
|
#include "DESModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ namespace LESModels
|
|||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
class SpalartAllmarasDES
|
class SpalartAllmarasDES
|
||||||
:
|
:
|
||||||
public LESeddyViscosity<BasicTurbulenceModel>
|
public DESModel<BasicTurbulenceModel>
|
||||||
{
|
{
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
Reference in New Issue
Block a user