Commit 119f1fdc authored by Henry's avatar Henry
Browse files

dynSmagorinsky renamed homogeneousDynSmagorinsky

to avoid the continuing confusion about this model
parent 4ebe912f
......@@ -15,7 +15,7 @@ oneEqEddy/oneEqEddy.C
dynOneEqEddy/dynOneEqEddy.C
locDynOneEqEddy/locDynOneEqEddy.C
Smagorinsky/Smagorinsky.C
dynSmagorinsky/dynSmagorinsky.C
homogeneousDynSmagorinsky/homogeneousDynSmagorinsky.C
LRRDiffStress/LRRDiffStress.C
DeardorffDiffStress/DeardorffDiffStress.C
spectEddyVisc/spectEddyVisc.C
......@@ -23,7 +23,6 @@ dynLagrangian/dynLagrangian.C
scaleSimilarity/scaleSimilarity.C
mixedSmagorinsky/mixedSmagorinsky.C
dynMixedSmagorinsky/dynMixedSmagorinsky.C
/*Smagorinsky2/Smagorinsky2.C*/
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "dynMixedSmagorinsky.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace incompressible
{
namespace LESModels
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(dynMixedSmagorinsky, 0);
addToRunTimeSelectionTable(LESModel, dynMixedSmagorinsky, dictionary);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
dynMixedSmagorinsky::dynMixedSmagorinsky
(
const volVectorField& U,
const surfaceScalarField& phi,
transportModel& transport,
const word& turbulenceModelName,
const word& modelName
)
:
LESModel(modelName, U, phi, transport, turbulenceModelName),
scaleSimilarity(U, phi, transport),
dynSmagorinsky(U, phi, transport)
{
printCoeffs();
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<volScalarField> dynMixedSmagorinsky::k() const
{
return
(
scaleSimilarity::k()
+ dynSmagorinsky::k()
);
}
tmp<volScalarField> dynMixedSmagorinsky::epsilon() const
{
return
(
scaleSimilarity::epsilon()
+ dynSmagorinsky::epsilon()
);
}
tmp<volSymmTensorField> dynMixedSmagorinsky::B() const
{
return
(
scaleSimilarity::B()
+ dynSmagorinsky::B()
);
}
tmp<volSymmTensorField> dynMixedSmagorinsky::devBeff() const
{
return
(
scaleSimilarity::devBeff()
+ dynSmagorinsky::devBeff()
);
}
tmp<fvVectorMatrix> dynMixedSmagorinsky::divDevBeff(volVectorField& U) const
{
return
(
scaleSimilarity::divDevBeff(U)
+ dynSmagorinsky::divDevBeff(U)
);
}
void dynMixedSmagorinsky::correct(const tmp<volTensorField>& gradU)
{
scaleSimilarity::correct(gradU);
dynSmagorinsky::correct(gradU());
}
bool dynMixedSmagorinsky::read()
{
if (LESModel::read())
{
scaleSimilarity::read();
dynSmagorinsky::read();
return true;
}
else
{
return false;
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace LESModels
} // namespace incompressible
} // End namespace Foam
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::incompressible::LESModels::dynMixedSmagorinsky
Description
The Mixed Isochoric Smagorinsky Model for incompressible flows.
The mixed model is a linear combination of an eddy viscosity model
with a scale similarity model.
\verbatim
B = (L + C) + R = (F(v*v) - F(v)*F(v)) + R
\endverbatim
The algebraic eddy viscosity SGS model is founded on the assumption
that local equilibrium prevails, hence
\verbatim
R = 2/3*rho*k*I - 2*nuEff*dev(D)
where
k = cI*delta^2*||D||^2
nuEff = ck*sqrt(k)*delta + nu
\endverbatim
The Leonard and cross contributions are incorporated
by adding,
\verbatim
+ div(((filter(U*U) - filter(U)*filter(U)) -
0.333*I*tr(filter(U*U) - filter(U)*filter(U))))
+ div((filter(U*epsilon) - filter(U)*filter(epsilon)))
\endverbatim
to the rhs. of the equations. This version implements filtering to
evaluate the coefficients in the model.
SourceFiles
dynMixedSmagorinsky.C
\*---------------------------------------------------------------------------*/
#ifndef dynMixedSmagorinsky_H
#define dynMixedSmagorinsky_H
#include "dynSmagorinsky.H"
#include "scaleSimilarity.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace incompressible
{
namespace LESModels
{
/*---------------------------------------------------------------------------*\
Class dynMixedSmagorinsky Declaration
\*---------------------------------------------------------------------------*/
class dynMixedSmagorinsky
:
public scaleSimilarity,
public dynSmagorinsky
{
// Private Member Functions
// Disallow default bitwise copy construct and assignment
dynMixedSmagorinsky(const dynMixedSmagorinsky&);
dynMixedSmagorinsky& operator=(const dynMixedSmagorinsky&);
public:
//- Runtime type information
TypeName("dynMixedSmagorinsky");
// Constructors
//- Constructors from components
dynMixedSmagorinsky
(
const volVectorField& U,
const surfaceScalarField& phi,
transportModel& transport,
const word& turbulenceModelName = turbulenceModel::typeName,
const word& modelName = typeName
);
//- Destructor
~dynMixedSmagorinsky()
{}
// Member Functions
//- Return SGS kinetic energy
tmp<volScalarField> k() const;
//- Return sub-grid disipation rate
tmp<volScalarField> epsilon() const;
//- Return the sub-grid stress tensor.
tmp<volSymmTensorField> B() const;
//- Return the effective sub-grid turbulence stress tensor
// including the laminar stress
tmp<volSymmTensorField> devBeff() const;
//- Returns div(B).
// This is the additional term due to the filtering of the NSE.
tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
//- Correct Eddy-Viscosity and related properties
void correct(const tmp<volTensorField>& gradU);
//- Read LESProperties dictionary
bool read();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace LESModels
} // End namespace incompressible
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
......@@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "dynSmagorinsky.H"
#include "homogeneousDynSmagorinsky.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -37,19 +37,19 @@ namespace LESModels
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(dynSmagorinsky, 0);
addToRunTimeSelectionTable(LESModel, dynSmagorinsky, dictionary);
defineTypeNameAndDebug(homogeneousDynSmagorinsky, 0);
addToRunTimeSelectionTable(LESModel, homogeneousDynSmagorinsky, dictionary);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void dynSmagorinsky::updateSubGridScaleFields(const volSymmTensorField& D)
void homogeneousDynSmagorinsky::updateSubGridScaleFields(const volSymmTensorField& D)
{
nuSgs_ = cD(D)*sqr(delta())*sqrt(magSqr(D));
nuSgs_.correctBoundaryConditions();
}
dimensionedScalar dynSmagorinsky::cD(const volSymmTensorField& D) const
dimensionedScalar homogeneousDynSmagorinsky::cD(const volSymmTensorField& D) const
{
const volSymmTensorField MM
(
......@@ -72,7 +72,7 @@ dimensionedScalar dynSmagorinsky::cD(const volSymmTensorField& D) const
}
dimensionedScalar dynSmagorinsky::cI(const volSymmTensorField& D) const
dimensionedScalar homogeneousDynSmagorinsky::cI(const volSymmTensorField& D) const
{
const volScalarField mm
(
......@@ -97,7 +97,7 @@ dimensionedScalar dynSmagorinsky::cI(const volSymmTensorField& D) const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
dynSmagorinsky::dynSmagorinsky
homogeneousDynSmagorinsky::homogeneousDynSmagorinsky
(
const volVectorField& U,
const surfaceScalarField& phi,
......@@ -135,7 +135,7 @@ dynSmagorinsky::dynSmagorinsky
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void dynSmagorinsky::correct(const tmp<volTensorField>& gradU)
void homogeneousDynSmagorinsky::correct(const tmp<volTensorField>& gradU)
{
LESModel::correct(gradU);
......@@ -148,7 +148,7 @@ void dynSmagorinsky::correct(const tmp<volTensorField>& gradU)
}
bool dynSmagorinsky::read()
bool homogeneousDynSmagorinsky::read()
{
if (GenEddyVisc::read())
{
......
......@@ -22,10 +22,10 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::incompressible::LESModels::dynSmagorinsky
Foam::incompressible::LESModels::homogeneousDynSmagorinsky
Description
The Isochoric dynamic Smagorinsky Model for incompressible flows.
The Isochoric homogeneous dynamic Smagorinsky Model for incompressible flows.
Algebraic eddy viscosity SGS model founded on the assumption that
local equilibrium prevails.
......@@ -55,15 +55,18 @@ Description
m = delta^2*(4*||F(D)||^2 - F(||D||^2))
L = dev(F(U*U) - F(U)*F(U))
M = delta^2*(F(||D||*dev(D)) - 4*||F(D)||*F(dev(D)))
The averaging <...> is over the whole domain, i.e. homogeneous turbulence
is assumed
\endverbatim
SourceFiles
dynSmagorinsky.C
homogeneousDynSmagorinsky.C
\*---------------------------------------------------------------------------*/
#ifndef dynSmagorinsky_H
#define dynSmagorinsky_H
#ifndef homogeneousDynSmagorinsky_H
#define homogeneousDynSmagorinsky_H
#include "Smagorinsky.H"
#include "LESfilter.H"
......@@ -78,10 +81,10 @@ namespace LESModels
{
/*---------------------------------------------------------------------------*\
Class dynSmagorinsky Declaration
Class homogeneousDynSmagorinsky Declaration
\*---------------------------------------------------------------------------*/
class dynSmagorinsky
class homogeneousDynSmagorinsky
:
public GenEddyVisc
{
......@@ -103,19 +106,19 @@ class dynSmagorinsky
dimensionedScalar cI(const volSymmTensorField& D) const;
// Disallow default bitwise copy construct and assignment
dynSmagorinsky(const dynSmagorinsky&);
dynSmagorinsky& operator=(const dynSmagorinsky&);
homogeneousDynSmagorinsky(const homogeneousDynSmagorinsky&);
homogeneousDynSmagorinsky& operator=(const homogeneousDynSmagorinsky&);
public:
//- Runtime type information
TypeName("dynSmagorinsky");
TypeName("homogeneousDynSmagorinsky");
// Constructors
//- Construct from components
dynSmagorinsky
homogeneousDynSmagorinsky
(
const volVectorField& U,
const surfaceScalarField& phi,
......@@ -126,7 +129,7 @@ public:
//- Destructor
virtual ~dynSmagorinsky()
virtual ~homogeneousDynSmagorinsky()
{}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment