tabulatedHeatTransfer.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-2016 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::tabulatedHeatTransfer
29 
30 Group
31  grpFvOptionsSources
32 
33 Description
34  Applies a tabulated heat transfer model for inter-region heat exchanges.
35 
36  The 2D table returns the heat transfer coefficient
37  by querying the local and neighbour region velocities.
38 
39  Required fields:
40  \verbatim
41  AoV | Area per unit volume of heat exchanger [1/m]
42  \endverbatim
43 
44 Usage
45  Minimal example by using \c constant/fvOptions:
46  \verbatim
47  tabulatedHeatTransfer1
48  {
49  // Mandatory entries (unmodifiable)
50  type tabulatedHeatTransfer;
51  outOfBounds clamp;
52  file "table";
53 
54  // Optional entries (unmodifiable)
55  U <Uname>;
56  UNbr <UnbrName>;
57 
58  // Mandatory/Optional (inherited) entries
59  ...
60  }
61  \endverbatim
62 
63  where the entries mean:
64  \table
65  Property | Description | Type | Reqd | Dflt
66  type | Type name: tabulatedHeatTransfer | word | yes | -
67  file | Heat transfer coefficient table | interpolate2DTable | yes | -
68  U | Name of operand velocity field | word | no | U
69  UNbr | Name of operand neighbour velocity field | word | no | U
70  \endtable
71 
72  The inherited entries are elaborated in:
73  - \link interRegionHeatTransfer.H \endlink
74  - \link interpolate2DTable.H \endlink
75 
76 See also
77  - Foam::fv::interRegionHeatTransferModel
78  - Foam::fv::constantHeatTransfer
79  - Foam::fv::tabulatedNTUHeatTransfer
80  - Foam::fv::variableHeatTransfer
81 
82 SourceFiles
83  tabulatedHeatTransfer.C
84 
85 \*---------------------------------------------------------------------------*/
86 
87 #ifndef tabulatedHeatTransfer_H
88 #define tabulatedHeatTransfer_H
89 
91 #include "autoPtr.H"
92 #include "interpolation2DTable.H"
93 
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95 
96 namespace Foam
97 {
98 namespace fv
99 {
100 
101 /*---------------------------------------------------------------------------*\
102  Class tabulatedHeatTransfer Declaration
103 \*---------------------------------------------------------------------------*/
104 
105 class tabulatedHeatTransfer
106 :
107  public interRegionHeatTransferModel
108 {
109 
110  // Private Data
111 
112  //- Name of operand velocity field
113  word UName_;
114 
115  //- Name of neighbour velocity field
116  word UNbrName_;
117 
118  //- 2D look up table
119  autoPtr<interpolation2DTable<scalar>> hTable_;
120 
121  //- Area per unit volume of heat exchanger
122  autoPtr<volScalarField> AoV_;
123 
124  //- Heat transfer coefficient table
125  const interpolation2DTable<scalar>& hTable();
126 
127  //- Field of area divided by volume
128  const volScalarField& AoV();
129 
130  //- Start time name
131  const word startTimeName_;
132 
133 
134 public:
135 
136  //- Runtime type information
137  TypeName("tabulatedHeatTransfer");
138 
139 
140  // Constructors
141 
142  //- Construct from dictionary
144  (
145  const word& name,
146  const word& modelType,
147  const dictionary& dict,
148  const fvMesh& mesh
149  );
150 
151  //- No copy construct
153 
154  //- No copy assignment
155  void operator=(const tabulatedHeatTransfer&) = delete;
156 
157 
158  //- Destructor
159  virtual ~tabulatedHeatTransfer() = default;
160 
161 
162  // Public Functions
163 
164  //- Calculate the heat transfer coefficient
165  virtual void calculateHtc();
166 
167  //- Read dictionary
168  virtual bool read(const dictionary& dict);
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace fv
175 } // End namespace Foam
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 
180 #endif
181 
182 // ************************************************************************* //
dictionary dict
void operator=(const tabulatedHeatTransfer &)=delete
No copy assignment.
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:30
virtual bool read(const dictionary &dict)
Read dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
tabulatedHeatTransfer(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from dictionary.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:72
TypeName("tabulatedHeatTransfer")
Runtime type information.
A class for handling words, derived from Foam::string.
Definition: word.H:63
labelList fv(nPoints)
virtual ~tabulatedHeatTransfer()=default
Destructor.
const word & name() const noexcept
Return const access to the source name.
Definition: fvOptionI.H:24
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual void calculateHtc()
Calculate the heat transfer coefficient.
Applies a tabulated heat transfer model for inter-region heat exchanges.
Namespace for OpenFOAM.