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

oneEqEddy.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::oneEqEddy
00026 
00027 Description
00028     One Equation Eddy Viscosity Model for incompressible flows
00029 
00030     Eddy viscosity SGS model using a modeled balance equation to simulate the
00031     behaviour of k, hence,
00032     @verbatim
00033         d/dt(k) + div(U*k) - div(nuEff*grad(k))
00034         =
00035         -B*L - ce*k^3/2/delta
00036 
00037     and
00038 
00039         B = 2/3*k*I - 2*nuSgs*dev(D)
00040         Beff = 2/3*k*I - 2*nuEff*dev(D)
00041 
00042     where
00043 
00044         D = symm(grad(U));
00045         nuSgs = ck*sqrt(k)*delta
00046         nuEff = nuSgs + nu
00047     @endverbatim
00048 
00049 SourceFiles
00050     oneEqEddy.C
00051 
00052 \*---------------------------------------------------------------------------*/
00053 
00054 #ifndef oneEqEddy_H
00055 #define oneEqEddy_H
00056 
00057 #include <incompressibleLESModels/GenEddyVisc.H>
00058 
00059 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00060 
00061 namespace Foam
00062 {
00063 namespace incompressible
00064 {
00065 namespace LESModels
00066 {
00067 
00068 /*---------------------------------------------------------------------------*\
00069                            Class oneEqEddy Declaration
00070 \*---------------------------------------------------------------------------*/
00071 
00072 class oneEqEddy
00073 :
00074     public GenEddyVisc
00075 {
00076     // Private data
00077 
00078         volScalarField k_;
00079 
00080         dimensionedScalar ck_;
00081 
00082 
00083     // Private Member Functions
00084 
00085         //- Update sub-grid scale fields
00086         void updateSubGridScaleFields();
00087 
00088         // Disallow default bitwise copy construct and assignment
00089         oneEqEddy(const oneEqEddy&);
00090         oneEqEddy& operator=(const oneEqEddy&);
00091 
00092 
00093 public:
00094 
00095     //- Runtime type information
00096     TypeName("oneEqEddy");
00097 
00098     // Constructors
00099 
00100         //- Construct from components
00101         oneEqEddy
00102         (
00103             const volVectorField& U,
00104             const surfaceScalarField& phi,
00105             transportModel& transport
00106         );
00107 
00108 
00109     //- Destructor
00110     virtual ~oneEqEddy()
00111     {}
00112 
00113 
00114     // Member Functions
00115 
00116         //- Return SGS kinetic energy
00117         virtual tmp<volScalarField> k() const
00118         {
00119             return k_;
00120         }
00121 
00122         //- Return the effective diffusivity for k
00123         tmp<volScalarField> DkEff() const
00124         {
00125             return tmp<volScalarField>
00126             (
00127                 new volScalarField("DkEff", nuSgs_ + nu())
00128             );
00129         }
00130 
00131         //- Correct Eddy-Viscosity and related properties
00132         virtual void correct(const tmp<volTensorField>& gradU);
00133 
00134         //- Read LESProperties dictionary
00135         virtual bool read();
00136 };
00137 
00138 
00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00140 
00141 } // End namespace LESModels
00142 } // End namespace incompressible
00143 } // End namespace Foam
00144 
00145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00146 
00147 #endif
00148 
00149 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines