constantAbsorption.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, 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::radiation::constantAbsorption
28 
29 Group
30  grpRadiationTransmissivitySubModels
31 
32 Description
33  Constant radiation transmissivity coefficient
34 
35 SourceFiles
36  constantAbsorption.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Foam_radiation_constantAbsorption_H
41 #define Foam_radiation_constantAbsorption_H
42 
44 #include "Function1.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace radiation
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class constantAbsorption Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
60 {
61 
62  // Private data
63 
64  //- Coefficients dictionary
65  dictionary coeffsDict_;
66 
67  //- Absorptivity coefficient
69 
70  //- Emissivity coefficient
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("constantAbsorption");
78 
79 
80  // Constructors
81 
82  //- Construct from components
84 
85 
86  //- Destructor
87  virtual ~constantAbsorption() = default;
88 
89 
90  // Member Functions
91 
92  //- absorptivity coefficient
94  (
95  const label bandI = 0,
96  const vectorField* incomingDirection = nullptr,
97  const scalarField* T = nullptr
98  ) const;
99 
100  //- Return absorptivity on face
101  scalar a
102  (
103  const label faceI,
104  const label bandI = 0,
105  const vector dir = Zero,
106  const scalar T = 0
107  ) const;
108 
109  //- Return emission coefficient
111  (
112  const label bandI = 0,
113  const vectorField* incomingDirection = nullptr,
114  const scalarField* T = nullptr
115  ) const;
116 
117  //- Return emission coefficient
118  scalar e
119  (
120  const label faceI,
121  const label bandI = 0,
122  const vector dir = Zero,
123  const scalar T = 0
124  ) const;
125 
126  //- Is Grey
127  inline bool isGrey() const
128  {
129  return true;
130  }
131 
132  //- Number of bands
133  inline label nBands() const
134  {
135  return 1;
136  }
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace radiation
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #endif
148 
149 // ************************************************************************* //
Based class for wall absorption emission models.
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Constant radiation transmissivity coefficient.
constantAbsorption(const dictionary &dict, const polyPatch &pp)
Construct from components.
label nBands() const
Number of bands.
TypeName("constantAbsorption")
Runtime type information.
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)
virtual ~constantAbsorption()=default
Destructor.
tmp< scalarField > a(const label bandI=0, const vectorField *incomingDirection=nullptr, const scalarField *T=nullptr) const
absorptivity coefficient
tmp< scalarField > e(const label bandI=0, const vectorField *incomingDirection=nullptr, const scalarField *T=nullptr) const
Return emission coefficient.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
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