Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
thermophysicalModels
radiation
submodels
absorptionEmissionModel
absorptionEmissionModel
absorptionEmissionModel.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 | Copyright (C) 1991-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
\*---------------------------------------------------------------------------*/
25
26
#include "
absorptionEmissionModel.H
"
27
28
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
29
30
namespace
Foam
31
{
32
namespace
radiation
33
{
34
defineTypeNameAndDebug
(absorptionEmissionModel, 0);
35
defineRunTimeSelectionTable
(absorptionEmissionModel, dictionary);
36
}
37
}
38
39
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40
41
Foam::radiation::absorptionEmissionModel::absorptionEmissionModel
42
(
43
const
dictionary
& dict,
44
const
fvMesh
&
mesh
45
)
46
:
47
dict_(dict),
48
mesh_(mesh)
49
{}
50
51
52
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
53
54
Foam::radiation::absorptionEmissionModel::~absorptionEmissionModel
()
55
{}
56
57
58
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
59
60
Foam::tmp<Foam::volScalarField>
61
Foam::radiation::absorptionEmissionModel::a
(
const
label bandI)
const
62
{
63
return
aDisp(bandI) + aCont(bandI);
64
}
65
66
67
Foam::tmp<Foam::volScalarField>
68
Foam::radiation::absorptionEmissionModel::aCont
(
const
label bandI)
const
69
{
70
return
tmp<volScalarField>
71
(
72
new
volScalarField
73
(
74
IOobject
75
(
76
"aCont"
,
77
mesh_.time().timeName(),
78
mesh_,
79
IOobject::NO_READ
,
80
IOobject::NO_WRITE
,
81
false
82
),
83
mesh_,
84
dimensionedScalar
(
"zero"
,
dimless
/
dimLength
, 0.0)
85
)
86
);
87
}
88
89
90
Foam::tmp<Foam::volScalarField>
91
Foam::radiation::absorptionEmissionModel::aDisp
(
const
label bandI)
const
92
{
93
return
tmp<volScalarField>
94
(
95
new
volScalarField
96
(
97
IOobject
98
(
99
"aDisp"
,
100
mesh_.time().timeName(),
101
mesh_,
102
IOobject::NO_READ
,
103
IOobject::NO_WRITE
,
104
false
105
),
106
mesh_,
107
dimensionedScalar
(
"zero"
,
dimless
/
dimLength
, 0.0)
108
)
109
);
110
}
111
112
113
Foam::tmp<Foam::volScalarField>
114
Foam::radiation::absorptionEmissionModel::e
(
const
label bandI)
const
115
{
116
return
eDisp(bandI) + eCont(bandI);
117
}
118
119
120
Foam::tmp<Foam::volScalarField>
121
Foam::radiation::absorptionEmissionModel::eCont
(
const
label bandI)
const
122
{
123
return
tmp<volScalarField>
124
(
125
new
volScalarField
126
(
127
IOobject
128
(
129
"eCont"
,
130
mesh_.time().timeName(),
131
mesh_,
132
IOobject::NO_READ
,
133
IOobject::NO_WRITE
,
134
false
135
),
136
mesh_,
137
dimensionedScalar
(
"zero"
,
dimless
/
dimLength
, 0.0)
138
)
139
);
140
}
141
142
143
Foam::tmp<Foam::volScalarField>
144
Foam::radiation::absorptionEmissionModel::eDisp
(
const
label bandI)
const
145
{
146
return
tmp<volScalarField>
147
(
148
new
volScalarField
149
(
150
IOobject
151
(
152
"eDisp"
,
153
mesh_.time().timeName(),
154
mesh_,
155
IOobject::NO_READ
,
156
IOobject::NO_WRITE
,
157
false
158
),
159
mesh_,
160
dimensionedScalar
(
"zero"
,
dimless
/
dimLength
, 0.0)
161
)
162
);
163
}
164
165
166
Foam::tmp<Foam::volScalarField>
167
Foam::radiation::absorptionEmissionModel::E
(
const
label bandI)
const
168
{
169
return
EDisp(bandI) + ECont(bandI);
170
}
171
172
173
Foam::tmp<Foam::volScalarField>
174
Foam::radiation::absorptionEmissionModel::ECont
(
const
label bandI)
const
175
{
176
return
tmp<volScalarField>
177
(
178
new
volScalarField
179
(
180
IOobject
181
(
182
"ECont"
,
183
mesh_.time().timeName(),
184
mesh_,
185
IOobject::NO_READ
,
186
IOobject::NO_WRITE
,
187
false
188
),
189
mesh_,
190
dimensionedScalar
(
"zero"
,
dimMass
/
dimLength
/
pow3
(
dimTime
), 0.0)
191
)
192
);
193
}
194
195
196
Foam::tmp<Foam::volScalarField>
197
Foam::radiation::absorptionEmissionModel::EDisp
(
const
label bandI)
const
198
{
199
return
tmp<volScalarField>
200
(
201
new
volScalarField
202
(
203
IOobject
204
(
205
"EDisp"
,
206
mesh_.time().timeName(),
207
mesh_,
208
IOobject::NO_READ
,
209
IOobject::NO_WRITE
,
210
false
211
),
212
mesh_,
213
dimensionedScalar
(
"zero"
,
dimMass
/
dimLength
/
pow3
(
dimTime
), 0.0)
214
)
215
);
216
}
217
218
219
Foam::label
Foam::radiation::absorptionEmissionModel::nBands
()
const
220
{
221
return
pTraits<label>::one
;
222
}
223
224
225
const
Foam::Vector2D<Foam::scalar>
&
226
Foam::radiation::absorptionEmissionModel::bands
(
const
label n)
const
227
{
228
return
Vector2D<scalar>::one
;
229
}
230
231
232
bool
Foam::radiation::absorptionEmissionModel::isGrey
()
const
233
{
234
return
false
;
235
}
236
237
238
Foam::tmp<Foam::volScalarField>
239
Foam::radiation::absorptionEmissionModel::addIntensity
240
(
241
const
label rayI,
242
const
volScalarField
& ILambda
243
)
const
244
{
245
return
ILambda;
246
}
247
248
249
void
Foam::radiation::absorptionEmissionModel::correct
250
(
251
volScalarField
& a,
252
PtrList<volScalarField>
& aj
253
)
const
254
{
255
a.
internalField
() = this->a();
256
aj[0].internalField() = a.
internalField
();
257
}
258
259
260
// ************************ vim: set sw=4 sts=4 et: ************************ //