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) 2011-2015 OpenFOAM Foundation
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 
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 
42 (
43  const dictionary& dict,
44  const fvMesh& mesh
45 )
46 :
47  dict_(dict),
48  mesh_(mesh)
49 {}
50 
51 
52 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
53 
55 {}
56 
57 
58 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
59 
62 {
63  return aDisp(bandI) + aCont(bandI);
64 }
65 
66 
69 {
70  return tmp<volScalarField>
71  (
72  new volScalarField
73  (
74  IOobject
75  (
76  "aCont",
77  mesh_.time().timeName(),
78  mesh_,
81  false
82  ),
83  mesh_,
84  dimensionedScalar("zero", dimless/dimLength, 0.0)
85  )
86  );
87 }
88 
89 
92 {
93  return tmp<volScalarField>
94  (
95  new volScalarField
96  (
97  IOobject
98  (
99  "aDisp",
100  mesh_.time().timeName(),
101  mesh_,
104  false
105  ),
106  mesh_,
107  dimensionedScalar("zero", dimless/dimLength, 0.0)
108  )
109  );
110 }
111 
112 
115 {
116  return eDisp(bandI) + eCont(bandI);
117 }
118 
119 
122 {
123  return tmp<volScalarField>
124  (
125  new volScalarField
126  (
127  IOobject
128  (
129  "eCont",
130  mesh_.time().timeName(),
131  mesh_,
134  false
135  ),
136  mesh_,
137  dimensionedScalar("zero", dimless/dimLength, 0.0)
138  )
139  );
140 }
141 
142 
145 {
146  return tmp<volScalarField>
147  (
148  new volScalarField
149  (
150  IOobject
151  (
152  "eDisp",
153  mesh_.time().timeName(),
154  mesh_,
157  false
158  ),
159  mesh_,
160  dimensionedScalar("zero", dimless/dimLength, 0.0)
161  )
162  );
163 }
164 
165 
168 {
169  return EDisp(bandI) + ECont(bandI);
170 }
171 
172 
175 {
176  return tmp<volScalarField>
177  (
178  new volScalarField
179  (
180  IOobject
181  (
182  "ECont",
183  mesh_.time().timeName(),
184  mesh_,
187  false
188  ),
189  mesh_,
191  )
192  );
193 }
194 
195 
198 {
199  return tmp<volScalarField>
200  (
201  new volScalarField
202  (
203  IOobject
204  (
205  "EDisp",
206  mesh_.time().timeName(),
207  mesh_,
210  false
211  ),
212  mesh_,
214  )
215  );
216 }
217 
218 
220 {
221  return pTraits<label>::one;
222 }
223 
224 
227 {
228  return Vector2D<scalar>::one;
229 }
230 
231 
233 {
234  return false;
235 }
236 
237 
239 (
240  volScalarField& a,
242 ) const
243 {
244  a = this->a();
245  aj[0] = a;
246 }
247 
248 
249 // ************************************************************************* //
virtual tmp< volScalarField > EDisp(const label bandI=0) const
Emission contribution for dispersed phase.
virtual label nBands() const
Const access to the number of bands - defaults to 1 for grey.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual tmp< volScalarField > eDisp(const label bandI=0) const
Return emission coefficient for dispersed phase.
defineTypeNameAndDebug(cloudAbsorptionEmission, 0)
Traits class for primitives.
Definition: pTraits.H:50
virtual tmp< volScalarField > aDisp(const label bandI=0) const
Absorption coefficient for dispersed phase.
virtual tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
virtual bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
defineRunTimeSelectionTable(radiationModel, T)
virtual const Vector2D< scalar > & bands(const label n) const
Const access to the bands - defaults to Vector2D::one for grey.
absorptionEmissionModel(const dictionary &dict, const fvMesh &mesh)
Construct from components.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
virtual tmp< volScalarField > a(const label bandI=0) const
Absorption coefficient (net)
virtual void correct(volScalarField &a, PtrList< volScalarField > &aj) const
Correct absorption coefficients.
dimensionedScalar pow3(const dimensionedScalar &ds)
virtual tmp< volScalarField > e(const label bandI=0) const
Emission coefficient (net)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:47
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:50
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:63
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
label n
virtual tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
A class for managing temporary objects.
Definition: PtrList.H:53
Templated 2D Vector derived from VectorSpace adding construction from 2 components, element access using x() and y() member functions and the inner-product (dot-product).
Definition: Vector2D.H:51
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
virtual tmp< volScalarField > eCont(const label bandI=0) const
Return emission coefficient for continuous phase.
virtual tmp< volScalarField > E(const label bandI=0) const
Emission contribution (net)
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.