wideBand.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-2019 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::radiationModels::absorptionEmission::wideBand
26 
27 Description
28  wideBand radiation absorption and emission coefficients for continuous
29  phase.
30 
31  All the bands should have the same number of species and have to be entered
32  in the same order.
33 
34  There is no check of continuity of the bands. They should not overlap or
35  have gaps.
36 
37  The emission constant proportionality is specified per band (EhrrCoeff).
38 
39  The coefficients for the species have to be specified for use in
40  moles x P [atm], i.e. (k[i] = species[i]*p*9.869231e-6).
41 
42  The lookup table file should be in the constant directory.
43 
44 Example
45  \verbatim
46  absorptionEmissionModel wideBand;
47 
48  wideBandCoeffs
49  {
50  band0
51  {
52  bandLimits (1e-6 2.63e-6);
53 
54  CH4
55  {
56  Tcommon 300;
57  Tlow 300;
58  Thigh 2500;
59  invTemp false;
60  loTcoeffs (0 0 0 0 0 0) ;
61  hiTcoeffs (0.1 0 0 0 0 0);
62  }
63 
64  CO2
65  {
66  Tcommon 300;
67  Tlow 300;
68  Thigh 2500;
69  invTemp false;
70  loTcoeffs (0 0 0 0 0 0) ;
71  hiTcoeffs (0.1 0 0 0 0 0);
72  }
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 (0.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 (0.1 0 0 0 0 0);
91  }
92  }
93  }
94  \endverbatim
95 
96 SourceFiles
97  wideBand.C
98 
99 \*---------------------------------------------------------------------------*/
100 
101 #ifndef wideBand_H
102 #define wideBand_H
103 
105 #include "absorptionEmissionModel.H"
106 #include "HashTable.H"
107 #include "absorptionCoeffs.H"
108 #include "fluidThermo.H"
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 namespace Foam
113 {
114 namespace radiationModels
115 {
116 namespace absorptionEmissionModels
117 {
118 
119 /*---------------------------------------------------------------------------*\
120  Class wideBand Declaration
121 \*---------------------------------------------------------------------------*/
123 class wideBand
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 protected:
142 
143  // Protected data
144 
145  //- Absorption model dictionary
147 
148  //- Hash table with species names
150 
151  //- Indices of species in the look-up table
153 
154  //- Bands
156 
157  //- Look-up table of species related to ft
159 
160  //- Thermo package
161  const fluidThermo& thermo_;
162 
163  //- Bands
164  label nBands_;
165 
166  //- Pointer list of species being solved involved in the absorption
168 
169  // Total wave length covered by the bands
170  scalar totalWaveLength_;
171 
172 
173 public:
174 
175  //- Runtime type information
176  TypeName("wideBand");
177 
178 
179  // Constructors
180 
181  //- Construct from components
182  wideBand
183  (
184  const dictionary& dict,
185  const fvMesh& mesh,
186  const word& modelName=typeName
187  );
188 
189 
190  //- Destructor
191  virtual ~wideBand();
192 
193 
194  // Member Functions
195 
196  //- Absorption coefficient for continuous phase
197  tmp<volScalarField> aCont(const label bandi = 0) const;
198 
199  //- Emission coefficient for continuous phase
200  tmp<volScalarField> eCont(const label bandi = 0) const;
201 
202  //- Emission contribution for continuous phase
203  tmp<volScalarField> ECont(const label bandi = 0) const;
204 
205  //-
206  inline bool isGrey() const
207  {
208  return false;
209  }
210 
211  //- Number of bands
212  inline label nBands() const
213  {
214  return nBands_;
215  }
216 
217  //- Lower and upper limit of band i
218  inline const Vector2D<scalar>& bands(const label bandi) const
219  {
220  return iBands_[bandi];
221  }
222 
223  //- Correct rays
224  void correct
225  (
226  volScalarField& a,
227  PtrList<volScalarField>& aLambda
228  ) const;
229 };
230 
231 
232 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
233 
234 } // End namespace absorptionEmissionModels
235 } // End namespace radiationModels
236 } // End namespace Foam
237 
238 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
239 
240 #endif
241 
242 // ************************************************************************* //
tmp< volScalarField > aCont(const label bandi=0) const
Absorption coefficient for continuous phase.
Definition: wideBand.C:194
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
FixedList< Vector2D< scalar >, maxBands_ > iBands_
Bands.
Definition: wideBand.H:154
FixedList< label, nSpecies_ > specieIndex_
Indices of species in the look-up table.
Definition: wideBand.H:151
autoPtr< interpolationLookUpTable< scalar > > lookUpTablePtr_
Look-up table of species related to ft.
Definition: wideBand.H:157
A 1D vector of objects of type <T> with a fixed size <Size>.
Definition: FixedList.H:54
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
const Vector2D< scalar > & bands(const label bandi) const
Lower and upper limit of band i.
Definition: wideBand.H:217
wideBand(const dictionary &dict, const fvMesh &mesh, const word &modelName=typeName)
Construct from components.
Definition: wideBand.C:55
HashTable< label > speciesNames_
Hash table with species names.
Definition: wideBand.H:148
void correct(volScalarField &a, PtrList< volScalarField > &aLambda) const
Correct rays.
Definition: wideBand.C:292
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
Definition: wideBand.H:205
virtual tmp< volScalarField > a(const label bandI=0) const
Absorption coefficient (net)
static const int maxBands_
Maximum number of bands.
Definition: wideBand.H:134
A class for handling words, derived from string.
Definition: word.H:59
Fundamental fluid thermodynamic properties.
Definition: fluidThermo.H:48
dictionary coeffsDict_
Absorption model dictionary.
Definition: wideBand.H:145
tmp< volScalarField > eCont(const label bandi=0) const
Emission coefficient for continuous phase.
Definition: wideBand.C:273
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
UPtrList< volScalarField > Yj_
Pointer list of species being solved involved in the absorption.
Definition: wideBand.H:166
const fluidThermo & thermo_
Thermo package.
Definition: wideBand.H:160
TypeName("wideBand")
Runtime type information.
FixedList< FixedList< absorptionCoeffs, nSpecies_ >, maxBands_ > coeffs_
Absorption coefficients.
Definition: wideBand.H:137
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const fvMesh & mesh() const
Reference to the mesh.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
tmp< volScalarField > ECont(const label bandi=0) const
Emission contribution for continuous phase.
Definition: wideBand.C:283
Model to supply absorption and emission coefficients for radiation modelling.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.
const dictionary & dict() const
Reference to the dictionary.
static const int nSpecies_
Maximum number of species considered for absorptivity.
Definition: wideBand.H:131