FreeFOAM The Cross-Platform CFD Toolkit
omegaWallFunctionFvPatchScalarField.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) 2008-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::compressible::RASModels::omegaWallFunctionFvPatchScalarField
26 
27 Description
28  Provides a wall function boundary condition/constraint on omega
29 
30  Computed value is:
31 
32  omega = sqrt(omega_vis^2 + omega_log^2)
33 
34  where
35  omega_vis = omega in viscous region
36  omega_log = omega in logarithmic region
37 
38  Model described by Eq.(15) of:
39  @verbatim
40  Menter, F., Esch, T.
41  "Elements of Industrial Heat Transfer Prediction"
42  16th Brazilian Congress of Mechanical Engineering (COBEM),
43  Nov. 2001
44  @endverbatim
45 
46 SourceFiles
47  omegaWallFunctionFvPatchScalarField.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef compressibleOmegaWallFunctionFvPatchScalarField_H
52 #define compressibleOmegaWallFunctionFvPatchScalarField_H
53 
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 namespace compressible
61 {
62 namespace RASModels
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class omegaWallFunctionFvPatchScalarField Declaration
67 \*---------------------------------------------------------------------------*/
68 
70 :
71  public fixedInternalValueFvPatchField<scalar>
72 {
73  // Private data
74 
75  //- Name of velocity field
76  word UName_;
77 
78  //- Name of density field
79  word rhoName_;
80 
81  //- Name of turbulence kinetic energy field
82  word kName_;
83 
84  //- Name of turbulence generation field
85  word GName_;
86 
87  //- Name of laminar viscosity field
88  word muName_;
89 
90  //- Name of turbulent viscosity field
91  word mutName_;
92 
93  //- Cmu coefficient
94  scalar Cmu_;
95 
96  //- Von Karman constant
97  scalar kappa_;
98 
99  //- E coefficient
100  scalar E_;
101 
102  //- beta1 coefficient
103  scalar beta1_;
104 
105 
106  // Private member functions
107 
108  //- Check the type of the patch
109  void checkType();
110 
111 
112 public:
113 
114  //- Runtime type information
115  TypeName("compressible::omegaWallFunction");
116 
117 
118  // Constructors
119 
120  //- Construct from patch and internal field
122  (
123  const fvPatch&,
125  );
126 
127  //- Construct from patch, internal field and dictionary
129  (
130  const fvPatch&,
132  const dictionary&
133  );
134 
135  //- Construct by mapping given
136  // omegaWallFunctionFvPatchScalarField
137  // onto a new patch
139  (
141  const fvPatch&,
143  const fvPatchFieldMapper&
144  );
145 
146  //- Construct as copy
148  (
150  );
151 
152  //- Construct and return a clone
154  {
156  (
158  );
159  }
160 
161  //- Construct as copy setting internal field reference
163  (
166  );
167 
168  //- Construct and return a clone setting internal field reference
169  virtual tmp<fvPatchScalarField> clone
170  (
172  ) const
173  {
175  (
177  );
178  }
179 
180 
181  // Member functions
182 
183  // Evaluation functions
184 
185  //- Update the coefficients associated with the patch field
186  virtual void updateCoeffs();
187 
188 
189  // I-O
190 
191  //- Write
192  void write(Ostream&) const;
193 };
194 
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 } // End namespace RASModels
199 } // End namespace compressible
200 } // End namespace Foam
201 
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 
204 #endif
205 
206 // ************************ vim: set sw=4 sts=4 et: ************************ //