lookup.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-2019 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::lookup
28 
29 Description
30  Lookup type of boundary radiation properties.
31 
32 Usage
33  \verbatim
34 
35  wallAbsorptionEmissionModel
36  {
37  type lookup;
38  absorptivity 0.1;
39  emissivity 0.1;
40  transmissivity 0;
41  }
42 
43  \endverbatim
44 
45 
46 \*---------------------------------------------------------------------------*/
47 
48 #ifndef lookup_H
49 #define lookup_H
50 
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 namespace Foam
56 {
57 namespace radiation
58 {
59 
60 /*---------------------------------------------------------------------------*\
61  Class lookup Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 class lookup
65 :
67 {
68 protected:
69 
70  // Protected data
71 
72  //- Reference to the polyPatch
73  const polyPatch& pp_;
74 
75  //- Dictionary
76  const dictionary dict_;
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("lookup");
83 
84  // Constructors
85 
86  //- Construct from components
87  lookup(const dictionary& dict, const polyPatch& pp);
88 
89 
90  //- Destructor
91  virtual ~lookup() = default;
92 
93 
94  // Member Functions
95 
96  //- Return emissivity
97  virtual tmp<scalarField> e
98  (
99  const label bandI,
100  vectorField* incomingDirection,
101  scalarField* T
102  ) const;
103 
104  //- Return emissivity on face
105  virtual scalar e
106  (
107  const label faceI,
108  const label bandI,
109  const vector& dir,
110  const scalar T
111  ) const;
112 
113  //- Return absorptivity on patch
114  virtual tmp<scalarField> a
115  (
116  const label bandI,
117  vectorField* incomingDirection,
118  scalarField* T
119  ) const;
120 
121  //- Return absorptivity on face
122  virtual scalar a
123  (
124  const label faceI,
125  const label bandI,
126  const vector& dir,
127  const scalar T
128  ) const;
129 
130  //- Return transmissivity on patch (default: 0)
131  virtual tmp<scalarField> t
132  (
133  const label bandI,
134  vectorField* incomingDirection,
135  scalarField* T
136  ) const;
137 
138  //- Return transmissivity on face (default: 0)
139  virtual scalar t
140  (
141  const label faceI,
142  const label bandI,
143  const vector& dir,
144  const scalar T
145  ) const;
146 
147  //- Return specular reflectivity on patch
148  virtual tmp<scalarField> rSpec
149  (
150  const label bandI,
151  vectorField* incomingDirection,
152  scalarField* T
153  ) const;
154 
155  //- Return specular reflectivity on face
156  virtual scalar rSpec
157  (
158  const label faceI,
159  const label bandI,
160  const vector& dir,
161  const scalar T
162  ) const;
163 
164  //- Return diffusive reflectivity on patch
165  virtual tmp<scalarField> rDiff
166  (
167  const label bandI,
168  vectorField* incomingDirection,
169  scalarField* T
170  ) const;
171 
172  //- Return diffusive reflectivity on face
173  virtual scalar rDiff
174  (
175  const label faceI,
176  const label bandI,
177  const vector& dir,
178  const scalar T
179  ) const;
180 
181  //- Is Grey
182  virtual bool isGrey() const;
183 
184  //- Number of bands
185  virtual label nBands() const;
186 };
187 
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 } // End namespace radiation
192 } // End namespace Foam
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 
196 #endif
197 
198 // ************************************************************************* //
Foam::radiation::boundaryRadiationPropertiesPatch
Definition: boundaryRadiationPropertiesPatch.H:56
Foam::radiation::lookup::nBands
virtual label nBands() const
Number of bands.
Definition: lookup.C:200
Foam::radiation::lookup::rDiff
virtual tmp< scalarField > rDiff(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return diffusive reflectivity on patch.
Definition: lookup.C:172
boundaryRadiationPropertiesPatch.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::radiation::lookup::TypeName
TypeName("lookup")
Runtime type information.
Foam::radiation::lookup::dict_
const dictionary dict_
Dictionary.
Definition: lookup.H:75
Foam::radiation::lookup::pp_
const polyPatch & pp_
Reference to the polyPatch.
Definition: lookup.H:72
Foam::Field< vector >
Foam::radiation::lookup::e
virtual tmp< scalarField > e(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return emissivity.
Definition: lookup.C:65
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::lookup::rSpec
virtual tmp< scalarField > rSpec(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return specular reflectivity on patch.
Definition: lookup.C:148
Foam::radiation::lookup
Lookup type of boundary radiation properties.
Definition: lookup.H:63
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::radiation::lookup::isGrey
virtual bool isGrey() const
Is Grey.
Definition: lookup.C:194
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::radiation::lookup::a
virtual tmp< scalarField > a(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return absorptivity on patch.
Definition: lookup.C:93
Foam::Vector< scalar >
Foam::radiation::lookup::~lookup
virtual ~lookup()=default
Destructor.
Foam::radiation::lookup::lookup
lookup(const dictionary &dict, const polyPatch &pp)
Construct from components.
Definition: lookup.C:51
Foam::radiation::lookup::t
virtual tmp< scalarField > t(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return transmissivity on patch (default: 0)
Definition: lookup.C:120