opaqueDiffusive.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 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 \*---------------------------------------------------------------------------*/
27 
28 #include "opaqueDiffusive.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35  namespace radiation
36  {
37  defineTypeNameAndDebug(opaqueDiffusive, 0);
39  (
40  boundaryRadiationPropertiesPatch,
41  opaqueDiffusive,
42  dictionary
43  );
44  }
45 }
46 
47 
48 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
49 
51 (
52  const dictionary& dict,
53  const polyPatch& pp
54 )
55 :
57  pp_(pp)
58 {
59  const dictionary& absorptionDict =
60  dict.subDict("wallAbsorptionEmissionModel");
61 
63  (
64  wallAbsorptionEmissionModel::New(absorptionDict, pp).ptr()
65  );
66 }
67 
68 
69 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
70 
72 (
73  const label bandI,
74  const vectorField* dir,
75  const scalarField* T
76 ) const
77 {
78  return(absorptionEmission_->e(bandI, dir, T));
79 }
80 
81 
83 (
84  const label faceI,
85  const label bandI,
86  const vector& dir,
87  const scalar T
88 ) const
89 {
90  return(absorptionEmission_->e(faceI, bandI, dir, T));
91 }
92 
93 
95 (
96  const label bandI,
97  const vectorField* dir,
98  const scalarField* T
99 ) const
100 {
101  return(absorptionEmission_->a(bandI, dir, T));
102 }
103 
104 
106 (
107  const label faceI,
108  const label bandI,
109  const vector& dir,
110  const scalar T
111 ) const
112 {
113  return(absorptionEmission_->a(faceI, bandI, dir, T));
114 }
115 
116 
118 (
119  const label bandI,
120  const vectorField* dir,
121  const scalarField* T
122 ) const
123 {
124  return tmp<scalarField>::New(pp_.size(), 0.0);
125 }
126 
127 
129 (
130  const label faceI,
131  const label bandI,
132  const vector& dir,
133  const scalar T
134 ) const
135 {
136  return 0;
137 }
138 
139 
141 (
142  const label bandI,
143  const vectorField* dir,
144  const scalarField* T
145 ) const
146 {
147  return tmp<scalarField>::New(pp_.size(), Zero);
148 }
149 
150 
152 (
153  const label faceI,
154  const label bandI,
155  const vector& dir,
156  const scalar T
157 ) const
158 {
159  return Zero;
160 }
161 
162 
164 (
165  const label bandI,
166  const vectorField* dir,
167  const scalarField* T
168 ) const
169 {
170  return tmp<scalarField>::New(pp_.size(), Zero);
171 }
172 
173 
175 (
176  const label faceI,
177  const label bandI,
178  const vector& dir,
179  const scalar T
180 ) const
181 {
182  return Zero;
183 }
184 
187 {
188  return absorptionEmission_->isGrey();
189 }
190 
191 
193 {
194  return absorptionEmission_->nBands();
195 }
196 
197 
198 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual bool isGrey() const
Is Grey.
defineTypeNameAndDebug(cloudAbsorptionEmission, 0)
virtual tmp< scalarField > e(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return emissivity.
static autoPtr< wallAbsorptionEmissionModel > New(const dictionary &dict, const polyPatch &pp)
Macros for easy insertion into run-time selection tables.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Definition: tmp.H:206
virtual tmp< scalarField > t(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return transmissivity on patch.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual tmp< scalarField > rDiff(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return diffusive reflectivity on patch.
autoPtr< wallAbsorptionEmissionModel > absorptionEmission_
Absorption/emission model.
addToRunTimeSelectionTable(absorptionEmissionModel, cloudAbsorptionEmission, dictionary)
virtual label nBands() const
Number of bands.
virtual tmp< scalarField > rSpec(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return specular reflectivity on patch.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:69
virtual tmp< scalarField > a(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return absorptivity on patch.
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
opaqueDiffusive(const dictionary &dict, const polyPatch &pp)
Construct from components.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Namespace for OpenFOAM.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127