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  which is used to relate turbulent momentum and heat transfer.
32 
33  The heat transfer coefficient is derived
34  from the skin friction coefficient:
35 
36  \f[
37  C_f = \frac{\tau_w}{0.5 \rho_\infty |U|^2}
38  \f]
39 
40  as:
41 
42  \f[
43  h = 0.5 \rho_\infty c_{p,\infty} |U_{\infty}| C_f
44  \f]
45 
46  where
47  \vartable
48  h | Convective heat transfer coefficient of the flow
49  \rho_\infty | Reference fluid density
50  c_{p,\infty} | Reference specific heat capacity at constant pressure
51  U_{\infty} | Reference velocity
52  C_f | Skin friction coefficient
53  \tau_w | Wall shear stress
54  \endvartable
55 
56 Usage
57  Minimal example by using \c system/controlDict.functions:
58  \verbatim
59  heatTransferCoeff1
60  {
61  // Mandatory and other optional entries
62  ...
63  htcModel ReynoldsAnalogy;
64 
65  // Conditional mandatory entries (runtime modifiable)
66  UInf (10 0 0);
67 
68  // Conditional optional entries (runtime modifiable)
69  Cp <CpName>;
70  rho <rhoName>;
71 
72  // mandatory if Cp == CpInf
73  CpInf 1005;
74 
75  // mandatory if rho == rhoInf
76  rhoInf 1;
77  }
78  \endverbatim
79 
80  where the entries mean:
81  \table
82  Property | Description | Type | Reqd | Dflt
83  type | Model name: ReynoldsAnalogy | word | yes | -
84  UInf | Reference velocity | scalar | yes | -
85  Cp | Name of reference specific heat capacity | word | no | Cp
86  CpInf | Reference specific heat capacity value | scalar | cndtnl | -
87  rho | Name of reference fluid density | word | no | rho
88  rhoInf | Reference fluid density value | scalar | cndtnl | -
89  \endtable
90 
91 Note
92  - to use a reference \c Cp, set \c Cp to \c CpInf
93  - to use a reference \c rho, set \c rho to \c rhoInf
94 
95 See also
96  - Foam::heatTransferCoeffModel
97  - Foam::heatTransferCoeffModels::fixedReferenceTemperature
98  - Foam::heatTransferCoeffModels::localReferenceTemperature
99 
100 SourceFiles
101  ReynoldsAnalogy.C
102 
103 \*---------------------------------------------------------------------------*/
104 
105 #ifndef heatTransferCoeffModels_ReynoldsAnalogy_H
106 #define heatTransferCoeffModels_ReynoldsAnalogy_H
107 
108 #include "heatTransferCoeffModel.H"
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 namespace Foam
113 {
114 namespace heatTransferCoeffModels
115 {
116 
117 /*---------------------------------------------------------------------------*\
118  Class ReynoldsAnalogy Declaration
119 \*---------------------------------------------------------------------------*/
120 
121 class ReynoldsAnalogy
122 :
123  public heatTransferCoeffModel
124 {
125 protected:
126 
127  // Protected Data
128 
129  //- Name of velocity field
130  word UName_;
131 
132  //- Reference velocity
133  vector URef_;
134 
135  //- Name of density field
136  word rhoName_;
137 
138  //- Reference density
139  scalar rhoRef_;
140 
141  //- Name of specific heat capacity field
142  word CpName_;
143 
144  //- Reference specific heat capacity
145  scalar CpRef_;
146 
147 
148  // Protected Member Functions
149 
150  virtual tmp<Field<scalar>> rho(const label patchi) const;
151 
152  virtual tmp<Field<scalar>> Cp(const label patchi) const;
153 
154  virtual tmp<volSymmTensorField> devReff() const;
155 
156  tmp<FieldField<Field, scalar>> Cf() const;
157 
158  //- Set the heat transfer coefficient
159  virtual void htc
160  (
162  const FieldField<Field, scalar>& q
163  );
164 
165 
166 public:
167 
168  //- Runtime type information
169  TypeName("ReynoldsAnalogy");
170 
171 
172  // Constructors
173 
174  //- Construct from components
176  (
177  const dictionary& dict,
178  const fvMesh& mesh,
179  const word& TName
180  );
181 
182  //- No copy construct
183  ReynoldsAnalogy(const ReynoldsAnalogy&) = delete;
184 
185  //- No copy assignment
186  void operator=(const ReynoldsAnalogy&) = delete;
187 
188 
189  //- Destructor
190  virtual ~ReynoldsAnalogy() = default;
191 
192 
193  // Member Functions
194 
195  //- Read from dictionary
196  virtual bool read(const dictionary& dict);
197 };
198 
199 
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 
202 } // End namespace heatTransferCoeffModels
203 } // End namespace Foam
204 
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 
207 #endif
208 
209 // ************************************************************************* //
Foam::heatTransferCoeffModels::ReynoldsAnalogy::devReff
virtual tmp< volSymmTensorField > devReff() const
Definition: ReynoldsAnalogy.C:103
Foam::heatTransferCoeffModels::ReynoldsAnalogy::rhoRef_
scalar rhoRef_
Reference density.
Definition: ReynoldsAnalogy.H:204
Foam::heatTransferCoeffModel::mesh
const fvMesh & mesh() const
The mesh reference.
Definition: heatTransferCoeffModel.H:190
Foam::heatTransferCoeffModel
An abstract base class for heat transfer coeffcient models.
Definition: heatTransferCoeffModel.H:104
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
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:210
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::heatTransferCoeffModels::ReynoldsAnalogy::ReynoldsAnalogy
ReynoldsAnalogy(const dictionary &dict, const fvMesh &mesh, const word &TName)
Construct from components.
Definition: ReynoldsAnalogy.C:197
Foam::heatTransferCoeffModels::ReynoldsAnalogy::Cf
tmp< FieldField< Field, scalar > > Cf() const
Definition: ReynoldsAnalogy.C:161
Foam::heatTransferCoeffModels::ReynoldsAnalogy::UName_
word UName_
Name of velocity field.
Definition: ReynoldsAnalogy.H:195
Foam::heatTransferCoeffModels::ReynoldsAnalogy::Cp
virtual tmp< Field< scalar > > Cp(const label patchi) const
Definition: ReynoldsAnalogy.C:76
Foam::heatTransferCoeffModels::ReynoldsAnalogy::rho
virtual tmp< Field< scalar > > rho(const label patchi) const
Definition: ReynoldsAnalogy.C:54
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::heatTransferCoeffModel::TName
const word & TName() const
Temperature name.
Definition: heatTransferCoeffModel.H:202
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::heatTransferCoeffModels::ReynoldsAnalogy::rhoName_
word rhoName_
Name of density field.
Definition: ReynoldsAnalogy.H:201
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
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:246
heatTransferCoeffModel.H
Foam::heatTransferCoeffModels::ReynoldsAnalogy::read
virtual bool read(const dictionary &dict)
Read from dictionary.
Definition: ReynoldsAnalogy.C:218
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:198
Foam::heatTransferCoeffModels::ReynoldsAnalogy
Heat transfer coefficient calculation based on Reynolds Analogy, which is used to relate turbulent mo...
Definition: ReynoldsAnalogy.H:186
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::heatTransferCoeffModels::ReynoldsAnalogy::CpName_
word CpName_
Name of specific heat capacity field.
Definition: ReynoldsAnalogy.H:207
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