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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::fv::variableHeatTransfer
29 
30 Group
31  grpFvOptionsSources
32 
33 Description
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 
66 Usage
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 
102 See also
103  - Foam::fv::interRegionHeatTransferModel
104  - Foam::fv::tabulatedHeatTransfer
105  - Foam::fv::tabulatedNTUHeatTransfer
106  - Foam::fv::constantHeatTransfer
107 
108 SourceFiles
109  variableHeatTransfer.C
110 
111 \*---------------------------------------------------------------------------*/
112 
113 #ifndef variableHeatTransfer_H
114 #define variableHeatTransfer_H
115 
117 #include "autoPtr.H"
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 namespace Foam
122 {
123 namespace fv
124 {
125 
126 /*---------------------------------------------------------------------------*\
127  Class variableHeatTransfer Declaration
128 \*---------------------------------------------------------------------------*/
129 
130 class variableHeatTransfer
131 :
132  public interRegionHeatTransferModel
133 {
134 
135  // Private Data
136 
137  //- Name of operand neighbour velocity field
138  word UNbrName_;
139 
140  //- Model constants
141  scalar a_;
142  scalar b_;
143  scalar c_;
144 
145  //- Strut diameter
146  scalar ds_;
147 
148  //- Fluid Prandtl number
149  scalar Pr_;
150 
151  //- Area per unit volume of heat exchanger
152  autoPtr<volScalarField> AoV_;
153 
154 
155 public:
156 
157  //- Runtime type information
158  TypeName("variableHeatTransfer");
159 
160 
161  // Constructors
162 
163  //- Construct from dictionary
165  (
166  const word& name,
167  const word& modelType,
168  const dictionary& dict,
169  const fvMesh& mesh
170  );
171 
172  //- No copy construct
174 
175  //- No copy assignment
176  void operator=(const variableHeatTransfer&) = delete;
177 
178 
179  //- Destructor
180  virtual ~variableHeatTransfer() = default;
181 
182 
183  // Public Functions
184 
185  //- Calculate the heat transfer coefficient
186  virtual void calculateHtc();
187 
188  //- Read dictionary
189  virtual bool read(const dictionary& dict);
190 };
191 
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 } // End namespace fv
196 } // End namespace Foam
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 #endif
201 
202 // ************************************************************************* //
Foam::fv::variableHeatTransfer
Applies a variable heat transfer model depending on local values for inter-region heat exchanges.
Definition: variableHeatTransfer.H:205
Foam::fv::option::name
const word & name() const noexcept
Return const access to the source name.
Definition: fvOptionI.H:31
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::fv::interRegionHeatTransferModel
Intermediate class for handling inter-region heat exchanges.
Definition: interRegionHeatTransferModel.H:142
Foam::fv::variableHeatTransfer::~variableHeatTransfer
virtual ~variableHeatTransfer()=default
Destructor.
interRegionHeatTransferModel.H
Foam::fv::variableHeatTransfer::calculateHtc
virtual void calculateHtc()
Calculate the heat transfer coefficient.
Definition: variableHeatTransfer.C:93
Foam::fv::variableHeatTransfer::variableHeatTransfer
variableHeatTransfer(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from dictionary.
Definition: variableHeatTransfer.C:48
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fv::variableHeatTransfer::TypeName
TypeName("variableHeatTransfer")
Runtime type information.
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fv
labelList fv(nPoints)
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::fv::option::mesh
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:37
Foam::fv::variableHeatTransfer::read
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: variableHeatTransfer.C:120
Foam::fv::variableHeatTransfer::operator=
void operator=(const variableHeatTransfer &)=delete
No copy assignment.
autoPtr.H