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 -------------------------------------------------------------------------------
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::boundaryRadiationPropertiesPatch
28 
29 Description
30 
31 SourceFiles
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"
43 #include "runTimeSelectionTables.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 namespace radiation
52 {
53 /*---------------------------------------------------------------------------*\
54  Class boundaryRadiationPropertiesPatch Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 {
59 private:
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 
79 protected:
80 
81  // Protected Member Functions
82 
83  //- Absorption/emission model
85 
86  //- Transmissivity model
88 
89 
90 public:
91 
92  //- Runtime type information
93  TypeName("boundaryRadiationPropertiesPatch");
94 
95  // Declare runtime constructor selection table
96 
98  (
99  autoPtr,
101  dictionary,
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 // ************************************************************************* //
Foam::radiation::boundaryRadiationPropertiesPatch
Definition: boundaryRadiationPropertiesPatch.H:56
Foam::radiation::boundaryRadiationPropertiesPatch::New
static autoPtr< boundaryRadiationPropertiesPatch > New(const dictionary &dict, const polyPatch &pp)
Selector.
Definition: boundaryRadiationPropertiesPatch.C:51
Foam::radiation::boundaryRadiationPropertiesPatch::transmissivity_
autoPtr< wallTransmissivityModel > transmissivity_
Transmissivity model.
Definition: boundaryRadiationPropertiesPatch.H:86
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
scalarField.H
Foam::radiation::boundaryRadiationPropertiesPatch::rDiff
virtual tmp< scalarField > rDiff(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return diffusive reflectivity on patch.
calculatedFvPatchFields.H
wallAbsorptionEmissionModel.H
Foam::radiation::boundaryRadiationPropertiesPatch::rSpec
virtual tmp< scalarField > rSpec(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return specular reflectivity on patch.
wallTransmissivityModel.H
Foam::radiation::wallTransmissivityModel
Base class for wall transmissivity models.
Definition: wallTransmissivityModel.H:52
Foam::radiation::boundaryRadiationPropertiesPatch::transmissiveModel
const wallTransmissivityModel & transmissiveModel() const
Return transmissivityModel.
Definition: boundaryRadiationPropertiesPatch.C:127
Foam::Field< vector >
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
Foam::radiation::boundaryRadiationPropertiesPatch::t
virtual tmp< scalarField > t(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return transmissivity on patch.
Foam::radiation::boundaryRadiationPropertiesPatch::boundaryRadiationPropertiesPatch
boundaryRadiationPropertiesPatch(const dictionary &, const polyPatch &)
Construct from patch, internal field and dictionary.
Definition: boundaryRadiationPropertiesPatch.C:105
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::radiation::boundaryRadiationPropertiesPatch::a
virtual tmp< scalarField > a(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return absorptivity on patch.
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::radiation::boundaryRadiationPropertiesPatch::e
virtual tmp< scalarField > e(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return emissivity on patch.
Foam::radiation::boundaryRadiationPropertiesPatch::write
virtual void write(Ostream &) const
Write.
Definition: boundaryRadiationPropertiesPatch.C:133
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::wallAbsorptionEmissionModel
Based class for wall absorption emission models.
Definition: wallAbsorptionEmissionModel.H:52
Foam::radiation::boundaryRadiationPropertiesPatch::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, boundaryRadiationPropertiesPatch, dictionary,(const dictionary &dict, const polyPatch &pp),(dict, pp))
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::radiation::boundaryRadiationPropertiesPatch::TypeName
TypeName("boundaryRadiationPropertiesPatch")
Runtime type information.
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::Vector< scalar >
Foam::radiation::boundaryRadiationPropertiesPatch::nBands
virtual label nBands() const =0
Number of bands.
Foam::radiation::boundaryRadiationPropertiesPatch::isGrey
virtual bool isGrey() const =0
Is Grey.
Foam::radiation::boundaryRadiationPropertiesPatch::absorptionEmission
const wallAbsorptionEmissionModel & absorptionEmission() const
Return absorptionEmissionModel.
Definition: boundaryRadiationPropertiesPatch.C:120
Foam::radiation::boundaryRadiationPropertiesPatch::~boundaryRadiationPropertiesPatch
virtual ~boundaryRadiationPropertiesPatch()=default
Destructor.
fvPatch.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::radiation::boundaryRadiationPropertiesPatch::absorptionEmission_
autoPtr< wallAbsorptionEmissionModel > absorptionEmission_
Absorption/emission model.
Definition: boundaryRadiationPropertiesPatch.H:83
Enum.H