absorptionEmissionModel.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-2015 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::radiation::absorptionEmissionModel
28
29Description
30 Model to supply absorption and emission coefficients for radiation
31 modelling
32
33\*---------------------------------------------------------------------------*/
34
35#ifndef radiation_absorptionEmissionModel_H
36#define radiation_absorptionEmissionModel_H
37
38#include "IOdictionary.H"
39#include "autoPtr.H"
41#include "volFields.H"
42#include "Vector2D.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48namespace radiation
49{
50
51/*---------------------------------------------------------------------------*\
52 Class absorptionEmissionModel Declaration
53\*---------------------------------------------------------------------------*/
56{
57
58protected:
59
60 // Protected data
61
62 //- Radiation model dictionary
63 const dictionary dict_;
64
65 //- Reference to the fvMesh
66 const fvMesh& mesh_;
67
68
69public:
70
71 //- Runtime type information
72 TypeName("absorptionEmissionModel");
73
74 //- Declare runtime constructor selection table
77 (
78 autoPtr,
81 (
82 const dictionary& dict,
83 const fvMesh& mesh
84 ),
85 (dict, mesh)
86 );
87
88
89 // Constructors
90
91 //- Construct from components
93 (
94 const dictionary& dict,
95 const fvMesh& mesh
96 );
97
98
99 //- Selector
101 (
102 const dictionary& dict,
103 const fvMesh& mesh
104 );
105
106
107 //- Destructor
108 virtual ~absorptionEmissionModel();
109
110
111 // Member Functions
112
113 // Access
114
115 //- Reference to the mesh
116 inline const fvMesh& mesh() const
117 {
118 return mesh_;
119 }
120
121 //- Reference to the dictionary
122 inline const dictionary& dict() const
123 {
124 return dict_;
125 }
126
127
128 // Absorption coefficient
129
130 //- Absorption coefficient (net)
131 virtual tmp<volScalarField> a(const label bandI = 0) const;
132
133 //- Absorption coefficient for continuous phase
134 virtual tmp<volScalarField> aCont(const label bandI = 0) const;
135
136 //- Absorption coefficient for dispersed phase
137 virtual tmp<volScalarField> aDisp(const label bandI = 0) const;
138
139
140 // Emission coefficient
141
142 //- Emission coefficient (net)
143 virtual tmp<volScalarField> e(const label bandI = 0) const;
144
145 //- Return emission coefficient for continuous phase
146 virtual tmp<volScalarField> eCont(const label bandI = 0) const;
147
148 //- Return emission coefficient for dispersed phase
149 virtual tmp<volScalarField> eDisp(const label bandI = 0) const;
150
151
152 // Emission contribution
153
154 //- Emission contribution (net)
155 virtual tmp<volScalarField> E(const label bandI = 0) const;
156
157 //- Emission contribution for continuous phase
158 virtual tmp<volScalarField> ECont(const label bandI = 0) const;
159
160 //- Emission contribution for dispersed phase
161 virtual tmp<volScalarField> EDisp(const label bandI = 0) const;
162
163
164 //- Const access to the number of bands - defaults to 1 for grey
165 // absorption/emission
166 virtual label nBands() const;
167
168 //- Const access to the bands - defaults to Vector2D::one for grey
169 // absorption/emission
170 virtual const Vector2D<scalar>& bands(const label n) const;
171
172 //- Flag for whether the absorption/emission is for a grey gas
173 virtual bool isGrey() const;
174
175 //- Correct absorption coefficients
176 virtual void correct
177 (
180 ) const;
181};
182
183
184// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185
186} // End namespace radiation
187} // End namespace Foam
188
189// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190
191#endif
192
193// ************************************************************************* //
label n
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
Templated 2D Vector derived from VectorSpace adding construction from 2 components,...
Definition: Vector2D.H:58
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Model to supply absorption and emission coefficients for radiation modelling.
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.
declareRunTimeSelectionTable(autoPtr, absorptionEmissionModel, dictionary,(const dictionary &dict, const fvMesh &mesh),(dict, mesh))
Declare runtime constructor selection table.
static autoPtr< absorptionEmissionModel > New(const dictionary &dict, const fvMesh &mesh)
Selector.
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.
const dictionary dict_
Radiation model dictionary.
virtual tmp< volScalarField > eDisp(const label bandI=0) const
Return emission coefficient for dispersed phase.
const fvMesh & mesh() const
Reference to the mesh.
virtual tmp< volScalarField > eCont(const label bandI=0) const
Return emission coefficient for continuous phase.
const dictionary & dict() const
Reference to the dictionary.
virtual tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
virtual tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
A class for managing temporary objects.
Definition: tmp.H:65
thermo correct()
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
volScalarField & e
Definition: createFields.H:11
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73