Loading...
Searching...
No Matches
variableHeatTransfer.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-2015 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::fv::variableHeatTransfer
29
30Group
31 grpFvOptionsSources
32
33Description
34 Applies a variable heat transfer model depending
35 on local values for inter-region heat exchanges.
36
37 The area of contact between regions (area) must be provided.
38 The Nu number is calculated as:
39
40 \f[
41 Nu = a \, \textrm{Re}^b \, \textrm{Pr}^c
42 \f]
43
44 and the heat transfer coefficient as:
45
46 \f[
47 htc = \frac{\textrm{Nu} \, K}{ds}
48 \f]
49
50 where
51 \vartable
52 htc | Heat transfer coefficient
53 Nu | Nusselt number
54 Re | Reynolds number
55 Pr | Fluid Prandtl number
56 K | Heat conduction
57 ds | Strut diameter
58 a, b, c | Model constants
59 \endvartable
60
61 Required fields:
62 \verbatim
63 AoV | Area per unit volume of heat exchanger [1/m]
64 \endverbatim
65
66Usage
67 Minimal example by using \c constant/fvOptions:
68 \verbatim
69 variableHeatTransfer1
70 {
71 // Mandatory entries (unmodifiable)
72 type variableHeatTransfer;
73
74 // Optional entries (runtime modifiable)
75 UNbr U;
76 a 0.0;
77 b 0.0;
78 c 0.0;
79 ds 0.0;
80 Pr 0.0;
81
82 // Mandatory/Optional (inherited) entries
83 ...
84 }
85 \endverbatim
86
87 where the entries mean:
88 \table
89 Property | Description | Type | Reqd | Dflt
90 type | Type name: variableHeatTransfer | word | yes | -
91 UNbr | Name of operand neighbour velocity field | word | no | U
92 a | Model constant | scalar | no | 0
93 b | Model constant | scalar | no | 0
94 c | Model constant | scalar | no | 0
95 ds | Struct diameter | scalar | no | 0
96 Pr | Fluid Prandtl number | scalar | no | 0
97 \endtable
98
99 The inherited entries are elaborated in:
100 - \link interRegionHeatTransfer.H \endlink
101
102Notes
103 - With v2512, the denominator of the Reynolds number calculation has been
104 changed from 'mut' to 'muEff'. For fully turbulent regions, there should be
105 no significant difference as mut >> mu, thus muEff ~ mut. However, in
106 porous/laminar regions, this change prevents the Reynolds number from
107 blowing up due to very low turbulent viscosity. Instead, the classical
108 laminar Reynolds number is now used in such regions.
109
110SourceFiles
111 variableHeatTransfer.C
112
113\*---------------------------------------------------------------------------*/
114
115#ifndef variableHeatTransfer_H
116#define variableHeatTransfer_H
117
119#include "autoPtr.H"
120
121// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122
123namespace Foam
124{
125namespace fv
126{
127
128/*---------------------------------------------------------------------------*\
129 Class variableHeatTransfer Declaration
130\*---------------------------------------------------------------------------*/
131
133:
135{
136
137 // Private Data
138
139 //- Name of operand neighbour velocity field
140 word UNbrName_;
141
142 //- Model constants
143 scalar a_;
144 scalar b_;
145 scalar c_;
146
147 //- Strut diameter
148 scalar ds_;
149
150 //- Fluid Prandtl number
151 scalar Pr_;
152
153 //- Area per unit volume of heat exchanger
154 autoPtr<volScalarField> AoV_;
155
156
157public:
158
159 //- Runtime type information
160 TypeName("variableHeatTransfer");
161
162
163 // Constructors
164
165 //- Construct from dictionary
167 (
168 const word& name,
169 const word& modelType,
170 const dictionary& dict,
171 const fvMesh& mesh
172 );
173
174 //- No copy construct
176
177 //- No copy assignment
178 void operator=(const variableHeatTransfer&) = delete;
179
180
181 //- Destructor
182 virtual ~variableHeatTransfer() = default;
183
184
185 // Public Functions
186
187 //- Calculate the heat transfer coefficient
188 virtual void calculateHtc();
189
190 //- Read dictionary
191 virtual bool read(const dictionary& dict);
192};
193
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197} // End namespace fv
198} // End namespace Foam
199
200// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201
202#endif
204// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
Intermediate class for handling inter-region heat exchanges.
interRegionHeatTransferModel(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from dictionary.
const word & name() const noexcept
Return const access to the source name.
Definition fvOptionI.H:24
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition fvOptionI.H:30
Applies a variable heat transfer model depending on local values for inter-region heat exchanges.
virtual ~variableHeatTransfer()=default
Destructor.
TypeName("variableHeatTransfer")
Runtime type information.
void operator=(const variableHeatTransfer &)=delete
No copy assignment.
variableHeatTransfer(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from dictionary.
virtual bool read(const dictionary &dict)
Read dictionary.
virtual void calculateHtc()
Calculate the heat transfer coefficient.
variableHeatTransfer(const variableHeatTransfer &)=delete
No copy construct.
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for finite-volume.
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68