Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::functionObjects::viewFactorHeatFlux
28
29Description
30 Determines radiation heat flux between patches when using the viewFactor
31 radiation model.
32
33Usage
34 Minimal example by using \c system/controlDict.functions:
35 \verbatim
36 viewFactorHeatFluxFO
37 {
38 // Mandatory entries
39 type viewFactorHeatFlux;
40 libs (utilityFunctionObjects);
41
42 // Optional entries
43 qr <word>;
44
45 // Inherited entries
46 ...
47 }
48 \endverbatim
49
50 where the entries mean:
51 \table
52 Property | Description | Type | Reqd | Deflt
53 type | Type name: viewFactorHeatFlux | word | yes | -
54 libs | Library name: fieldFunctionObjects | word | yes | -
55 globalFaceFaces | Face addressing data | labelListIOList | yes | -
56 F | View factors data | scalarListIOList | yes | -
57 qr | Name of radiation heat flux field | word | no | qr
58 \endtable
59
60 The inherited entries are elaborated in:
61 - \link functionObject.H \endlink
62 - \link writeFile.H \endlink
63
64SourceFiles
65 fvMeshFunctionObject.C
66
67\*---------------------------------------------------------------------------*/
68
69#ifndef Foam_functionObjects_viewFactorHeatFlux
70#define Foam_functionObjects_viewFactorHeatFlux
71
73#include "writeFile.H"
74#include "IOmapDistribute.H"
75#include "labelListIOList.H"
76#include "scalarListIOList.H"
77
78// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79
80namespace Foam
81{
82
83namespace functionObjects
84{
85
86/*---------------------------------------------------------------------------*\
87 Class viewFactorHeatFlux Declaration
88\*---------------------------------------------------------------------------*/
89
91:
93 public writeFile
94{
95 // Private Data
96
97 // Name of radiation heat flux field; default = qr
98 word qrName_;
99
100
101 // Fields generated by viewFactorsGen utility
102
103 //- Map
104 autoPtr<IOmapDistribute> mapDistPtr_;
105
106 //- Face addressing
107 labelListIOList faceFaces_;
108
109 //- View factors
110 scalarListIOList Fij_;
111
112 //- Patch indicies in compact addressing
113 scalarList compactPatchID_;
114
115
116 // Private Member Functions
117
118 //- Initialise
119 void initialise();
120
122public:
123
124 //- Runtime type information
125 TypeName("viewFactorHeatFlux");
126
127
128 // Constructors
129
130 //- Construct from name, Time and dictionary
132 (
133 const word& name,
134 const Time& runTime,
135 const dictionary& dict,
136 const bool readFields = true
137 );
138
139 //- Construct from objectRegistry and dictionary
141 (
142 const word& name,
143 const objectRegistry& obr,
144 const dictionary& dict,
145 const bool readFields = true
146 );
147
148 //- No copy construct
149 viewFactorHeatFlux(const viewFactorHeatFlux&) = delete;
150
151 //- No copy assignment
152 void operator=(const viewFactorHeatFlux&) = delete;
153
154
155 //- Destructor
156 virtual ~viewFactorHeatFlux() = default;
157
158
159 // Member Functions
160
161 //- Read the function-object dictionary
162 virtual bool read(const dictionary&);
163
164 //- Execute the function-object operations (no-op)
165 // All operations performed during the call to write()
166 virtual bool execute();
167
168 //- Write the function-object results (per patch)
169 virtual bool write();
170
171 //- Update for changes of mesh
172 virtual void updateMesh(const mapPolyMesh&);
173
174 //- Update for mesh point-motion
175 virtual void movePoints(const polyMesh&);
176};
177
178
179// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180
181} // End namespace functionObjects
182} // End namespace Foam
183
184// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185
186#endif
187
188// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
Reads fields from the time directories and adds them to the mesh database for further post-processing...
Definition readFields.H:146
virtual const objectRegistry & obr() const
The region or sub-region registry being used.
Determines radiation heat flux between patches when using the viewFactor radiation model.
TypeName("viewFactorHeatFlux")
Runtime type information.
void operator=(const viewFactorHeatFlux &)=delete
No copy assignment.
viewFactorHeatFlux(const viewFactorHeatFlux &)=delete
No copy construct.
virtual void movePoints(const polyMesh &)
Update for mesh point-motion.
viewFactorHeatFlux(const word &name, const Time &runTime, const dictionary &dict, const bool readFields=true)
Construct from name, Time and dictionary.
virtual void updateMesh(const mapPolyMesh &)
Update for changes of mesh.
virtual ~viewFactorHeatFlux()=default
Destructor.
virtual bool execute()
Execute the function-object operations (no-op).
virtual bool write()
Write the function-object results (per patch).
virtual bool read(const dictionary &)
Read the function-object dictionary.
Base class for writing single files from the function objects.
Definition writeFile.H:113
writeFile(const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true, const string &ext=".dat")
Construct from objectRegistry, prefix, fileName.
Definition writeFile.C:200
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Namespace for OpenFOAM.
IOList< scalarList > scalarListIOList
IO for a List of scalarList.
IOList< labelList > labelListIOList
IO for a List of labelList.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
List< scalar > scalarList
List of scalar.
Definition scalarList.H:32
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68