initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / incompressible / RAS / kOmega / kOmega.H
blob3c1a2cbd9b208feb01cec82af3b0598b1b1166ab
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::incompressible::RASModels::kOmega
28 Description
29     Standard high Reynolds-number k-omega turbulence model for
30     incompressible flows.
32     References:
33     @verbatim
34         "Turbulence Modeling for CFD"
35         D. C. Wilcox,
36         DCW Industries, Inc., La Canada,
37         California, 1998.
39         See also:
40         http://www.cfd-online.com/Wiki/Wilcox's_k-omega_model
41     @endverbatim
43     The default model coefficients correspond to the following:
44     @verbatim
45         kOmegaCoeffs
46         {
47             Cmu         0.09;  // Equivalent to betaStar
48             alpha       0.52;
49             beta        0.072;
50             alphak      0.5;
51             alphaOmega  0.5;
52         }
53     @endverbatim
55 SourceFiles
56     kOmega.C
58 \*---------------------------------------------------------------------------*/
60 #ifndef kOmega_H
61 #define kOmega_H
63 #include "RASModel.H"
65 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 namespace Foam
69 namespace incompressible
71 namespace RASModels
74 /*---------------------------------------------------------------------------*\
75                            Class kOmega Declaration
76 \*---------------------------------------------------------------------------*/
78 class kOmega
80     public RASModel
82     // Private data
84         // Model coefficients
86             dimensionedScalar Cmu_;
87             dimensionedScalar beta_;
88             dimensionedScalar alpha_;
89             dimensionedScalar alphaK_;
90             dimensionedScalar alphaOmega_;
93         // Fields
95             volScalarField k_;
96             volScalarField omega_;
97             volScalarField nut_;
100 public:
102     //- Runtime type information
103     TypeName("kOmega");
105     // Constructors
107         //- Construct from components
108         kOmega
109         (
110             const volVectorField& U,
111             const surfaceScalarField& phi,
112             transportModel& transport
113         );
116     // Destructor
117     virtual ~kOmega()
118     {}
121     // Member Functions
123         //- Return the turbulence viscosity
124         virtual tmp<volScalarField> nut() const
125         {
126             return nut_;
127         }
129         //- Return the effective diffusivity for k
130         tmp<volScalarField> DkEff() const
131         {
132             return tmp<volScalarField>
133             (
134                 new volScalarField("DkEff", alphaK_*nut_ + nu())
135             );
136         }
138         //- Return the effective diffusivity for omega
139         tmp<volScalarField> DomegaEff() const
140         {
141             return tmp<volScalarField>
142             (
143                 new volScalarField("DomegaEff", alphaOmega_*nut_ + nu())
144             );
145         }
147         //- Return the turbulence kinetic energy
148         virtual tmp<volScalarField> k() const
149         {
150             return k_;
151         }
153         //- Return the turbulence specific dissipation rate
154         virtual tmp<volScalarField> omega() const
155         {
156             return omega_;
157         }
159         //- Return the turbulence kinetic energy dissipation rate
160         virtual tmp<volScalarField> epsilon() const
161         {
162             return tmp<volScalarField>
163             (
164                 new volScalarField
165                 (
166                     IOobject
167                     (
168                         "epsilon",
169                         mesh_.time().timeName(),
170                         mesh_
171                     ),
172                     Cmu_*k_*omega_,
173                     omega_.boundaryField().types()
174                 )
175             );
176         }
178         //- Return the Reynolds stress tensor
179         virtual tmp<volSymmTensorField> R() const;
181         //- Return the effective stress tensor including the laminar stress
182         virtual tmp<volSymmTensorField> devReff() const;
184         //- Return the source term for the momentum equation
185         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
187         //- Solve the turbulence equations and correct the turbulence viscosity
188         virtual void correct();
190         //- Read RASProperties dictionary
191         virtual bool read();
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 } // End namespace RASModels
198 } // End namespace incompressible
199 } // End namespace Foam
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 #endif
205 // ************************************************************************* //