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

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