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 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 radiation_constantAbsorption_H
41 #define radiation_constantAbsorption_H
42 
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace radiation
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class constantAbsorption Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
59 {
60 
61  // Private data
62 
63  //- Coefficients dictionary
64  dictionary coeffsDict_;
65 
66  //- Absorptivity coefficient
67  scalar a_;
68 
69  //- Emissivity coefficient
70  scalar e_;
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("constantAbsorption");
77 
78 
79  // Constructors
80 
81  //- Construct from components
82  constantAbsorption(const dictionary& dict, const polyPatch& pp);
83 
84 
85  //- Destructor
86  virtual ~constantAbsorption() = default;
87 
88 
89  // Member Functions
90 
91  //- absorptivity coefficient
93  (
94  const label bandI = 0,
95  vectorField* incomingDirection = nullptr,
96  scalarField* T = nullptr
97  ) const;
98 
99  //- Return absorptivity on face
100  scalar a
101  (
102  const label faceI,
103  const label bandI = 0,
104  const vector dir = Zero,
105  const scalar T = 0
106  ) const;
107 
108  //- Return emission coefficient
110  (
111  const label bandI = 0,
112  vectorField* incomingDirection = nullptr,
113  scalarField* T = nullptr
114  ) const;
115 
116  //- Return emission coefficient
117  scalar e
118  (
119  const label faceI,
120  const label bandI = 0,
121  const vector dir = Zero,
122  const scalar T = 0
123  ) const;
124 
125  //- Is Grey
126  inline bool isGrey() const
127  {
128  return true;
129  }
130 
131  //- Number of bands
132  inline label nBands() const
133  {
134  return 1;
135  }
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace radiation
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
Foam::radiation::constantAbsorption::nBands
label nBands() const
Number of bands.
Definition: constantAbsorption.H:131
Foam::radiation::constantAbsorption
Constant radiation transmissivity coefficient.
Definition: constantAbsorption.H:55
Foam::radiation::constantAbsorption::e
tmp< scalarField > e(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const
Return emission coefficient.
Definition: constantAbsorption.C:90
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::constantAbsorption::TypeName
TypeName("constantAbsorption")
Runtime type information.
Foam::radiation::constantAbsorption::isGrey
bool isGrey() const
Is Grey.
Definition: constantAbsorption.H:125
wallAbsorptionEmissionModel.H
Foam::Field< vector >
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::radiation::constantAbsorption::constantAbsorption
constantAbsorption(const dictionary &dict, const polyPatch &pp)
Construct from components.
Definition: constantAbsorption.C:52
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::constantAbsorption::~constantAbsorption
virtual ~constantAbsorption()=default
Destructor.
Foam::radiation::constantAbsorption::a
tmp< scalarField > a(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const
absorptivity coefficient
Definition: constantAbsorption.C:67
Foam::Vector< scalar >