wallAbsorptionEmissionModel.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) 2018 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::radiation::wallAbsorptionEmissionModel
28 
29 Description
30  Based class for wall absorption emission models
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef wallAbsorptionEmissionModel_H
35 #define wallAbsorptionEmissionModel_H
36 
37 #include "dictionary.H"
38 #include "autoPtr.H"
39 #include "runTimeSelectionTables.H"
40 #include "polyPatch.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace radiation
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class wallAbsorptionEmissionModel Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55 
56 protected:
57 
58  // Protected data
59 
60  //- Reference to the polyPatch
61  const polyPatch& pp_;
62 
63 public:
64 
65  //- Runtime type information
66  TypeName("wallAbsorptionEmissionModel");
67 
68  // Declare runtime constructor selection table
69 
71  (
72  autoPtr,
74  dictionary,
75  (
76  const dictionary& dict,
77  const polyPatch& pp
78  ),
79  (dict, pp)
80  );
81 
82 
83  // Constructors
84 
85  //- Construct from components
87  (
88  const dictionary& dict, const polyPatch& pp
89  );
90 
91 
92  // Selector
93 
95  (
96  const dictionary& dict,
97  const polyPatch& pp
98  );
99 
100 
101  //- Destructor
103 
104 
105  // Member Functions
106 
107  //- Return emissivity on patch
108  virtual tmp<scalarField> e
109  (
110  const label bandI = 0,
111  vectorField* incomingDirection = nullptr,
112  scalarField* T = nullptr
113  ) const = 0;
114 
115 
116  //- Return emissivity on face
117  virtual scalar e
118  (
119  const label faceI,
120  const label bandI = 0,
121  const vector dir = Zero,
122  const scalar T = 0
123  ) const = 0;
124 
125 
126  //- Return absorptivity on patch
127  virtual tmp<scalarField> a
128  (
129  const label bandI = 0,
130  vectorField* incomingDirection = nullptr,
131  scalarField* T = nullptr
132  ) const = 0;
133 
134 
135  //- Return absorptivity on face
136  virtual scalar a
137  (
138  const label faceI,
139  const label bandI = 0,
140  const vector dir = Zero,
141  const scalar T = 0
142  ) const = 0;
143 
144  //- Is Grey
145  virtual bool isGrey() const = 0;
146 
147  //- Number of bands
148  virtual label nBands() const = 0;
149 
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace radiation
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
Based class for wall absorption emission models.
dictionary dict
virtual tmp< scalarField > e(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return emissivity on patch.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
static autoPtr< wallAbsorptionEmissionModel > New(const dictionary &dict, const polyPatch &pp)
TypeName("wallAbsorptionEmissionModel")
Runtime type information.
virtual label nBands() const =0
Number of bands.
virtual tmp< scalarField > a(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return absorptivity on patch.
declareRunTimeSelectionTable(autoPtr, wallAbsorptionEmissionModel, dictionary,(const dictionary &dict, const polyPatch &pp),(dict, pp))
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const polyPatch & pp_
Reference to the polyPatch.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
wallAbsorptionEmissionModel(const dictionary &dict, const polyPatch &pp)
Construct from components.
virtual bool isGrey() const =0
Is Grey.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:69
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Namespace for OpenFOAM.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127