alphatJayatillekeWallFunctionFvPatchScalarField.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) 2017 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::alphatJayatillekeWallFunctionFvPatchScalarField
29 
30 Group
31  grpCmpWallFunctions
32 
33 Description
34  This boundary condition provides a thermal wall function for turbulent
35  thermal diffusivity (usually\c alphat) based on the Jayatilleke model.
36 
37 Usage
38  \table
39  Property | Description | Required | Default value
40  Prt | turbulent Prandtl number | no | 0.85
41  kappa | Von Karman constant | no | 0.41
42  E | model coefficient | no | 9.8
43  \endtable
44 
45  Example of the boundary condition specification:
46  \verbatim
47  <patchName>
48  {
49  type alphatJayatillekeWallFunction;
50  Prt 0.85;
51  kappa 0.41;
52  E 9.8;
53  value uniform 0; // optional value entry
54  }
55  \endverbatim
56 
57 See also
58  Foam::fixedValueFvPatchField
59 
60 SourceFiles
61  alphatJayatillekeWallFunctionFvPatchScalarField.C
62 
63 \*---------------------------------------------------------------------------*/
64 
65 #ifndef compressible_alphatJayatillekeWallFunctionFvPatchScalarField_H
66 #define compressible_alphatJayatillekeWallFunctionFvPatchScalarField_H
67 
70 
71 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72 
73 namespace Foam
74 {
75 namespace compressible
76 {
77 
78 /*---------------------------------------------------------------------------*\
79  Class alphatJayatillekeWallFunctionFvPatchScalarField Declaration
80 \*---------------------------------------------------------------------------*/
81 
82 class alphatJayatillekeWallFunctionFvPatchScalarField
83 :
84  public fixedValueFvPatchScalarField
85 {
86  // Private data
87 
88  //- Turbulent Prandtl number
89  scalar Prt_;
90 
91  //- Von Karman constant
92  scalar kappa_;
93 
94  //- E coefficient
95  scalar E_;
96 
97 
98  // Solution parameters
99 
100  static scalar maxExp_;
101  static scalar tolerance_;
102  static label maxIters_;
103 
104 
105  // Private Member Functions
106 
107  //- Check the type of the patch
108  void checkType();
109 
110  //- Return the patch y+
111  tmp<scalarField> yPlus
112  (
113  const compressible::turbulenceModel& turbModel
114  ) const;
115 
116  //- `P' function
117  scalar Psmooth(const scalar Prat) const;
118 
119  //- Calculate y+ at the edge of the thermal laminar sublayer
120  scalar yPlusTherm
121  (
122  const scalar P,
123  const scalar Prat
124  ) const;
125 
126 
127 public:
128 
129  //- Runtime type information
130  TypeName("compressible::alphatJayatillekeWallFunction");
131 
132 
133  // Constructors
134 
135  //- Construct from patch and internal field
137  (
138  const fvPatch&,
140  );
141 
142  //- Construct from patch, internal field and dictionary
144  (
145  const fvPatch&,
147  const dictionary&
148  );
149 
150  //- Construct by mapping given an
151  // alphatJayatillekeWallFunctionFvPatchScalarField
152  // onto a new patch
154  (
156  const fvPatch&,
158  const fvPatchFieldMapper&
159  );
160 
161  //- Construct as copy
163  (
165  );
166 
167  //- Construct and return a clone
168  virtual tmp<fvPatchScalarField> clone() const
169  {
171  (
173  );
174  }
175 
176  //- Construct as copy setting internal field reference
178  (
181  );
182 
183  //- Construct and return a clone setting internal field reference
185  (
187  ) const
188  {
190  (
192  (
193  *this,
194  iF
195  )
196  );
197  }
198 
199 
200  // Member functions
201 
202  // Evaluation functions
203 
204  //- Update the coefficients associated with the patch field
205  virtual void updateCoeffs();
206 
207 
208  // I-O
209 
210  //- Write
211  void write(Ostream&) const;
212 };
213 
214 
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 
217 } // End namespace compressible
218 } // End namespace Foam
219 
220 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221 
222 #endif
223 
224 // ************************************************************************* //
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:219
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:187
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField
This boundary condition provides a thermal wall function for turbulent thermal diffusivity (usuallyal...
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.H:101
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::write
void write(Ostream &) const
Write.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:324
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::alphatJayatillekeWallFunctionFvPatchScalarField
alphatJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: alphatJayatillekeWallFunctionFvPatchScalarField.C:139
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
compressible
bool compressible
Definition: pEqn.H:2
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::ThermalDiffusivity
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
Definition: phaseCompressibleTurbulenceModelFwd.H:47
fixedValueFvPatchFields.H
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
turbulentFluidThermoModel.H
Foam::compressible::alphatJayatillekeWallFunctionFvPatchScalarField::TypeName
TypeName("compressible::alphatJayatillekeWallFunction")
Runtime type information.
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54