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-2023 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, internal field and dictionary
111  (
112  const fvPatch&,
113  const DimensionedField<scalar, volMesh>&,
114  const dictionary&
115  );
116 
117  //- Construct by mapping given
118  // convectiveHeatTransferFvPatchScalarField
119  // onto a new patch
121  (
123  const fvPatch&,
125  const fvPatchFieldMapper&
126  );
127 
128  //- Disallow copy without setting internal field reference
130  (
132  ) = delete;
133 
134  //- Copy constructor setting internal field reference
136  (
139  );
140 
141  //- Construct and return a clone setting internal field reference
143  (
145  ) const
146  {
148  (
150  );
151  }
152 
153 
154  // Member Functions
155 
156  // Evaluation functions
157 
158  //- Update the coefficients associated with the patch field
159  virtual void updateCoeffs();
160 
161 
162  // I-O
163 
164  //- Write
165  virtual void write(Ostream&) const;
166 };
167 
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 } // End namespace compressible
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #endif
177 
178 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
This boundary condition provides a convective heat transfer coefficient condition.
convectiveHeatTransferFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
TypeName("convectiveHeatTransfer")
Runtime type information.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Foam::fvPatchFieldMapper.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.