multiBandAbsorption.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-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::multiBandAbsorption
28 
29 Group
30  wallAbsorptionEmissionModel
31 
32 Description
33  multiBandAbsorption radiation transmissivity for solids.
34 
35 Usage
36  \verbatim
37 
38  wallAbsorptionEmissionModel
39  {
40  type multiBandAbsorption;
41  absorptivity (0.3 0.7);
42  emissivity (0.3 0.7);
43  };
44 
45  \endverbatim
46 
47 SourceFiles
48  multiBandAbsorption.C
49 
50 \*---------------------------------------------------------------------------*/
51 
52 #ifndef multiBandAbsorption_H
53 #define multiBandAbsorption_H
54 
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 namespace radiation
62 {
63 
64 /*---------------------------------------------------------------------------*\
65  Class multiBandAbsorption Declaration
66 \*---------------------------------------------------------------------------*/
67 
69 :
71 {
72 public:
73 
74  // Public data
75 
76  //- Maximum number of bands
77  static const label maxBands_ = 5;
78 
79 
80 private:
81 
82  // Private data
83 
84  //- Absorption model dictionary
85  dictionary coeffsDict_;
86 
87  //- Absorption coefficients
88  scalarList aCoeffs_;
89 
90  //- Emission coefficients
91  scalarList eCoeffs_;
92 
93  //- Bands
94  label nBands_;
95 
96 
97 public:
98 
99  //- Runtime type information
100  TypeName("multiBandAbsorption");
101 
102 
103  // Constructors
104 
105  //- Construct from components
107  (
108  const dictionary& dict,
109  const polyPatch& pp
110  );
111 
112 
113  //- Destructor
114  virtual ~multiBandAbsorption();
115 
116 
117  // Member Functions
118 
119  // Access
120 
121  //- absorptivity coefficient
123  (
124  const label bandI = 0,
125  vectorField* incomingDirection = nullptr,
126  scalarField* T = nullptr
127  ) const;
128 
129  //- Return absorptivity on face
130  scalar a
131  (
132  const label faceI,
133  const label bandI = 0,
134  const vector dir = Zero,
135  const scalar T = 0
136  ) const;
137 
138  //- Return emission coefficient
140  (
141  const label bandI = 0,
142  vectorField* incomingDirection = nullptr,
143  scalarField* T = nullptr
144  ) const;
145 
146  //- Return emission coefficient
147  scalar e
148  (
149  const label faceI,
150  const label bandI = 0,
151  const vector dir = Zero,
152  const scalar T = 0
153  ) const;
154 
155  //- Is Grey
156  inline bool isGrey() const
157  {
158  return false;
159  }
160 
161  //- Number of bands
162  inline label nBands() const
163  {
164  return nBands_;
165  }
166 
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace radiation
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************************************************************* //
Foam::radiation::multiBandAbsorption::maxBands_
static const label maxBands_
Maximum number of bands.
Definition: multiBandAbsorption.H:76
Foam::radiation::multiBandAbsorption
multiBandAbsorption radiation transmissivity for solids.
Definition: multiBandAbsorption.H:67
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::radiation::multiBandAbsorption::~multiBandAbsorption
virtual ~multiBandAbsorption()
Destructor.
Definition: multiBandAbsorption.C:71
Foam::radiation::multiBandAbsorption::e
tmp< scalarField > e(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const
Return emission coefficient.
Definition: multiBandAbsorption.C:101
wallAbsorptionEmissionModel.H
Foam::Field< vector >
Foam::radiation::multiBandAbsorption::multiBandAbsorption
multiBandAbsorption(const dictionary &dict, const polyPatch &pp)
Construct from components.
Definition: multiBandAbsorption.C:52
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
Foam::radiation::multiBandAbsorption::TypeName
TypeName("multiBandAbsorption")
Runtime type information.
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::radiation::wallAbsorptionEmissionModel
Based class for wall absorption emission models.
Definition: wallAbsorptionEmissionModel.H:52
Foam::radiation::multiBandAbsorption::a
tmp< scalarField > a(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const
absorptivity coefficient
Definition: multiBandAbsorption.C:79
Foam::Vector< scalar >
Foam::List< scalar >
Foam::radiation::multiBandAbsorption::nBands
label nBands() const
Number of bands.
Definition: multiBandAbsorption.H:161
Foam::radiation::multiBandAbsorption::isGrey
bool isGrey() const
Is Grey.
Definition: multiBandAbsorption.H:155