wideBandAbsorptionEmission.H
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) 2011-2018 OpenFOAM Foundation
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
26Class
27 Foam::radiation::wideBandAbsorptionEmission
28
29Group
30 grpRadiationAbsorptionEmissionSubModels
31
32Description
33
34 wideBandAbsorptionEmission radiation absorption and emission coefficients
35 for continuous phase.
36
37 All the bands should have the same number of species and have to be entered
38 in the same order.
39
40 There is no check of continuity of the bands. They should not ovelap or
41 have gaps.
42
43 The emission constant proportionality is specified per band (EhrrCoeff).
44
45 The coefficients for the species have to be specified for use in
46 moles x P [atm], i.e. (k[i] = species[i]*p*9.869231e-6).
47
48 The look Up table file should be in the constant directory.
49
50 band dictionary:
51 \verbatim
52 band0
53 {
54 bandLimits (1.0e-6 2.63e-6);
55 EhrrCoeff 0.0;
56 species
57 {
58 CH4
59 {
60 Tcommon 300.;
61 Tlow 300.;
62 Thigh 2500.;
63 invTemp false;
64 loTcoeffs (0 0 0 0 0 0) ;
65 hiTcoeffs (.1 0 0 0 0 0);
66 }
67 CO2
68 {
69 Tcommon 300.;
70 Tlow 300.;
71 Thigh 2500.;
72 invTemp false;
73 loTcoeffs (0 0 0 0 0 0) ;
74 hiTcoeffs (.1 0 0 0 0 0);
75 }
76 H2O
77 {
78 Tcommon 300.;
79 Tlow 300.;
80 Thigh 2500.;
81 invTemp false;
82 loTcoeffs (0 0 0 0 0 0) ;
83 hiTcoeffs (.1 0 0 0 0 0);
84 }
85 Ysoot
86 {
87 Tcommon 300.;
88 Tlow 300.;
89 Thigh 2500.;
90 invTemp false;
91 loTcoeffs (0 0 0 0 0 0) ;
92 hiTcoeffs (.1 0 0 0 0 0);
93 }
94 }
95 }
96 \endverbatim
97
98
99SourceFiles
100 wideBandAbsorptionEmission.C
101
102\*---------------------------------------------------------------------------*/
103
104#ifndef wideBandAbsorptionEmission_H
105#define wideBandAbsorptionEmission_H
106
109#include "HashTable.H"
110#include "absorptionCoeffs.H"
111#include "fluidThermo.H"
112
113// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114
115namespace Foam
116{
117namespace radiation
118{
119
120/*---------------------------------------------------------------------------*\
121 Class wideBandAbsorptionEmission Declaration
122\*---------------------------------------------------------------------------*/
125:
127{
128public:
129
130 // Public data
131
132 //- Maximum number of species considered for absorptivity
133 static const int nSpecies_ = 5;
134
135 //- Maximum number of bands
136 static const int maxBands_ = 10;
137
138 //- Absorption coefficients
140
141
142private:
143
144 // Private data
145
146 //- Absorption model dictionary
147 dictionary coeffsDict_;
148
149 //- Hash table with species names
150 HashTable<label> speciesNames_;
151
152 //- Indices of species in the look-up table
153 FixedList<label, nSpecies_> specieIndex_;
154
155 //- Bands
157
158 //- Proportion of the heat released rate emitted
159 FixedList<scalar, maxBands_> iEhrrCoeffs_;
160
161 //- Look-up table of species related to ft
162 mutable autoPtr<interpolationLookUpTable<scalar>> lookUpTablePtr_;
163
164 //- Thermo package
165 const fluidThermo& thermo_;
166
167 //- Bands
168 label nBands_;
169
170 //- Pointer list of species being solved involved in the absorption
172
173 // Total wave length covered by the bands
174 scalar totalWaveLength_;
175
176
177public:
178
179 //- Runtime type information
180 TypeName("wideBandAbsorptionEmission");
181
182
183 // Constructors
184
185 //- Construct from components
187
188
189 //- Destructor
191
192
193 // Member Functions
194
195 //- Absorption coefficient for continuous phase
196 tmp<volScalarField> aCont(const label bandi = 0) const;
197
198 //- Emission coefficient for continuous phase
199 tmp<volScalarField> eCont(const label bandi = 0) const;
200
201 //- Emission contribution for continuous phase
202 tmp<volScalarField> ECont(const label bandi = 0) const;
203
205 inline bool isGrey() const
206 {
207 return false;
208 }
209
210 //- Number of bands
211 inline label nBands() const
212 {
213 return nBands_;
214 }
215
216 //- Lower and upper limit of band i
217 inline const Vector2D<scalar>& bands(const label bandi) const
218 {
219 return iBands_[bandi];
220 }
221
222 //- Correct rays
223 void correct
224 (
227 ) const;
228};
229
230
231// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
232
233} // End namespace radiation
234} // End namespace Foam
235
236// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
237
238#endif
239
240// ************************************************************************* //
A 1D vector of objects of type <T> with a fixed length <N>.
Definition: FixedList.H:81
A HashTable similar to std::unordered_map.
Definition: HashTable.H:123
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition: UPtrList.H:71
Templated 2D Vector derived from VectorSpace adding construction from 2 components,...
Definition: Vector2D.H:58
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Fundamental fluid thermodynamic properties.
Definition: fluidThermo.H:56
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Model to supply absorption and emission coefficients for radiation modelling.
virtual tmp< volScalarField > a(const label bandI=0) const
Absorption coefficient (net)
const fvMesh & mesh() const
Reference to the mesh.
const dictionary & dict() const
Reference to the dictionary.
wideBandAbsorptionEmission radiation absorption and emission coefficients for continuous phase.
static const int maxBands_
Maximum number of bands.
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
const Vector2D< scalar > & bands(const label bandi) const
Lower and upper limit of band i.
FixedList< FixedList< absorptionCoeffs, nSpecies_ >, maxBands_ > coeffs_
Absorption coefficients.
tmp< volScalarField > aCont(const label bandi=0) const
Absorption coefficient for continuous phase.
static const int nSpecies_
Maximum number of species considered for absorptivity.
tmp< volScalarField > ECont(const label bandi=0) const
Emission contribution for continuous phase.
tmp< volScalarField > eCont(const label bandi=0) const
Emission coefficient for continuous phase.
TypeName("wideBandAbsorptionEmission")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:65
thermo correct()
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73