nutkFilmWallFunctionFvPatchScalarField.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) 2011-2016 OpenFOAM Foundation
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::nutkFilmWallFunctionFvPatchScalarField
26 
27 Group
28  grpSurfaceFilmBoundaryConditions grpCmpWallFunctions
29 
30 Description
31  This boundary condition provides a turbulent viscosity condition when
32  using wall functions, based on turbulence kinetic energy, for use with
33  surface film models.
34 
35 Usage
36  Example of the boundary condition specification:
37  \verbatim
38  <patchName>
39  {
40  type nutkFilmWallFunction;
41  value uniform 0;
42  }
43  \endverbatim
44 
45 See also
46  Foam::nutkWallFunctionFvPatchScalarField
47 
48 SourceFiles
49  nutkFilmWallFunctionFvPatchScalarField.C
50 
51 \*---------------------------------------------------------------------------*/
52 
53 #ifndef compressibleNutSpalartAllmarasWallFunctionFvPatchScalarField_H
54 #define compressibleNutSpalartAllmarasWallFunctionFvPatchScalarField_H
55 
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 namespace compressible
63 {
64 namespace RASModels
65 {
66 
67 /*---------------------------------------------------------------------------*\
68  Class nutkFilmWallFunctionFvPatchScalarField Declaration
69 \*---------------------------------------------------------------------------*/
70 
72 :
74 {
75 protected:
76 
77  // Protected data
78 
79  //- B Coefficient (default = 5.5)
80  scalar B_;
81 
82  //- y+ value for laminar -> turbulent transition (default = 11.05)
83  scalar yPlusCrit_;
84 
85 
86  // Protected member functions
87 
88  //- Calculate the turbulence viscosity
89  virtual tmp<scalarField> calcNut() const;
90 
91  //- Calculate the friction velocity
92  virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const;
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("nutkFilmWallFunction");
99 
100 
101  // Constructors
102 
103  //- Construct from patch and internal field
105  (
106  const fvPatch&,
108  );
109 
110  //- Construct from patch, internal field and dictionary
112  (
113  const fvPatch&,
115  const dictionary&
116  );
117 
118  //- Construct by mapping given
119  // nutkFilmWallFunctionFvPatchScalarField
120  // onto a new patch
122  (
124  const fvPatch&,
126  const fvPatchFieldMapper&
127  );
128 
129  //- Construct as copy
131  (
133  );
134 
135  //- Construct and return a clone
136  virtual tmp<fvPatchScalarField> clone() const
137  {
139  (
141  );
142  }
143 
144  //- Construct as copy setting internal field reference
146  (
149  );
150 
151  //- Construct and return a clone setting internal field reference
153  (
155  ) const
156  {
158  (
160  );
161  }
162 
163 
164  // Member functions
165 
166  // Evaluation functions
167 
168  //- Calculate and return the yPlus at the boundary
169  virtual tmp<scalarField> yPlus() const;
170 
171 
172  // I-O
173 
174  //- Write
175  virtual void write(Ostream& os) const;
176 };
177 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace RASModels
182 } // End namespace compressible
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
scalar yPlusCrit_
y+ value for laminar -> turbulent transition (default = 11.05)
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions...
virtual tmp< scalarField > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
Foam::fvPatchFieldMapper.
TypeName("nutkFilmWallFunction")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
nutkFilmWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
A class for managing temporary objects.
Definition: PtrList.H:54
This boundary condition provides a turbulent viscosity condition when using wall functions, based on turbulence kinetic energy, for use with surface film models.
Namespace for OpenFOAM.
bool compressible
Definition: pEqn.H:30