multiBandZoneAbsorptionEmission.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) 2015-2019 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::radiation::multiBandZoneAbsorptionEmission
28 
29 Group
30  grpRadiationAbsorptionEmissionSubModels
31 
32 Description
33 
34  multiBandZoneAbsorptionEmission radiation absorption/emission for solids.
35 
36 
37 SourceFiles
38  multiBandZoneAbsorptionEmission.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef multiBandZoneAbsorptionEmission_H
43 #define multiBandZoneAbsorptionEmission_H
44 
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 namespace radiation
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class multiBandZoneAbsorptionEmission Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
61 {
62 public:
63 
64  // Public data
65 
66  //- Maximum number of bands
67  static const int maxBands_ = 5;
68 
69 
70 private:
71 
72  // Private data
73 
74  //- Absorption model dictionary
75  dictionary coeffsDict_;
76 
77  //- Absorption coefficients outside cellSets
78  scalarList absCoeffs_;
79 
80  //- Emissivity coefficients outside cellSets
81  scalarList emiCoeffs_;
82 
83  //- Bands
84  label nBands_;
85 
86  //- Cell zones absorptivity
87  HashTable<scalarList> zoneAbsorptivity_;
88 
89  //- Cell zones emisivity
90  HashTable<scalarList> zoneEmisivity_;
91 
92  //- Cells for each zone
93  labelList zoneCells_;
94 
95 
96 
97 public:
98 
99  //- Runtime type information
100  TypeName("multiBandZoneAbsorptionEmission");
101 
102 
103  // Constructors
104 
105  //- Construct from components
107  (
108  const dictionary& dict,
109  const fvMesh& mesh
110  );
111 
112 
113  //- Destructor
115 
116 
117  // Member Functions
118 
119  // Access
120 
121  // Absorption coefficient
122 
123  //- Absorption coefficient
124  tmp<volScalarField> aCont(const label bandI) const;
125 
126 
127  // Emission coefficient
128 
129  //- Emission coefficient
130  tmp<volScalarField> eCont(const label bandI) const;
131 
132 
133  // Emission contribution
134 
135  //- Emission contribution
136  tmp<volScalarField> ECont(const label bandI) const;
137 
138 
139  inline bool isGrey() const
140  {
141  return false;
142  }
143 
144  //- Number of bands
145  inline label nBands() const
146  {
147  return nBands_;
148  }
149 
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace radiation
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
Foam::radiation::multiBandZoneAbsorptionEmission::isGrey
bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
Definition: multiBandZoneAbsorptionEmission.H:138
Foam::radiation::absorptionEmissionModel::dict
const dictionary & dict() const
Reference to the dictionary.
Definition: absorptionEmissionModel.H:121
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::radiation::multiBandZoneAbsorptionEmission::multiBandZoneAbsorptionEmission
multiBandZoneAbsorptionEmission(const dictionary &dict, const fvMesh &mesh)
Construct from components.
Definition: multiBandZoneAbsorptionEmission.C:53
Foam::radiation::absorptionEmissionModel::mesh
const fvMesh & mesh() const
Reference to the mesh.
Definition: absorptionEmissionModel.H:115
Foam::radiation::multiBandZoneAbsorptionEmission::~multiBandZoneAbsorptionEmission
virtual ~multiBandZoneAbsorptionEmission()
Destructor.
Definition: multiBandZoneAbsorptionEmission.C:98
Foam::radiation::multiBandZoneAbsorptionEmission::ECont
tmp< volScalarField > ECont(const label bandI) const
Emission contribution.
Definition: multiBandZoneAbsorptionEmission.C:200
Foam::radiation::multiBandZoneAbsorptionEmission
multiBandZoneAbsorptionEmission radiation absorption/emission for solids.
Definition: multiBandZoneAbsorptionEmission.H:57
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Foam::radiation::multiBandZoneAbsorptionEmission::TypeName
TypeName("multiBandZoneAbsorptionEmission")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::radiation::multiBandZoneAbsorptionEmission::maxBands_
static const int maxBands_
Maximum number of bands.
Definition: multiBandZoneAbsorptionEmission.H:66
Foam::HashTable
A HashTable similar to std::unordered_map.
Definition: HashTable.H:105
absorptionEmissionModel.H
Foam::List< scalar >
Foam::radiation::absorptionEmissionModel
Model to supply absorption and emission coefficients for radiation modelling.
Definition: absorptionEmissionModel.H:54
Foam::radiation::multiBandZoneAbsorptionEmission::nBands
label nBands() const
Number of bands.
Definition: multiBandZoneAbsorptionEmission.H:144
Foam::radiation::multiBandZoneAbsorptionEmission::eCont
tmp< volScalarField > eCont(const label bandI) const
Emission coefficient.
Definition: multiBandZoneAbsorptionEmission.C:153
Foam::radiation::multiBandZoneAbsorptionEmission::aCont
tmp< volScalarField > aCont(const label bandI) const
Absorption coefficient.
Definition: multiBandZoneAbsorptionEmission.C:106