All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
wallHeatFlux.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) 2016-2020 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::functionObjects::wallHeatFlux
26 
27 Description
28  Calculates and write the heat-flux at wall patches as the
29  volScalarField field 'wallHeatFlux'.
30 
31  All wall patches are included by default; to restrict the calculation to
32  certain patches, use the optional 'patches' entry.
33 
34  Example of function object specification:
35  \verbatim
36  wallHeatFlux1
37  {
38  type wallHeatFlux;
39  libs ("libfieldFunctionObjects.so");
40  ...
41  region fluid;
42  patches (".*Wall");
43  }
44  \endverbatim
45 
46 Usage
47  \table
48  Property | Description | Required | Default value
49  type | type name: wallHeatFlux | yes |
50  patches | list of patches to process | no | all wall patches
51  region | region to be evaluated | no | default region
52  \endtable
53 
54 Note
55  Writing field 'wallHeatFlux' is done by default, but it can be overridden by
56  defining an empty \c objects list. For details see writeLocalObjects.
57 
58 See also
59  Foam::functionObject
60  Foam::functionObjects::fvMeshFunctionObject
61  Foam::functionObjects::logFiles
62  Foam::functionObjects::writeLocalObjects
63  Foam::functionObjects::timeControl
64 
65 SourceFiles
66  wallHeatFlux.C
67 
68 \*---------------------------------------------------------------------------*/
69 
70 #ifndef functionObjects_wallHeatFlux_H
71 #define functionObjects_wallHeatFlux_H
72 
73 #include "fvMeshFunctionObject.H"
74 #include "logFiles.H"
75 #include "writeLocalObjects.H"
76 #include "HashSet.H"
77 #include "volFieldsFwd.H"
78 #include "surfaceFieldsFwd.H"
79 
80 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81 
82 namespace Foam
83 {
84 namespace functionObjects
85 {
86 
87 /*---------------------------------------------------------------------------*\
88  Class wallHeatFlux Declaration
89 \*---------------------------------------------------------------------------*/
90 
91 class wallHeatFlux
92 :
93  public fvMeshFunctionObject,
94  public logFiles,
95  public writeLocalObjects
96 {
97 
98 protected:
99 
100  // Protected data
101 
102  //- Optional list of patches to process
104 
105 
106  // Protected Member Functions
107 
108  //- File header information
109  virtual void writeFileHeader(const label i);
111  //- Calculate the heat-flux
113 
114 
115 public:
116 
117  //- Runtime type information
118  TypeName("wallHeatFlux");
119 
120 
121  // Constructors
123  //- Construct from Time and dictionary
125  (
126  const word& name,
127  const Time& runTime,
128  const dictionary&
129  );
130 
131  //- Disallow default bitwise copy construction
132  wallHeatFlux(const wallHeatFlux&) = delete;
133 
134 
135  //- Destructor
136  virtual ~wallHeatFlux();
137 
138 
139  // Member Functions
140 
141  //- Read the wallHeatFlux data
142  virtual bool read(const dictionary&);
143 
144  //- Calculate the wall heat-flux
145  virtual bool execute();
146 
147  //- Write the wall heat-flux
148  virtual bool write();
149 
150 
151  // Member Operators
152 
153  //- Disallow default bitwise assignment
154  void operator=(const wallHeatFlux&) = delete;
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace functionObjects
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
void operator=(const wallHeatFlux &)=delete
Disallow default bitwise assignment.
wallHeatFlux(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
Definition: wallHeatFlux.C:111
virtual bool execute()
Calculate the wall heat-flux.
Definition: wallHeatFlux.C:193
const word & name() const
Return the name of this functionObject.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual bool write()
Write the wall heat-flux.
Definition: wallHeatFlux.C:231
engineTime & runTime
virtual ~wallHeatFlux()
Destructor.
Definition: wallHeatFlux.C:128
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
Definition: HashSet.H:211
tmp< volScalarField > calcWallHeatFlux(const surfaceScalarField &q)
Calculate the heat-flux.
Definition: wallHeatFlux.C:64
A class for handling words, derived from string.
Definition: word.H:59
TypeName("wallHeatFlux")
Runtime type information.
virtual void writeFileHeader(const label i)
File header information.
Definition: wallHeatFlux.C:48
virtual bool read(const dictionary &)
Read the wallHeatFlux data.
Definition: wallHeatFlux.C:134
Calculates and write the heat-flux at wall patches as the volScalarField field &#39;wallHeatFlux&#39;.
Definition: wallHeatFlux.H:110
A class for managing temporary objects.
Definition: PtrList.H:53
labelHashSet patchSet_
Optional list of patches to process.
Definition: wallHeatFlux.H:122
Namespace for OpenFOAM.