wideBandAbsorptionEmission.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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 have to be specified for use in
41  moles x P [atm], i.e. (k[i] = species[i]*p*9.869231e-6).
42 
43  The look Up table file should be in the constant directory.
44 
45  band dictionary:
46  \verbatim
47  band0
48  {
49  bandLimits (1.0e-6 2.63e-6);
50  EhrrCoeff 0.0;
51  species
52  {
53  CH4
54  {
55  Tcommon 300.;
56  Tlow 300.;
57  Thigh 2500.;
58  invTemp false;
59  loTcoeffs (0 0 0 0 0 0) ;
60  hiTcoeffs (.1 0 0 0 0 0);
61  }
62  CO2
63  {
64  Tcommon 300.;
65  Tlow 300.;
66  Thigh 2500.;
67  invTemp false;
68  loTcoeffs (0 0 0 0 0 0) ;
69  hiTcoeffs (.1 0 0 0 0 0);
70  }
71  H2O
72  {
73  Tcommon 300.;
74  Tlow 300.;
75  Thigh 2500.;
76  invTemp false;
77  loTcoeffs (0 0 0 0 0 0) ;
78  hiTcoeffs (.1 0 0 0 0 0);
79  }
80  Ysoot
81  {
82  Tcommon 300.;
83  Tlow 300.;
84  Thigh 2500.;
85  invTemp false;
86  loTcoeffs (0 0 0 0 0 0) ;
87  hiTcoeffs (.1 0 0 0 0 0);
88  }
89  }
90  }
91  \endverbatim
92 
93 
94 SourceFiles
95  wideBandAbsorptionEmission.C
96 
97 \*---------------------------------------------------------------------------*/
98 
99 #ifndef wideBandAbsorptionEmission_H
100 #define wideBandAbsorptionEmission_H
101 
103 #include "absorptionEmissionModel.H"
104 #include "HashTable.H"
105 #include "absorptionCoeffs.H"
106 #include "fluidThermo.H"
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 namespace Foam
111 {
112 namespace radiation
113 {
114 
115 /*---------------------------------------------------------------------------*\
116  Class wideBandAbsorptionEmission Declaration
117 \*---------------------------------------------------------------------------*/
120 :
122 {
123 public:
124 
125  // Public data
126 
127  //- Maximum number of species considered for absorptivity
128  static const int nSpecies_ = 5;
129 
130  //- Maximum number of bands
131  static const int maxBands_ = 10;
132 
133  //- Absorption coefficients
135 
136 
137 private:
138 
139  // Private data
140 
141  //- Absorption model dictionary
142  dictionary coeffsDict_;
143 
144  //- Hash table with species names
145  HashTable<label> speciesNames_;
146 
147  //- Indices of species in the look-up table
148  FixedList<label, nSpecies_> specieIndex_;
149 
150  //- Bands
151  FixedList<Vector2D<scalar>, maxBands_> iBands_;
152 
153  //- Proportion of the heat released rate emitted
154  FixedList<scalar, maxBands_> iEhrrCoeffs_;
155 
156  //- Look-up table of species related to ft
157  mutable autoPtr<interpolationLookUpTable<scalar>> lookUpTablePtr_;
158 
159  //- Thermo package
160  const fluidThermo& thermo_;
161 
162  //- Bands
163  label nBands_;
164 
165  //- Pointer list of species being solved involved in the absorption
167 
168  // Total wave length covered by the bands
169  scalar totalWaveLength_;
170 
171 
172 public:
173 
174  //- Runtime type information
175  TypeName("wideBandAbsorptionEmission");
176 
177 
178  // Constructors
179 
180  //- Construct from components
182 
183 
184  //- Destructor
185  virtual ~wideBandAbsorptionEmission();
186 
187 
188  // Member Functions
189 
190  //- Absorption coefficient for continuous phase
191  tmp<volScalarField> aCont(const label bandi = 0) const;
192 
193  //- Emission coefficient for continuous phase
194  tmp<volScalarField> eCont(const label bandi = 0) const;
195 
196  //- Emission contribution for continuous phase
197  tmp<volScalarField> ECont(const label bandi = 0) const;
198 
200  inline bool isGrey() const
201  {
202  return false;
203  }
204 
205  //- Number of bands
206  inline label nBands() const
207  {
208  return nBands_;
209  }
210 
211  //- Lower and upper limit of band i
212  inline const Vector2D<scalar>& bands(const label bandi) const
213  {
214  return iBands_[bandi];
215  }
216 
217  //- Correct rays
218  void correct
219  (
220  volScalarField& a,
221  PtrList<volScalarField>& aLambda
222  ) const;
223 };
224 
225 
226 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227 
228 } // End namespace radiation
229 } // End namespace Foam
230 
231 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
232 
233 #endif
234 
235 // ************************************************************************* //
tmp< volScalarField > aCont(const label bandi=0) const
Absorption coefficient for continuous phase.
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
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:54
void correct(volScalarField &a, PtrList< volScalarField > &aLambda) const
Correct rays.
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.
const Vector2D< scalar > & bands(const label bandi) const
Lower and upper limit of band i.
const fvMesh & mesh() const
Reference to the mesh.
FixedList< FixedList< absorptionCoeffs, nSpecies_ >, maxBands_ > coeffs_
Absorption coefficients.
static const int maxBands_
Maximum number of bands.
const dictionary & dict() const
Reference to the dictionary.
Model to supply absorption and emission coefficients for radiation modelling.
static const int nSpecies_
Maximum number of species considered for absorptivity.
Fundamental fluid thermodynamic properties.
Definition: fluidThermo.H:49
virtual tmp< volScalarField > a(const label bandI=0) const
Absorption coefficient (net)
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...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:63
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
wideBandAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
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
tmp< volScalarField > ECont(const label bandi=0) const
Emission contribution for continuous phase.
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.
tmp< volScalarField > eCont(const label bandi=0) const
Emission coefficient for continuous phase.