Loading...
Searching...
No Matches
wallTransmissivityModel.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) 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::radiation::wallTransmissivityModel
28
29Description
30 Base class for wall transmissivity models
31
32\*---------------------------------------------------------------------------*/
33
34#ifndef Foam_radiation_wallTransmissivityModel_H
35#define Foam_radiation_wallTransmissivityModel_H
36
37#include "dictionary.H"
38#include "autoPtr.H"
40#include "polyPatch.H"
41
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44namespace Foam
45{
46namespace radiation
47{
48
49/*---------------------------------------------------------------------------*\
50 Class wallTransmissivityModel Declaration
51\*---------------------------------------------------------------------------*/
52
54{
55
56protected:
57
58 // Protected data
59
60 //- Reference to the polyPatch
61 const polyPatch& pp_;
62
63
64public:
65
66 //- Runtime type information
67 TypeName("wallTransmissivityModel");
69 // Declare runtime constructor selection table
70
72 (
73 autoPtr,
76 (
77 const dictionary& dict,
78 const polyPatch& pp
79 ),
80 (dict, pp)
81 );
82
83
84 // Constructors
85
86 //- Construct from components
88
89
90 // Selector
91
93 (
94 const dictionary& dict,
95 const polyPatch& pp
96 );
97
98
99 //- Destructor
100 virtual ~wallTransmissivityModel() = default;
102
103 // Member Functions
104
105 //- Return transmissivity
106 virtual tmp<scalarField> t
107 (
108 const label bandI = 0,
109 const vectorField* incomingDirection = nullptr,
110 const scalarField* T = nullptr
111 ) const = 0;
112
113 //- Return transmissivity on face
114 virtual scalar t
115 (
116 const label faceI,
117 const label bandI = 0,
118 const vector dir = Zero,
119 const scalar T = 0
120 ) const = 0;
121
122 //- Is Grey
123 virtual bool isGrey() const = 0;
124
125 //- Number of bands
126 virtual label nBands() const = 0;
127};
128
129
130// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131
132} // End namespace radiation
133} // End namespace Foam
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137#endif
138
139// ************************************************************************* //
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
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
A patch is a list of labels that address the faces in the global face list.
Definition polyPatch.H:73
virtual ~wallTransmissivityModel()=default
Destructor.
wallTransmissivityModel(const dictionary &dict, const polyPatch &pp)
Construct from components.
virtual bool isGrey() const =0
Is Grey.
const polyPatch & pp_
Reference to the polyPatch.
TypeName("wallTransmissivityModel")
Runtime type information.
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.
declareRunTimeSelectionTable(autoPtr, wallTransmissivityModel, dictionary,(const dictionary &dict, const polyPatch &pp),(dict, pp))
static autoPtr< wallTransmissivityModel > New(const dictionary &dict, const polyPatch &pp)
virtual tmp< scalarField > t(const label bandI=0, const vectorField *incomingDirection=nullptr, const scalarField *T=nullptr) const =0
Return transmissivity.
A class for managing temporary objects.
Definition tmp.H:75
Namespace for radiation modelling.
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)
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
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68