Loading...
Searching...
No Matches
heatTransferCoeff.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-2025 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
26Class
27 Foam::functionObjects::heatTransferCoeff
28
29Group
30 grpFieldFunctionObjects
31
32Description
33 Computes the heat transfer coefficient [W/(m^2 K)] as a \c volScalarField
34 for a given set of patches.
35
36 The heat transfer coefficient is definition dependent; therefore, different
37 7 coefficient values could be obtained based on different definitions.
38
39 Optionally, the Nusselt number (i.e. the ratio of convective to conductive
40 heat transfer at a boundary in a fluid) can be output:
41
42 \f[
43 Nu = \frac{h L}{\kappa}
44 \f]
45
46 where
47 \vartable
48 Nu | Nusselt number
49 h | Heat transfer coefficient
50 L | Characteristic length that defines the scale of the physical system
51 \kappa | Thermal conductivity of the fluid
52 \endvartable
53
54 Operands:
55 \table
56 Operand | Type | Location
57 input | - | -
58 output file | - | -
59 output field | volScalarField | <time>/outputField
60 \endtable
61
62Usage
63 Minimal example by using \c system/controlDict.functions:
64 \verbatim
65 heatTransferCoeffFO
66 {
67 // Mandatory entries
68 type heatTransferCoeff;
69 libs (fieldFunctionObjects);
70
71 field <word>;
72 patches (<wordRes>);
73 htcModel <word>;
74
75 // Optional entries
76 qr <word>;
77 L <scalar>;
78 kappa <scalar>;
79
80 // Conditional entries based on selected <htcModel>
81 ...
82
83 // Inherited entries
84 ...
85 }
86 \endverbatim
87
88 where the entries mean:
89 \table
90 Property | Description | Type | Reqd | Deflt
91 type | Type name: heatTransferCoeff | word | yes | -
92 libs | Library name: fieldFunctionObjects | word | yes | -
93 field | Name of operand field | word | yes | -
94 patches | Names of operand patches | wordRes | yes | -
95 htcModel | Heat transfer coefficient model <!--
96 --> - see below | word | yes | -
97 qr | Name of radiative heat flux field | word | no | qr
98 L | Characteristic length that defines <!--
99 --> the scale of the physical system | scalar | no | 1
100 kappa | Thermal conductivity of fluid | scalar | no | 1
101 \endtable
102
103 The inherited entries are elaborated in:
104 - \link fieldExpression.H \endlink
105 - \link heatTransferCoeffModel.H \endlink
106
107 Options for the \c htcModel entry:
108 \verbatim
109 ReynoldsAnalogy | Reynold's analogy
110 localReferenceTemperature | Local reference temperature
111 fixedReferenceTemperature | Fixed reference temperature
112 faceZoneReferenceTemperature | Face-zone reference temperature
113 \endverbatim
114
115SourceFiles
116 heatTransferCoeff.C
117
118\*---------------------------------------------------------------------------*/
119
120#ifndef Foam_functionObjects_heatTransferCoeff_H
121#define Foam_functionObjects_heatTransferCoeff_H
122
123#include "fieldExpression.H"
124
125// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127namespace Foam
128{
129
130// Forward Declarations
132
133namespace functionObjects
134{
135
136/*---------------------------------------------------------------------------*\
137 Class heatTransferCoeff Declaration
138\*---------------------------------------------------------------------------*/
139
141:
142 public fieldExpression
143{
144 // Private Data
145
146 //- Characteristic length that defines the scale of the physical system
147 scalar L_;
148
149 //- Thermal conductivity of the fluid
150 scalar kappa_;
151
152 //- Heat transfer coefficient model
153 autoPtr<heatTransferCoeffModel> htcModelPtr_;
154
155
156protected:
157
158 //- Calculate the heat transfer coefficient field and return true
159 //- if successful
160 virtual bool calc();
161
162
163public:
164
165 //- Runtime type information
166 TypeName("heatTransferCoeff");
167
168
169 // Constructors
170
171 //- Construct from name, Time and dictionary
173 (
174 const word& name,
175 const Time& runTime,
176 const dictionary& dict
177 );
178
179 //- No copy construct
180 heatTransferCoeff(const heatTransferCoeff&) = delete;
181
182 //- No copy assignment
183 void operator=(const heatTransferCoeff&) = delete;
184
185
186 //- Destructor
187 virtual ~heatTransferCoeff() = default;
188
189
190 // Member Functions
191
192 //- Read the function-object dictionary
193 virtual bool read(const dictionary& dict);
194};
195
196
197// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198
199} // End namespace functionObjects
200} // End namespace Foam
201
202// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203
204#endif
205
206// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
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
const word & name() const noexcept
Return the name of this functionObject.
Intermediate class for handling field expression function objects (e.g. blendingFactor etc....
fieldExpression(const word &name, const Time &runTime, const dictionary &dict, const word &fieldName=word::null, const word &resultName=word::null)
Construct from name, Time and dictionary.
Computes the heat transfer coefficient [W/(m^2 K)] as a volScalarField for a given set of patches.
void operator=(const heatTransferCoeff &)=delete
No copy assignment.
heatTransferCoeff(const heatTransferCoeff &)=delete
No copy construct.
TypeName("heatTransferCoeff")
Runtime type information.
virtual bool calc()
Calculate the heat transfer coefficient field and return true if successful.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
heatTransferCoeff(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
virtual ~heatTransferCoeff()=default
Destructor.
A base class for heat transfer coefficient models.
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68