OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

dynSmagorinsky.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::incompressible::LESModels::dynSmagorinsky
00027 
00028 Description
00029     The Isochoric dynamic Smagorinsky Model for incompressible flows.
00030 
00031     Algebraic eddy viscosity SGS model founded on the assumption that
00032     local equilibrium prevails.
00033     Thus,
00034     @verbatim
00035         B = 2/3*k*I - 2*nuSgs*dev(D)
00036         Beff = 2/3*k*I - 2*nuEff*dev(D)
00037 
00038     where
00039 
00040         k = cI*delta^2*||D||^2
00041         nuSgs = cD*delta^2*||D||
00042         nuEff = nuSgs + nu
00043 
00044     In the dynamic version of the choric  Smagorinsky model
00045     the coefficients cI and cD are calculated during the simulation,
00046 
00047         cI=<K*m>/<m*m>
00048 
00049     and
00050 
00051         cD=<L.M>/<M.M>,
00052 
00053     where
00054 
00055         K = 0.5*(F(U.U) - F(U).F(U))
00056         m = delta^2*(4*||F(D)||^2 - F(||D||^2))
00057         L = dev(F(U*U) - F(U)*F(U))
00058         M = delta^2*(F(||D||*dev(D)) - 4*||F(D)||*F(dev(D)))
00059     @endverbatim
00060 
00061 SourceFiles
00062     dynSmagorinsky.C
00063 
00064 \*---------------------------------------------------------------------------*/
00065 
00066 #ifndef dynSmagorinsky_H
00067 #define dynSmagorinsky_H
00068 
00069 #include "Smagorinsky.H"
00070 #include "LESfilter.H"
00071 
00072 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00073 
00074 namespace Foam
00075 {
00076 namespace incompressible
00077 {
00078 namespace LESModels
00079 {
00080 
00081 /*---------------------------------------------------------------------------*\
00082                            Class dynSmagorinsky Declaration
00083 \*---------------------------------------------------------------------------*/
00084 
00085 class dynSmagorinsky
00086 :
00087     public GenEddyVisc
00088 {
00089     // Private data
00090 
00091         volScalarField k_;
00092 
00093         autoPtr<LESfilter> filterPtr_;
00094         LESfilter& filter_;
00095 
00096 
00097     // Private Member Functions
00098 
00099         //- Update sub-grid scale fields
00100         void updateSubGridScaleFields(const volSymmTensorField& D);
00101 
00102         //- Calculate coefficients cD, cI from filtering velocity field
00103         dimensionedScalar cD(const volSymmTensorField& D) const;
00104         dimensionedScalar cI(const volSymmTensorField& D) const;
00105 
00106         // Disallow default bitwise copy construct and assignment
00107         dynSmagorinsky(const dynSmagorinsky&);
00108         dynSmagorinsky& operator=(const dynSmagorinsky&);
00109 
00110 
00111 public:
00112 
00113     //- Runtime type information
00114     TypeName("dynSmagorinsky");
00115 
00116     // Constructors
00117 
00118         //- Construct from components
00119         dynSmagorinsky
00120         (
00121             const volVectorField& U,
00122             const surfaceScalarField& phi,
00123             transportModel& transport
00124         );
00125 
00126 
00127     //- Destructor
00128     virtual ~dynSmagorinsky()
00129     {}
00130 
00131 
00132     // Member Functions
00133 
00134         //- Return SGS kinetic energy
00135         virtual tmp<volScalarField> k() const
00136         {
00137             return k_;
00138         }
00139 
00140         //- Correct Eddy-Viscosity and related properties
00141         virtual void correct(const tmp<volTensorField>& gradU);
00142 
00143         //- Read LESProperties dictionary
00144         virtual bool read();
00145 };
00146 
00147 
00148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00149 
00150 } // End namespace LESModels
00151 } // End namespace incompressible
00152 } // End namespace Foam
00153 
00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00155 
00156 #endif
00157 
00158 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd