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-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::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  \heading Patch usage
54 
55  \table
56  Property | Description | Required | Default value
57  L | Length scale [m] | yes |
58  \endtable
59 
60  Example of the boundary condition specification:
61  \verbatim
62  myPatch
63  {
64  type convectiveHeatTransfer;
65  L 0.1;
66  }
67  \endverbatim
68 
69 SeeAlso
70  Foam::fixedValueFvPatchField
71 
72 SourceFiles
73  convectiveHeatTransferFvPatchScalarField.C
74 
75 \*---------------------------------------------------------------------------*/
76 
77 #ifndef compressibleMutRoughWallFunctionFvPatchScalarField_H
78 #define compressibleMutRoughWallFunctionFvPatchScalarField_H
79 
81 
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 
84 namespace Foam
85 {
86 namespace compressible
87 {
88 
89 /*---------------------------------------------------------------------------*\
90  Class convectiveHeatTransferFvPatchScalarField Declaration
91 \*---------------------------------------------------------------------------*/
92 
93 class convectiveHeatTransferFvPatchScalarField
94 :
95  public fixedValueFvPatchScalarField
96 {
97 protected:
98 
99  // Protected data
100 
101  //- L Length scale [m]
102  const scalar L_;
103 
104 
105 public:
106 
107  //- Runtime type information
108  TypeName("convectiveHeatTransfer");
109 
110 
111  // Constructors
112 
113  //- Construct from patch and internal field
115  (
116  const fvPatch&,
117  const DimensionedField<scalar, volMesh>&
118  );
119 
120  //- Construct from patch, internal field and dictionary
122  (
123  const fvPatch&,
125  const dictionary&
126  );
127 
128  //- Construct by mapping given
129  // convectiveHeatTransferFvPatchScalarField
130  // onto a new patch
132  (
134  const fvPatch&,
136  const fvPatchFieldMapper&
137  );
138 
139  //- Construct as copy
141  (
143  );
144 
145  //- Construct and return a clone
146  virtual tmp<fvPatchScalarField> clone() const
147  {
149  (
151  );
152  }
153 
154  //- Construct as copy setting internal field reference
156  (
159  );
160 
161  //- Construct and return a clone setting internal field reference
163  (
165  ) const
166  {
168  (
170  );
171  }
172 
173 
174  // Member functions
175 
176  // Evaluation functions
177 
178  //- Update the coefficients associated with the patch field
179  virtual void updateCoeffs();
180 
181 
182  // I-O
183 
184  //- Write
185  virtual void write(Ostream&) const;
186 };
187 
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 } // End namespace compressible
192 } // End namespace Foam
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 
196 #endif
197 
198 // ************************************************************************* //
Foam::compressible::convectiveHeatTransferFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: convectiveHeatTransferFvPatchScalarField.H:175
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::compressible::convectiveHeatTransferFvPatchScalarField::TypeName
TypeName("convectiveHeatTransfer")
Runtime type information.
Foam::compressible::convectiveHeatTransferFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: convectiveHeatTransferFvPatchScalarField.C:104
Foam::compressible::convectiveHeatTransferFvPatchScalarField::convectiveHeatTransferFvPatchScalarField
convectiveHeatTransferFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: convectiveHeatTransferFvPatchScalarField.C:42
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
Namespace for OpenFOAM.
Definition: combustionModel.C:30
fixedValueFvPatchFields.H
compressible
bool compressible
Definition: pEqn.H:40
Foam::compressible::convectiveHeatTransferFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: convectiveHeatTransferFvPatchScalarField.C:161
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::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51
Foam::compressible::convectiveHeatTransferFvPatchScalarField
This boundary condition provides a convective heat transfer coefficient condition.
Definition: convectiveHeatTransferFvPatchScalarField.H:122
Foam::compressible::convectiveHeatTransferFvPatchScalarField::L_
const scalar L_
L Length scale [m].
Definition: convectiveHeatTransferFvPatchScalarField.H:131