heatTransferCoefficientModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::fv::heatTransferCoefficientModel
26 
27 Description
28  Base class for heat transfer coefficient modelling used in heat transfer
29  fvModels
30 
31 SourceFiles
32  heatTransferCoefficientModel.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef heatTransferCoefficientModel_H
37 #define heatTransferCoefficientModel_H
38 
39 #include "volFields.H"
40 #include "interRegionModel.H"
41 #include "runTimeSelectionTables.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace fv
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class heatTransferCoefficientModel Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56 protected:
57 
58  // Protected Member Data
59 
60  //- Reference to the mesh
61  const fvMesh& mesh_;
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("heatTransferCoefficientModel");
68 
69 
70  // Declare runtime construction
71 
73  (
74  autoPtr,
76  mesh,
77  (
78  const dictionary& dict,
79  const fvMesh& mesh
80  ),
81  (dict, mesh)
82  );
83 
85  (
86  autoPtr,
88  model,
89  (
90  const dictionary& dict,
91  const interRegionModel& model
92  ),
93  (dict, model)
94  );
95 
96 
97  // Constructors
98 
99  //- Construct from dictionary and mesh
101  (
102  const word& modelType,
103  const dictionary& dict,
104  const fvMesh& mesh
105  );
106 
107  //- Construct from dictionary and model
109  (
110  const word& modelType,
111  const dictionary& dict,
112  const interRegionModel& model
113  );
114 
115  //- Disallow default bitwise copy construction
117  (
119  ) = delete;
120 
121 
122  // Selectors
123 
124  //- Select from dictionary and mesh
126  (
127  const dictionary& dict,
128  const fvMesh& mesh
129  );
130 
131  //- Select from dictionary and model
133  (
134  const dictionary& dict,
135  const interRegionModel& model
136  );
137 
138 
139  //- Destructor
141 
142 
143  // Member Functions
144 
145  //- Get the heat transfer coefficient
146  virtual tmp<volScalarField> htc() const = 0;
147 
148  //- Correct the heat transfer coefficient
149  virtual void correct() = 0;
150 
151  //- Read dictionary
152  virtual bool read(const dictionary& dict);
153 };
154 
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace fv
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Base class for heat transfer coefficient modelling used in heat transfer fvModels.
TypeName("heatTransferCoefficientModel")
Runtime type information.
const fvMesh & mesh_
Reference to the mesh.
virtual bool read(const dictionary &dict)
Read dictionary.
virtual tmp< volScalarField > htc() const =0
Get the heat transfer coefficient.
virtual void correct()=0
Correct the heat transfer coefficient.
static autoPtr< heatTransferCoefficientModel > New(const dictionary &dict, const fvMesh &mesh)
Select from dictionary and mesh.
heatTransferCoefficientModel(const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from dictionary and mesh.
declareRunTimeSelectionTable(autoPtr, heatTransferCoefficientModel, mesh,(const dictionary &dict, const fvMesh &mesh),(dict, mesh))
Base class for inter-region exchange.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
labelList fv(nPoints)
Macros to ease declaration of run-time selection tables.
dictionary dict