convectiveHeatTransferFvPatchScalarField.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-2016 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::convectiveHeatTransferFvPatchScalarField
26 
27 Group
28  grpCmpBoundaryConditions
29 
30 Description
31  This boundary condition provides a convective heat transfer coefficient
32  condition
33 
34  if Re > 500000
35  \f[
36  htc_p = \frac{0.664 Re^{0.5} Pr^{0.333} \kappa_p}{L}
37  \f]
38  else
39  \f[
40  htc_p = \frac{0.037 Re^{0.8} Pr^{0.333} \kappa_p}{L}
41  \f]
42 
43  where
44 
45  \vartable
46  htc_p | patch convective heat transfer coefficient
47  Re | Reynolds number
48  Pr | Prandtl number
49  \kappa_p | thermal conductivity
50  L | length scale
51  \endvartable
52 
53 Usage
54  \table
55  Property | Description | Required | Default value
56  L | Length scale [m] | yes |
57  \endtable
58 
59  Example of the boundary condition specification:
60  \verbatim
61  <patchName>
62  {
63  type convectiveHeatTransfer;
64  L 0.1;
65  }
66  \endverbatim
67 
68 See also
69  Foam::fixedValueFvPatchField
70 
71 SourceFiles
72  convectiveHeatTransferFvPatchScalarField.C
73 
74 \*---------------------------------------------------------------------------*/
75 
76 #ifndef compressibleMutRoughWallFunctionFvPatchScalarField_H
77 #define compressibleMutRoughWallFunctionFvPatchScalarField_H
78 
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 namespace Foam
84 {
85 namespace compressible
86 {
87 
88 /*---------------------------------------------------------------------------*\
89  Class convectiveHeatTransferFvPatchScalarField Declaration
90 \*---------------------------------------------------------------------------*/
91 
92 class convectiveHeatTransferFvPatchScalarField
93 :
94  public fixedValueFvPatchScalarField
95 {
96 protected:
97 
98  // Protected data
99 
100  //- L Length scale [m]
101  const scalar L_;
102 
103 
104 public:
105 
106  //- Runtime type information
107  TypeName("convectiveHeatTransfer");
108 
109 
110  // Constructors
111 
112  //- Construct from patch and internal field
114  (
115  const fvPatch&,
116  const DimensionedField<scalar, volMesh>&
117  );
118 
119  //- Construct from patch, internal field and dictionary
121  (
122  const fvPatch&,
124  const dictionary&
125  );
126 
127  //- Construct by mapping given
128  // convectiveHeatTransferFvPatchScalarField
129  // onto a new patch
131  (
133  const fvPatch&,
135  const fvPatchFieldMapper&
136  );
137 
138  //- Construct as copy
140  (
142  );
143 
144  //- Construct and return a clone
145  virtual tmp<fvPatchScalarField> clone() const
146  {
148  (
150  );
151  }
152 
153  //- Construct as copy setting internal field reference
155  (
158  );
159 
160  //- Construct and return a clone setting internal field reference
162  (
164  ) const
165  {
167  (
169  );
170  }
171 
172 
173  // Member functions
175  // Evaluation functions
176 
177  //- Update the coefficients associated with the patch field
178  virtual void updateCoeffs();
179 
180 
181  // I-O
182 
183  //- Write
184  virtual void write(Ostream&) const;
185 };
186 
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 } // End namespace compressible
191 } // End namespace Foam
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 #endif
196 
197 // ************************************************************************* //
This boundary condition provides a convective heat transfer coefficient condition.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
TypeName("convectiveHeatTransfer")
Runtime type information.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::fvPatchFieldMapper.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
convectiveHeatTransferFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
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: PtrList.H:54
Namespace for OpenFOAM.
bool compressible
Definition: pEqn.H:30