FreeFOAM The Cross-Platform CFD Toolkit
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 | 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::wideBandAbsorptionEmission
26 
27 Description
28 
29  wideBandAbsorptionEmission radiation absorption and emission coefficients
30  for continuous phase.
31 
32  All the bands should have the same number of species and have to be entered
33  in the same order.
34 
35  There is no check of continuity of the bands. They should not ovelap or
36  have gaps.
37 
38  The emission constant proportionality is specified per band (EhrrCoeff).
39 
40  The coefficients for the species in the LookUpTable have to be specified
41  for use in moles x P [atm].i.e. (k[i] = species[i]*p*9.869231e-6).
42 
43  The coefficients for CO and soot or any other added are multiplied by the
44  respective mass fraction being solved.
45 
46  The look Up table file should be in the constant directory.
47 
48  band dictionary:
49 
50  band0
51  {
52  bandLimits (1.0e-6 2.63e-6);
53  EhrrCoeff 0.0;
54  species
55  {
56  CH4
57  {
58  Tcommon 300.;
59  Tlow 300.;
60  Thigh 2500.;
61  invTemp false;
62  loTcoeffs (0 0 0 0 0 0) ;
63  hiTcoeffs (.1 0 0 0 0 0);
64  }
65  CO2
66  {
67  Tcommon 300.;
68  Tlow 300.;
69  Thigh 2500.;
70  invTemp false;
71  loTcoeffs (0 0 0 0 0 0) ;
72  hiTcoeffs (.1 0 0 0 0 0);
73  }
74 
75  H2O
76  {
77  Tcommon 300.;
78  Tlow 300.;
79  Thigh 2500.;
80  invTemp false;
81  loTcoeffs (0 0 0 0 0 0) ;
82  hiTcoeffs (.1 0 0 0 0 0);
83  }
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 
97 
98 SourceFiles
99  wideBandAbsorptionEmission.C
100 
101 \*---------------------------------------------------------------------------*/
102 
103 #ifndef wideBandAbsorptionEmission_H
104 #define wideBandAbsorptionEmission_H
105 
108 #include <OpenFOAM/HashTable.H>
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 namespace Foam
115 {
116 namespace radiation
117 {
118 
119 /*---------------------------------------------------------------------------*\
120  Class wideBandAbsorptionEmission Declaration
121 \*---------------------------------------------------------------------------*/
122 
124 :
126 {
127 public:
128 
129  // Public data
130 
131  //- Maximum number of species considered for absorptivity
132  static const int nSpecies_ = 5;
133 
134  //- Maximum number of bands
135  static const int maxBands_ = 10;
136 
137  //- Absorption coefficients
139 
140 
141 private:
142 
143  // Private data
144 
145  //- Absorption model dictionary
146  dictionary coeffsDict_;
147 
148  //- Hash table with species names
149  HashTable<label> speciesNames_;
150 
151  //- Indices of species in the look-up table
152  FixedList<label, nSpecies_> specieIndex_;
153 
154  //- Bands
156 
157  //- Proportion of the heat released rate emitted
158  FixedList<scalar, maxBands_> iEhrrCoeffs_;
159 
160  //- Look-up table of species related to ft
161  mutable interpolationLookUpTable<scalar> lookUpTable_;
162 
163  //- Thermo package
164  const basicThermo& thermo_;
165 
166  //- Bands
167  label nBands_;
168 
169  //- Pointer list of species being solved involved in the absorption
171 
172  // Total wave length covered by the bands
173  scalar totalWaveLength_;
174 
175 
176 public:
177 
178  //- Runtime type information
179  TypeName("wideBandAbsorptionEmission");
180 
181 
182  // Constructors
183 
184  //- Construct from components
186  (
187  const dictionary& dict,
188  const fvMesh& mesh
189  );
190 
191 
192  // Destructor
193  virtual ~wideBandAbsorptionEmission();
194 
195 
196  // Member Functions
197 
198  // Access
199 
200  // Absorption coefficient
201 
202  //- Absorption coefficient for continuous phase
203  tmp<volScalarField> aCont(const label bandI = 0) const;
204 
205 
206  // Emission coefficient
207 
208  //- Emission coefficient for continuous phase
209  tmp<volScalarField> eCont(const label bandI = 0) const;
210 
211 
212  // Emission contribution
213 
214  //- Emission contribution for continuous phase
215  tmp<volScalarField> ECont(const label bandI = 0) const;
216 
217 
218  inline bool isGrey() const
219  {
220  return false;
221  }
222 
223  //- Number of bands
224  inline label nBands() const
225  {
226  return nBands_;
227  }
228 
229  //- Lower and upper limit of band i
230  inline const Vector2D<scalar>& bands(const label i) const
231  {
232  return iBands_[i];
233  }
234 
235  //- Add contribution of ILambda to the total radiative intensity in
236  // direction i
238  (
239  const label i,
240  const volScalarField& ILambda
241  ) const;
242 
243  void correct
244  (
245  volScalarField& a_,
246  PtrList<volScalarField>& aLambda
247  ) const;
248 };
249 
250 
251 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
252 
253 } // End namespace radiation
254 } // End namespace Foam
255 
256 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
257 
258 #endif
259 
260 // ************************ vim: set sw=4 sts=4 et: ************************ //