convectiveHeatTransferFvPatchScalarField.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-2018 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 Description
28  This boundary condition provides a convective heat transfer coefficient
29  condition
30 
31  if Re > 500000
32  \f[
33  htc_p = \frac{0.664 Re^{0.5} Pr^{0.333} \kappa_p}{L}
34  \f]
35  else
36  \f[
37  htc_p = \frac{0.037 Re^{0.8} Pr^{0.333} \kappa_p}{L}
38  \f]
39 
40  where
41 
42  \vartable
43  htc_p | patch convective heat transfer coefficient
44  Re | Reynolds number
45  Pr | Prandtl number
46  \kappa_p | thermal conductivity
47  L | length scale
48  \endvartable
49 
50 Usage
51  \table
52  Property | Description | Required | Default value
53  L | Length scale [m] | yes |
54  \endtable
55 
56  Example of the boundary condition specification:
57  \verbatim
58  <patchName>
59  {
60  type convectiveHeatTransfer;
61  L 0.1;
62  }
63  \endverbatim
64 
65 See also
66  Foam::fixedValueFvPatchField
67 
68 SourceFiles
69  convectiveHeatTransferFvPatchScalarField.C
70 
71 \*---------------------------------------------------------------------------*/
72 
73 #ifndef convectiveHeatTransferFvPatchScalarField_H
74 #define convectiveHeatTransferFvPatchScalarField_H
75 
77 
78 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79 
80 namespace Foam
81 {
82 namespace compressible
83 {
84 
85 /*---------------------------------------------------------------------------*\
86  Class convectiveHeatTransferFvPatchScalarField Declaration
87 \*---------------------------------------------------------------------------*/
88 
89 class convectiveHeatTransferFvPatchScalarField
90 :
91  public fixedValueFvPatchScalarField
92 {
93 protected:
94 
95  // Protected data
96 
97  //- L Length scale [m]
98  const scalar L_;
99 
100 
101 public:
102 
103  //- Runtime type information
104  TypeName("convectiveHeatTransfer");
105 
106 
107  // Constructors
108 
109  //- Construct from patch and internal field
111  (
112  const fvPatch&,
113  const DimensionedField<scalar, volMesh>&
114  );
115 
116  //- Construct from patch, internal field and dictionary
118  (
119  const fvPatch&,
121  const dictionary&
122  );
123 
124  //- Construct by mapping given
125  // convectiveHeatTransferFvPatchScalarField
126  // onto a new patch
128  (
130  const fvPatch&,
132  const fvPatchFieldMapper&
133  );
134 
135  //- Construct as copy
137  (
139  );
140 
141  //- Construct and return a clone
142  virtual tmp<fvPatchScalarField> clone() const
143  {
145  (
147  );
148  }
149 
150  //- Construct as copy setting internal field reference
152  (
155  );
156 
157  //- Construct and return a clone setting internal field reference
159  (
161  ) const
162  {
164  (
166  );
167  }
168 
169 
170  // Member functions
172  // Evaluation functions
173 
174  //- Update the coefficients associated with the patch field
175  virtual void updateCoeffs();
176 
177 
178  // I-O
179 
180  //- Write
181  virtual void write(Ostream&) const;
182 };
183 
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 } // End namespace compressible
188 } // End namespace Foam
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #endif
193 
194 // ************************************************************************* //
This boundary condition provides a convective heat transfer coefficient condition.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
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.
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:53
Namespace for OpenFOAM.