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-2018 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 
79 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80 
81 namespace Foam
82 {
83 namespace functionObjects
84 {
85 
86 /*---------------------------------------------------------------------------*\
87  Class wallHeatFlux Declaration
88 \*---------------------------------------------------------------------------*/
89 
90 class wallHeatFlux
91 :
92  public fvMeshFunctionObject,
93  public logFiles,
94  public writeLocalObjects
95 {
96 
97 protected:
98 
99  // Protected data
100 
101  //- Optional list of patches to process
103 
104 
105  // Protected Member Functions
106 
107  //- File header information
108  virtual void writeFileHeader(const label i);
110  //- Calculate the heat-flux
112  (
113  const volScalarField& alpha,
114  const volScalarField& he
115  );
116 
117 
118 private:
119 
120  // Private member functions
122  //- Disallow default bitwise copy construct
123  wallHeatFlux(const wallHeatFlux&);
124 
125  //- Disallow default bitwise assignment
126  void operator=(const wallHeatFlux&);
127 
128 
129 public:
130 
131  //- Runtime type information
132  TypeName("wallHeatFlux");
133 
134 
135  // Constructors
136 
137  //- Construct from Time and dictionary
139  (
140  const word& name,
141  const Time& runTime,
142  const dictionary&
143  );
144 
145 
146  //- Destructor
147  virtual ~wallHeatFlux();
148 
149 
150  // Member Functions
151 
152  //- Read the wallHeatFlux data
153  virtual bool read(const dictionary&);
154 
155  //- Calculate the wall heat-flux
156  virtual bool execute();
157 
158  //- Write the wall heat-flux
159  virtual bool write();
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace functionObjects
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
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:204
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:246
engineTime & runTime
virtual ~wallHeatFlux()
Destructor.
Definition: wallHeatFlux.C:142
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
tmp< volScalarField > calcWallHeatFlux(const volScalarField &alpha, const volScalarField &he)
Calculate the heat-flux.
Definition: wallHeatFlux.C:63
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
virtual bool read(const dictionary &)
Read the wallHeatFlux data.
Definition: wallHeatFlux.C:148
Calculates and write the heat-flux at wall patches as the volScalarField field &#39;wallHeatFlux&#39;.
Definition: wallHeatFlux.H:109
A class for managing temporary objects.
Definition: PtrList.H:53
labelHashSet patchSet_
Optional list of patches to process.
Definition: wallHeatFlux.H:121
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Namespace for OpenFOAM.