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-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::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 Usage
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 \*---------------------------------------------------------------------------*/
110 
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  //- Hash table of species names
132 
133  //- Indices of species in the look-up table
135 
136  //- Look-up table of species related to ft
138 
139  //- Thermo package
140  const fluidThermo& thermo_;
141 
142  //- Pointer list of species in the registry involved in the absorption
144 
145 
146 public:
147 
148  //- Runtime type information
149  TypeName("greyMean");
150 
151 
152  // Constructors
153 
154  //- Construct from components
155  greyMean
156  (
157  const dictionary& dict,
158  const fvMesh& mesh,
159  const word& modelName=typeName
160  );
161 
162 
163  //- Destructor
164  virtual ~greyMean();
165 
166 
167  // Member Functions
168 
169  //- Absorption coefficient for continuous phase
170  tmp<volScalarField> aCont(const label bandI = 0) const;
171 
172  //- Emission coefficient for continuous phase
173  tmp<volScalarField> eCont(const label bandI = 0) const;
174 
175  //- Emission contribution for continuous phase
176  tmp<volScalarField> ECont(const label bandI = 0) const;
177 
178  //-
179  inline bool isGrey() const
180  {
181  return true;
182  }
183 };
184 
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 } // End namespace absorptionEmissionModels
189 } // End namespace radiationModels
190 } // End namespace Foam
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************************************************************* //
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.
const fluidThermo & thermo_
Thermo package.
Definition: greyMean.H:139
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
Definition: greyMean.H:178
UPtrList< volScalarField > Yj_
Pointer list of species in the registry involved in the absorption.
Definition: greyMean.H:142
HashTable< label > speciesNames_
Hash table of species names.
Definition: greyMean.H:130
autoPtr< interpolationLookUpTable > lookUpTablePtr_
Look-up table of species related to ft.
Definition: greyMean.H:136
TypeName("greyMean")
Runtime type information.
FixedList< label, nSpecies_ > specieIndex_
Indices of species in the look-up table.
Definition: greyMean.H:133
tmp< volScalarField > eCont(const label bandI=0) const
Emission coefficient for continuous phase.
Definition: greyMean.C:259
tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
Definition: greyMean.C:177
tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
Definition: greyMean.C:269
greyMean(const dictionary &dict, const fvMesh &mesh, const word &modelName=typeName)
Construct from components.
Definition: greyMean.C:55
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