Loading...
Searching...
No Matches
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-2022 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 Foam_radiation_boundaryRadiationPropertiesPatch_H
37#define Foam_radiation_boundaryRadiationPropertiesPatch_H
38
39#include "scalarField.H"
40#include "Enum.H"
41#include "fvPatch.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51namespace radiation
53/*---------------------------------------------------------------------------*\
54 Class boundaryRadiationPropertiesPatch Declaration
55\*---------------------------------------------------------------------------*/
56
58{
59 // Private Data
60
61 //- Dictionary
62 const dictionary dict_;
63
64 //- reference to fvPatch
65 const polyPatch& patch_;
66
67
68 // Private Member Functions
69
70 //- Return nbr patch index
71 label nbrPatchIndex() const;
72
73 //- Return nbr mesh
74 const fvMesh& nbrRegion() const;
75
76
77protected:
78
79 // Protected Member Functions
80
81 //- Absorption/emission model
83
84 //- Transmissivity model
86
88public:
89
90 //- Runtime type information
91 TypeName("boundaryRadiationPropertiesPatch");
93 // Declare runtime constructor selection table
94
96 (
97 autoPtr,
101 const dictionary& dict,
102 const polyPatch& pp
103 ),
105 );
106
107
108 // Constructors
109
110 //- Construct from patch, internal field and dictionary
112 (
113 const dictionary&,
114 const polyPatch&
115 );
116
117
118 //- Selector
120 (
121 const dictionary& dict,
122 const polyPatch& pp
123 );
124
125 //- Destructor
126 virtual ~boundaryRadiationPropertiesPatch() = default;
127
128
129 // Member Functions
130
131 //- Return absorptionEmissionModel
133
134 //- Return transmissivityModel
136
137 //- Return emissivity on patch
138 virtual tmp<scalarField> e
139 (
140 const label bandI = 0,
141 const vectorField* incomingDirection = nullptr,
142 const scalarField* T = nullptr
143 ) const = 0;
144
145 //- Return emissivity on face
146 virtual scalar e
147 (
148 const label faceI,
149 const label bandI = 0,
150 const vector& dir = Zero,
151 const scalar T = 0
152 ) const = 0;
153
154 //- Return absorptivity on patch
155 virtual tmp<scalarField> a
156 (
157 const label bandI = 0,
158 const vectorField* incomingDirection = nullptr,
159 const scalarField* T = nullptr
160 ) const = 0;
161
162 //- Return absorptivity on face
163 virtual scalar a
164 (
165 const label faceI,
166 const label bandI = 0,
167 const vector& dir = Zero,
168 const scalar T = 0
169 ) const = 0;
170
171 //- Return transmissivity on patch
172 virtual tmp<scalarField> t
173 (
174 const label bandI = 0,
175 const vectorField* incomingDirection = nullptr,
176 const scalarField* T = nullptr
177 ) const = 0;
178
179 //- Return transmissivity on face
180 virtual scalar t
181 (
182 const label faceI,
183 const label bandI = 0,
184 const vector& dir = Zero,
185 const scalar T = 0
186 ) const = 0;
187
188 //- Return specular reflectivity on patch
189 virtual tmp<scalarField> rSpec
191 const label bandI = 0,
192 const vectorField* incomingDirection = nullptr,
193 const scalarField* T = nullptr
194 ) const = 0;
195
196 //- Return specular reflectivity on face
197 virtual scalar rSpec
198 (
199 const label faceI,
200 const label bandI = 0,
201 const vector& dir = Zero,
202 const scalar T = 0
203 ) const = 0;
204
205 //- Return diffusive reflectivity on patch
206 virtual tmp<scalarField> rDiff
207 (
208 const label bandI = 0,
209 const vectorField* incomingDirection = nullptr,
210 const scalarField* T = nullptr
211 ) const = 0;
212
213 //- Return diffusive reflectivity on face
214 virtual scalar rDiff
215 (
216 const label faceI,
217 const label bandI = 0,
218 const vector& dir = Zero,
219 const scalar T = 0
220 ) const = 0;
221
222 //- Is Grey
223 virtual bool isGrey() const = 0;
224
225 //- Number of bands
226 virtual label nBands() const = 0;
227
228 //- Write
229 virtual void write(Ostream&) const;
230};
231
233// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
234
235} // End namespace Foam
236} // End namespace radiation
237
238// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
239
240#endif
241
242// ************************************************************************* //
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
A patch is a list of labels that address the faces in the global face list.
Definition polyPatch.H:73
TypeName("boundaryRadiationPropertiesPatch")
Runtime type information.
const wallTransmissivityModel & transmissiveModel() const
Return transmissivityModel.
const wallAbsorptionEmissionModel & absorptionEmission() const
Return absorptionEmissionModel.
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.
virtual tmp< scalarField > e(const label bandI=0, const vectorField *incomingDirection=nullptr, const scalarField *T=nullptr) const =0
Return emissivity on patch.
declareRunTimeSelectionTable(autoPtr, boundaryRadiationPropertiesPatch, dictionary,(const dictionary &dict, const polyPatch &pp),(dict, pp))
virtual tmp< scalarField > rSpec(const label bandI=0, const vectorField *incomingDirection=nullptr, const scalarField *T=nullptr) const =0
Return specular reflectivity 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 ~boundaryRadiationPropertiesPatch()=default
Destructor.
virtual tmp< scalarField > a(const label bandI=0, const vectorField *incomingDirection=nullptr, const 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 > t(const label bandI=0, const vectorField *incomingDirection=nullptr, const scalarField *T=nullptr) const =0
Return transmissivity on patch.
virtual tmp< scalarField > rDiff(const label bandI=0, const vectorField *incomingDirection=nullptr, const scalarField *T=nullptr) const =0
Return diffusive reflectivity on patch.
boundaryRadiationPropertiesPatch(const dictionary &, const polyPatch &)
Construct from patch, internal field and dictionary.
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:75
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0).
Definition zero.H:127
Vector< scalar > vector
Definition vector.H:57
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
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
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68