Loading...
Searching...
No Matches
heatTransferCoeffModel.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-2023 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
26Namespace
27 Foam::heatTransferCoeffModels
28
29Description
30 A namespace for various heat transfer coefficient model implementations.
31
32Class
33 Foam::heatTransferCoeffModel
34
35Description
36 A base class for heat transfer coefficient models.
37
38SourceFiles
39 heatTransferCoeffModel.C
40 heatTransferCoeffModelNew.C
41
42\*---------------------------------------------------------------------------*/
43
44#ifndef Foam_heatTransferCoeffModel_H
45#define Foam_heatTransferCoeffModel_H
46
47#include "volFields.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53
54// Forward Declarations
55class fvMesh;
56
57/*---------------------------------------------------------------------------*\
58 Class heatTransferCoeffModel Declaration
59\*---------------------------------------------------------------------------*/
60
62{
63protected:
64
65 // Protected Data
67 //- Const reference to the mesh
68 const fvMesh& mesh_;
69
70 //- List of (wall) patches to process (selected by name)
72
73 //- Name of temperature field
74 const word TName_;
75
76 //- Name of radiative heat flux field
78
79
80 // Protected Member Functions
82 //- Set the heat transfer coefficient
83 virtual void htc
84 (
87 ) = 0;
88
90public:
91
92 //- Runtime type information
93 TypeName("heatTransferCoeffModel");
94
95
96 // Declare runtime constructor selection table
97
99 (
100 autoPtr,
103 (
104 const dictionary& dict,
105 const fvMesh& mesh,
106 const word& TName
107 ),
108 (dict, mesh, TName)
109 );
110
111
112 // Selectors
113
114 //- Return a reference to the selected heat transfer coefficient model
116 (
117 const dictionary& dict,
118 const fvMesh& mesh,
119 const word& TName
120 );
121
122
123 // Constructors
124
125 //- Construct from components
127 (
128 const dictionary& dict,
129 const fvMesh& mesh,
130 const word& TName
131 );
132
133 //- No copy construct
135
136 //- No copy assignment
137 void operator=(const heatTransferCoeffModel&) = delete;
138
139
140 //- Destructor
141 virtual ~heatTransferCoeffModel() = default;
142
143
144 // Member Functions
145
146 // Access
147
148 //- Return const reference to the mesh
149 const fvMesh& mesh() const noexcept { return mesh_; }
150
151 //- Return const reference to wall patches to process
152 const labelList& patchIDs() const noexcept { return patchIDs_; }
154 //- Return const reference to name of temperature field
155 const word& TName() const noexcept { return TName_; }
156
157 //- Return const reference to name of radiative heat-flux field
158 const word& qrName() const noexcept { return qrName_; }
160
161 // Evaluation
162
163 //- Return boundary fields of heat-flux field
165
166 //- Calculate the heat transfer coefficient field and return true
167 //- if successful
168 virtual bool calc
170 volScalarField& result,
172 );
173
175 // I-O
176
177 //- Read the function-object dictionary
178 virtual bool read(const dictionary& dict);
180
181
182// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183
184} // End namespace Foam
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188#endif
189
190// ************************************************************************* //
A field of fields is a PtrList of fields with reference counting.
Definition FieldField.H:77
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
const word TName_
Name of temperature field.
const fvMesh & mesh() const noexcept
Return const reference to the mesh.
static autoPtr< heatTransferCoeffModel > New(const dictionary &dict, const fvMesh &mesh, const word &TName)
Return a reference to the selected heat transfer coefficient model.
virtual ~heatTransferCoeffModel()=default
Destructor.
declareRunTimeSelectionTable(autoPtr, heatTransferCoeffModel, dictionary,(const dictionary &dict, const fvMesh &mesh, const word &TName),(dict, mesh, TName))
const fvMesh & mesh_
Const reference to the mesh.
heatTransferCoeffModel(const dictionary &dict, const fvMesh &mesh, const word &TName)
Construct from components.
word qrName_
Name of radiative heat flux field.
const labelList & patchIDs() const noexcept
Return const reference to wall patches to process.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
void operator=(const heatTransferCoeffModel &)=delete
No copy assignment.
heatTransferCoeffModel(const heatTransferCoeffModel &)=delete
No copy construct.
const word & qrName() const noexcept
Return const reference to name of radiative heat-flux field.
tmp< FieldField< Field, scalar > > q() const
Return boundary fields of heat-flux field.
TypeName("heatTransferCoeffModel")
Runtime type information.
const word & TName() const noexcept
Return const reference to name of temperature field.
labelList patchIDs_
List of (wall) patches to process (selected by name).
virtual bool calc(volScalarField &result, const FieldField< Field, scalar > &q)
Calculate the heat transfer coefficient field and return true if successful.
virtual void htc(volScalarField &htc, const FieldField< Field, scalar > &q)=0
Set the heat transfer coefficient.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const direction noexcept
Definition scalarImpl.H:265
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68