Loading...
Searching...
No Matches
wallHeatFlux.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) 2016-2017 OpenFOAM Foundation
9 Copyright (C) 2016-2025 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::functionObjects::wallHeatFlux
29
30Group
31
32Description
33 This function object calculates the wall heat flux based on a custom model
34 defined in the dictionary. The model can be specified to compute the heat
35 flux according to user-defined criteria or equations.
36
37Usage
38 Minimal example by using \c system/controlDict.functions:
39 \verbatim
40 wallHeatFlux1
41 {
42 // Mandatory entries
43 type wallHeatFlux;
44 libs (fieldFunctionObjects);
45
46 // Optional entries
47 model <word>;
48
49 // Conditional entries
50
51 // Option-1: when 'model' is 'wall' - previous 'wallHeatFlux' state
52
53 // Optional entries
54 patches (<patch1> ... <patchN>); // (wall1 "(wall2|wall3)");
55 qr <word>;
56
57
58 // Option-2: when 'model' is 'gauge'
59 // Mandatory entries
60 patch <word>;
61 Tgauge <scalar>;
62
63 // Optional entries
64 absorptivity <scalar>;
65 emissivity <scalar>;
66 T <word>;
67 qin <word>;
68 alphat <word>;
69 convective <bool>;
70 radiative <bool>;
71 writeFields <bool>;
72
73 // Inherited entries
74 ...
75 }
76 \endverbatim
77
78 where the entries mean:
79 \table
80 Property | Description | Type | Reqd | Deflt
81 type | Type name: wallHeatFlux | word | yes | -
82 libs | Library name: fieldFunctionObjects | word | yes | -
83 model | Model name | word | no | wall
84 patches | Names of operand patches | wordList | no | all wall patches
85 qr | Name of radiative heat flux field | word | no | qr
86 patch | Name of the patch to probe | word | yes | -
87 Tgauge | Gauge temperature (K) | scalar | yes | -
88 absorptivity | Absorptivity of the gauge | scalar | no | 1
89 emissivity | Emissivity of the gauge | scalar | no | 1
90 T | Name of the temperature field | word | no | T
91 qin | Name of the incident radiative heat flux field | word | no | qin
92 alphat | Name of turbulent thermal diffusivity field | word | no | alphat
93 convective | Write convective heat flux into file | bool | no | true
94 radiative | Write radiative heat flux into file | bool | no | true
95 writeFields | Write the fields 'qConv' and 'qRad' | bool | no | true
96 \endtable
97
98 The inherited entries are elaborated in:
99 - \link fvMeshFunctionObject.H \endlink
100 - \link writeFile.H \endlink
101 - \link probeModel.H \endlink
102 - \link patchFieldProbe.H \endlink
103
104SourceFiles
105 wallHeatFlux.cxx
106
107\*---------------------------------------------------------------------------*/
108
109#ifndef functionObjects_wallHeatFlux_H
110#define functionObjects_wallHeatFlux_H
111
112#include "fvMeshFunctionObject.H"
113
114// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115
116namespace Foam
117{
118
119// Forward Declarations
121
122namespace functionObjects
123{
124
125/*---------------------------------------------------------------------------*\
126 Class wallHeatFlux Declaration
127\*---------------------------------------------------------------------------*/
128
129class wallHeatFlux
130:
132{
133 // Private Data
134
135 //- Heat-flux model
136 autoPtr<wallHeatFluxModel> qModelPtr_;
137
138
139public:
140
141 //- Runtime type information
142 TypeName("wallHeatFlux");
143
144
145 // Constructors
146
147 //- Construct from name, Time and dictionary
149 (
150 const word& name,
151 const Time& runTime,
152 const dictionary& dict
153 );
154
155
156 //- Destructor
157 virtual ~wallHeatFlux() = default;
158
159
160 // Member Functions
161
162 //- Read the settings
163 virtual bool read(const dictionary& dict);
164
165 //- Calculate the heat-flux data
166 virtual bool execute();
167
168 //- Write the heat-flux data
169 virtual bool write();
170};
171
172
173// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174
175} // End namespace functionObjects
176} // End namespace Foam
177
178// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179
180#endif
181
182// ************************************************************************* //
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.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
This function object calculates the wall heat flux based on a custom model defined in the dictionary....
virtual bool read(const dictionary &dict)
Read the settings.
virtual bool execute()
Calculate the heat-flux data.
virtual ~wallHeatFlux()=default
Destructor.
virtual bool write()
Write the heat-flux data.
TypeName("wallHeatFlux")
Runtime type information.
wallHeatFlux(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
A base class for heat-flux 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