1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::incompressible::LESModels::Smagorinsky
29 The Isochoric Smagorinsky Model for incompressible flows.
31 Algebraic eddy viscosity SGS model founded on the assumption that
32 local equilibrium prevails.
35 B = 2/3*k*I - 2*nuSgs*dev(D)
36 Beff = 2/3*k*I - 2*nuEff*dev(D)
41 k = (2*ck/ce)*delta^2*||D||^2
42 nuSgs = ck*sqrt(k)*delta
49 \*---------------------------------------------------------------------------*/
54 #include "GenEddyVisc.H"
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 namespace incompressible
65 /*---------------------------------------------------------------------------*\
66 Class Smagorinsky Declaration
67 \*---------------------------------------------------------------------------*/
75 dimensionedScalar ck_;
78 // Private Member Functions
80 // Disallow default bitwise copy construct and assignment
81 Smagorinsky(const Smagorinsky&);
82 Smagorinsky& operator=(const Smagorinsky&);
87 //- Runtime type information
88 TypeName("Smagorinsky");
92 //- Construct from components
95 const volVectorField& U,
96 const surfaceScalarField& phi,
97 transportModel& transport
109 //- Return SGS kinetic energy
110 // calculated from the given velocity gradient
111 tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
113 return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));
116 //- Return SGS kinetic energy
117 tmp<volScalarField> k() const
119 return k(fvc::grad(U()));
123 //- Correct Eddy-Viscosity and related properties
124 virtual void correct(const tmp<volTensorField>& gradU);
126 //- Read turbulenceProperties dictionary
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace LESModels
134 } // End namespace incompressible
135 } // End namespace Foam
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 // ************************************************************************* //