initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / turbulenceModels / LES / incompressible / Smagorinsky / Smagorinsky.H
blobf86578934e7a7fda63efe644062c51229c29676d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::incompressible::LESModels::Smagorinsky
28 Description
29     The Isochoric Smagorinsky Model for incompressible flows.
31     Algebraic eddy viscosity SGS model founded on the assumption that
32     local equilibrium prevails.
33     Thus,
34     @verbatim
35         B = 2/3*k*I - 2*nuSgs*dev(D)
36         Beff = 2/3*k*I - 2*nuEff*dev(D)
38     where
40         D = symm(grad(U));
41         k = (2*ck/ce)*delta^2*||D||^2
42         nuSgs = ck*sqrt(k)*delta
43         nuEff = nuSgs + nu
44     @endverbatim
46 SourceFiles
47     Smagorinsky.C
49 \*---------------------------------------------------------------------------*/
51 #ifndef Smagorinsky_H
52 #define Smagorinsky_H
54 #include "GenEddyVisc.H"
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 namespace Foam
60 namespace incompressible
62 namespace LESModels
65 /*---------------------------------------------------------------------------*\
66                            Class Smagorinsky Declaration
67 \*---------------------------------------------------------------------------*/
69 class Smagorinsky
71     public GenEddyVisc
73     // Private data
75         dimensionedScalar ck_;
78     // Private Member Functions
80         // Disallow default bitwise copy construct and assignment
81         Smagorinsky(const Smagorinsky&);
82         Smagorinsky& operator=(const Smagorinsky&);
85 public:
87     //- Runtime type information
88     TypeName("Smagorinsky");
90     // Constructors
92         //- Construct from components
93         Smagorinsky
94         (
95             const volVectorField& U,
96             const surfaceScalarField& phi,
97             transportModel& transport
98         );
101     // Destructor
103         ~Smagorinsky()
104         {}
107     // Member Functions
109         //- Return SGS kinetic energy
110         //  calculated from the given velocity gradient
111         tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
112         {
113             return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));
114         }
116         //- Return SGS kinetic energy
117         tmp<volScalarField> k() const
118         {
119             return k(fvc::grad(U()));
120         }
123         //- Correct Eddy-Viscosity and related properties
124         virtual void correct(const tmp<volTensorField>& gradU);
126         //- Read turbulenceProperties dictionary
127         virtual bool read();
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 } // End namespace LESModels
134 } // End namespace incompressible
135 } // End namespace Foam
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 #endif
141 // ************************************************************************* //