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-2024 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 Usage
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 \*---------------------------------------------------------------------------*/
122 
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  //- Hash table with species names
147 
148  //- Indices of species in the look-up table
150 
151  //- Bands
153 
154  //- Look-up table of species related to ft
156 
157  //- Thermo package
158  const fluidThermo& thermo_;
159 
160  //- Bands
161  label nBands_;
162 
163  //- Pointer list of species being solved involved in the absorption
165 
166  // Total wave length covered by the bands
167  scalar totalWaveLength_;
168 
169 
170 public:
171 
172  //- Runtime type information
173  TypeName("wideBand");
174 
175 
176  // Constructors
177 
178  //- Construct from components
179  wideBand
180  (
181  const dictionary& dict,
182  const fvMesh& mesh,
183  const word& modelName=typeName
184  );
185 
186 
187  //- Destructor
188  virtual ~wideBand();
189 
190 
191  // Member Functions
192 
193  //- Absorption coefficient for continuous phase
194  tmp<volScalarField> aCont(const label bandi = 0) const;
195 
196  //- Emission coefficient for continuous phase
197  tmp<volScalarField> eCont(const label bandi = 0) const;
198 
199  //- Emission contribution for continuous phase
200  tmp<volScalarField> ECont(const label bandi = 0) const;
201 
202  //-
203  inline bool isGrey() const
204  {
205  return false;
206  }
207 
208  //- Number of bands
209  inline label nBands() const
210  {
211  return nBands_;
212  }
213 
214  //- Lower and upper limit of band i
215  inline const Vector2D<scalar>& bands(const label bandi) const
216  {
217  return iBands_[bandi];
218  }
219 
220  //- Correct rays
221  void correct
222  (
223  volScalarField& a,
224  PtrList<volScalarField>& aLambda
225  ) const;
226 };
227 
228 
229 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230 
231 } // End namespace absorptionEmissionModels
232 } // End namespace radiationModels
233 } // End namespace Foam
234 
235 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236 
237 #endif
238 
239 // ************************************************************************* //
A 1D vector of objects of type <T> with a fixed size <Size>.
Definition: FixedList.H:78
Generic GeometricField class.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: UPtrList.H:66
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:56
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:96
Model to supply absorption and emission coefficients for radiation modelling.
const fvMesh & mesh() const
Reference to the mesh.
virtual tmp< volScalarField > a(const label bandI=0) const
Absorption coefficient (net)
const fluidThermo & thermo_
Thermo package.
Definition: wideBand.H:157
static const int maxBands_
Maximum number of bands.
Definition: wideBand.H:134
void correct(volScalarField &a, PtrList< volScalarField > &aLambda) const
Correct rays.
Definition: wideBand.C:299
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
Definition: wideBand.H:202
UPtrList< volScalarField > Yj_
Pointer list of species being solved involved in the absorption.
Definition: wideBand.H:163
FixedList< FixedList< absorptionCoeffs, nSpecies_ >, maxBands_ > coeffs_
Absorption coefficients.
Definition: wideBand.H:137
TypeName("wideBand")
Runtime type information.
tmp< volScalarField > aCont(const label bandi=0) const
Absorption coefficient for continuous phase.
Definition: wideBand.C:199
HashTable< label > speciesNames_
Hash table with species names.
Definition: wideBand.H:145
wideBand(const dictionary &dict, const fvMesh &mesh, const word &modelName=typeName)
Construct from components.
Definition: wideBand.C:54
const Vector2D< scalar > & bands(const label bandi) const
Lower and upper limit of band i.
Definition: wideBand.H:214
autoPtr< interpolationLookUpTable > lookUpTablePtr_
Look-up table of species related to ft.
Definition: wideBand.H:154
static const int nSpecies_
Maximum number of species considered for absorptivity.
Definition: wideBand.H:131
FixedList< label, nSpecies_ > specieIndex_
Indices of species in the look-up table.
Definition: wideBand.H:148
tmp< volScalarField > ECont(const label bandi=0) const
Emission contribution for continuous phase.
Definition: wideBand.C:290
tmp< volScalarField > eCont(const label bandi=0) const
Emission coefficient for continuous phase.
Definition: wideBand.C:280
FixedList< Vector2D< scalar >, maxBands_ > iBands_
Bands.
Definition: wideBand.H:151
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
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
dictionary dict