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