opaqueReflective.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::opaqueReflective
28 
29 Description
30  Radiation boundary model for opaque reflective walls. It requires to
31  specify a wallAbsorptionEmissionModel and the reflected fraction
32  in boundaryRadiationProperties file
33  fd is the diffusive reflected fraction. 0 all the incoming flux is
34  specularly reflected and 1 all is diffusive reflected. fd is used
35  in the calculation of the specular reflection (rSpec) and the
36  diffusive reflection (rDiff). Absorptivity and emissivity are
37  independent of fd.
38 
39 Usage
40  \verbatim
41 
42  type opaqueReflective;
43 
44  fd 0.0;
45 
46  wallAbsorptionEmissionModel
47  {
48  type multiBandAbsorption;
49  absorptivity (0.3 0.7);
50  emissivity (0.3 0.7);
51  };
52 
53  \endverbatim
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef opaqueReflective_H
58 #define opaqueReflective_H
59 
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 namespace Foam
65 {
66 namespace radiation
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class opaqueReflective Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 class opaqueReflective
74 :
76 {
77 
78 protected:
79 
80  // Protected data
81 
82  //- Reference to the polyPatch
83  const polyPatch& pp_;
84 
85  //- Diffuse fraction
86  const scalar fd_;
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("opaqueReflective");
92 
93  // Constructors
94 
95  //- Construct from components
96  opaqueReflective(const dictionary& dict, const polyPatch& pp);
97 
98 
99  //- Destructor
100  virtual ~opaqueReflective() = default;
101 
102 
103  // Member Functions
104 
105  //- Return emissivity
106  virtual tmp<scalarField> e
107  (
108  const label bandI,
109  vectorField* incomingDirection,
110  scalarField* T
111  ) const;
112 
113  //- Return emissivity on face
114  virtual scalar e
115  (
116  const label faceI,
117  const label bandI,
118  const vector& dir,
119  const scalar T
120  ) const;
121 
122  //- Return absorptivity on patch
123  virtual tmp<scalarField> a
124  (
125  const label bandI,
126  vectorField* incomingDirection,
127  scalarField* T
128  ) const;
129 
130  //- Return absorptivity on face
131  virtual scalar a
132  (
133  const label faceI,
134  const label bandI,
135  const vector& dir,
136  const scalar T
137  ) const;
138 
139  //- Return transmissivity on patch
140  virtual tmp<scalarField> t
141  (
142  const label bandI,
143  vectorField* incomingDirection,
144  scalarField* T
145  ) const;
146 
147  //- Return transmissivity on face
148  virtual scalar t
149  (
150  const label faceI,
151  const label bandI,
152  const vector& dir,
153  const scalar T
154  ) const;
155 
156  //- Return specular reflectivity on patch
157  virtual tmp<scalarField> rSpec
158  (
159  const label bandI,
160  vectorField* incomingDirection,
161  scalarField* T
162  ) const;
163 
164  //- Return specular reflectivity on face
165  virtual scalar rSpec
166  (
167  const label faceI,
168  const label bandI,
169  const vector& dir,
170  const scalar T
171  ) const;
172 
173  //- Return diffusive reflectivity on patch
174  virtual tmp<scalarField> rDiff
175  (
176  const label bandI,
177  vectorField* incomingDirection ,
178  scalarField* T
179  ) const;
180 
181  //- Return diffusive reflectivity on face
182  virtual scalar rDiff
183  (
184  const label faceI,
185  const label bandI,
186  const vector& dir,
187  const scalar T
188  ) const;
189 
190  //- Is Grey
191  virtual bool isGrey() const;
192 
193  //- Number of bands
194  virtual label nBands() const;
195 };
196 
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 } // End namespace radiation
201 } // End namespace Foam
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 #endif
206 
207 // ************************************************************************* //
Foam::radiation::boundaryRadiationPropertiesPatch
Definition: boundaryRadiationPropertiesPatch.H:56
Foam::radiation::opaqueReflective::t
virtual tmp< scalarField > t(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return transmissivity on patch.
Definition: opaqueReflective.C:120
Foam::radiation::opaqueReflective::opaqueReflective
opaqueReflective(const dictionary &dict, const polyPatch &pp)
Construct from components.
Definition: opaqueReflective.C:51
boundaryRadiationPropertiesPatch.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::radiation::opaqueReflective::rDiff
virtual tmp< scalarField > rDiff(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return diffusive reflectivity on patch.
Definition: opaqueReflective.C:168
Foam::radiation::opaqueReflective::pp_
const polyPatch & pp_
Reference to the polyPatch.
Definition: opaqueReflective.H:82
Foam::radiation::opaqueReflective::nBands
virtual label nBands() const
Number of bands.
Definition: opaqueReflective.C:196
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::opaqueReflective::~opaqueReflective
virtual ~opaqueReflective()=default
Destructor.
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
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:121
Foam::radiation::opaqueReflective
Radiation boundary model for opaque reflective walls. It requires to specify a wallAbsorptionEmission...
Definition: opaqueReflective.H:72
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::radiation::opaqueReflective::fd_
const scalar fd_
Diffuse fraction.
Definition: opaqueReflective.H:85
Foam::radiation::opaqueReflective::rSpec
virtual tmp< scalarField > rSpec(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return specular reflectivity on patch.
Definition: opaqueReflective.C:144
Foam::radiation::opaqueReflective::isGrey
virtual bool isGrey() const
Is Grey.
Definition: opaqueReflective.C:190
Foam::Vector< scalar >
Foam::radiation::opaqueReflective::TypeName
TypeName("opaqueReflective")
Runtime type information.
Foam::radiation::opaqueReflective::e
virtual tmp< scalarField > e(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return emissivity.
Definition: opaqueReflective.C:73
Foam::radiation::opaqueReflective::a
virtual tmp< scalarField > a(const label bandI, vectorField *incomingDirection, scalarField *T) const
Return absorptivity on patch.
Definition: opaqueReflective.C:97