alphatFilmWallFunctionFvPatchScalarField.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-2017 OpenFOAM Foundation
9  Copyright (C) 2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::compressible::RASModels::alphatFilmWallFunctionFvPatchScalarField
29 
30 Group
31  grpSurfaceFilmBoundaryConditions grpCmpWallFunctions
32 
33 Description
34  This boundary condition provides a turbulent thermal diffusivity condition
35  when using wall functions, for use with surface film models. This
36  condition varies from the standard wall function by taking into account any
37  mass released from the film model.
38 
39 Usage
40  Example of the boundary condition specification:
41  \verbatim
42  <patchName>
43  {
44  // Mandatory entries
45  type alphatFilmWallFunction;
46 
47  // Optional entries
48  filmRegion <word>;
49  B <scalar>;
50  yPlusCrit <scalar>;
51  Cmu <scalar>;
52  kappa <scalar>;
53  Prt <scalar>;
54 
55  // Inherited entries
56  ...
57  }
58  \endverbatim
59 
60  where the entries mean:
61  \table
62  Property | Description | Type | Reqd | Deflt
63  type | Type name: alphatFilmWallFunction | word | yes | -
64  filmRegion | Name of film region | word | no | surfaceFilmProperties
65  B | Model coefficient | scalar | no | 5.5
66  yPlusCrit | Critical y+ for transition to turbulence | scalar | no | 11.5
67  Cmu | Empirical model coefficient | scalar | no | 0.09
68  Prt | Turbulent Prandtl number | scalar | no | 0.85
69  kappa | von Karman constant | scalar | no | 0.41
70  \endtable
71 
72  The inherited entries are elaborated in:
73  - \link fixedValueFvPatchFields.H \endlink
74 
75 SourceFiles
76  alphatFilmWallFunctionFvPatchScalarField.C
77 
78 \*---------------------------------------------------------------------------*/
79 
80 #ifndef alphatFilmWallFunctionFvPatchScalarField_H
81 #define alphatFilmWallFunctionFvPatchScalarField_H
82 
84 
85 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86 
87 namespace Foam
88 {
89 namespace compressible
90 {
91 namespace RASModels
92 {
93 
94 /*---------------------------------------------------------------------------*\
95  Class alphatFilmWallFunctionFvPatchScalarField Declaration
96 \*---------------------------------------------------------------------------*/
97 
98 class alphatFilmWallFunctionFvPatchScalarField
99 :
100  public fixedValueFvPatchScalarField
101 {
102 protected:
103 
104  // Protected Data
105 
106  //- Name of film region
107  word filmRegionName_;
108 
109  //- B Coefficient
110  scalar B_;
111 
112  //- y+ value for laminar -> turbulent transition
113  scalar yPlusCrit_;
114 
115  //- Empirical model coefficient
116  scalar Cmu_;
117 
118  //- Von-Karman constant
119  scalar kappa_;
120 
121  //- Turbulent Prandtl number
122  scalar Prt_;
123 
124 
125 public:
126 
127  //- Runtime type information
128  TypeName("alphatFilmWallFunction");
129 
130 
131  // Constructors
132 
133  //- Construct from patch and internal field
135  (
136  const fvPatch&,
137  const DimensionedField<scalar, volMesh>&
138  );
139 
140  //- Construct from patch, internal field and dictionary
142  (
143  const fvPatch&,
145  const dictionary&
146  );
147 
148  //- Construct by mapping given
149  //- alphatFilmWallFunctionFvPatchScalarField
150  //- onto a new patch
152  (
154  const fvPatch&,
156  const fvPatchFieldMapper&
157  );
158 
159  //- Construct as copy
161  (
163  );
164 
165  //- Construct as copy setting internal field reference
167  (
170  );
171 
172  //- Return a clone
173  virtual tmp<fvPatchField<scalar>> clone() const
174  {
175  return fvPatchField<scalar>::Clone(*this);
176  }
178  //- Clone with an internal field reference
180  (
182  ) const
183  {
184  return fvPatchField<scalar>::Clone(*this, iF);
185  }
186 
187 
188  // Member Functions
189 
190  // Evaluation
191 
192  //- Update the coefficients associated with the patch field
193  virtual void updateCoeffs();
194 
195 
196  // I-O
197 
198  //- Write
199  virtual void write(Ostream&) const;
200 };
201 
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 } // End namespace RASModels
206 } // End namespace compressible
207 } // End namespace Foam
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 
211 #endif
212 
213 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
TypeName("alphatFilmWallFunction")
Runtime type information.
alphatFilmWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:597
A FieldMapper for finite-volume patch fields.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
bool compressible
Definition: pEqn.H:2
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.
This boundary condition provides a turbulent thermal diffusivity condition when using wall functions...