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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::heatTransferCoeffModels::ReynoldsAnalogy
28
29Description
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
56Usage
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
91Note
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
95See also
96 - Foam::heatTransferCoeffModel
97 - Foam::heatTransferCoeffModels::fixedReferenceTemperature
98 - Foam::heatTransferCoeffModels::localReferenceTemperature
99
100SourceFiles
101 ReynoldsAnalogy.C
102
103\*---------------------------------------------------------------------------*/
104
105#ifndef heatTransferCoeffModels_ReynoldsAnalogy_H
106#define heatTransferCoeffModels_ReynoldsAnalogy_H
107
109
110// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111
112namespace Foam
113{
114namespace heatTransferCoeffModels
115{
116
117/*---------------------------------------------------------------------------*\
118 Class ReynoldsAnalogy Declaration
119\*---------------------------------------------------------------------------*/
120
121class ReynoldsAnalogy
122:
123 public heatTransferCoeffModel
124{
125protected:
126
127 // Protected Data
128
129 //- Name of velocity field
130 word UName_;
131
132 //- Reference velocity
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
166public:
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};
199
200// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202} // End namespace heatTransferCoeffModels
203} // End namespace Foam
205// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206
207#endif
208
209// ************************************************************************* //
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
An abstract base class for heat transfer coeffcient models.
tmp< FieldField< Field, scalar > > q() const
Return q boundary fields.
const fvMesh & mesh() const
The mesh reference.
const word & TName() const
Temperature name.
Heat transfer coefficient calculation based on Reynolds Analogy, which is used to relate turbulent mo...
scalar CpRef_
Reference specific heat capacity.
TypeName("ReynoldsAnalogy")
Runtime type information.
virtual tmp< volSymmTensorField > devReff() const
virtual ~ReynoldsAnalogy()=default
Destructor.
virtual bool read(const dictionary &dict)
Read from dictionary.
ReynoldsAnalogy(const ReynoldsAnalogy &)=delete
No copy construct.
ReynoldsAnalogy(const dictionary &dict, const fvMesh &mesh, const word &TName)
Construct from components.
word CpName_
Name of specific heat capacity field.
tmp< FieldField< Field, scalar > > Cf() const
virtual void htc(volScalarField &htc, const FieldField< Field, scalar > &q)
Set the heat transfer coefficient.
void operator=(const ReynoldsAnalogy &)=delete
No copy assignment.
A class for managing temporary objects.
Definition: tmp.H:65
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
Definition: word.H:68
const volScalarField & Cp
Definition: EEqn.H:7
Namespace for OpenFOAM.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73