greyMeanSolid.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-2019 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::absorptionEmissionModels::greyMeanSolid
26 
27 Description
28  greyMeanSolid radiation absorption and emission coefficients for solid 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 SourceFiles
44  greyMeanSolid.C
45 
46 \*---------------------------------------------------------------------------*/
47 
48 #ifndef greyMeanSolid_H
49 #define greyMeanSolid_H
50 
52 #include "solidThermo.H"
53 #include "basicSpecieMixture.H"
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 namespace radiationModels
60 {
61 namespace absorptionEmissionModels
62 {
63 
64 /*---------------------------------------------------------------------------*\
65  Class greyMeanSolid Declaration
66 \*---------------------------------------------------------------------------*/
67 
68 class greyMeanSolid
69 :
71 {
72 
73 private:
74 
75  // Private Data
76 
77  //- Enumering of radiative properties
78  enum radiativeProperties
79  {
80  absorptivity,
81  emissivity
82  };
83 
84  //- Absorption model dictionary
85  dictionary coeffsDict_;
86 
87  //- SLG thermo package
88  const solidThermo& thermo_;
89 
90  //- Hash table of species names
91  HashTable<label> speciesNames_;
92 
93  //- Basic multicomponent mixture
94  const basicSpecieMixture& mixture_;
95 
96  //- List of solid species data
97  List<FixedList<scalar, 2>> solidData_;
98 
99 
100  // Private Member Functions
101 
102  //- Calculate the volumetric fraction of Yj
103  tmp<scalarField> X(const word specie) const;
104 
105  //- Calculate the property mixing
106  tmp<volScalarField> calc(const label) const;
107 
108 
109 public:
110 
111  //- Runtime type information
112  TypeName("greyMeanSolid");
113 
114 
115  // Constructors
116 
117  //- Construct from components
119  (
120  const dictionary& dict,
121  const fvMesh& mesh
122  );
123 
124 
125  //- Destructor
126  virtual ~greyMeanSolid();
127 
128 
129  // Member Functions
130 
131  // Access
132 
133  // Absorption coefficient
134 
135  //- Absorption coefficient for continuous phase
136  tmp<volScalarField> aCont(const label bandI = 0) const;
137 
138 
139  // Emission coefficient
140 
141  //- Emission coefficient for continuous phase
142  tmp<volScalarField> eCont(const label bandI = 0) const;
143 
144 
145  // Member Functions
147  inline bool isGrey() const
148  {
149  return true;
150  }
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace absorptionEmissionModels
157 } // End namespace radiationModels
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #endif
163 
164 // ************************************************************************* //
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
tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
tmp< volScalarField > eCont(const label bandI=0) const
Emission coefficient for continuous phase.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
Base class of the thermophysical property types.
Definition: specie.H:65
greyMeanSolid(const dictionary &dict, const fvMesh &mesh)
Construct from components.
Definition: greyMeanSolid.C:92
TypeName("greyMeanSolid")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:59
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:48
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
greyMeanSolid radiation absorption and emission coefficients for solid phase
Definition: greyMeanSolid.H:67
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const fvMesh & mesh() const
Reference to the mesh.
Model to supply absorption and emission coefficients for radiation modelling.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.
const dictionary & dict() const
Reference to the dictionary.