solarLoadBase.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) 2022 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::solarLoadBase
28 
29 Group
30  grpRadiationModels
31 
32 Description
33  Base class for solarLoad models.
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef radiation_solarLoadBase_H
38 #define radiation_solarLoadBase_H
39 
40 #include "regIOobject.H"
41 #include "fvMesh.H"
42 #include "solarCalculator.H"
43 #include "faceShading.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace radiation
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class solarLoadBase Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class solarLoadBase
57 :
58  public regIOobject
59 {
60 public:
61 
62  //- Runtime type information
63  TypeName("solarLoadBase");
64 
65 
66  // Constructors
67 
68  //- Construct
69  solarLoadBase(const fvMesh& mesh);
70 
71 
72  //- Destructor
73  virtual ~solarLoadBase() = default;
74 
75 
76  // Member Functions
77 
78  // Access
79 
80  //- Return const reference to the solar calculator
81  virtual const solarCalculator& solarCalculatorRef() const = 0;
82 
83  //- Return const reference to the face shading calculator
84  virtual const faceShading& faceShadingRef() const = 0;
85 
86 
87  // IO
88 
89  bool writeData(Foam::Ostream&) const
90  {
91  return true;
92  }
93 };
94 
95 
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 
98 } // End namespace radiation
99 } // End namespace Foam
100 
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 
103 #endif
104 
105 // ************************************************************************* //
A solar calculator model providing models for the solar direction and solar loads.
Base class for solarLoad models.
Definition: solarLoadBase.H:49
dynamicFvMesh & mesh
virtual ~solarLoadBase()=default
Destructor.
Helper class to calculate visible faces for global, sun-like illumination.
Definition: faceShading.H:57
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
virtual const solarCalculator & solarCalculatorRef() const =0
Return const reference to the solar calculator.
bool writeData(Foam::Ostream &) const
Pure virtual writeData function.
Definition: solarLoadBase.H:92
TypeName("solarLoadBase")
Runtime type information.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual const faceShading & faceShadingRef() const =0
Return const reference to the face shading calculator.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:66
solarLoadBase(const fvMesh &mesh)
Construct.
Definition: solarLoadBase.C:37
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.