alphatJayatillekeWallFunctionFvPatchScalarField.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-2023 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::alphatJayatillekeWallFunctionFvPatchScalarField
26 
27 Description
28  This boundary condition provides a thermal wall function for turbulent
29  thermal diffusivity (usually\c alphat) based on the Jayatilleke model.
30 
31 Usage
32  \table
33  Property | Description | Required | Default value
34  Prt | turbulent Prandtl number | no | 0.85
35  \endtable
36 
37  Example of the boundary condition specification:
38  \verbatim
39  <patchName>
40  {
41  type alphatJayatillekeWallFunction;
42  Prt 0.85;
43  value uniform 0;
44  }
45  \endverbatim
46 
47  Note that other model constants (i.e., Cmu, kappa and E) are obtained from
48  the corresponding turbulent viscosity boundary condition.
49 
50 See also
51  Foam::fixedValueFvPatchField
52 
53 SourceFiles
54  alphatJayatillekeWallFunctionFvPatchScalarField.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef alphatJayatillekeWallFunctionFvPatchScalarField_H
59 #define alphatJayatillekeWallFunctionFvPatchScalarField_H
60 
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 
69 class fluidThermophysicalTransportModel;
70 
71 namespace compressible
72 {
73 
74 /*---------------------------------------------------------------------------*\
75  Class alphatJayatillekeWallFunctionFvPatchScalarField Declaration
76 \*---------------------------------------------------------------------------*/
77 
78 class alphatJayatillekeWallFunctionFvPatchScalarField
79 :
80  public fixedValueFvPatchScalarField
81 {
82  // Private Data
83 
84  //- Turbulent Prandtl number
85  scalar Prt_;
86 
87 
88  // Solution parameters
89 
90  static scalar maxExp_;
91  static scalar tolerance_;
92  static label maxIters_;
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("compressible::alphatJayatillekeWallFunction");
99 
100 
101  // Constructors
102 
103  //- Construct from patch, internal field and dictionary
105  (
106  const fvPatch&,
108  const dictionary&
109  );
110 
111  //- Construct by mapping given an
112  // alphatJayatillekeWallFunctionFvPatchScalarField
113  // onto a new patch
115  (
117  const fvPatch&,
119  const fvPatchFieldMapper&
120  );
121 
122  //- Disallow copy without setting internal field reference
124  (
126  ) = delete;
127 
128  //- Copy constructor setting internal field reference
130  (
133  );
134 
135  //- Construct and return a clone setting internal field reference
137  (
139  ) const
140  {
142  (
144  (
145  *this,
146  iF
147  )
148  );
149  }
150 
151 
152  // Member Functions
153 
154  // Evaluation functions
155 
156  //- Calculate the smoothing function
157  static tmp<scalarField> P(const scalarField& Prat);
158 
159  //- Calculate y+ at the edge of the thermal laminar sublayer
161  (
163  const scalarField& P,
164  const scalarField& Prat
165  );
166 
167  //- Calculate the turbulent thermal diffusivity
168  static tmp<scalarField> alphat
169  (
171  const scalar Prt,
172  const label patchi
173  );
174 
175  //- Update the coefficients associated with the patch field
176  virtual void updateCoeffs();
177 
178 
179  // I-O
180 
181  //- Write
182  void write(Ostream&) const;
183 };
184 
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 } // End namespace compressible
189 } // End namespace Foam
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
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:57
This boundary condition provides a thermal wall function for turbulent thermal diffusivity (usuallyal...
TypeName("compressible::alphatJayatillekeWallFunction")
Runtime type information.
static tmp< scalarField > alphat(const fluidThermophysicalTransportModel &ttm, const scalar Prt, const label patchi)
Calculate the turbulent thermal diffusivity.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
static tmp< scalarField > yPlusTherm(const nutWallFunctionFvPatchScalarField &nutw, const scalarField &P, const scalarField &Prat)
Calculate y+ at the edge of the thermal laminar sublayer.
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
static tmp< scalarField > P(const scalarField &Prat)
Calculate the smoothing function.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Abstract base class for fluid thermophysical transport models RAS, LES and laminar.
Foam::fvPatchFieldMapper.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions,...
A class for managing temporary objects.
Definition: tmp.H:55
label patchi
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59