absorptionEmissionModel.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::absorptionEmissionModel
26 
27 Description
28  Model to supply absorption and emission coefficients for radiation
29  modelling
30 
31 \*---------------------------------------------------------------------------*/
32 
33 #ifndef absorptionEmissionModel_H
34 #define absorptionEmissionModel_H
35 
36 #include "IOdictionary.H"
37 #include "autoPtr.H"
38 #include "runTimeSelectionTables.H"
39 #include "volFields.H"
40 #include "Vector2D.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace radiationModels
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class absorptionEmissionModel Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55 
56 protected:
57 
58  // Protected data
59 
60  //- Reference to the fvMesh
61  const fvMesh& mesh_;
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("absorptionEmissionModel");
68 
69  //- Declare runtime constructor selection table
70 
72  (
73  autoPtr,
75  dictionary,
76  (
77  const dictionary& dict,
78  const fvMesh& mesh
79  ),
80  (dict, mesh)
81  );
82 
83 
84  // Constructors
85 
86  //- Construct from mesh
88 
89 
90  //- Selector
92  (
93  const dictionary& dict,
94  const fvMesh& mesh
95  );
96 
97 
98  //- Destructor
99  virtual ~absorptionEmissionModel();
100 
101 
102  // Member Functions
103 
104  // Access
105 
106  //- Reference to the mesh
107  inline const fvMesh& mesh() const
108  {
109  return mesh_;
110  }
111 
112 
113  // Absorption coefficient
114 
115  //- Absorption coefficient (net)
116  virtual tmp<volScalarField> a(const label bandI = 0) const;
117 
118  //- Absorption coefficient for continuous phase
119  virtual tmp<volScalarField> aCont(const label bandI = 0) const;
120 
121  //- Absorption coefficient for dispersed phase
122  virtual tmp<volScalarField> aDisp(const label bandI = 0) const;
123 
124 
125  // Emission coefficient
126 
127  //- Emission coefficient (net)
128  virtual tmp<volScalarField> e(const label bandI = 0) const;
129 
130  //- Return emission coefficient for continuous phase
131  virtual tmp<volScalarField> eCont(const label bandI = 0) const;
132 
133  //- Return emission coefficient for dispersed phase
134  virtual tmp<volScalarField> eDisp(const label bandI = 0) const;
135 
136 
137  // Emission contribution
138 
139  //- Emission contribution (net)
140  virtual tmp<volScalarField> E(const label bandI = 0) const;
141 
142  //- Emission contribution for continuous phase
143  virtual tmp<volScalarField> ECont(const label bandI = 0) const;
144 
145  //- Emission contribution for dispersed phase
146  virtual tmp<volScalarField> EDisp(const label bandI = 0) const;
147 
148 
149  //- Const access to the number of bands - defaults to 1 for grey
150  // absorption/emission
151  virtual label nBands() const;
152 
153  //- Const access to the bands - defaults to Vector2D::one for grey
154  // absorption/emission
155  virtual const Vector2D<scalar>& bands(const label n) const;
156 
157  //- Flag for whether the absorption/emission is for a grey gas
158  virtual bool isGrey() const;
159 
160  //- Correct absorption coefficients
161  virtual void correct
162  (
163  volScalarField& a,
165  ) const;
166 };
167 
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 } // End namespace radiationModels
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #endif
177 
178 // ************************************************************************* //
label n
Generic GeometricField class.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
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
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:96
Model to supply absorption and emission coefficients for radiation modelling.
static autoPtr< absorptionEmissionModel > New(const dictionary &dict, const fvMesh &mesh)
Selector.
virtual tmp< volScalarField > e(const label bandI=0) const
Emission coefficient (net)
virtual bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
virtual const Vector2D< scalar > & bands(const label n) const
Const access to the bands - defaults to Vector2D::one for grey.
const fvMesh & mesh_
Reference to the fvMesh.
virtual tmp< volScalarField > aDisp(const label bandI=0) const
Absorption coefficient for dispersed phase.
virtual tmp< volScalarField > E(const label bandI=0) const
Emission contribution (net)
virtual tmp< volScalarField > EDisp(const label bandI=0) const
Emission contribution for dispersed phase.
const fvMesh & mesh() const
Reference to the mesh.
declareRunTimeSelectionTable(autoPtr, absorptionEmissionModel, dictionary,(const dictionary &dict, const fvMesh &mesh),(dict, mesh))
Declare runtime constructor selection table.
absorptionEmissionModel(const fvMesh &mesh)
Construct from mesh.
virtual label nBands() const
Const access to the number of bands - defaults to 1 for grey.
virtual tmp< volScalarField > a(const label bandI=0) const
Absorption coefficient (net)
TypeName("absorptionEmissionModel")
Runtime type information.
virtual tmp< volScalarField > eDisp(const label bandI=0) const
Return emission coefficient for dispersed phase.
virtual tmp< volScalarField > eCont(const label bandI=0) const
Return emission coefficient for continuous phase.
virtual tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
virtual void correct(volScalarField &a, PtrList< volScalarField > &aj) const
Correct absorption coefficients.
virtual tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
A class for managing temporary objects.
Definition: tmp.H:55
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
Macros to ease declaration of run-time selection tables.
dictionary dict