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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2018 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::radiation::wideBandAbsorptionEmission
28 
29 Group
30  grpRadiationAbsorptionEmissionSubModels
31 
32 Description
33 
34  wideBandAbsorptionEmission radiation absorption and emission coefficients
35  for continuous phase.
36 
37  All the bands should have the same number of species and have to be entered
38  in the same order.
39 
40  There is no check of continuity of the bands. They should not ovelap or
41  have gaps.
42 
43  The emission constant proportionality is specified per band (EhrrCoeff).
44 
45  The coefficients for the species have to be specified for use in
46  moles x P [atm], i.e. (k[i] = species[i]*p*9.869231e-6).
47 
48  The look Up table file should be in the constant directory.
49 
50  band dictionary:
51  \verbatim
52  band0
53  {
54  bandLimits (1.0e-6 2.63e-6);
55  EhrrCoeff 0.0;
56  species
57  {
58  CH4
59  {
60  Tcommon 300.;
61  Tlow 300.;
62  Thigh 2500.;
63  invTemp false;
64  loTcoeffs (0 0 0 0 0 0) ;
65  hiTcoeffs (.1 0 0 0 0 0);
66  }
67  CO2
68  {
69  Tcommon 300.;
70  Tlow 300.;
71  Thigh 2500.;
72  invTemp false;
73  loTcoeffs (0 0 0 0 0 0) ;
74  hiTcoeffs (.1 0 0 0 0 0);
75  }
76  H2O
77  {
78  Tcommon 300.;
79  Tlow 300.;
80  Thigh 2500.;
81  invTemp false;
82  loTcoeffs (0 0 0 0 0 0) ;
83  hiTcoeffs (.1 0 0 0 0 0);
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  \endverbatim
97 
98 
99 SourceFiles
100  wideBandAbsorptionEmission.C
101 
102 \*---------------------------------------------------------------------------*/
103 
104 #ifndef wideBandAbsorptionEmission_H
105 #define wideBandAbsorptionEmission_H
106 
108 #include "absorptionEmissionModel.H"
109 #include "HashTable.H"
110 #include "absorptionCoeffs.H"
111 #include "fluidThermo.H"
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 namespace Foam
116 {
117 namespace radiation
118 {
119 
120 /*---------------------------------------------------------------------------*\
121  Class wideBandAbsorptionEmission Declaration
122 \*---------------------------------------------------------------------------*/
123 
125 :
127 {
128 public:
129 
130  // Public data
131 
132  //- Maximum number of species considered for absorptivity
133  static const int nSpecies_ = 5;
134 
135  //- Maximum number of bands
136  static const int maxBands_ = 10;
137 
138  //- Absorption coefficients
140 
141 
142 private:
143 
144  // Private data
145 
146  //- Absorption model dictionary
147  dictionary coeffsDict_;
148 
149  //- Hash table with species names
150  HashTable<label> speciesNames_;
151 
152  //- Indices of species in the look-up table
153  FixedList<label, nSpecies_> specieIndex_;
154 
155  //- Bands
157 
158  //- Proportion of the heat released rate emitted
159  FixedList<scalar, maxBands_> iEhrrCoeffs_;
160 
161  //- Look-up table of species related to ft
162  mutable autoPtr<interpolationLookUpTable<scalar>> lookUpTablePtr_;
163 
164  //- Thermo package
165  const fluidThermo& thermo_;
166 
167  //- Bands
168  label nBands_;
169 
170  //- Pointer list of species being solved involved in the absorption
172 
173  // Total wave length covered by the bands
174  scalar totalWaveLength_;
175 
176 
177 public:
178 
179  //- Runtime type information
180  TypeName("wideBandAbsorptionEmission");
181 
182 
183  // Constructors
184 
185  //- Construct from components
187 
188 
189  //- Destructor
190  virtual ~wideBandAbsorptionEmission();
191 
192 
193  // Member Functions
194 
195  //- Absorption coefficient for continuous phase
196  tmp<volScalarField> aCont(const label bandi = 0) const;
197 
198  //- Emission coefficient for continuous phase
199  tmp<volScalarField> eCont(const label bandi = 0) const;
200 
201  //- Emission contribution for continuous phase
202  tmp<volScalarField> ECont(const label bandi = 0) const;
203 
204 
205  inline bool isGrey() const
206  {
207  return false;
208  }
209 
210  //- Number of bands
211  inline label nBands() const
212  {
213  return nBands_;
214  }
215 
216  //- Lower and upper limit of band i
217  inline const Vector2D<scalar>& bands(const label bandi) const
218  {
219  return iBands_[bandi];
220  }
221 
222  //- Correct rays
223  void correct
224  (
225  volScalarField& a,
226  PtrList<volScalarField>& aLambda
227  ) const;
228 };
229 
230 
231 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
232 
233 } // End namespace radiation
234 } // End namespace Foam
235 
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
237 
238 #endif
239 
240 // ************************************************************************* //
HashTable.H
Foam::radiation::absorptionEmissionModel::dict
const dictionary & dict() const
Reference to the dictionary.
Definition: absorptionEmissionModel.H:121
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::radiation::wideBandAbsorptionEmission
wideBandAbsorptionEmission radiation absorption and emission coefficients for continuous phase.
Definition: wideBandAbsorptionEmission.H:123
fluidThermo.H
Foam::radiation::wideBandAbsorptionEmission::ECont
tmp< volScalarField > ECont(const label bandi=0) const
Emission contribution for continuous phase.
Definition: wideBandAbsorptionEmission.C:291
Foam::radiation::absorptionEmissionModel::mesh
const fvMesh & mesh() const
Reference to the mesh.
Definition: absorptionEmissionModel.H:115
Foam::radiation::wideBandAbsorptionEmission::nSpecies_
static const int nSpecies_
Maximum number of species considered for absorptivity.
Definition: wideBandAbsorptionEmission.H:132
Foam::fluidThermo
Fundamental fluid thermodynamic properties.
Definition: fluidThermo.H:52
Foam::Vector2D< scalar >
Foam::radiation::wideBandAbsorptionEmission::bands
const Vector2D< scalar > & bands(const label bandi) const
Lower and upper limit of band i.
Definition: wideBandAbsorptionEmission.H:216
Foam::radiation::wideBandAbsorptionEmission::maxBands_
static const int maxBands_
Maximum number of bands.
Definition: wideBandAbsorptionEmission.H:135
Foam::UPtrList
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition: UPtrList.H:62
Foam::radiation::wideBandAbsorptionEmission::~wideBandAbsorptionEmission
virtual ~wideBandAbsorptionEmission()
Destructor.
Definition: wideBandAbsorptionEmission.C:194
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::HashTable< label >
Foam::radiation::wideBandAbsorptionEmission::wideBandAbsorptionEmission
wideBandAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
Definition: wideBandAbsorptionEmission.C:55
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::radiation::wideBandAbsorptionEmission::eCont
tmp< volScalarField > eCont(const label bandi=0) const
Emission coefficient for continuous phase.
Definition: wideBandAbsorptionEmission.C:284
absorptionEmissionModel.H
Foam::FixedList
A 1D vector of objects of type <T> with a fixed length <N>.
Definition: HashTable.H:104
interpolationLookUpTable.H
Foam::radiation::absorptionEmissionModel::a
virtual tmp< volScalarField > a(const label bandI=0) const
Absorption coefficient (net)
Definition: absorptionEmissionModel.C:63
Foam::radiation::wideBandAbsorptionEmission::aCont
tmp< volScalarField > aCont(const label bandi=0) const
Absorption coefficient for continuous phase.
Definition: wideBandAbsorptionEmission.C:201
Foam::radiation::wideBandAbsorptionEmission::nBands
label nBands() const
Number of bands.
Definition: wideBandAbsorptionEmission.H:210
Foam::radiation::absorptionEmissionModel
Model to supply absorption and emission coefficients for radiation modelling.
Definition: absorptionEmissionModel.H:54
Foam::radiation::wideBandAbsorptionEmission::isGrey
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
Definition: wideBandAbsorptionEmission.H:204
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::radiation::wideBandAbsorptionEmission::TypeName
TypeName("wideBandAbsorptionEmission")
Runtime type information.
absorptionCoeffs.H
Foam::radiation::wideBandAbsorptionEmission::correct
void correct(volScalarField &a, PtrList< volScalarField > &aLambda) const
Correct rays.
Definition: wideBandAbsorptionEmission.C:345
Foam::radiation::wideBandAbsorptionEmission::coeffs_
FixedList< FixedList< absorptionCoeffs, nSpecies_ >, maxBands_ > coeffs_
Absorption coefficients.
Definition: wideBandAbsorptionEmission.H:138