Loading...
Searching...
No Matches
wallHeatFlux_wall.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::wallHeatFluxModels::wall
29
30Description
31 This model computes the wall-heat flux at selected wall patches.
32
33Usage
34 Minimal example by using \c system/controlDict.functions:
35 \verbatim
36 wallHeatFlux1
37 {
38 // Mandatory entries
39 type wallHeatFlux;
40 libs (fieldFunctionObjects);
41
42 model wall;
43
44 // Optional entries
45 patches (<patch1> ... <patchN>); // (wall1 "(wall2|wall3)");
46 qr <word>;
47
48 // Inherited entries
49 ...
50 }
51 \endverbatim
52
53 where the entries mean:
54 \table
55 Property | Description | Type | Reqd | Deflt
56 type | Type name: wallHeatFlux | word | yes | -
57 libs | Library name: fieldFunctionObjects | word | yes | -
58 patches | Names of operand patches | wordList | no | all wall patches
59 qr | Name of radiative heat flux field | word | no | qr
60 \endtable
61
62 The inherited entries are elaborated in:
63 - \link fvMeshFunctionObject.H \endlink
64 - \link writeFile.H \endlink
65
66Note
67 - The model \c wall corresponds to \c wallHeatFlux in OpenFOAM v2506 and
68 earlier versions.
69
70SourceFiles
71 wallHeatFlux_wall.cxx
72
73\*---------------------------------------------------------------------------*/
74
75#ifndef wallHeatFluxModels_wall_H
76#define wallHeatFluxModels_wall_H
77
78#include "wallHeatFluxModel.H"
79#include "writeFile.H"
80#include "volFieldsFwd.H"
81
82// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83
84namespace Foam
85{
86namespace wallHeatFluxModels
87{
88
89/*---------------------------------------------------------------------------*\
90 Class wall Declaration
91\*---------------------------------------------------------------------------*/
92
93class wall
94:
95 public wallHeatFluxModel
96{
97 // Private Data
98
99 //- Name of the radiative heat-flux field
100 word qrName_;
101
102 //- Wall patches to process (optionally filtered by name)
103 labelList patchIDs_;
104
105
106 // Private Member Functions
107
108 //- Write file-header information
109 void writeFileHeader(Ostream& os);
110
111 //- Calculate the wall heat-flux
112 void calcHeatFlux
113 (
114 const volScalarField& alpha,
115 const volScalarField& he,
116 volScalarField& wallHeatFlux
117 );
119
120public:
121
122 //- Runtime type information
123 TypeName("wall");
124
125
126 // Constructors
127
128 //- Construct from components
129 wall
130 (
131 const dictionary& dict,
132 const fvMesh& mesh,
133 const word& name,
134 const word objName,
136 );
137
138
139 //- Destructor
140 virtual ~wall() = default;
141
142
143 // Member Functions
144
145 // Access
146
147 //- Return const reference to name of radiative heat-flux field
148 const word& qrName() const noexcept { return qrName_; }
149
150
151 // Evaluation
152
153 //- Read the settings
154 virtual bool read(const dictionary& dict);
155
156 //- Calculate the heat-flux data
157 virtual bool execute();
159 //- Write the heat-flux data
160 virtual bool write();
161};
162
163
164// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165
166} // End namespace wallHeatFluxModels
167} // End namespace Foam
168
169// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170
171#endif
172
173// ************************************************************************* //
volScalarField & he
Definition YEEqn.H:52
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Base class for function objects, adding functionality to read/write state information (data required ...
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
const fvMesh & mesh() const noexcept
Return const reference to the mesh.
const word & objName() const noexcept
Return const reference to the function-object name.
functionObjects::stateFunctionObject & state() const noexcept
Return const reference to the state function object.
wallHeatFluxModel(const wallHeatFluxModel &)=delete
No copy construct.
This model computes the wall-heat flux at selected wall patches.
virtual bool read(const dictionary &dict)
Read the settings.
virtual bool execute()
Calculate the heat-flux data.
virtual bool write()
Write the heat-flux data.
wall(const dictionary &dict, const fvMesh &mesh, const word &name, const word objName, functionObjects::stateFunctionObject &state)
Construct from components.
const word & qrName() const noexcept
Return const reference to name of radiative heat-flux field.
TypeName("wall")
Runtime type information.
virtual ~wall()=default
Destructor.
A class for handling words, derived from Foam::string.
Definition word.H:66
OBJstream os(runTime.globalPath()/outputName)
A namespace for various heat-flux model implementations.
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
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
volScalarField & alpha
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68
Forwards and collection of common volume field types.