1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::incompressible::LESModels::Smagorinsky
28 The Isochoric Smagorinsky Model for incompressible flows.
30 Algebraic eddy viscosity SGS model founded on the assumption that
31 local equilibrium prevails.
34 B = 2/3*k*I - 2*nuSgs*dev(D)
35 Beff = 2/3*k*I - 2*nuEff*dev(D)
40 k = (2*ck/ce)*delta^2*||D||^2
41 nuSgs = ck*sqrt(k)*delta
48 \*---------------------------------------------------------------------------*/
53 #include "GenEddyVisc.H"
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 namespace incompressible
64 /*---------------------------------------------------------------------------*\
65 Class Smagorinsky Declaration
66 \*---------------------------------------------------------------------------*/
74 dimensionedScalar ck_;
77 // Private Member Functions
79 //- Update sub-grid scale fields
80 void updateSubGridScaleFields(const volTensorField& gradU);
82 // Disallow default bitwise copy construct and assignment
83 Smagorinsky(const Smagorinsky&);
84 Smagorinsky& operator=(const Smagorinsky&);
89 //- Runtime type information
90 TypeName("Smagorinsky");
94 //- Construct from components
97 const volVectorField& U,
98 const surfaceScalarField& phi,
99 transportModel& transport
104 virtual ~Smagorinsky()
110 //- Return SGS kinetic energy
111 // calculated from the given velocity gradient
112 tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
114 return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));
117 //- Return SGS kinetic energy
118 virtual tmp<volScalarField> k() const
120 return k(fvc::grad(U()));
124 //- Correct Eddy-Viscosity and related properties
125 virtual void correct(const tmp<volTensorField>& gradU);
127 //- Read LESProperties dictionary
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 } // End namespace LESModels
135 } // End namespace incompressible
136 } // End namespace Foam
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 // ************************************************************************* //