OpenFOAM logo
Open Source CFD Toolkit

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-2005 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     dynOneEqEddy
00027 
00028 Description
00029 <pre>
00030     One Equation Eddy Viscosity Model
00031     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00032     Eddy viscosity SGS model using a modeled balance equation to simulate the
00033     behaviour of k, hence,
00034 
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*nuEff*dev(D)
00042 
00043     where
00044 
00045         D = symm(grad(U));
00046         muSgs = rho*ck*sqrt(k)*delta
00047         muEff = muSgs + mu
00048 </pre>
00049 
00050 SourceFiles
00051     dynOneEqEddy.C
00052 
00053 \*---------------------------------------------------------------------------*/
00054 
00055 #ifndef compressibleDynOneEqEddy_H
00056 #define compressibleDynOneEqEddy_H
00057 
00058 #include "GenEddyVisc.H"
00059 #include "LESfilter.H"
00060 
00061 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00062 
00063 namespace Foam
00064 {
00065 namespace compressible
00066 {
00067 namespace LESmodels
00068 {
00069 
00070 /*---------------------------------------------------------------------------*\
00071                            Class dynOneEqEddy Declaration
00072 \*---------------------------------------------------------------------------*/
00073 
00074 class dynOneEqEddy
00075 :
00076     public GenEddyVisc
00077 {
00078     // Private data
00079 
00080         autoPtr<LESfilter> filterPtr_;
00081         LESfilter& filter_;
00082 
00083 
00084     // Private Member Functions
00085 
00086         //- Calculate ck, ce by filtering the velocity field U.
00087         dimensionedScalar ck_(const volTensorField& D) const;
00088         dimensionedScalar ce_(const volTensorField& D) const;
00089 
00090         // Disallow default bitwise copy construct and assignment
00091         dynOneEqEddy(const dynOneEqEddy&);
00092         dynOneEqEddy& operator=(const dynOneEqEddy&);
00093 
00094 
00095 public:
00096 
00097     //- Runtime type information
00098     TypeName("dynOneEqEddy");
00099 
00100 
00101     // Constructors
00102 
00103         //- Constructor from components
00104         dynOneEqEddy
00105         (
00106             const volScalarField& rho,
00107             const volVectorField& U,
00108             const surfaceScalarField& phi,
00109             const basicThermo& thermoPhysicalModel
00110         );
00111 
00112 
00113     // Destructor
00114 
00115         ~dynOneEqEddy();
00116 
00117 
00118     // Member Functions
00119 
00120         //- Return the effective diffusivity for k
00121         tmp<volScalarField> DkEff() const
00122         {
00123             return tmp<volScalarField> 
00124             (
00125                 new volScalarField("DkEff", muSgs_ + mu())
00126             );
00127         }
00128 
00129         //- Correct Eddy-Viscosity and related properties
00130         void correct(const tmp<volTensorField>& gradU);
00131 
00132         //- Read turbulenceProperties dictionary
00133         bool read();
00134 };
00135 
00136 
00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00138 
00139 } // End namespace LESmodels
00140 } // End namespace compressible
00141 } // End namespace Foam
00142 
00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00144 
00145 #endif
00146 
00147 // ************************************************************************* //
For further information go to www.openfoam.org