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 -------------------------------------------------------------------------------
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::wallTransmissivityModel
28 
29 Description
30  Base class for wall transmissivity models
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef wallTransmissivityModel_H
35 #define wallTransmissivityModel_H
36 
37 #include "dictionary.H"
38 #include "autoPtr.H"
39 #include "runTimeSelectionTables.H"
40 #include "polyPatch.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace radiation
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class wallTransmissivityModel Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55 
56 protected:
57 
58  // Protected data
59 
60  //- Reference to the polyPatch
61  const polyPatch& pp_;
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("wallTransmissivityModel");
68 
69  // Declare runtime constructor selection table
70 
72  (
73  autoPtr,
75  dictionary,
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;
101 
102 
103  // Member Functions
104 
105  //- Return transmissivity
106  virtual tmp<scalarField> t
107  (
108  const label bandI = 0,
109  vectorField* incomingDirection = nullptr,
110  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 // ************************************************************************* //
polyPatch.H
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
Foam::radiation::wallTransmissivityModel::wallTransmissivityModel
wallTransmissivityModel(const dictionary &dict, const polyPatch &pp)
Construct from components.
Definition: wallTransmissivityModel.C:46
Foam::radiation::wallTransmissivityModel
Base class for wall transmissivity models.
Definition: wallTransmissivityModel.H:52
Foam::Field< vector >
Foam::radiation::wallTransmissivityModel::t
virtual tmp< scalarField > t(const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const =0
Return transmissivity.
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
Foam::radiation::wallTransmissivityModel::pp_
const polyPatch & pp_
Reference to the polyPatch.
Definition: wallTransmissivityModel.H:60
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::radiation::wallTransmissivityModel::New
static autoPtr< wallTransmissivityModel > New(const dictionary &dict, const polyPatch &pp)
Definition: wallTransmissivityModelNew.C:35
Foam::radiation::wallTransmissivityModel::isGrey
virtual bool isGrey() const =0
Is Grey.
Foam::radiation::wallTransmissivityModel::TypeName
TypeName("wallTransmissivityModel")
Runtime type information.
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Foam::radiation::wallTransmissivityModel::nBands
virtual label nBands() const =0
Number of bands.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::radiation::wallTransmissivityModel::~wallTransmissivityModel
virtual ~wallTransmissivityModel()=default
Destructor.
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::Vector< scalar >
dictionary.H
Foam::radiation::wallTransmissivityModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, wallTransmissivityModel, dictionary,(const dictionary &dict, const polyPatch &pp),(dict, pp))
autoPtr.H