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 | Copyright (C) 2011-2015 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::alphatWallFunctionFvPatchScalarField
26 
27 Group
28  grpCmpWallFunctions
29 
30 Description
31  This boundary condition provides a turbulent thermal diffusivity conditon
32  when using wall functions
33  - replicates OpenFOAM v1.5 (and earlier) behaviour
34 
35  The turbulent thermal diffusivity calculated using:
36 
37  \f[
38  \alpha_t = \frac{\mu_t}{Pr_t}
39  \f]
40 
41  where
42 
43  \vartable
44  \alpha_t| turblence thermal diffusivity
45  \mu_t | turblence viscosity
46  Pr_t | turblent Prandtl number
47  \endvartable
48 
49  \heading Patch usage
50 
51  \table
52  Property | Description | Required | Default value
53  nut | turbulence viscosity field name | no | nut
54  Prt | turbulent Prandtl number | no | 0.85
55  \endtable
56 
57  Example of the boundary condition specification:
58  \verbatim
59  myPatch
60  {
61  type alphatWallFunction;
62  nut nut;
63  Prt 0.85;
64  value uniform 0; // optional value entry
65  }
66  \endverbatim
67 
68 SeeAlso
69  Foam::fixedValueFvPatchField
70 
71 SourceFiles
72  alphatWallFunctionFvPatchScalarField.C
73 
74 \*---------------------------------------------------------------------------*/
75 
76 #ifndef compressibleAlphatWallFunctionFvPatchScalarField_H
77 #define compressibleAlphatWallFunctionFvPatchScalarField_H
78 
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 namespace Foam
84 {
85 namespace compressible
86 {
87 
88 /*---------------------------------------------------------------------------*\
89  Class alphatWallFunctionFvPatchScalarField Declaration
90 \*---------------------------------------------------------------------------*/
91 
92 class alphatWallFunctionFvPatchScalarField
93 :
94  public fixedValueFvPatchScalarField
95 {
96  // Private data
97 
98  //- Turbulent Prandtl number (default = 0.85)
99  scalar Prt_;
100 
101 
102 public:
103 
104  //- Runtime type information
105  TypeName("compressible::alphatWallFunction");
106 
107 
108  // Constructors
109 
110  //- Construct from patch and internal field
112  (
113  const fvPatch&,
114  const DimensionedField<scalar, volMesh>&
115  );
116 
117  //- Construct from patch, internal field and dictionary
119  (
120  const fvPatch&,
122  const dictionary&
123  );
124 
125  //- Construct by mapping given
126  // alphatWallFunctionFvPatchScalarField
127  // onto a new patch
129  (
131  const fvPatch&,
133  const fvPatchFieldMapper&
134  );
135 
136  //- Construct as copy
138  (
140  );
141 
142  //- Construct and return a clone
143  virtual tmp<fvPatchScalarField> clone() const
144  {
146  (
148  );
149  }
150 
151  //- Construct as copy setting internal field reference
153  (
156  );
157 
158  //- Construct and return a clone setting internal field reference
160  (
162  ) const
163  {
165  (
167  );
168  }
169 
170 
171  // Member functions
172 
173  // Evaluation functions
174 
175  //- Update the coefficients associated with the patch field
176  virtual void updateCoeffs();
177 
178 
179  // I-O
180 
181  //- Write
182  virtual void write(Ostream&) const;
183 };
184 
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 } // End namespace compressible
189 } // End namespace Foam
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
Foam::compressible::alphatWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: alphatWallFunctionFvPatchScalarField.C:100
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::compressible::alphatWallFunctionFvPatchScalarField
This boundary condition provides a turbulent thermal diffusivity conditon when using wall functions.
Definition: alphatWallFunctionFvPatchScalarField.H:118
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::compressible::alphatWallFunctionFvPatchScalarField::Prt_
scalar Prt_
Turbulent Prandtl number (default = 0.85)
Definition: alphatWallFunctionFvPatchScalarField.H:125
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::compressible::alphatWallFunctionFvPatchScalarField::alphatWallFunctionFvPatchScalarField
alphatWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: alphatWallFunctionFvPatchScalarField.C:42
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:169
fixedValueFvPatchFields.H
compressible
bool compressible
Definition: pEqn.H:40
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::compressible::alphatWallFunctionFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: alphatWallFunctionFvPatchScalarField.C:129
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51