greyMeanAbsorptionEmission.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-2016 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::greyMeanAbsorptionEmission
28
29Group
30 grpRadiationAbsorptionEmissionSubModels
31
32Description
33 greyMeanAbsorptionEmission radiation absorption and emission coefficients
34 for continuous phase
35
36 The coefficients for the species in the Look up table have to be specified
37 for use in moles x P [atm], i.e. (k[i] = species[i]*p*9.869231e-6).
38
39 The coefficients for CO and soot or any other added are multiplied by the
40 respective mass fraction being solved
41
42 All the species in the dictionary need either to be in the look-up table or
43 being solved. Conversely, all the species solved do not need to be included
44 in the calculation of the absorption coefficient
45
46 The names of the species in the absorption dictionary must match exactly the
47 name in the look-up table or the name of the field being solved
48
49 The look-up table ("speciesTable") file should be in constant
50
51 i.e. dictionary
52 \verbatim
53 LookUpTableFileName "speciesTable";
54
55 EhrrCoeff 0.0;
56
57 CO2
58 {
59 Tcommon 300.; // Common Temp
60 invTemp true; // Is the polynomial using inverse temperature?
61 Tlow 300.; // Low Temp
62 Thigh 2500.; // High Temp
63
64 loTcoeffs // coeffs for T < Tcommon
65 (
66 0 // a0 +
67 0 // a1*T +
68 0 // a2*T^(+/-)2 +
69 0 // a3*T^(+/-)3 +
70 0 // a4*T^(+/-)4 +
71 0 // a5*T^(+/-)5 +
72 );
73 hiTcoeffs // coeffs for T > Tcommon
74 (
75 18.741
76 -121.31e3
77 273.5e6
78 -194.05e9
79 56.31e12
80 -5.8169e15
81 );
82 }
83 \endverbatim
84
85SourceFiles
86 greyMeanAbsorptionEmission.C
87
88\*---------------------------------------------------------------------------*/
89
90#ifndef greyMeanAbsorptionEmission_H
91#define greyMeanAbsorptionEmission_H
92
95#include "HashTable.H"
96#include "absorptionCoeffs.H"
97#include "fluidThermo.H"
98
99// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100
101namespace Foam
102{
103namespace radiation
104{
105
106/*---------------------------------------------------------------------------*\
107 Class greyMeanAbsorptionEmission Declaration
108\*---------------------------------------------------------------------------*/
111:
113{
114public:
115
116 // Public data
117
118 // Maximum number of species considered for absorptivity
119 static const int nSpecies_ = 5;
120
121 // Absorption Coefficients
123
124
125private:
126
127 // Private data
128
129 //- Absorption model dictionary
130 dictionary coeffsDict_;
131
132 //- Hash table of species names
133 HashTable<label> speciesNames_;
134
135 //- Indices of species in the look-up table
136 FixedList<label, nSpecies_> specieIndex_;
137
138 //- Look-up table of species related to ft
139 mutable autoPtr<interpolationLookUpTable<scalar>> lookUpTablePtr_;
140
141 //- SLG thermo package
142 const fluidThermo& thermo_;
143
144 //- Emission constant coefficient
145 const scalar EhrrCoeff_;
146
147 //- Pointer list of species in the registry involved in the absorption
149
150
151public:
152
153 //- Runtime type information
154 TypeName("greyMeanAbsorptionEmission");
155
156
157 // Constructors
158
159 //- Construct from components
161
162
163 //- Destructor
165
166
167 // Member Functions
168
169 // Access
170
171 // Absorption coefficient
172
173 //- Absorption coefficient for continuous phase
174 tmp<volScalarField> aCont(const label bandI = 0) const;
175
176
177 // Emission coefficient
178
179 //- Emission coefficient for continuous phase
180 tmp<volScalarField> eCont(const label bandI = 0) const;
181
182
183 // Emission contribution
184
185 //- Emission contribution for continuous phase
186 tmp<volScalarField> ECont(const label bandI = 0) const;
187
188
189 // Member Functions
191 inline bool isGrey() const
192 {
193 return true;
194 }
195};
196
197
198// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199
200} // End namespace radiation
201} // End namespace Foam
202
203// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204
205#endif
206
207// ************************************************************************* //
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>, without allocation/deallocation management of the pointers...
Definition: UPtrList.H:71
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.
const fvMesh & mesh() const
Reference to the mesh.
const dictionary & dict() const
Reference to the dictionary.
greyMeanAbsorptionEmission radiation absorption and emission coefficients for continuous phase
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
TypeName("greyMeanAbsorptionEmission")
Runtime type information.
tmp< volScalarField > eCont(const label bandI=0) const
Emission coefficient for continuous phase.
tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
A class for managing temporary objects.
Definition: tmp.H:65
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