FreeFOAM The Cross-Platform CFD Toolkit
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) 2008-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 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 
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  }
79 
80 SourceFiles
81  greyMeanAbsorptionEmission.C
82 
83 \*---------------------------------------------------------------------------*/
84 
85 #ifndef greyMeanAbsorptionEmission_H
86 #define greyMeanAbsorptionEmission_H
87 
90 #include <OpenFOAM/HashTable.H>
93 
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95 
96 namespace Foam
97 {
98 namespace radiation
99 {
100 
101 /*---------------------------------------------------------------------------*\
102  Class greyMeanAbsorptionEmission Declaration
103 \*---------------------------------------------------------------------------*/
104 
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 interpolationLookUpTable<scalar> lookUpTable_;
135 
136  // Thermo package
137  const basicThermo& 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  const dictionary& dict,
158  const fvMesh& mesh
159  );
160 
161 
162  // Destructor
163  virtual ~greyMeanAbsorptionEmission();
164 
165 
166  // Member Operators
167 
168  // Access
169 
170  // Absorption coefficient
171 
172  //- Absorption coefficient for continuous phase
173  tmp<volScalarField> aCont(const label bandI = 0) const;
174 
175 
176  // Emission coefficient
177 
178  //- Emission coefficient for continuous phase
179  tmp<volScalarField> eCont(const label bandI = 0) const;
180 
181 
182  // Emission contribution
183 
184  //- Emission contribution for continuous phase
185  tmp<volScalarField> ECont(const label bandI = 0) const;
186 
187 
188  // Member Functions
189 
190  inline bool isGrey() const
191  {
192  return true;
193  }
194 };
195 
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 } // End namespace radiation
200 } // End namespace Foam
201 
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 
204 #endif
205 
206 // ************************ vim: set sw=4 sts=4 et: ************************ //