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  vectorField* dir,
75  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 
96 (
97  const label bandI,
98  vectorField* dir,
99  scalarField* T
100 ) const
101 {
102  return(absorptionEmission_->a(bandI, dir, T));
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(absorptionEmission_->a(faceI, bandI, dir, T));
115 }
116 
117 
119 (
120  const label bandI,
121  vectorField* dir,
122  scalarField* T
123 ) const
124 {
125  return tmp<scalarField>::New(pp_.size(), 0.0);
126 }
127 
128 
130 (
131  const label faceI,
132  const label bandI,
133  const vector& dir,
134  const scalar T
135 ) const
136 {
137  return 0;
138 }
139 
140 
143 (
144  const label bandI,
145  vectorField* dir,
146  scalarField* T
147 ) const
148 {
149  return tmp<scalarField>::New(pp_.size(), Zero);
150 }
151 
152 
154 (
155  const label faceI,
156  const label bandI,
157  const vector& dir,
158  const scalar T
159 ) const
160 {
161  return Zero;
162 }
163 
164 
166 (
167  const label bandI,
168  vectorField* dir,
169  scalarField* T
170 ) const
171 {
172  return tmp<scalarField>::New(pp_.size(), Zero);
173 }
174 
175 
177 (
178  const label faceI,
179  const label bandI,
180  const vector& dir,
181  const scalar T
182 ) const
183 {
184  return Zero;
185 }
186 
189 {
190  return absorptionEmission_->isGrey();
191 }
192 
193 
195 {
196  return absorptionEmission_->nBands();
197 }
198 
199 
200 // ************************************************************************* //
virtual tmp< scalarField > rSpec(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return specular reflectivity on patch.
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)
static autoPtr< wallAbsorptionEmissionModel > New(const dictionary &dict, const polyPatch &pp)
Macros for easy insertion into run-time selection tables.
virtual tmp< scalarField > t(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return transmissivity on patch.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Definition: tmp.H:206
virtual tmp< scalarField > rDiff(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return diffusive reflectivity 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 > e(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return emissivity.
autoPtr< wallAbsorptionEmissionModel > absorptionEmission_
Absorption/emission model.
addToRunTimeSelectionTable(absorptionEmissionModel, cloudAbsorptionEmission, dictionary)
virtual label nBands() const
Number of bands.
virtual tmp< scalarField > a(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return absorptivity 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
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