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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::radiation::lookup
28
29Description
30 Lookup type of boundary radiation properties.
31
32Usage
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
55namespace Foam
56{
57namespace radiation
58{
59
60/*---------------------------------------------------------------------------*\
61 Class lookup Declaration
62\*---------------------------------------------------------------------------*/
64class lookup
65:
67{
68protected:
69
70 // Protected data
71
72 //- Reference to the polyPatch
73 const polyPatch& pp_;
74
75 //- Dictionary
76 const dictionary dict_;
77
78
79public:
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,
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,
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,
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,
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,
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// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
Lookup type of boundary radiation properties.
Definition: lookup.H:66
virtual bool isGrey() const
Is Grey.
Definition: lookup.C:194
virtual tmp< scalarField > a(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return absorptivity on patch.
Definition: lookup.C:93
const polyPatch & pp_
Reference to the polyPatch.
Definition: lookup.H:72
virtual tmp< scalarField > t(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return transmissivity on patch (default: 0)
Definition: lookup.C:120
virtual label nBands() const
Number of bands.
Definition: lookup.C:200
TypeName("lookup")
Runtime type information.
virtual tmp< scalarField > rSpec(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return specular reflectivity on patch.
Definition: lookup.C:148
virtual tmp< scalarField > rDiff(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return diffusive reflectivity on patch.
Definition: lookup.C:172
const dictionary dict_
Dictionary.
Definition: lookup.H:75
virtual ~lookup()=default
Destructor.
A class for managing temporary objects.
Definition: tmp.H:65
const volScalarField & T
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.
dictionary dict
volScalarField & e
Definition: createFields.H:11
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73