initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / radiation / radiationModel / fvDOM / radiativeIntensityRay / radiativeIntensityRay.H
blobc139a3633427827c6a2ca2629c0cbe00070ba84d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::radiation::radiativeIntensityRay
28 Description
29     Radiation intensity for a ray in a given direction
31 SourceFiles
32     radiativeIntensityRay.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef radiativeIntensityRay_H
37 #define radiativeIntensityRay_H
39 #include "absorptionEmissionModel.H"
40 #include "blackBodyEmission.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
46 namespace radiation
49 // Forward declaration of classes
50 class fvDOM;
52 /*---------------------------------------------------------------------------*\
53                     Class radiativeIntensityRay Declaration
54 \*---------------------------------------------------------------------------*/
56 class radiativeIntensityRay
58 public:
60     static const word intensityPrefix;
63 private:
65     // Private data
67         //- Refence to the owner fvDOM object
68         const fvDOM& dom_;
70         //- Reference to the mesh
71         const fvMesh& mesh_;
73         //- Absorption/emission model
74         const absorptionEmissionModel& absorptionEmission_;
76         //- Black body
77         const blackBodyEmission& blackBody_;
79         //- Total radiative intensity / [W/m2]
80         volScalarField I_;
82         //- Total radiative heat flux on boundary
83         volScalarField Qr_;
85         //- Direction
86         vector d_;
88         //- Average direction vector inside the solid angle
89         vector dAve_;
91         //- Theta angle
92         scalar theta_;
94         //- Phi angle
95         scalar phi_;
97         //- Solid angle
98         scalar omega_;
100         //- Number of wavelengths/bands
101         label nLambda_;
103         //- List of pointers to radiative intensity fields for given wavelengths
104         PtrList<volScalarField> ILambda_;
106         //- Global ray id - incremented in constructor
107         static label rayId;
110     // Private member functions
112         //- Disallow default bitwise copy construct
113         radiativeIntensityRay(const radiativeIntensityRay&);
115         //- Disallow default bitwise assignment
116         void operator=(const radiativeIntensityRay&);
119 public:
121     // Constructors
123         //- Construct form components
124         radiativeIntensityRay
125         (
126             const fvDOM& dom,
127             const fvMesh& mesh,
128             const scalar phi,
129             const scalar theta,
130             const scalar deltaPhi,
131             const scalar deltaTheta,
132             const label lambda,
133             const absorptionEmissionModel& absEmmModel_,
134             const blackBodyEmission& blackBody
135         );
138     // Destructor
139     ~radiativeIntensityRay();
142     // Member functions
144         // Edit
146             //- Update radiative intensity on i direction
147             scalar correct();
149             //- Initialise the ray in i direction
150             void init
151             (
152                 const scalar phi,
153                 const scalar theta,
154                 const scalar deltaPhi,
155                 const scalar deltaTheta,
156                 const scalar lambda
157             );
159             //- Add radiative intensities from all the bands
160             void addIntensity();
163         // Access
165             //- Return intensity
166             inline const volScalarField& I() const;
168             //- Return const access to the boundary heat flux
169             inline const volScalarField& Qr() const;
171             //- Return non-const access to the boundary heat flux
172             inline volScalarField& Qr();
174             //- Return direction
175             inline const vector& d() const;
177             //- Return the average vector inside the solid angle
178             inline const vector& dAve() const;
180             //- Return the number of bands
181             inline scalar nLambda() const;
183             //- Return the phi angle
184             inline scalar phi() const;
186             //- Return the theta angle
187             inline scalar theta() const;
189             //- Return the solid angle
190             inline scalar omega() const;
192             //- Return the radiative intensity for a given wavelength
193             inline const volScalarField& ILambda(const label lambdaI) const;
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 } // End namespace radiation
200 } // End namespace Foam
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 #include "radiativeIntensityRayI.H"
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 #endif
210 // ************************************************************************* //