boundaryRadiationPropertiesPatch.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-2018 OpenCFD Ltd.
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::boundaryRadiationPropertiesPatch
28
29Description
30
31SourceFiles
32 boundaryRadiationPropertiesPatch.C
33
34\*---------------------------------------------------------------------------*/
35
36#ifndef boundaryRadiationPropertiesPatch_H
37#define boundaryRadiationPropertiesPatch_H
38
39#include "scalarField.H"
40#include "Enum.H"
41#include "fvPatch.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51namespace radiation
52{
53/*---------------------------------------------------------------------------*\
54 Class boundaryRadiationPropertiesPatch Declaration
55\*---------------------------------------------------------------------------*/
58{
59private:
60
61 // Private data
62
63 //- Dictionary
64 const dictionary dict_;
65
66 //- reference to fvPatch
67 const polyPatch& patch_;
68
69
70 // Private functions
71
72 //- Return nbr patch index
73 label nbrPatchIndex() const;
74
75 //- Return nbr mesh
76 const fvMesh& nbrRegion() const;
77
78
79protected:
80
81 // Protected Member Functions
82
83 //- Absorption/emission model
85
86 //- Transmissivity model
88
89
90public:
91
92 //- Runtime type information
93 TypeName("boundaryRadiationPropertiesPatch");
94
95 // Declare runtime constructor selection table
98 (
99 autoPtr,
102 (
103 const dictionary& dict,
104 const polyPatch& pp
105 ),
106 (dict, pp)
107 );
108
109
110 // Constructors
111
112 //- Construct from patch, internal field and dictionary
114 (
115 const dictionary&,
116 const polyPatch&
117 );
118
119
120 //- Selector
122 (
123 const dictionary& dict,
124 const polyPatch& pp
125 );
126
127 //- Destructor
128 virtual ~boundaryRadiationPropertiesPatch() = default;
129
130
131 // Member functions
132
133 //- Return absorptionEmissionModel
135
136 //- Return transmissivityModel
138
139 //- Return emissivity on patch
140 virtual tmp<scalarField> e
141 (
142 const label bandI = 0,
143 vectorField* incomingDirection = nullptr,
144 scalarField* T = nullptr
145 ) const = 0;
146
147 //- Return emissivity on face
148 virtual scalar e
149 (
150 const label faceI,
151 const label bandI = 0,
152 const vector& dir = Zero,
153 const scalar T = 0
154 ) const = 0;
155
156 //- Return absorptivity on patch
157 virtual tmp<scalarField> a
158 (
159 const label bandI = 0,
160 vectorField* incomingDirection = nullptr,
161 scalarField* T = nullptr
162 ) const = 0;
163
164 //- Return absorptivity on face
165 virtual scalar a
166 (
167 const label faceI,
168 const label bandI = 0,
169 const vector& dir = Zero,
170 const scalar T = 0
171 ) const = 0;
172
173 //- Return transmissivity on patch
174 virtual tmp<scalarField> t
175 (
176 const label bandI = 0,
177 vectorField* incomingDirection = nullptr,
178 scalarField* T = nullptr
179 ) const = 0;
180
181 //- Return transmissivity on face
182 virtual scalar t
183 (
184 const label faceI,
185 const label bandI = 0,
186 const vector& dir = Zero,
187 const scalar T = 0
188 ) const = 0;
189
190 //- Return specular reflectivity on patch
191 virtual tmp<scalarField> rSpec
192 (
193 const label bandI = 0,
194 vectorField* incomingDirection = nullptr,
195 scalarField* T = nullptr
196 ) const = 0;
197
198 //- Return specular reflectivity on face
199 virtual scalar rSpec
200 (
201 const label faceI,
202 const label bandI = 0,
203 const vector& dir = Zero,
204 const scalar T = 0
205 ) const = 0;
206
207 //- Return diffusive reflectivity on patch
208 virtual tmp<scalarField> rDiff
209 (
210 const label bandI = 0,
211 vectorField* incomingDirection = nullptr,
212 scalarField* T = nullptr
213 ) const = 0;
214
215 //- Return diffusive reflectivity on face
216 virtual scalar rDiff
217 (
218 const label faceI,
219 const label bandI = 0,
220 const vector& dir = Zero,
221 const scalar T = 0
222 ) const = 0;
223
224 //- Is Grey
225 virtual bool isGrey() const = 0;
226
227 //- Number of bands
228 virtual label nBands() const = 0;
229
230 //- Write
231 virtual void write(Ostream&) const;
232};
233
234
235// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236
237} // End namespace Foam
238} // End namespace radiation
239
240// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
241
242#endif
243
244// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
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
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
TypeName("boundaryRadiationPropertiesPatch")
Runtime type information.
const wallTransmissivityModel & transmissiveModel() const
Return transmissivityModel.
const wallAbsorptionEmissionModel & absorptionEmission() const
Return absorptionEmissionModel.
virtual tmp< scalarField > rDiff(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return diffusive reflectivity on patch.
virtual scalar a(const label faceI, const label bandI=0, const vector &dir=Zero, const scalar T=0) const =0
Return absorptivity on face.
static autoPtr< boundaryRadiationPropertiesPatch > New(const dictionary &dict, const polyPatch &pp)
Selector.
virtual scalar rSpec(const label faceI, const label bandI=0, const vector &dir=Zero, const scalar T=0) const =0
Return specular reflectivity on face.
declareRunTimeSelectionTable(autoPtr, boundaryRadiationPropertiesPatch, dictionary,(const dictionary &dict, const polyPatch &pp),(dict, pp))
virtual tmp< scalarField > t(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return transmissivity on patch.
virtual bool isGrey() const =0
Is Grey.
virtual label nBands() const =0
Number of bands.
virtual scalar t(const label faceI, const label bandI=0, const vector &dir=Zero, const scalar T=0) const =0
Return transmissivity on face.
virtual tmp< scalarField > rSpec(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return specular reflectivity on patch.
virtual ~boundaryRadiationPropertiesPatch()=default
Destructor.
virtual tmp< scalarField > a(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return absorptivity on patch.
autoPtr< wallAbsorptionEmissionModel > absorptionEmission_
Absorption/emission model.
virtual scalar rDiff(const label faceI, const label bandI=0, const vector &dir=Zero, const scalar T=0) const =0
Return diffusive reflectivity on face.
virtual scalar e(const label faceI, const label bandI=0, const vector &dir=Zero, const scalar T=0) const =0
Return emissivity on face.
virtual tmp< scalarField > e(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return emissivity on patch.
autoPtr< wallTransmissivityModel > transmissivity_
Transmissivity model.
Based class for wall absorption emission models.
Base class for wall transmissivity models.
A class for managing temporary objects.
Definition: tmp.H:65
const volScalarField & T
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
runTime write()
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)
dictionary dict
volScalarField & e
Definition: createFields.H:11
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73