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 | Copyright (C) 2016-2017 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 Group
28  grpForcesFunctionObjects
29 
30 Description
31  Calculates and write the heat-flux at wall patches as the
32  volScalarField field 'wallHeatFlux'.
33 
34  All wall patches are included by default; to restrict the calculation to
35  certain patches, use the optional 'patches' entry.
36 
37  Example of function object specification:
38  \verbatim
39  wallHeatFlux1
40  {
41  type wallHeatFlux;
42  libs ("libfieldFunctionObjects.so");
43  ...
44  region fluid;
45  patches (".*Wall");
46  }
47  \endverbatim
48 
49 Usage
50  \table
51  Property | Description | Required | Default value
52  type | type name: wallHeatFlux | yes |
53  patches | list of patches to process | no | all wall patches
54  region | region to be evaluated | no | default region
55  \endtable
56 
57 Note
58  Writing field 'wallHeatFlux' is done by default, but it can be overridden by
59  defining an empty \c objects list. For details see writeLocalObjects.
60 
61 See also
62  Foam::functionObject
63  Foam::functionObjects::fvMeshFunctionObject
64  Foam::functionObjects::logFiles
65  Foam::functionObjects::writeLocalObjects
66  Foam::functionObjects::pressureTools
67  Foam::functionObjects::timeControl
68 
69 SourceFiles
70  wallHeatFlux.C
71 
72 \*---------------------------------------------------------------------------*/
73 
74 #ifndef functionObjects_wallHeatFlux_H
75 #define functionObjects_wallHeatFlux_H
76 
77 #include "fvMeshFunctionObject.H"
78 #include "logFiles.H"
79 #include "writeLocalObjects.H"
80 #include "volFieldsFwd.H"
81 #include "HashSet.H"
82 
83 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
84 
85 namespace Foam
86 {
87 namespace functionObjects
88 {
89 
90 /*---------------------------------------------------------------------------*\
91  Class wallHeatFlux Declaration
92 \*---------------------------------------------------------------------------*/
93 
94 class wallHeatFlux
95 :
96  public fvMeshFunctionObject,
97  public logFiles,
98  public writeLocalObjects
99 {
100 
101 protected:
102 
103  // Protected data
104 
105  //- Optional list of patches to process
107 
108 
109  // Protected Member Functions
110 
111  //- File header information
112  virtual void writeFileHeader(const label i);
114  //- Calculate the heat-flux
115  void calcHeatFlux
116  (
117  const volScalarField& alpha,
118  const volScalarField& he,
120  );
121 
122 
123 private:
124 
125  // Private member functions
126 
127  //- Disallow default bitwise copy construct
128  wallHeatFlux(const wallHeatFlux&);
129 
130  //- Disallow default bitwise assignment
131  void operator=(const wallHeatFlux&);
132 
133 
134 public:
135 
136  //- Runtime type information
137  TypeName("wallHeatFlux");
138 
139 
140  // Constructors
141 
142  //- Construct from Time and dictionary
144  (
145  const word& name,
146  const Time& runTime,
147  const dictionary&
148  );
149 
150 
151  //- Destructor
152  virtual ~wallHeatFlux();
153 
154 
155  // Member Functions
156 
157  //- Read the wallHeatFlux data
158  virtual bool read(const dictionary&);
159 
160  //- Calculate the wall heat-flux
161  virtual bool execute();
162 
163  //- Write the wall heat-flux
164  virtual bool write();
165 };
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 } // End namespace functionObjects
171 } // End namespace Foam
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #endif
176 
177 // ************************************************************************* //
volScalarField & he
Definition: YEEqn.H:51
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
virtual bool execute()
Calculate the wall heat-flux.
Definition: wallHeatFlux.C:202
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:137
virtual bool write()
Write the wall heat-flux.
Definition: wallHeatFlux.C:245
virtual ~wallHeatFlux()
Destructor.
Definition: wallHeatFlux.C:140
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:210
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
void calcHeatFlux(const volScalarField &alpha, const volScalarField &he, volScalarField &wallHeatFlux)
Calculate the heat-flux.
Definition: wallHeatFlux.C:62
virtual bool read(const dictionary &)
Read the wallHeatFlux data.
Definition: wallHeatFlux.C:146
Calculates and write the heat-flux at wall patches as the volScalarField field &#39;wallHeatFlux&#39;.
Definition: wallHeatFlux.H:113
labelHashSet patchSet_
Optional list of patches to process.
Definition: wallHeatFlux.H:125
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Namespace for OpenFOAM.