Loading...
Searching...
No Matches
Smagorinsky< BasicTurbulenceModel > Class Template Reference

The Smagorinsky SGS model. More...

#include <Smagorinsky.H>

Inheritance diagram for Smagorinsky< BasicTurbulenceModel >:
Collaboration diagram for Smagorinsky< BasicTurbulenceModel >:

Public Types

typedef BasicTurbulenceModel::alphaField alphaField
typedef BasicTurbulenceModel::rhoField rhoField
typedef BasicTurbulenceModel::transportModel transportModel
Public Types inherited from LESeddyViscosity< BasicTurbulenceModel >
typedef BasicTurbulenceModel::alphaField alphaField
typedef BasicTurbulenceModel::rhoField rhoField
typedef BasicTurbulenceModel::transportModel transportModel
Public Types inherited from eddyViscosity< LESModel< BasicTurbulenceModel > >
typedef BasicTurbulenceModel::alphaField alphaField
typedef BasicTurbulenceModel::rhoField rhoField
typedef BasicTurbulenceModel::transportModel transportModel
Public Types inherited from linearViscousStress< BasicTurbulenceModel >
typedef BasicTurbulenceModel::alphaField alphaField
typedef BasicTurbulenceModel::rhoField rhoField
typedef BasicTurbulenceModel::transportModel transportModel

Public Member Functions

 TypeName ("Smagorinsky")
 Runtime type information.
 Smagorinsky (const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName=turbulenceModel::propertiesName, const word &type=typeName)
 Construct from components.
virtual ~Smagorinsky ()=default
 Destructor.
virtual bool read ()
 Read model coefficients if they have changed.
virtual tmp< volScalarFieldk () const
 Return SGS kinetic energy.
virtual void correct ()
 Correct Eddy-Viscosity and related properties.
Public Member Functions inherited from LESeddyViscosity< BasicTurbulenceModel >
 LESeddyViscosity (const word &type, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName=turbulenceModel::propertiesName)
 Construct from components.
virtual ~LESeddyViscosity ()=default
 Destructor.
Public Member Functions inherited from eddyViscosity< LESModel< BasicTurbulenceModel > >
 eddyViscosity (const word &modelName, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName)
 Construct from components.
virtual ~eddyViscosity ()=default
 Destructor.
virtual tmp< volScalarFieldnut () const
 Return the turbulence viscosity.
virtual tmp< volSymmTensorFieldR () const
 Return the Reynolds stress tensor.
virtual void validate ()
 Validate the turbulence fields after construction.
Public Member Functions inherited from linearViscousStress< BasicTurbulenceModel >
 linearViscousStress (const word &modelName, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName)
 Construct from components.
virtual ~linearViscousStress ()=default
 Destructor.
virtual tmp< volSymmTensorFielddevRhoReff () const
 Return the effective stress tensor.
virtual tmp< volSymmTensorFielddevRhoReff (const volVectorField &U) const
 Return the effective stress tensor based on a given velocity field.
virtual tmp< fvVectorMatrixdivDevRhoReff (volVectorField &U) const
 Return the source term for the momentum equation.
virtual tmp< fvVectorMatrixdivDevRhoReff (const volScalarField &rho, volVectorField &U) const
 Return the source term for the momentum equation.

Protected Member Functions

tmp< volScalarFieldk (const tmp< volTensorField > &gradU) const
 Return SGS kinetic energy.
virtual void correctNut ()
 Update the SGS eddy viscosity.

Protected Attributes

dimensionedScalar Ck_
Protected Attributes inherited from eddyViscosity< LESModel< BasicTurbulenceModel > >
volScalarField nut_

Detailed Description

template<class BasicTurbulenceModel>
class Foam::LESModels::Smagorinsky< BasicTurbulenceModel >

The Smagorinsky SGS model.

Reference:

    Smagorinsky, J. (1963).
    General circulation experiments with the primitive equations: I.
    The basic experiment*.
    Monthly weather review, 91(3), 99-164.

The form of the Smagorinsky model implemented is obtained from the k-equation model assuming local equilibrium which provides estimates of both k and epsilon separate from the sub-grid scale viscosity:

    B = 2/3*k*I - 2*nuSgs*dev(D)

where

    D = symm(grad(U));
    k from D:B + Ce*k^3/2/delta = 0
    nuSgs = Ck*sqrt(k)*delta

The default model coefficients are

    SmagorinskyCoeffs
    {
        Ck                  0.094;
        Ce                  1.048;
    }
See also
Foam::LESModels::kEqn
Source files

Definition at line 88 of file Smagorinsky.H.

Member Typedef Documentation

◆ alphaField

template<class BasicTurbulenceModel>
typedef BasicTurbulenceModel::alphaField alphaField

Definition at line 129 of file Smagorinsky.H.

◆ rhoField

template<class BasicTurbulenceModel>
typedef BasicTurbulenceModel::rhoField rhoField

Definition at line 130 of file Smagorinsky.H.

◆ transportModel

template<class BasicTurbulenceModel>
typedef BasicTurbulenceModel::transportModel transportModel

Definition at line 131 of file Smagorinsky.H.

Constructor & Destructor Documentation

◆ Smagorinsky()

template<class BasicTurbulenceModel>
Smagorinsky ( const alphaField & alpha,
const rhoField & rho,
const volVectorField & U,
const surfaceScalarField & alphaRhoPhi,
const surfaceScalarField & phi,
const transportModel & transport,
const word & propertiesName = turbulenceModel::propertiesName,
const word & type = typeName )

Construct from components.

Definition at line 78 of file Smagorinsky.C.

References alpha, Ck_, Foam::GlobalIOList< Tuple2< scalar, vector > >::typeName, phi, rho, and U.

◆ ~Smagorinsky()

template<class BasicTurbulenceModel>
virtual ~Smagorinsky ( )
virtualdefault

Destructor.

Member Function Documentation

◆ k() [1/2]

template<class BasicTurbulenceModel>
tmp< volScalarField > k ( const tmp< volTensorField > & gradU) const
protected

Return SGS kinetic energy.

calculated from the given velocity gradient

Definition at line 35 of file Smagorinsky.C.

References b, Ck_, D, delta, Foam::dev(), IOobject::groupName(), Foam::sqr(), Foam::sqrt(), Foam::symm(), and Foam::tr().

Referenced by SmagorinskyZhang< BasicTurbulenceModel >::correctNut().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctNut()

template<class BasicTurbulenceModel>
void correctNut ( )
protectedvirtual

Update the SGS eddy viscosity.

Implements eddyViscosity< LESModel< BasicTurbulenceModel > >.

Reimplemented in SmagorinskyZhang< BasicTurbulenceModel >.

Definition at line 63 of file Smagorinsky.C.

References Ck_, optionList::correct(), delta, Foam::fvc::grad(), k, options::New(), eddyViscosity< LESModel< BasicTurbulenceModel > >::nut_, and Foam::sqrt().

Referenced by correct().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeName()

template<class BasicTurbulenceModel>
TypeName ( "Smagorinsky< BasicTurbulenceModel >" )

Runtime type information.

◆ read()

template<class BasicTurbulenceModel>
bool read ( )
virtual

Read model coefficients if they have changed.

Reimplemented from LESeddyViscosity< BasicTurbulenceModel >.

Reimplemented in SmagorinskyZhang< BasicTurbulenceModel >.

Definition at line 122 of file Smagorinsky.C.

References Ck_, and LESeddyViscosity< BasicTurbulenceModel >::read().

Referenced by SmagorinskyZhang< BasicTurbulenceModel >::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ k() [2/2]

template<class BasicTurbulenceModel>
virtual tmp< volScalarField > k ( ) const
inlinevirtual

Return SGS kinetic energy.

Implements eddyViscosity< LESModel< BasicTurbulenceModel > >.

Definition at line 174 of file Smagorinsky.H.

Referenced by Smagorinsky< Foam::EddyDiffusivity< Foam::fluidThermoCompressibleTurbulenceModel > >::k().

Here is the caller graph for this function:

◆ correct()

template<class BasicTurbulenceModel>
void correct ( )
virtual

Correct Eddy-Viscosity and related properties.

Implements eddyViscosity< LESModel< BasicTurbulenceModel > >.

Definition at line 136 of file Smagorinsky.C.

References linearViscousStress< BasicTurbulenceModel >::correct(), and correctNut().

Here is the call graph for this function:

Member Data Documentation

◆ Ck_

template<class BasicTurbulenceModel>
dimensionedScalar Ck_
protected

The documentation for this class was generated from the following files:
  • src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.H
  • src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C