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