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

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-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::oneEqEddy
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 the
00032     behaviour of k, hence,
00033     @verbatim
00034         d/dt(rho*k) + div(rho*U*k) - div(muEff*grad(k))
00035         =
00036         -rho*D:B - ce*rho*k^3/2/delta
00037 
00038     and
00039 
00040         B = 2/3*k*I - 2*nuSgs*dev(D)
00041 
00042     where
00043 
00044         D = symm(grad(U));
00045         muSgs = ck*rho*sqrt(k)*delta
00046     @endverbatim
00047 
00048 
00049 SourceFiles
00050     oneEqEddy.C
00051 
00052 \*---------------------------------------------------------------------------*/
00053 
00054 #ifndef compressibleOneEqEddy_H
00055 #define compressibleOneEqEddy_H
00056 
00057 #include "GenEddyVisc.H"
00058 
00059 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00060 
00061 namespace Foam
00062 {
00063 namespace compressible
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         dimensionedScalar ck_;
00079 
00080 
00081     // Private Member Functions
00082 
00083         //- Update sub-grid scale fields
00084         void updateSubGridScaleFields();
00085 
00086         // Disallow default bitwise copy construct and assignment
00087         oneEqEddy(const oneEqEddy&);
00088         oneEqEddy& operator=(const oneEqEddy&);
00089 
00090 
00091 public:
00092 
00093     //- Runtime type information
00094     TypeName("oneEqEddy");
00095 
00096 
00097     // Constructors
00098 
00099         //- Constructor from components
00100         oneEqEddy
00101         (
00102             const volScalarField& rho,
00103             const volVectorField& U,
00104             const surfaceScalarField& phi,
00105             const basicThermo& thermoPhysicalModel
00106         );
00107 
00108 
00109     // Destructor
00110     virtual ~oneEqEddy()
00111     {}
00112 
00113 
00114     // Member Functions
00115 
00116         //- Return the effective diffusivity for k
00117         tmp<volScalarField> DkEff() const
00118         {
00119             return tmp<volScalarField>
00120             (
00121                 new volScalarField("DkEff", muSgs_ + mu())
00122             );
00123         }
00124 
00125         //- Correct Eddy-Viscosity and related properties
00126         virtual void correct(const tmp<volTensorField>& gradU);
00127 
00128         //- Read LESProperties dictionary
00129         virtual bool read();
00130 };
00131 
00132 
00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00134 
00135 } // End namespace LESModels
00136 } // End namespace compressible
00137 } // End namespace Foam
00138 
00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00140 
00141 #endif
00142 
00143 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd