Loading...
Searching...
No Matches
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
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;
117 //- Write local wall function variables
118 void writeLocalEntries(Ostream&) const;
119
120
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 );
135
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 as copy setting internal field reference
166 );
167
168 //- Return a clone
169 virtual tmp<fvPatchField<scalar>> clone() const
170 {
171 return fvPatchField<scalar>::Clone(*this);
172 }
173
174 //- Clone with an internal field reference
176 (
178 ) const
179 {
180 return fvPatchField<scalar>::Clone(*this, iF);
181 }
182
183
184 // Member Functions
185
186 // Evaluation
187
188 //- Calculate and return the yPlus at the boundary
189 virtual tmp<scalarField> yPlus() const;
190
191
192 // I-O
193
194 //- Write
195 virtual void write(Ostream& os) const;
196};
197
198
199// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200
201} // End namespace RASModels
202} // End namespace compressible
203} // End namespace Foam
204
205// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206
207#endif
208
209// ************************************************************************* //
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:59
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.
tmp< scalarField > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
TypeName("nutkFilmWallFunction")
Runtime type information.
nutkFilmWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
nutkWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
OBJstream os(runTime.globalPath()/outputName)
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:68