FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

GenEddyVisc.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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::incompressible::LESModels::GenEddyVisc
00026 
00027 Description
00028     General base class for all incompressible models that can be implemented
00029     as an eddy viscosity, i.e. algebraic and one-equation models.
00030 
00031     Contains fields for k (SGS turbulent kinetic energy), gamma
00032     (modelled viscosity) and epsilon (SGS dissipation).
00033 
00034 SourceFiles
00035     GenEddyVisc.C
00036 
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef GenEddyVisc_H
00040 #define GenEddyVisc_H
00041 
00042 #include <incompressibleLESModels/LESModel.H>
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 namespace incompressible
00049 {
00050 namespace LESModels
00051 {
00052 
00053 /*---------------------------------------------------------------------------*\
00054                            Class GenEddyVisc Declaration
00055 \*---------------------------------------------------------------------------*/
00056 
00057 class GenEddyVisc
00058 :
00059     virtual public LESModel
00060 {
00061     // Private Member Functions
00062 
00063         // Disallow default bitwise copy construct and assignment
00064         GenEddyVisc(const GenEddyVisc&);
00065         GenEddyVisc& operator=(const GenEddyVisc&);
00066 
00067 
00068 protected:
00069 
00070         dimensionedScalar ce_;
00071 
00072         volScalarField nuSgs_;
00073 
00074 
00075 public:
00076 
00077     // Constructors
00078 
00079         //- Construct from components
00080         GenEddyVisc
00081         (
00082             const volVectorField& U,
00083             const surfaceScalarField& phi,
00084             transportModel& transport
00085         );
00086 
00087 
00088     //- Destructor
00089     virtual ~GenEddyVisc()
00090     {}
00091 
00092 
00093     // Member Functions
00094 
00095         //- Return SGS kinetic energy
00096         virtual tmp<volScalarField> k() const = 0;
00097 
00098         //- Return sub-grid disipation rate
00099         virtual tmp<volScalarField> epsilon() const
00100         {
00101             return ce_*k()*sqrt(k())/delta();
00102         }
00103 
00104         //- Return the SGS viscosity.
00105         virtual tmp<volScalarField> nuSgs() const
00106         {
00107             return nuSgs_;
00108         }
00109 
00110         //- Return the sub-grid stress tensor.
00111         virtual tmp<volSymmTensorField> B() const;
00112 
00113         //- Return the effective sub-grid turbulence stress tensor
00114         //  including the laminar stress
00115         virtual tmp<volSymmTensorField> devBeff() const;
00116 
00117         //- Return the deviatoric part of the effective sub-grid
00118         //  turbulence stress tensor including the laminar stress
00119         virtual tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
00120 
00121         //- Correct Eddy-Viscosity and related properties
00122         virtual void correct(const tmp<volTensorField>& gradU);
00123 
00124         //- Read LESProperties dictionary
00125         virtual bool read();
00126 };
00127 
00128 
00129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00130 
00131 } // End namespace LESModels
00132 } // End namespace incompressible
00133 } // End namespace Foam
00134 
00135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00136 
00137 #endif
00138 
00139 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines