greyMean.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-2021 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::greyMean
26 
27 Description
28  greyMean radiation absorption and emission coefficients for continuous phase
29 
30  The coefficients for the species in the Look up table have to be specified
31  for use in moles x P [atm], i.e. (k[i] = species[i]*p*9.869231e-6).
32 
33  The coefficients for CO and soot or any other added are multiplied by the
34  respective mass fraction being solved
35 
36  All the species in the dictionary need either to be in the look-up table or
37  being solved. Conversely, all the species solved do not need to be included
38  in the calculation of the absorption coefficient
39 
40  The names of the species in the absorption dictionary must match exactly the
41  name in the look-up table or the name of the field being solved
42 
43  The look-up table ("speciesTable") file should be in constant
44 
45 Example
46  \verbatim
47  absorptionEmissionModel greyMean;
48 
49  greyMeanCoeffs
50  {
51  lookUpTableFileName "speciesTable";
52 
53  EhrrCoeff 0.0;
54 
55  CO2
56  {
57  Tcommon 300.; // Common Temp
58  invTemp true; // Is the polynomial using inverse temperature?
59  Tlow 300.; // Low Temp
60  Thigh 2500.; // High Temp
61 
62  loTcoeffs // coeffs for T < Tcommon
63  (
64  0 // a0 +
65  0 // a1*T +
66  0 // a2*T^(+/-)2 +
67  0 // a3*T^(+/-)3 +
68  0 // a4*T^(+/-)4 +
69  0 // a5*T^(+/-)5 +
70  );
71  hiTcoeffs // coeffs for T > Tcommon
72  (
73  18.741
74  -121.31e3
75  273.5e6
76  -194.05e9
77  56.31e12
78  -5.8169e15
79  );
80  }
81  }
82  \endverbatim
83 
84 SourceFiles
85  greyMean.C
86 
87 \*---------------------------------------------------------------------------*/
88 
89 #ifndef greyMean_H
90 #define greyMean_H
91 
94 #include "HashTable.H"
95 #include "absorptionCoeffs.H"
96 #include "fluidThermo.H"
97 
98 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 
100 namespace Foam
101 {
102 namespace radiationModels
103 {
104 namespace absorptionEmissionModels
105 {
106 
107 /*---------------------------------------------------------------------------*\
108  Class greyMean Declaration
109 \*---------------------------------------------------------------------------*/
111 class greyMean
112 :
114 {
115 public:
116 
117  // Public data
118 
119  // Maximum number of species considered for absorptivity
120  static const int nSpecies_ = 5;
121 
122  // Absorption Coefficients
124 
125 
126 protected:
127 
128  // Protected data
129 
130  //- Absorption model dictionary
132 
133  //- Hash table of species names
135 
136  //- Indices of species in the look-up table
138 
139  //- Look-up table of species related to ft
141 
142  //- Thermo package
143  const fluidThermo& thermo_;
144 
145  //- Pointer list of species in the registry involved in the absorption
147 
148 
149 public:
150 
151  //- Runtime type information
152  TypeName("greyMean");
153 
154 
155  // Constructors
156 
157  //- Construct from components
158  greyMean
159  (
160  const dictionary& dict,
161  const fvMesh& mesh,
162  const word& modelName=typeName
163  );
164 
165 
166  //- Destructor
167  virtual ~greyMean();
168 
169 
170  // Member Functions
171 
172  //- Absorption coefficient for continuous phase
173  tmp<volScalarField> aCont(const label bandI = 0) const;
174 
175  //- Emission coefficient for continuous phase
176  tmp<volScalarField> eCont(const label bandI = 0) const;
177 
178  //- Emission contribution for continuous phase
179  tmp<volScalarField> ECont(const label bandI = 0) const;
180 
181  //-
182  inline bool isGrey() const
183  {
184  return true;
185  }
186 };
187 
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 } // End namespace absorptionEmissionModels
192 } // End namespace radiationModels
193 } // End namespace Foam
194 
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 
197 #endif
198 
199 // ************************************************************************* //
UPtrList< volScalarField > Yj_
Pointer list of species in the registry involved in the absorption.
Definition: greyMean.H:145
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
greyMean(const dictionary &dict, const fvMesh &mesh, const word &modelName=typeName)
Construct from components.
Definition: greyMean.C:56
autoPtr< interpolationLookUpTable > lookUpTablePtr_
Look-up table of species related to ft.
Definition: greyMean.H:139
TypeName("greyMean")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
dictionary coeffsDict_
Absorption model dictionary.
Definition: greyMean.H:130
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
Definition: greyMean.H:181
A class for handling words, derived from string.
Definition: word.H:59
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:53
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
tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
Definition: greyMean.C:266
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const fvMesh & mesh() const
Reference to the mesh.
tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
Definition: greyMean.C:179
FixedList< label, nSpecies_ > specieIndex_
Indices of species in the look-up table.
Definition: greyMean.H:136
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Model to supply absorption and emission coefficients for radiation modelling.
A class for managing temporary objects.
Definition: PtrList.H:53
HashTable< label > speciesNames_
Hash table of species names.
Definition: greyMean.H:133
const fluidThermo & thermo_
Thermo package.
Definition: greyMean.H:142
tmp< volScalarField > eCont(const label bandI=0) const
Emission coefficient for continuous phase.
Definition: greyMean.C:256
Namespace for OpenFOAM.
const dictionary & dict() const
Reference to the dictionary.