Loading...
Searching...
No Matches
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"
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 const 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
95(
96 const label bandI,
97 const vectorField* dir,
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,
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,
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,
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// ************************************************************************* //
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
autoPtr< wallAbsorptionEmissionModel > absorptionEmission_
Absorption/emission model.
boundaryRadiationPropertiesPatch(const dictionary &, const polyPatch &)
Construct from patch, internal field and dictionary.
Radiation boundary model for opaque diffusive walls. It requires to specify a wallAbsorptionEmissionM...
virtual tmp< scalarField > a(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return absorptivity on patch.
virtual bool isGrey() const
Is Grey.
const polyPatch & pp_
Reference to the polyPatch.
virtual tmp< scalarField > rDiff(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return diffusive reflectivity on patch.
virtual label nBands() const
Number of bands.
virtual tmp< scalarField > t(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return transmissivity on patch.
virtual tmp< scalarField > e(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return emissivity.
virtual tmp< scalarField > rSpec(const label bandI, const vectorField *incomingDirection, const scalarField *T) const
Return specular reflectivity on patch.
opaqueDiffusive(const dictionary &dict, const polyPatch &pp)
Construct from components.
static autoPtr< wallAbsorptionEmissionModel > New(const dictionary &dict, const polyPatch &pp)
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