FreeFOAM The Cross-Platform CFD Toolkit
kOmega.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::incompressible::RASModels::kOmega
26 
27 Description
28  Standard high Reynolds-number k-omega turbulence model for
29  incompressible flows.
30 
31  References:
32  @verbatim
33  "Turbulence Modeling for CFD"
34  D. C. Wilcox,
35  DCW Industries, Inc., La Canada,
36  California, 1988.
37 
38  See also:
39  http://www.cfd-online.com/Wiki/Wilcox's_k-omega_model
40  @endverbatim
41 
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
53 
54 SourceFiles
55  kOmega.C
56 
57 \*---------------------------------------------------------------------------*/
58 
59 #ifndef kOmega_H
60 #define kOmega_H
61 
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 namespace incompressible
69 {
70 namespace RASModels
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class kOmega Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 class kOmega
78 :
79  public RASModel
80 {
81  // Private data
82 
83  // Model coefficients
84 
85  dimensionedScalar Cmu_;
86  dimensionedScalar beta_;
87  dimensionedScalar alpha_;
88  dimensionedScalar alphaK_;
89  dimensionedScalar alphaOmega_;
90 
91 
92  // Fields
93 
94  volScalarField k_;
95  volScalarField omega_;
96  volScalarField nut_;
97 
98 
99 public:
100 
101  //- Runtime type information
102  TypeName("kOmega");
103 
104  // Constructors
105 
106  //- Construct from components
107  kOmega
108  (
109  const volVectorField& U,
110  const surfaceScalarField& phi,
112  );
113 
114 
115  // Destructor
116  virtual ~kOmega()
117  {}
118 
119 
120  // Member Functions
121 
122  //- Return the turbulence viscosity
123  virtual tmp<volScalarField> nut() const
124  {
125  return nut_;
126  }
127 
128  //- Return the effective diffusivity for k
130  {
131  return tmp<volScalarField>
132  (
133  new volScalarField("DkEff", alphaK_*nut_ + nu())
134  );
135  }
136 
137  //- Return the effective diffusivity for omega
139  {
140  return tmp<volScalarField>
141  (
142  new volScalarField("DomegaEff", alphaOmega_*nut_ + nu())
143  );
144  }
145 
146  //- Return the turbulence kinetic energy
147  virtual tmp<volScalarField> k() const
148  {
149  return k_;
150  }
151 
152  //- Return the turbulence specific dissipation rate
153  virtual tmp<volScalarField> omega() const
154  {
155  return omega_;
156  }
157 
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  }
176 
177  //- Return the Reynolds stress tensor
178  virtual tmp<volSymmTensorField> R() const;
179 
180  //- Return the effective stress tensor including the laminar stress
181  virtual tmp<volSymmTensorField> devReff() const;
182 
183  //- Return the source term for the momentum equation
185 
186  //- Solve the turbulence equations and correct the turbulence viscosity
187  virtual void correct();
188 
189  //- Read RASProperties dictionary
190  virtual bool read();
191 };
192 
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 
196 } // End namespace RASModels
197 } // End namespace incompressible
198 } // End namespace Foam
199 
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 
202 #endif
203 
204 // ************************ vim: set sw=4 sts=4 et: ************************ //