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

kOmega.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::RASModels::kOmega
00027 
00028 Description
00029     Standard high Reynolds-number k-omega turbulence model for
00030     incompressible flows.
00031 
00032     References:
00033     @verbatim
00034         "Turbulence Modeling for CFD"
00035         D. C. Wilcox,
00036         DCW Industries, Inc., La Canada,
00037         California, 1998.
00038 
00039         See also:
00040         http://www.cfd-online.com/Wiki/Wilcox's_k-omega_model
00041     @endverbatim
00042 
00043     The default model coefficients correspond to the following:
00044     @verbatim
00045         kOmegaCoeffs
00046         {
00047             Cmu         0.09;  // Equivalent to betaStar
00048             alpha       0.52;
00049             beta        0.072;
00050             alphak      0.5;
00051             alphaOmega  0.5;
00052         }
00053     @endverbatim
00054 
00055 SourceFiles
00056     kOmega.C
00057 
00058 \*---------------------------------------------------------------------------*/
00059 
00060 #ifndef kOmega_H
00061 #define kOmega_H
00062 
00063 #include "RASModel.H"
00064 
00065 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00066 
00067 namespace Foam
00068 {
00069 namespace incompressible
00070 {
00071 namespace RASModels
00072 {
00073 
00074 /*---------------------------------------------------------------------------*\
00075                            Class kOmega Declaration
00076 \*---------------------------------------------------------------------------*/
00077 
00078 class kOmega
00079 :
00080     public RASModel
00081 {
00082     // Private data
00083 
00084         // Model coefficients
00085 
00086             dimensionedScalar Cmu_;
00087             dimensionedScalar beta_;
00088             dimensionedScalar alpha_;
00089             dimensionedScalar alphaK_;
00090             dimensionedScalar alphaOmega_;
00091 
00092 
00093         // Fields
00094 
00095             volScalarField k_;
00096             volScalarField omega_;
00097             volScalarField nut_;
00098 
00099 
00100 public:
00101 
00102     //- Runtime type information
00103     TypeName("kOmega");
00104 
00105     // Constructors
00106 
00107         //- Construct from components
00108         kOmega
00109         (
00110             const volVectorField& U,
00111             const surfaceScalarField& phi,
00112             transportModel& transport
00113         );
00114 
00115 
00116     // Destructor
00117     virtual ~kOmega()
00118     {}
00119 
00120 
00121     // Member Functions
00122 
00123         //- Return the turbulence viscosity
00124         virtual tmp<volScalarField> nut() const
00125         {
00126             return nut_;
00127         }
00128 
00129         //- Return the effective diffusivity for k
00130         tmp<volScalarField> DkEff() const
00131         {
00132             return tmp<volScalarField>
00133             (
00134                 new volScalarField("DkEff", alphaK_*nut_ + nu())
00135             );
00136         }
00137 
00138         //- Return the effective diffusivity for omega
00139         tmp<volScalarField> DomegaEff() const
00140         {
00141             return tmp<volScalarField>
00142             (
00143                 new volScalarField("DomegaEff", alphaOmega_*nut_ + nu())
00144             );
00145         }
00146 
00147         //- Return the turbulence kinetic energy
00148         virtual tmp<volScalarField> k() const
00149         {
00150             return k_;
00151         }
00152 
00153         //- Return the turbulence specific dissipation rate
00154         virtual tmp<volScalarField> omega() const
00155         {
00156             return omega_;
00157         }
00158 
00159         //- Return the turbulence kinetic energy dissipation rate
00160         virtual tmp<volScalarField> epsilon() const
00161         {
00162             return tmp<volScalarField>
00163             (
00164                 new volScalarField
00165                 (
00166                     IOobject
00167                     (
00168                         "epsilon",
00169                         mesh_.time().timeName(),
00170                         mesh_
00171                     ),
00172                     Cmu_*k_*omega_,
00173                     omega_.boundaryField().types()
00174                 )
00175             );
00176         }
00177 
00178         //- Return the Reynolds stress tensor
00179         virtual tmp<volSymmTensorField> R() const;
00180 
00181         //- Return the effective stress tensor including the laminar stress
00182         virtual tmp<volSymmTensorField> devReff() const;
00183 
00184         //- Return the source term for the momentum equation
00185         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
00186 
00187         //- Solve the turbulence equations and correct the turbulence viscosity
00188         virtual void correct();
00189 
00190         //- Read RASProperties dictionary
00191         virtual bool read();
00192 };
00193 
00194 
00195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00196 
00197 } // End namespace RASModels
00198 } // End namespace incompressible
00199 } // End namespace Foam
00200 
00201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00202 
00203 #endif
00204 
00205 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd