nutkFilmWallFunctionFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2020 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 Description
28  This boundary condition provides a turbulent viscosity condition when
29  using wall functions, based on turbulence kinetic energy, for use with
30  surface film models.
31 
32 Usage
33  Example of the boundary condition specification:
34  \verbatim
35  <patchName>
36  {
37  type nutkFilmWallFunction;
38  value uniform 0;
39  }
40  \endverbatim
41 
42 See also
43  Foam::nutkWallFunctionFvPatchScalarField
44 
45 SourceFiles
46  nutkFilmWallFunctionFvPatchScalarField.C
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef nutkFilmWallFunctionFvPatchScalarField_H
51 #define nutkFilmWallFunctionFvPatchScalarField_H
52 
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 namespace compressible
60 {
61 namespace RASModels
62 {
63 
64 /*---------------------------------------------------------------------------*\
65  Class nutkFilmWallFunctionFvPatchScalarField Declaration
66 \*---------------------------------------------------------------------------*/
67 
69 :
71 {
72 protected:
73 
74  // Protected data
75 
76  //- B Coefficient (default = 5.5)
77  scalar B_;
78 
79  //- y+ value for laminar -> turbulent transition (default = 11.05)
80  scalar yPlusCrit_;
81 
82 
83  // Protected member functions
84 
85  //- Calculate the turbulence viscosity
86  virtual tmp<scalarField> nut() const;
87 
88  //- Calculate the friction velocity
89  virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const;
90 
91 
92 public:
93 
94  //- Runtime type information
95  TypeName("nutkFilmWallFunction");
96 
97 
98  // Constructors
99 
100  //- Construct from patch and internal field
102  (
103  const fvPatch&,
105  );
106 
107  //- Construct from patch, internal field and dictionary
109  (
110  const fvPatch&,
112  const dictionary&
113  );
114 
115  //- Construct by mapping given
116  // nutkFilmWallFunctionFvPatchScalarField
117  // onto a new patch
119  (
121  const fvPatch&,
123  const fvPatchFieldMapper&
124  );
125 
126  //- Copy constructor
128  (
130  );
131 
132  //- Construct and return a clone
133  virtual tmp<fvPatchScalarField> clone() const
134  {
136  (
138  );
139  }
140 
141  //- Copy constructor setting internal field reference
143  (
146  );
147 
148  //- Construct and return a clone setting internal field reference
150  (
152  ) const
153  {
155  (
157  );
158  }
159 
160 
161  // Member Functions
162 
163  // Evaluation functions
164 
165  //- Calculate and return the yPlus at the boundary
166  virtual tmp<scalarField> yPlus() const;
167 
168 
169  // I-O
170 
171  //- Write
172  virtual void write(Ostream& os) const;
173 };
174 
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 } // End namespace RASModels
179 } // End namespace compressible
180 } // End namespace Foam
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 #endif
185 
186 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
scalar yPlusCrit_
y+ value for laminar -> turbulent transition (default = 11.05)
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
Turbulent viscosity wall-function boundary condition for high Reynolds number flows based on near-wal...
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< fvPatchScalarField > clone() const
Construct and return a clone.
virtual tmp< scalarField > nut() const
Calculate the turbulence viscosity.
A class for managing temporary objects.
Definition: PtrList.H:53
virtual tmp< scalarField > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
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.