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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::compressible::convectiveHeatTransferFvPatchScalarField
28 
29 Group
30  grpCmpBoundaryConditions
31 
32 Description
33  This boundary condition provides a convective heat transfer coefficient
34  condition
35 
36  if Re > 500000
37  \f[
38  htc_p = \frac{0.664 Re^{0.5} Pr^{0.333} \kappa_p}{L}
39  \f]
40  else
41  \f[
42  htc_p = \frac{0.037 Re^{0.8} Pr^{0.333} \kappa_p}{L}
43  \f]
44 
45  where
46 
47  \vartable
48  htc_p | patch convective heat transfer coefficient
49  Re | Reynolds number
50  Pr | Prandtl number
51  \kappa_p | thermal conductivity
52  L | length scale
53  \endvartable
54 
55 Usage
56  \table
57  Property | Description | Required | Default value
58  L | Length scale [m] | yes |
59  \endtable
60 
61  Example of the boundary condition specification:
62  \verbatim
63  <patchName>
64  {
65  type convectiveHeatTransfer;
66  L 0.1;
67  }
68  \endverbatim
69 
70 See also
71  Foam::fixedValueFvPatchField
72 
73 SourceFiles
74  convectiveHeatTransferFvPatchScalarField.C
75 
76 \*---------------------------------------------------------------------------*/
77 
78 #ifndef convectiveHeatTransferFvPatchScalarField_H
79 #define convectiveHeatTransferFvPatchScalarField_H
80 
82 
83 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
84 
85 namespace Foam
86 {
87 namespace compressible
88 {
89 
90 /*---------------------------------------------------------------------------*\
91  Class convectiveHeatTransferFvPatchScalarField Declaration
92 \*---------------------------------------------------------------------------*/
93 
94 class convectiveHeatTransferFvPatchScalarField
95 :
96  public fixedValueFvPatchScalarField
97 {
98 protected:
99 
100  // Protected data
101 
102  //- L Length scale [m]
103  const scalar L_;
104 
105 
106 public:
107 
108  //- Runtime type information
109  TypeName("convectiveHeatTransfer");
110 
111 
112  // Constructors
113 
114  //- Construct from patch and internal field
116  (
117  const fvPatch&,
118  const DimensionedField<scalar, volMesh>&
119  );
120 
121  //- Construct from patch, internal field and dictionary
123  (
124  const fvPatch&,
126  const dictionary&
127  );
128 
129  //- Construct by mapping given
130  // convectiveHeatTransferFvPatchScalarField
131  // onto a new patch
133  (
135  const fvPatch&,
137  const fvPatchFieldMapper&
138  );
139 
140  //- Construct as copy
142  (
144  );
145 
146  //- Construct and return a clone
147  virtual tmp<fvPatchScalarField> clone() const
148  {
150  (
152  );
153  }
154 
155  //- Construct as copy setting internal field reference
157  (
160  );
161 
162  //- Construct and return a clone setting internal field reference
164  (
166  ) const
167  {
169  (
171  );
172  }
173 
174 
175  // Member functions
176 
177  // Evaluation functions
178 
179  //- Update the coefficients associated with the patch field
180  virtual void updateCoeffs();
181 
182 
183  // I-O
184 
185  //- Write
186  virtual void write(Ostream&) const;
187 };
188 
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 } // End namespace compressible
193 } // End namespace Foam
194 
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 
197 #endif
198 
199 // ************************************************************************* //
Foam::compressible::convectiveHeatTransferFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: convectiveHeatTransferFvPatchScalarField.H:176
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
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:106
Foam::compressible::convectiveHeatTransferFvPatchScalarField::convectiveHeatTransferFvPatchScalarField
convectiveHeatTransferFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: convectiveHeatTransferFvPatchScalarField.C:44
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
compressible
bool compressible
Definition: pEqn.H:2
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fixedValueFvPatchFields.H
Foam::compressible::convectiveHeatTransferFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: convectiveHeatTransferFvPatchScalarField.C:163
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
Foam::compressible::convectiveHeatTransferFvPatchScalarField
This boundary condition provides a convective heat transfer coefficient condition.
Definition: convectiveHeatTransferFvPatchScalarField.H:123
Foam::compressible::convectiveHeatTransferFvPatchScalarField::L_
const scalar L_
L Length scale [m].
Definition: convectiveHeatTransferFvPatchScalarField.H:132