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) 2011-2015 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::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 lookup table 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  \verbatim
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  H2O
75  {
76  Tcommon 300.;
77  Tlow 300.;
78  Thigh 2500.;
79  invTemp false;
80  loTcoeffs (0 0 0 0 0 0) ;
81  hiTcoeffs (.1 0 0 0 0 0);
82  }
83  Ysoot
84  {
85  Tcommon 300.;
86  Tlow 300.;
87  Thigh 2500.;
88  invTemp false;
89  loTcoeffs (0 0 0 0 0 0) ;
90  hiTcoeffs (.1 0 0 0 0 0);
91  }
92  }
93  }
94  \endverbatim
95 
96 
97 SourceFiles
98  wideBandAbsorptionEmission.C
99 
100 \*---------------------------------------------------------------------------*/
101 
102 #ifndef wideBandAbsorptionEmission_H
103 #define wideBandAbsorptionEmission_H
104 
106 #include "absorptionEmissionModel.H"
107 #include "HashTable.H"
108 #include "absorptionCoeffs.H"
109 #include "fluidThermo.H"
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 namespace Foam
114 {
115 namespace radiation
116 {
117 
118 /*---------------------------------------------------------------------------*\
119  Class wideBandAbsorptionEmission Declaration
120 \*---------------------------------------------------------------------------*/
123 :
125 {
126 public:
127 
128  // Public data
129 
130  //- Maximum number of species considered for absorptivity
131  static const int nSpecies_ = 5;
132 
133  //- Maximum number of bands
134  static const int maxBands_ = 10;
135 
136  //- Absorption coefficients
138 
139 
140 private:
141 
142  // Private data
143 
144  //- Absorption model dictionary
145  dictionary coeffsDict_;
146 
147  //- Hash table with species names
148  HashTable<label> speciesNames_;
149 
150  //- Indices of species in the look-up table
151  FixedList<label, nSpecies_> specieIndex_;
152 
153  //- Bands
154  FixedList<Vector2D<scalar>, maxBands_> iBands_;
155 
156  //- Proportion of the heat released rate emitted
157  FixedList<scalar, maxBands_> iEhrrCoeffs_;
158 
159  //- Lookup table of species related to ft
160  mutable interpolationLookUpTable<scalar> lookUpTable_;
161 
162  //- Thermo package
163  const fluidThermo& thermo_;
164 
165  //- Bands
166  label nBands_;
167 
168  //- Pointer list of species being solved involved in the absorption
170 
171  // Total wave length covered by the bands
172  scalar totalWaveLength_;
173 
174 
175 public:
176 
177  //- Runtime type information
178  TypeName("wideBandAbsorptionEmission");
179 
180 
181  // Constructors
182 
183  //- Construct from components
185 
186 
187  //- Destructor
188  virtual ~wideBandAbsorptionEmission();
189 
190 
191  // Member Functions
192 
193  // Access
194 
195  // Absorption coefficient
196 
197  //- Absorption coefficient for continuous phase
198  tmp<volScalarField> aCont(const label bandI = 0) const;
199 
200 
201  // Emission coefficient
202 
203  //- Emission coefficient for continuous phase
204  tmp<volScalarField> eCont(const label bandI = 0) const;
205 
206 
207  // Emission contribution
208 
209  //- Emission contribution for continuous phase
210  tmp<volScalarField> ECont(const label bandI = 0) const;
211 
213  inline bool isGrey() const
214  {
215  return false;
216  }
217 
218  //- Number of bands
219  inline label nBands() const
220  {
221  return nBands_;
222  }
223 
224  //- Lower and upper limit of band i
225  inline const Vector2D<scalar>& bands(const label i) const
226  {
227  return iBands_[i];
228  }
229 
230  //- Correct rays
231  void correct
232  (
233  volScalarField& a_,
234  PtrList<volScalarField>& aLambda
235  ) const;
236 };
237 
238 
239 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
240 
241 } // End namespace radiation
242 } // End namespace Foam
243 
244 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
245 
246 #endif
247 
248 // ************************************************************************* //
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
A 1D vector of objects of type <T> with a fixed size <Size>.
Definition: FixedList.H:53
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
TypeName("wideBandAbsorptionEmission")
Runtime type information.
FixedList< FixedList< absorptionCoeffs, nSpecies_ >, maxBands_ > coeffs_
Absorption coefficients.
tmp< volScalarField > eCont(const label bandI=0) const
Emission coefficient for continuous phase.
static const int maxBands_
Maximum number of bands.
Model to supply absorption and emission coefficients for radiation modelling.
static const int nSpecies_
Maximum number of species considered for absorptivity.
tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
Fundamental fluid thermodynamic properties.
Definition: fluidThermo.H:49
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
wideBandAbsorptionEmission radiation absorption and emission coefficients for continuous phase...
void correct(volScalarField &a_, PtrList< volScalarField > &aLambda) const
Correct rays.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:62
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
wideBandAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
const fvMesh & mesh() const
Reference to the mesh.
tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
A class for managing temporary objects.
Definition: PtrList.H:54
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
const dictionary & dict() const
Reference to the dictionary.
const Vector2D< scalar > & bands(const label i) const
Lower and upper limit of band i.
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.