1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 Foam::compressible::LESModels::Smagorinsky
28 The choric Smagorinsky Model for compressible flows.
30 Algebraic eddy viscosity SGS model founded on the assumption that
31 local equilibrium prevails.
35 B = 2/3*k*I - 2*nuSgs*dev(D)
40 k from rho*D:B + ce*rho*k^3/2/delta = 0
41 muSgs = ck*rho*sqrt(k)*delta
47 \*---------------------------------------------------------------------------*/
49 #ifndef compressibleSmagorinsky_H
50 #define compressibleSmagorinsky_H
52 #include "GenEddyVisc.H"
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 namespace compressible
63 /*---------------------------------------------------------------------------*\
64 Class Smagorinsky Declaration
65 \*---------------------------------------------------------------------------*/
73 dimensionedScalar ck_;
76 // Private Member Functions
78 //- Update sub-grid scale fields
79 void updateSubGridScaleFields(const volTensorField& gradU);
81 // Disallow default bitwise copy construct and assignment
82 Smagorinsky(const Smagorinsky&);
83 Smagorinsky& operator=(const Smagorinsky&);
88 //- Runtime type information
89 TypeName("Smagorinsky");
93 //- Construct from components
96 const volScalarField& rho,
97 const volVectorField& U,
98 const surfaceScalarField& phi,
99 const basicThermo& thermoPhysicalModel,
100 const word& turbulenceModelName = turbulenceModel::typeName,
101 const word& modelName = typeName
106 virtual ~Smagorinsky()
112 //- Return SGS kinetic energy
113 // calculated from the given velocity gradient
114 tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
116 return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));
119 //- Return SGS kinetic energy
120 virtual tmp<volScalarField> k() const
122 return k(fvc::grad(U()));
126 //- Correct Eddy-Viscosity and related properties
127 virtual void correct(const tmp<volTensorField>& gradU);
129 //- Read LESProperties dictionary
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 } // End namespace LESModels
137 } // End namespace compressible
138 } // End namespace Foam
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 // ************************************************************************* //