FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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