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
lagrangian
intermediate
submodels
addOns
radiation
absorptionEmission
cloudAbsorptionEmission
cloudAbsorptionEmission.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 "
cloudAbsorptionEmission.H
"
27
#include <
OpenFOAM/addToRunTimeSelectionTable.H
>
28
29
#include <
lagrangianIntermediate/thermoCloud.H
>
30
31
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32
33
namespace
Foam
34
{
35
namespace
radiation
36
{
37
defineTypeNameAndDebug
(
cloudAbsorptionEmission
, 0);
38
39
addToRunTimeSelectionTable
40
(
41
absorptionEmissionModel
,
42
cloudAbsorptionEmission
,
43
dictionary
44
);
45
}
46
}
47
48
49
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
50
51
Foam::radiation::cloudAbsorptionEmission::cloudAbsorptionEmission
52
(
53
const
dictionary
& dict,
54
const
fvMesh
&
mesh
55
)
56
:
57
absorptionEmissionModel
(dict, mesh),
58
coeffsDict_(dict.
subDict
(typeName +
"Coeffs"
)),
59
cloudNames_(coeffsDict_.lookup(
"cloudNames"
))
60
{}
61
62
63
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
64
65
Foam::radiation::cloudAbsorptionEmission::~cloudAbsorptionEmission
()
66
{}
67
68
69
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
70
71
Foam::tmp<Foam::volScalarField>
72
Foam::radiation::cloudAbsorptionEmission::aDisp
(
const
label)
const
73
{
74
tmp<volScalarField>
ta
75
(
76
new
volScalarField
77
(
78
IOobject
79
(
80
"a"
,
81
mesh_.time().timeName(),
82
mesh_,
83
IOobject::NO_READ
,
84
IOobject::NO_WRITE
,
85
false
86
),
87
mesh_,
88
dimensionedScalar
(
"a"
,
dimless
/
dimLength
, 0.0)
89
)
90
);
91
92
forAll
(cloudNames_, i)
93
{
94
const
thermoCloud
& tc
95
(
96
mesh_.objectRegistry::lookupObject<
thermoCloud
>(cloudNames_[i])
97
);
98
99
ta() += tc.
ap
();
100
}
101
102
return
ta;
103
}
104
105
106
Foam::tmp<Foam::volScalarField>
107
Foam::radiation::cloudAbsorptionEmission::eDisp
(
const
label bandI)
const
108
{
109
tmp<volScalarField>
te
110
(
111
new
volScalarField
112
(
113
IOobject
114
(
115
"e"
,
116
mesh_.time().timeName(),
117
mesh_,
118
IOobject::NO_READ
,
119
IOobject::NO_WRITE
,
120
false
121
),
122
mesh_,
123
dimensionedScalar
(
"e"
,
dimless
/
dimLength
, 0.0)
124
)
125
);
126
127
return
te;
128
}
129
130
131
Foam::tmp<Foam::volScalarField>
132
Foam::radiation::cloudAbsorptionEmission::EDisp
(
const
label bandI)
const
133
{
134
tmp<volScalarField>
tE
135
(
136
new
volScalarField
137
(
138
IOobject
139
(
140
"E"
,
141
mesh_.time().timeName(),
142
mesh_,
143
IOobject::NO_READ
,
144
IOobject::NO_WRITE
,
145
false
146
),
147
mesh_,
148
dimensionedScalar
(
"E"
,
dimMass
/
dimLength
/
pow3
(
dimTime
), 0.0)
149
)
150
);
151
152
forAll
(cloudNames_, i)
153
{
154
const
thermoCloud
& tc
155
(
156
mesh_.objectRegistry::lookupObject<
thermoCloud
>(cloudNames_[i])
157
);
158
159
tE() += tc.
Ep
();
160
}
161
162
return
tE;
163
}
164
165
166
// ************************ vim: set sw=4 sts=4 et: ************************ //