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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField
29
30Group
31 grpSurfaceFilmBoundaryConditions grpCmpWallFunctions
32
33Description
34 This boundary condition provides a turbulent viscosity condition when
35 using wall functions, based on turbulence kinetic energy, for use with
36 surface film models.
37
38Usage
39 Example of the boundary condition specification:
40 \verbatim
41 <patchName>
42 {
43 // Mandatory entries
44 type nutkFilmWallFunction;
45
46 // Optional entries
47 filmRegion <word>;
48 B <scalar>;
49 yPlusCrit <scalar>;
50
51 // Inherited entries
52 ...
53 }
54 \endverbatim
55
56 where the entries mean:
57 \table
58 Property | Description | Type | Reqd | Deflt
59 type | Type name: alphatFilmWallFunction | word | yes | -
60 filmRegion | Name of film region | word | no | surfaceFilmProperties
61 B | Model coefficient | scalar | no | 5.5
62 yPlusCrit | Critical y+ for transition to turbulence | scalar | no | 11.5
63 \endtable
64
65 The inherited entries are elaborated in:
66 - \link nutkWallFunctionFvPatchScalarField.H \endlink
67
68SourceFiles
69 nutkFilmWallFunctionFvPatchScalarField.C
70
71\*---------------------------------------------------------------------------*/
72
73#ifndef nutkFilmWallFunctionFvPatchScalarField_H
74#define nutkFilmWallFunctionFvPatchScalarField_H
75
77
78// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79
80namespace Foam
81{
82namespace compressible
83{
84namespace RASModels
85{
86
87/*---------------------------------------------------------------------------*\
88 Class nutkFilmWallFunctionFvPatchScalarField Declaration
89\*---------------------------------------------------------------------------*/
90
91class nutkFilmWallFunctionFvPatchScalarField
92:
93 public nutkWallFunctionFvPatchScalarField
94{
95protected:
96
97 // Protected Data
98
99 //- Name of film region
100 word filmRegionName_;
101
102 //- B Coefficient
103 scalar B_;
104
105 //- y+ value for laminar -> turbulent transition
106 scalar yPlusCrit_;
107
108
109 // Protected Member Functions
110
111 //- Calculate the turbulence viscosity
112 virtual tmp<scalarField> calcNut() const;
113
114 //- Calculate the friction velocity
115 tmp<scalarField> calcUTau(const scalarField& magGradU) const;
116
117 //- Write local wall function variables
118 void writeLocalEntries(Ostream&) const;
119
121public:
122
123 //- Runtime type information
124 TypeName("nutkFilmWallFunction");
125
126
127 // Constructors
128
129 //- Construct from patch and internal field
131 (
132 const fvPatch&,
134 );
136 //- Construct from patch, internal field and dictionary
138 (
139 const fvPatch&,
141 const dictionary&
142 );
143
144 //- Construct by mapping given
145 //- nutkFilmWallFunctionFvPatchScalarField
146 //- onto a new patch
148 (
150 const fvPatch&,
152 const fvPatchFieldMapper&
153 );
154
155 //- Construct as copy
157 (
159 );
160
161 //- Construct and return a clone
162 virtual tmp<fvPatchScalarField> clone() const
163 {
165 (
167 );
168 }
169
170 //- Construct as copy setting internal field reference
172 (
175 );
176
177 //- Construct and return a clone setting internal field reference
179 (
181 ) const
182 {
184 (
186 );
187 }
188
189
190 // Member Functions
192 // Evaluation
193
194 //- Calculate and return the yPlus at the boundary
195 virtual tmp<scalarField> yPlus() const;
196
197
198 // I-O
199
200 //- Write
201 virtual void write(Ostream& os) const;
202};
203
204
205// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206
207} // End namespace RASModels
208} // End namespace compressible
209} // End namespace Foam
210
211// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212
213#endif
214
215// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
This boundary condition provides a turbulent viscosity condition when using wall functions,...
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
tmp< scalarField > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
TypeName("nutkFilmWallFunction")
Runtime type information.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
This boundary condition provides a wall function for the turbulent viscosity (i.e....
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
OBJstream os(runTime.globalPath()/outputName)
bool compressible
Definition: pEqn.H:2
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73