Loading...
Searching...
No Matches
lookup.C
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
26\*---------------------------------------------------------------------------*/
27
28#include "lookup.H"
31// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32
33namespace Foam
34{
35 namespace radiation
36 {
39 (
41 lookup,
43 );
44 }
45}
46
47
48// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
49
51(
52 const dictionary& dict,
53 const polyPatch& pp
54)
55:
58 dict_(dict)
59{}
60
61
62// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
63
65(
66 const label bandI,
67 const vectorField* dir,
68 const scalarField* T
69) const
70{
72 (
73 pp_.size(),
74 dict_.get<scalar>("emissivity")
75 );
76}
77
78
80(
81 const label faceI,
82 const label bandI,
83 const vector& dir,
84 const scalar T
85) const
86{
87 return dict_.get<scalar>("emissivity");
88}
89
90
92(
93 const label bandI,
94 const vectorField* dir,
95 const scalarField* T
96) const
97{
99 (
100 pp_.size(),
101 dict_.get<scalar>("absorptivity")
102 );
103}
104
105
107(
108 const label faceI,
109 const label bandI,
110 const vector& dir,
111 const scalar T
112) const
113{
114 return dict_.get<scalar>("absorptivity");
115}
116
117
119(
120 const label bandI,
121 const vectorField* dir,
122 const scalarField* T
123) const
124{
127 pp_.size(),
128 dict_.getOrDefault<scalar>("transmissivity", 0)
129 );
130}
131
132
134(
135 const label faceI,
136 const label bandI,
137 const vector& dir,
138 const scalar T
139) const
140{
141 return dict_.getOrDefault<scalar>("transmissivity", 0);
142}
143
144
146(
147 const label bandI,
148 const vectorField* dir,
150) const
151{
152 return tmp<scalarField>::New(pp_.size(), Zero);
153}
154
155
157(
158 const label faceI,
159 const label bandI,
160 const vector& dir,
161 const scalar T
162) const
163{
164 return Zero;
165}
166
167
169(
170 const label bandI,
171 const vectorField* dir,
173) const
174{
175 return tmp<scalarField>::New(pp_.size(), Zero);
176}
177
178
180(
181 const label faceI,
182 const label bandI,
183 const vector& dir,
184 const scalar T
185) const
186{
187 return Zero;
188}
189
192{
193 return true;
194}
195
196
197Foam::label Foam::radiation::lookup::nBands() const
198{
199 return 1;
200}
201
202
203// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A patch is a list of labels that address the faces in the global face list.
Definition polyPatch.H:73
boundaryRadiationPropertiesPatch(const dictionary &, const polyPatch &)
Construct from patch, internal field and dictionary.
Lookup type of boundary radiation properties.
Definition lookup.H:60
virtual tmp< scalarField > a(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return absorptivity on patch.
Definition lookup.C:85
virtual bool isGrey() const
Is Grey.
Definition lookup.C:184
const polyPatch & pp_
Reference to the polyPatch.
Definition lookup.H:68
virtual tmp< scalarField > rDiff(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return diffusive reflectivity on patch.
Definition lookup.C:162
virtual label nBands() const
Number of bands.
Definition lookup.C:190
virtual tmp< scalarField > t(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return transmissivity on patch (default: 0).
Definition lookup.C:112
const dictionary dict_
Dictionary.
Definition lookup.H:73
virtual tmp< scalarField > e(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return emissivity.
Definition lookup.C:58
virtual tmp< scalarField > rSpec(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return specular reflectivity on patch.
Definition lookup.C:139
lookup(const dictionary &dict, const polyPatch &pp)
Construct from components.
Definition lookup.C:44
A class for managing temporary objects.
Definition tmp.H:75
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Definition tmp.H:215
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition className.H:142
Namespace for radiation modelling.
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0).
Definition zero.H:127
Vector< scalar > vector
Definition vector.H:57
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dictionary dict