faceReflecting.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 OpenFOAM Foundation
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::faceReflecting
28
29Description
30
31 Calculates the reflecting faces from specular surfaces. It only
32 takes into account the first reflection coming from a surface hit
33 by the primary Sun hit faces.
34
35SourceFiles
36 faceReflecting.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef faceReflecting_H
41#define faceReflecting_H
42
43#include "fvMesh.H"
44#include "wallPolyPatch.H"
45#include "triSurfaceTools.H"
46#include "vectorList.H"
48#include "faceShading.H"
49#include "solarCalculator.H"
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55
56/*---------------------------------------------------------------------------*\
57 Class faceReflecting Declaration
58\*---------------------------------------------------------------------------*/
61{
62 // Private data
63
64 //- Reference to mesh
65 const fvMesh& mesh_;
66
67 //- Number of solid angles in theta
68 label nTheta_;
69
70 //- Number of solid angles in phi
71 label nPhi_ ;
72
73 //- Total number of rays (1 per direction)
74 label nRay_;
75
76 //- Discretised angles for reflected rays
77 vectorList refDiscAngles_;
78
79 //- Spectral distribution for the integrated solar heat flux
80 const scalarList& spectralDistribution_;
81
82 //- Net reflected radiative heat flux [W/m2]
83 PtrList<volScalarField> qreflective_;
84
85 //- Primary hits faces
86 const faceShading& directHitFaces_;
87
88 //- Distributed surface for ray tracing
90
91 //- Faces from which rays are shot
92 autoPtr<labelList> shootFacesIds_;
93
94 //- Face centres from which rays are shot
96
97 //- Face normal from which rays are shot
99
100 //- Solar calculator
101 const solarCalculator& solarCalc_;
102
103 //- Shooting rays pacthes
104 labelHashSet includePatches_;
105
106 //- Map from triSurface Index to global
107 labelList mapTriToGlobal_;
108
109
110 // Private members
111
112 //- Calculate ray start faces
113 void calculate();
114
115 //- Initialise model
116 void initialise(const dictionary& dict);
117
118
119 //- No copy construct
120 faceReflecting(const faceReflecting&) = delete;
121
122 //- No copy assignment
123 void operator=(const faceReflecting&) = delete;
124
125
126public:
127
128 // Declare name of the class and its debug switch
129 ClassName("faceReflecting");
130
131
132 // Constructors
133
134 //- Construct from components
136 (
137 const fvMesh& mesh,
138 const faceShading& directHiyFaces,
139 const solarCalculator& ,
140 const scalarList& spectralDistribution,
141 const dictionary& dict
142 );
143
144
145
146 //- Destructor
147 ~faceReflecting() = default;
148
149
150 // Member Functions
151
152 // Const access to qreflective
153 const volScalarField& qreflective(const label bandI) const
154 {
155 return qreflective_[bandI];
156 }
157
158
159 //- Correct reflected flux
160 void correct();
161};
162
163
164// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165
166} // End namespace Foam
167
168// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169
170#endif
171
172// ************************************************************************* //
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Calculates the reflecting faces from specular surfaces. It only takes into account the first reflecti...
void correct()
Correct reflected flux.
ClassName("faceReflecting")
~faceReflecting()=default
Destructor.
const volScalarField & qreflective(const label bandI) const
faceShading uses the transmissivity value in the boundaryRadiationProperties in order to evaluate whi...
Definition: faceShading.H:62
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
A solar calculator model providing models for the solar direction and solar loads.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:67
dynamicFvMesh & mesh
Namespace for OpenFOAM.
dictionary dict