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-------------------------------------------------------------------------------
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 "opaqueDiffusive.H"
30
31// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32
33namespace Foam
34{
35 namespace radiation
36 {
39 (
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,
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,
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,
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,
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,
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
187
189{
190 return absorptionEmission_->isGrey();
191}
192
193
195{
196 return absorptionEmission_->nBands();
197}
198
199
200// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
const STLpoint & a() const
Definition: STLtriangleI.H:68
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
Definition: dictionary.C:460
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
autoPtr< wallAbsorptionEmissionModel > absorptionEmission_
Absorption/emission model.
Radiation boundary model for opaque diffusive walls. It requires to specify a wallAbsorptionEmissionM...
virtual bool isGrey() const
Is Grey.
virtual label nBands() const
Number of bands.
virtual tmp< scalarField > rSpec(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return specular reflectivity on patch.
virtual tmp< scalarField > rDiff(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return diffusive reflectivity on patch.
A class for managing temporary objects.
Definition: tmp.H:65
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
const volScalarField & T
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
const dimensionedScalar e
Elementary charge.
Namespace for OpenFOAM.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
dictionary dict