ReynoldsAnalogy.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) 2017-2020 OpenCFD Ltd.
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::heatTransferCoeffModels::ReynoldsAnalogy
28 
29 Description
30  Heat transfer coefficient calculation based on Reynolds Analogy
31 
32  The heat transfer coefficient is derived from the skin friction
33  coefficient:
34 
35  \f[
36  C_f = \frac{\tau_w}{0.5 \rho_\infty |U|^2}
37  \f]
38 
39  as:
40 
41  \f[
42  h = 0.5 \rho_\infty C_{p,\infty} |U_{\infty}| C_f
43  \f]
44 
45 Usage
46  Example of function object specification:
47  \verbatim
48  type heatTransferCoeff;
49  libs (fieldFunctionObjects);
50  ...
51  htcModel ReynoldsAnalogy;
52  UInf (20 0 0);
53  Cp CpInf;
54  CpInf 1005;
55  ...
56  \endverbatim
57 
58  Where the entries comprise:
59  \table
60  Property | Description | Required | Default value
61  type | type name: heatTransferCoeff | yes |
62  htcModel | selected htc model | yes |
63  UInf | reference velocity | yes |
64  Cp | specific heat capacity field name | no |
65  rho | density field name | no |
66  \endtable
67 
68  Note:
69  - to use a reference \c Cp, set \c Cp to \c CpInf
70  - to use a reference \c rho, set \c rho to \c rhoInf
71 
72 SourceFiles
73  ReynoldsAnalogy.C
74 
75 SeeAlso
76  Foam::heatTransferCoeffModel
77 
78 \*---------------------------------------------------------------------------*/
79 
80 #ifndef heatTransferCoeffModels_ReynoldsAnalogy_H
81 #define heatTransferCoeffModels_ReynoldsAnalogy_H
82 
83 #include "heatTransferCoeffModel.H"
84 
85 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86 
87 namespace Foam
88 {
89 namespace heatTransferCoeffModels
90 {
91 
92 /*---------------------------------------------------------------------------*\
93  Class ReynoldsAnalogy Declaration
94 \*---------------------------------------------------------------------------*/
95 
96 class ReynoldsAnalogy
97 :
98  public heatTransferCoeffModel
99 {
100 protected:
101 
102  // Protected Data
103 
104  //- Name of velocity field
105  word UName_;
106 
107  //- Reference velocity
108  vector URef_;
109 
110  //- Name of density field
111  word rhoName_;
112 
113  //- Reference density
114  scalar rhoRef_;
115 
116  //- Name of specific heat capacity field
117  word CpName_;
118 
119  //- Reference specific heat capacity
120  scalar CpRef_;
121 
122 
123  // Protected Member Functions
124 
125  virtual tmp<Field<scalar>> rho(const label patchi) const;
126 
127  virtual tmp<Field<scalar>> Cp(const label patchi) const;
128 
129  virtual tmp<volSymmTensorField> devReff() const;
130 
132 
133  //- Set the heat transfer coefficient
134  virtual void htc
135  (
138  );
139 
140 
141  //- No copy construct
142  ReynoldsAnalogy(const ReynoldsAnalogy&) = delete;
143 
144  //- No copy assignment
145  void operator=(const ReynoldsAnalogy&) = delete;
146 
147 
148 public:
149 
150  //- Runtime type information
151  TypeName("ReynoldsAnalogy");
152 
153 
154  // Constructors
155 
156  //- Construct from components
158  (
159  const dictionary& dict,
160  const fvMesh& mesh,
161  const word& TName
162  );
163 
164 
165  //- Destructor
166  virtual ~ReynoldsAnalogy() = default;
167 
168 
169  // Member Functions
170 
171  //- Read from dictionary
172  virtual bool read(const dictionary& dict);
173 };
174 
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 } // End namespace heatTransferCoeffModels
179 } // End namespace Foam
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 #endif
184 
185 // ************************************************************************* //
Foam::heatTransferCoeffModels::ReynoldsAnalogy::devReff
virtual tmp< volSymmTensorField > devReff() const
Definition: ReynoldsAnalogy.C:104
Foam::heatTransferCoeffModels::ReynoldsAnalogy::rhoRef_
scalar rhoRef_
Reference density.
Definition: ReynoldsAnalogy.H:143
Foam::heatTransferCoeffModel::mesh
const fvMesh & mesh() const
The mesh reference.
Definition: heatTransferCoeffModel.H:151
Foam::heatTransferCoeffModel
An abstract base class for heat transfer coeffcient models.
Definition: heatTransferCoeffModel.H:63
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:53
Foam::heatTransferCoeffModels::ReynoldsAnalogy::CpRef_
scalar CpRef_
Reference specific heat capacity.
Definition: ReynoldsAnalogy.H:149
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::heatTransferCoeffModels::ReynoldsAnalogy::ReynoldsAnalogy
ReynoldsAnalogy(const ReynoldsAnalogy &)=delete
No copy construct.
Foam::heatTransferCoeffModels::ReynoldsAnalogy::Cf
tmp< FieldField< Field, scalar > > Cf() const
Definition: ReynoldsAnalogy.C:162
Foam::heatTransferCoeffModels::ReynoldsAnalogy::UName_
word UName_
Name of velocity field.
Definition: ReynoldsAnalogy.H:134
Foam::heatTransferCoeffModels::ReynoldsAnalogy::Cp
virtual tmp< Field< scalar > > Cp(const label patchi) const
Definition: ReynoldsAnalogy.C:77
Foam::heatTransferCoeffModels::ReynoldsAnalogy::rho
virtual tmp< Field< scalar > > rho(const label patchi) const
Definition: ReynoldsAnalogy.C:54
Foam::heatTransferCoeffModel::TName
const word & TName() const
Temperature name.
Definition: heatTransferCoeffModel.H:163
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::heatTransferCoeffModels::ReynoldsAnalogy::rhoName_
word rhoName_
Name of density field.
Definition: ReynoldsAnalogy.H:140
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
Foam::heatTransferCoeffModels::ReynoldsAnalogy::htc
virtual void htc(volScalarField &htc, const FieldField< Field, scalar > &q)
Set the heat transfer coefficient.
Definition: ReynoldsAnalogy.C:247
heatTransferCoeffModel.H
Foam::heatTransferCoeffModels::ReynoldsAnalogy::read
virtual bool read(const dictionary &dict)
Read from dictionary.
Definition: ReynoldsAnalogy.C:219
Foam::Vector< scalar >
Foam::heatTransferCoeffModels::ReynoldsAnalogy::operator=
void operator=(const ReynoldsAnalogy &)=delete
No copy assignment.
Foam::heatTransferCoeffModels::ReynoldsAnalogy::TypeName
TypeName("ReynoldsAnalogy")
Runtime type information.
Foam::heatTransferCoeffModels::ReynoldsAnalogy::URef_
vector URef_
Reference velocity.
Definition: ReynoldsAnalogy.H:137
Foam::heatTransferCoeffModels::ReynoldsAnalogy
Heat transfer coefficient calculation based on Reynolds Analogy.
Definition: ReynoldsAnalogy.H:125
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::heatTransferCoeffModels::ReynoldsAnalogy::CpName_
word CpName_
Name of specific heat capacity field.
Definition: ReynoldsAnalogy.H:146
Foam::heatTransferCoeffModels::ReynoldsAnalogy::~ReynoldsAnalogy
virtual ~ReynoldsAnalogy()=default
Destructor.
Foam::heatTransferCoeffModel::q
tmp< FieldField< Field, scalar > > q() const
Return q boundary fields.
Definition: heatTransferCoeffModel.C:46