boundaryRadiationPropertiesPatch.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) 2015-2022 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::boundaryRadiationPropertiesPatch
28 
29 Description
30 
31 SourceFiles
32  boundaryRadiationPropertiesPatch.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef boundaryRadiationPropertiesPatch_H
37 #define boundaryRadiationPropertiesPatch_H
38 
39 #include "scalarField.H"
40 #include "Enum.H"
41 #include "fvPatch.H"
43 #include "runTimeSelectionTables.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 namespace radiation
52 {
53 /*---------------------------------------------------------------------------*\
54  Class boundaryRadiationPropertiesPatch Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 {
59  // Private Data
60 
61  //- Dictionary
62  const dictionary dict_;
63 
64  //- reference to fvPatch
65  const polyPatch& patch_;
66 
67 
68  // Private Member Functions
69 
70  //- Return nbr patch index
71  label nbrPatchIndex() const;
72 
73  //- Return nbr mesh
74  const fvMesh& nbrRegion() const;
75 
76 
77 protected:
78 
79  // Protected Member Functions
80 
81  //- Absorption/emission model
83 
84  //- Transmissivity model
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("boundaryRadiationPropertiesPatch");
92 
93  // Declare runtime constructor selection table
94 
96  (
97  autoPtr,
99  dictionary,
100  (
101  const dictionary& dict,
102  const polyPatch& pp
103  ),
104  (dict, pp)
105  );
106 
107 
108  // Constructors
109 
110  //- Construct from patch, internal field and dictionary
112  (
113  const dictionary&,
114  const polyPatch&
115  );
116 
117 
118  //- Selector
120  (
121  const dictionary& dict,
122  const polyPatch& pp
123  );
124 
125  //- Destructor
126  virtual ~boundaryRadiationPropertiesPatch() = default;
127 
128 
129  // Member Functions
130 
131  //- Return absorptionEmissionModel
133 
134  //- Return transmissivityModel
136 
137  //- Return emissivity on patch
138  virtual tmp<scalarField> e
139  (
140  const label bandI = 0,
141  vectorField* incomingDirection = nullptr,
142  scalarField* T = nullptr
143  ) const = 0;
144 
145  //- Return emissivity on face
146  virtual scalar e
147  (
148  const label faceI,
149  const label bandI = 0,
150  const vector& dir = Zero,
151  const scalar T = 0
152  ) const = 0;
153 
154  //- Return absorptivity on patch
155  virtual tmp<scalarField> a
156  (
157  const label bandI = 0,
158  vectorField* incomingDirection = nullptr,
159  scalarField* T = nullptr
160  ) const = 0;
161 
162  //- Return absorptivity on face
163  virtual scalar a
164  (
165  const label faceI,
166  const label bandI = 0,
167  const vector& dir = Zero,
168  const scalar T = 0
169  ) const = 0;
170 
171  //- Return transmissivity on patch
172  virtual tmp<scalarField> t
173  (
174  const label bandI = 0,
175  vectorField* incomingDirection = nullptr,
176  scalarField* T = nullptr
177  ) const = 0;
178 
179  //- Return transmissivity on face
180  virtual scalar t
181  (
182  const label faceI,
183  const label bandI = 0,
184  const vector& dir = Zero,
185  const scalar T = 0
186  ) const = 0;
187 
188  //- Return specular reflectivity on patch
189  virtual tmp<scalarField> rSpec
190  (
191  const label bandI = 0,
192  vectorField* incomingDirection = nullptr,
193  scalarField* T = nullptr
194  ) const = 0;
195 
196  //- Return specular reflectivity on face
197  virtual scalar rSpec
198  (
199  const label faceI,
200  const label bandI = 0,
201  const vector& dir = Zero,
202  const scalar T = 0
203  ) const = 0;
204 
205  //- Return diffusive reflectivity on patch
206  virtual tmp<scalarField> rDiff
207  (
208  const label bandI = 0,
209  vectorField* incomingDirection = nullptr,
210  scalarField* T = nullptr
211  ) const = 0;
212 
213  //- Return diffusive reflectivity on face
214  virtual scalar rDiff
215  (
216  const label faceI,
217  const label bandI = 0,
218  const vector& dir = Zero,
219  const scalar T = 0
220  ) const = 0;
221 
222  //- Is Grey
223  virtual bool isGrey() const = 0;
224 
225  //- Number of bands
226  virtual label nBands() const = 0;
227 
228  //- Write
229  virtual void write(Ostream&) const;
230 };
231 
232 
233 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
234 
235 } // End namespace Foam
236 } // End namespace radiation
237 
238 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
239 
240 #endif
241 
242 // ************************************************************************* //
Based class for wall absorption emission models.
dictionary dict
const wallAbsorptionEmissionModel & absorptionEmission() const
Return absorptionEmissionModel.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual tmp< scalarField > t(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return transmissivity on patch.
autoPtr< wallTransmissivityModel > transmissivity_
Transmissivity model.
virtual tmp< scalarField > a(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return absorptivity on patch.
virtual tmp< scalarField > rSpec(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return specular reflectivity on patch.
declareRunTimeSelectionTable(autoPtr, boundaryRadiationPropertiesPatch, dictionary,(const dictionary &dict, const polyPatch &pp),(dict, pp))
virtual label nBands() const =0
Number of bands.
virtual bool isGrey() const =0
Is Grey.
TypeName("boundaryRadiationPropertiesPatch")
Runtime type information.
virtual ~boundaryRadiationPropertiesPatch()=default
Destructor.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
boundaryRadiationPropertiesPatch(const dictionary &, const polyPatch &)
Construct from patch, internal field and dictionary.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const wallTransmissivityModel & transmissiveModel() const
Return transmissivityModel.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
autoPtr< wallAbsorptionEmissionModel > absorptionEmission_
Absorption/emission model.
virtual tmp< scalarField > e(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return emissivity on patch.
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
virtual tmp< scalarField > rDiff(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return diffusive reflectivity on patch.
static autoPtr< boundaryRadiationPropertiesPatch > New(const dictionary &dict, const polyPatch &pp)
Selector.
Base class for wall transmissivity models.
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