alphatWallFunctionFvPatchScalarField.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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::compressible::alphatWallFunctionFvPatchScalarField
28 
29 Group
30  grpCmpWallFunctions
31 
32 Description
33  This boundary condition provides a turbulent thermal diffusivity condition
34  when using wall functions
35  - replicates OpenFOAM v1.5 (and earlier) behaviour
36 
37  The turbulent thermal diffusivity calculated using:
38 
39  \f[
40  \alpha_t = \frac{\mu_t}{Pr_t}
41  \f]
42 
43  where
44 
45  \vartable
46  \alpha_t| turblence thermal diffusivity
47  \mu_t | turblence viscosity
48  Pr_t | turblent Prandtl number
49  \endvartable
50 
51 Usage
52  \table
53  Property | Description | Required | Default value
54  nut | turbulence viscosity field name | no | nut
55  Prt | turbulent Prandtl number | no | 0.85
56  \endtable
57 
58  Example of the boundary condition specification:
59  \verbatim
60  <patchName>
61  {
62  type alphatWallFunction;
63  nut nut;
64  Prt 0.85;
65  value uniform 0; // optional value entry
66  }
67  \endverbatim
68 
69 See also
70  Foam::fixedValueFvPatchField
71 
72 SourceFiles
73  alphatWallFunctionFvPatchScalarField.C
74 
75 \*---------------------------------------------------------------------------*/
76 
77 #ifndef compressible_alphatWallFunctionFvPatchScalarField_H
78 #define compressible_alphatWallFunctionFvPatchScalarField_H
79 
81 
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 
84 namespace Foam
85 {
86 namespace compressible
87 {
88 
89 /*---------------------------------------------------------------------------*\
90  Class alphatWallFunctionFvPatchScalarField Declaration
91 \*---------------------------------------------------------------------------*/
92 
93 class alphatWallFunctionFvPatchScalarField
94 :
95  public fixedValueFvPatchScalarField
96 {
97  // Private data
98 
99  //- Turbulent Prandtl number (default = 0.85)
100  scalar Prt_;
101 
102 
103 public:
104 
105  //- Runtime type information
106  TypeName("compressible::alphatWallFunction");
107 
108 
109  // Constructors
110 
111  //- Construct from patch and internal field
113  (
114  const fvPatch&,
115  const DimensionedField<scalar, volMesh>&
116  );
117 
118  //- Construct from patch, internal field and dictionary
120  (
121  const fvPatch&,
123  const dictionary&
124  );
125 
126  //- Construct by mapping given
127  // alphatWallFunctionFvPatchScalarField
128  // onto a new patch
130  (
132  const fvPatch&,
134  const fvPatchFieldMapper&
135  );
136 
137  //- Construct as copy
139  (
141  );
142 
143  //- Construct and return a clone
144  virtual tmp<fvPatchScalarField> clone() const
145  {
147  (
149  );
150  }
151 
152  //- Construct as copy setting internal field reference
154  (
157  );
158 
159  //- Construct and return a clone setting internal field reference
161  (
163  ) const
164  {
166  (
168  );
169  }
170 
171 
172  // Member functions
173 
174  // Evaluation functions
175 
176  //- Update the coefficients associated with the patch field
177  virtual void updateCoeffs();
178 
179 
180  // I-O
181 
182  //- Write
183  virtual void write(Ostream&) const;
184 };
185 
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 } // End namespace compressible
190 } // End namespace Foam
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************************************************************* //
Foam::compressible::alphatWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: alphatWallFunctionFvPatchScalarField.C:103
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::compressible::alphatWallFunctionFvPatchScalarField
This boundary condition provides a turbulent thermal diffusivity condition when using wall functions.
Definition: alphatWallFunctionFvPatchScalarField.H:119
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:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::compressible::alphatWallFunctionFvPatchScalarField::alphatWallFunctionFvPatchScalarField
alphatWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: alphatWallFunctionFvPatchScalarField.C:45
Foam::compressible::alphatWallFunctionFvPatchScalarField::TypeName
TypeName("compressible::alphatWallFunction")
Runtime type information.
Foam::compressible::alphatWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: alphatWallFunctionFvPatchScalarField.H:170
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
Foam::compressible::alphatWallFunctionFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: alphatWallFunctionFvPatchScalarField.C:132
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54