Forward compatibility: flex
[foam-extend-3.2.git] / src / turbulenceModels / incompressible / RAS / kOmega / kOmega.H
blobbf04df354a7c45ddd94042ebd0fe72659fecd2d2
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::incompressible::RASModels::kOmega
27 Description
28     Standard high Reynolds-number k-omega turbulence model for
29     incompressible flows.
31     References:
32     @verbatim
33         "Turbulence Modeling for CFD"
34         D. C. Wilcox,
35         DCW Industries, Inc., La Canada,
36         California, 1988.
38         See also:
39         http://www.cfd-online.com/Wiki/Wilcox's_k-omega_model
40     @endverbatim
42     The default model coefficients correspond to the following:
43     @verbatim
44         kOmegaCoeffs
45         {
46             Cmu         0.09;  // Equivalent to betaStar
47             alpha       0.52;
48             beta        0.072;
49             alphak      0.5;
50             alphaOmega  0.5;
51         }
52     @endverbatim
54 SourceFiles
55     kOmega.C
57 \*---------------------------------------------------------------------------*/
59 #ifndef kOmega_H
60 #define kOmega_H
62 #include "RASModel.H"
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66 namespace Foam
68 namespace incompressible
70 namespace RASModels
73 /*---------------------------------------------------------------------------*\
74                            Class kOmega Declaration
75 \*---------------------------------------------------------------------------*/
77 class kOmega
79     public RASModel
81     // Private data
83         // Model coefficients
85             dimensionedScalar Cmu_;
86             dimensionedScalar beta_;
87             dimensionedScalar alpha_;
88             dimensionedScalar alphaK_;
89             dimensionedScalar alphaOmega_;
92         // Fields
94             volScalarField k_;
95             volScalarField omega_;
96             volScalarField nut_;
99 public:
101     //- Runtime type information
102     TypeName("kOmega");
104     // Constructors
106         //- Construct from components
107         kOmega
108         (
109             const volVectorField& U,
110             const surfaceScalarField& phi,
111             transportModel& transport
112         );
115     // Destructor
116     virtual ~kOmega()
117     {}
120     // Member Functions
122         //- Return the turbulence viscosity
123         virtual tmp<volScalarField> nut() const
124         {
125             return nut_;
126         }
128         //- Return the effective diffusivity for k
129         tmp<volScalarField> DkEff() const
130         {
131             return tmp<volScalarField>
132             (
133                 new volScalarField("DkEff", alphaK_*nut_ + nu())
134             );
135         }
137         //- Return the effective diffusivity for omega
138         tmp<volScalarField> DomegaEff() const
139         {
140             return tmp<volScalarField>
141             (
142                 new volScalarField("DomegaEff", alphaOmega_*nut_ + nu())
143             );
144         }
146         //- Return the turbulence kinetic energy
147         virtual tmp<volScalarField> k() const
148         {
149             return k_;
150         }
152         //- Return the turbulence specific dissipation rate
153         virtual tmp<volScalarField> omega() const
154         {
155             return omega_;
156         }
158         //- Return the turbulence kinetic energy dissipation rate
159         virtual tmp<volScalarField> epsilon() const
160         {
161             return tmp<volScalarField>
162             (
163                 new volScalarField
164                 (
165                     IOobject
166                     (
167                         "epsilon",
168                         mesh_.time().timeName(),
169                         mesh_
170                     ),
171                     Cmu_*k_*omega_,
172                     omega_.boundaryField().types()
173                 )
174             );
175         }
177         //- Return the Reynolds stress tensor
178         virtual tmp<volSymmTensorField> R() const;
180         //- Return the effective stress tensor including the laminar stress
181         virtual tmp<volSymmTensorField> devReff() const;
183         //- Return the source term for the momentum equation
184         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
186         //- Solve the turbulence equations and correct the turbulence viscosity
187         virtual void correct();
189         //- Read RASProperties dictionary
190         virtual bool read();
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 } // End namespace RASModels
197 } // End namespace incompressible
198 } // End namespace Foam
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 #endif
204 // ************************************************************************* //