viewFactorHeatFlux.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) 2024 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::functionObjects::viewFactorHeatFlux
28 
29 Description
30  Determines radiation heat flux between patches when using the viewFactor
31  radiation model.
32 
33 Usage
34  Minimal example by using \c system/controlDict.functions:
35  \verbatim
36  viewFactorHeatFlux1
37  {
38  // Mandatory entries (unmodifiable)
39  type viewFactorHeatFlux;
40  libs (utilityFunctionObjects);
41 
42  // Optional entries (runtime modifiable)
43  qr qr;
44  }
45  \endverbatim
46 
47  where the entries mean:
48  \table
49  Property | Description | Type | Req'd | Dflt
50  type | Type name: viewFactorHeatFlux | word | yes | -
51  libs | Library name: fieldFunctionObjects | word | yes | -
52  qr | Name of radiation heat flux field | word | no | qr
53  \endtable
54 
55 See also
56 - Foam::radiation::viewFactor
57 
58 SourceFiles
59  fvMeshFunctionObject.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef Foam_functionObjects_viewFactorHeatFlux
64 #define Foam_functionObjects_viewFactorHeatFlux
65 
66 #include "fvMeshFunctionObject.H"
67 #include "writeFile.H"
68 #include "IOmapDistribute.H"
69 #include "labelListIOList.H"
70 #include "scalarListIOList.H"
71 
72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73 
74 namespace Foam
75 {
76 
77 namespace functionObjects
78 {
79 
80 /*---------------------------------------------------------------------------*\
81  Class viewFactorHeatFlux Declaration
82 \*---------------------------------------------------------------------------*/
83 
84 class viewFactorHeatFlux
85 :
86  public fvMeshFunctionObject,
87  public writeFile
88 {
89  // Private Data
90 
91  // Name of radiation heat flux field; default = qr
92  word qrName_;
93 
94 
95  // Fields generated by viewFactorsGen utility
96 
97  //- Map
98  autoPtr<IOmapDistribute> mapDistPtr_;
99 
100  //- Face addressing
101  labelListIOList faceFaces_;
102 
103  //- View factors
104  scalarListIOList Fij_;
105 
106  //- Patch indicies in compact addressing
107  scalarList compactPatchID_;
108 
109 
110  // Private Member Functions
111 
112  //- Initialise
113  void initialise();
114 
115 
116 public:
117 
118  //- Runtime type information
119  TypeName("viewFactorHeatFlux");
120 
121 
122  // Constructors
123 
124  //- Construct from Time and dictionary
126  (
127  const word& name,
128  const Time& runTime,
129  const dictionary& dict,
130  const bool readFields = true
131  );
132 
133  //- Construct from objectRegistry and dictionary
135  (
136  const word& name,
137  const objectRegistry& obr,
138  const dictionary& dict,
139  const bool readFields = true
140  );
141 
142  //- No copy construct
143  viewFactorHeatFlux(const viewFactorHeatFlux&) = delete;
144 
145  //- No copy assignment
146  void operator=(const viewFactorHeatFlux&) = delete;
147 
148 
149  //- Destructor
150  virtual ~viewFactorHeatFlux() = default;
151 
152 
153  // Member Functions
154 
155  //- Read the viewFactorHeatFlux data
156  virtual bool read(const dictionary&);
157 
158  //- No-op - all operations performed during the call to write()
159  virtual bool execute();
160 
161  //- Write the viewFactorHeatFlux per patch
162  virtual bool write();
163 
164  //- Update for changes of mesh
165  virtual void updateMesh(const mapPolyMesh&);
166 
167  //- Update for mesh point-motion
168  virtual void movePoints(const polyMesh&);
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace functionObjects
175 } // End namespace Foam
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 #endif
180 
181 // ************************************************************************* //
TypeName("viewFactorHeatFlux")
Runtime type information.
dictionary dict
virtual bool write()
Write the viewFactorHeatFlux per patch.
Determines radiation heat flux between patches when using the viewFactor radiation model...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual bool read(const dictionary &)
Read the viewFactorHeatFlux data.
viewFactorHeatFlux(const word &name, const Time &runTime, const dictionary &dict, const bool readFields=true)
Construct from Time and dictionary.
engineTime & runTime
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:69
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
const word & name() const noexcept
Return the name of this functionObject.
A class for handling words, derived from Foam::string.
Definition: word.H:63
Reads fields from the time directories and adds them to the mesh database for further post-processing...
Definition: readFields.H:151
virtual void movePoints(const polyMesh &)
Update for mesh point-motion.
virtual bool execute()
No-op - all operations performed during the call to write()
virtual void updateMesh(const mapPolyMesh &)
Update for changes of mesh.
void operator=(const viewFactorHeatFlux &)=delete
No copy assignment.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:75
virtual ~viewFactorHeatFlux()=default
Destructor.
Registry of regIOobjects.
virtual const objectRegistry & obr() const
The region or sub-region registry being used.
Namespace for OpenFOAM.
IOList< labelList > labelListIOList
IO for a List of labelList.