greyMeanAbsorptionEmission.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-2016 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::greyMeanAbsorptionEmission
28 
29 Group
30  grpRadiationAbsorptionEmissionSubModels
31 
32 Description
33  greyMeanAbsorptionEmission radiation absorption and emission coefficients
34  for continuous phase
35 
36  The coefficients for the species in the Look up table have to be specified
37  for use in moles x P [atm], i.e. (k[i] = species[i]*p*9.869231e-6).
38 
39  The coefficients for CO and soot or any other added are multiplied by the
40  respective mass fraction being solved
41 
42  All the species in the dictionary need either to be in the look-up table or
43  being solved. Conversely, all the species solved do not need to be included
44  in the calculation of the absorption coefficient
45 
46  The names of the species in the absorption dictionary must match exactly the
47  name in the look-up table or the name of the field being solved
48 
49  The look-up table ("speciesTable") file should be in constant
50 
51  i.e. dictionary
52  \verbatim
53  LookUpTableFileName "speciesTable";
54 
55  EhrrCoeff 0.0;
56 
57  CO2
58  {
59  Tcommon 300.; // Common Temp
60  invTemp true; // Is the polynomial using inverse temperature?
61  Tlow 300.; // Low Temp
62  Thigh 2500.; // High Temp
63 
64  loTcoeffs // coeffs for T < Tcommon
65  (
66  0 // a0 +
67  0 // a1*T +
68  0 // a2*T^(+/-)2 +
69  0 // a3*T^(+/-)3 +
70  0 // a4*T^(+/-)4 +
71  0 // a5*T^(+/-)5 +
72  );
73  hiTcoeffs // coeffs for T > Tcommon
74  (
75  18.741
76  -121.31e3
77  273.5e6
78  -194.05e9
79  56.31e12
80  -5.8169e15
81  );
82  }
83  \endverbatim
84 
85 SourceFiles
86  greyMeanAbsorptionEmission.C
87 
88 \*---------------------------------------------------------------------------*/
89 
90 #ifndef greyMeanAbsorptionEmission_H
91 #define greyMeanAbsorptionEmission_H
92 
95 #include "HashTable.H"
96 #include "absorptionCoeffs.H"
97 #include "fluidThermo.H"
98 
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 
101 namespace Foam
102 {
103 namespace radiation
104 {
105 
106 /*---------------------------------------------------------------------------*\
107  Class greyMeanAbsorptionEmission Declaration
108 \*---------------------------------------------------------------------------*/
109 
111 :
113 {
114 public:
115 
116  // Public data
117 
118  // Maximum number of species considered for absorptivity
119  static const int nSpecies_ = 5;
120 
121  // Absorption Coefficients
123 
124 
125 private:
126 
127  // Private data
128 
129  //- Absorption model dictionary
130  dictionary coeffsDict_;
131 
132  //- Hash table of species names
133  HashTable<label> speciesNames_;
134 
135  //- Indices of species in the look-up table
136  FixedList<label, nSpecies_> specieIndex_;
137 
138  //- Look-up table of species related to ft
139  mutable autoPtr<interpolationLookUpTable<scalar>> lookUpTablePtr_;
140 
141  //- SLG thermo package
142  const fluidThermo& thermo_;
143 
144  //- Emission constant coefficient
145  const scalar EhrrCoeff_;
146 
147  //- Pointer list of species in the registry involved in the absorption
149 
150 
151 public:
152 
153  //- Runtime type information
154  TypeName("greyMeanAbsorptionEmission");
155 
156 
157  // Constructors
158 
159  //- Construct from components
161 
162 
163  //- Destructor
164  virtual ~greyMeanAbsorptionEmission();
165 
166 
167  // Member Functions
168 
169  // Access
170 
171  // Absorption coefficient
172 
173  //- Absorption coefficient for continuous phase
174  tmp<volScalarField> aCont(const label bandI = 0) const;
175 
176 
177  // Emission coefficient
178 
179  //- Emission coefficient for continuous phase
180  tmp<volScalarField> eCont(const label bandI = 0) const;
181 
182 
183  // Emission contribution
184 
185  //- Emission contribution for continuous phase
186  tmp<volScalarField> ECont(const label bandI = 0) const;
187 
188 
189  // Member Functions
190 
191  inline bool isGrey() const
192  {
193  return true;
194  }
195 };
196 
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 } // End namespace radiation
201 } // End namespace Foam
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 #endif
206 
207 // ************************************************************************* //
Foam::radiation::greyMeanAbsorptionEmission::TypeName
TypeName("greyMeanAbsorptionEmission")
Runtime type information.
Foam::radiation::greyMeanAbsorptionEmission::~greyMeanAbsorptionEmission
virtual ~greyMeanAbsorptionEmission()
Destructor.
Definition: greyMeanAbsorptionEmission.C:181
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
fluidThermo.H
Foam::radiation::absorptionCoeffs
Definition: absorptionCoeffs.H:54
Foam::radiation::absorptionEmissionModel::mesh
const fvMesh & mesh() const
Reference to the mesh.
Definition: absorptionEmissionModel.H:115
Foam::fluidThermo
Fundamental fluid thermodynamic properties.
Definition: fluidThermo.H:52
Foam::radiation::greyMeanAbsorptionEmission::nSpecies_
static const int nSpecies_
Definition: greyMeanAbsorptionEmission.H:118
Foam::radiation::greyMeanAbsorptionEmission::ECont
tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
Definition: greyMeanAbsorptionEmission.C:276
Foam::radiation::greyMeanAbsorptionEmission::aCont
tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
Definition: greyMeanAbsorptionEmission.C:188
Foam::UPtrList
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition: UPtrList.H:62
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Foam::radiation::greyMeanAbsorptionEmission::isGrey
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
Definition: greyMeanAbsorptionEmission.H:190
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::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
absorptionEmissionModel.H
Foam::FixedList< label, nSpecies_ >
Foam::radiation::greyMeanAbsorptionEmission::eCont
tmp< volScalarField > eCont(const label bandI=0) const
Emission coefficient for continuous phase.
Definition: greyMeanAbsorptionEmission.C:269
interpolationLookUpTable.H
Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission
greyMeanAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
Definition: greyMeanAbsorptionEmission.C:56
Foam::radiation::greyMeanAbsorptionEmission
greyMeanAbsorptionEmission radiation absorption and emission coefficients for continuous phase
Definition: greyMeanAbsorptionEmission.H:109
Foam::radiation::absorptionEmissionModel
Model to supply absorption and emission coefficients for radiation modelling.
Definition: absorptionEmissionModel.H:54
Foam::radiation::greyMeanAbsorptionEmission::coeffs_
absorptionCoeffs coeffs_[nSpecies_]
Definition: greyMeanAbsorptionEmission.H:121
absorptionCoeffs.H