OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

radiativeIntensityRay.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::radiation::radiativeIntensityRay
00027 
00028 Description
00029     Radiation intensity for a ray in a given direction
00030 
00031 SourceFiles
00032     radiativeIntensityRay.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef radiativeIntensityRay_H
00037 #define radiativeIntensityRay_H
00038 
00039 #include "absorptionEmissionModel.H"
00040 #include "blackBodyEmission.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 namespace radiation
00047 {
00048 
00049 // Forward declaration of classes
00050 class fvDOM;
00051 
00052 /*---------------------------------------------------------------------------*\
00053                     Class radiativeIntensityRay Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class radiativeIntensityRay
00057 {
00058 public:
00059 
00060     static const word intensityPrefix;
00061 
00062 
00063 private:
00064 
00065     // Private data
00066 
00067         //- Refence to the owner fvDOM object
00068         const fvDOM& dom_;
00069 
00070         //- Reference to the mesh
00071         const fvMesh& mesh_;
00072 
00073         //- Absorption/emission model
00074         const absorptionEmissionModel& absorptionEmission_;
00075 
00076         //- Black body
00077         const blackBodyEmission& blackBody_;
00078 
00079         //- Total radiative intensity / [W/m2]
00080         volScalarField I_;
00081 
00082         //- Total radiative heat flux on boundary
00083         volScalarField Qr_;
00084 
00085         //- Direction
00086         vector d_;
00087 
00088         //- Average direction vector inside the solid angle
00089         vector dAve_;
00090 
00091         //- Theta angle
00092         scalar theta_;
00093 
00094         //- Phi angle
00095         scalar phi_;
00096 
00097         //- Solid angle
00098         scalar omega_;
00099 
00100         //- Number of wavelengths/bands
00101         label nLambda_;
00102 
00103         //- List of pointers to radiative intensity fields for given wavelengths
00104         PtrList<volScalarField> ILambda_;
00105 
00106         //- Global ray id - incremented in constructor
00107         static label rayId;
00108 
00109 
00110     // Private member functions
00111 
00112         //- Disallow default bitwise copy construct
00113         radiativeIntensityRay(const radiativeIntensityRay&);
00114 
00115         //- Disallow default bitwise assignment
00116         void operator=(const radiativeIntensityRay&);
00117 
00118 
00119 public:
00120 
00121     // Constructors
00122 
00123         //- Construct form components
00124         radiativeIntensityRay
00125         (
00126             const fvDOM& dom,
00127             const fvMesh& mesh,
00128             const scalar phi,
00129             const scalar theta,
00130             const scalar deltaPhi,
00131             const scalar deltaTheta,
00132             const label lambda,
00133             const absorptionEmissionModel& absEmmModel_,
00134             const blackBodyEmission& blackBody
00135         );
00136 
00137 
00138     // Destructor
00139     ~radiativeIntensityRay();
00140 
00141 
00142     // Member functions
00143 
00144         // Edit
00145 
00146             //- Update radiative intensity on i direction
00147             scalar correct();
00148 
00149             //- Initialise the ray in i direction
00150             void init
00151             (
00152                 const scalar phi,
00153                 const scalar theta,
00154                 const scalar deltaPhi,
00155                 const scalar deltaTheta,
00156                 const scalar lambda
00157             );
00158 
00159             //- Add radiative intensities from all the bands
00160             void addIntensity();
00161 
00162 
00163         // Access
00164 
00165             //- Return intensity
00166             inline const volScalarField& I() const;
00167 
00168             //- Return const access to the boundary heat flux
00169             inline const volScalarField& Qr() const;
00170 
00171             //- Return non-const access to the boundary heat flux
00172             inline volScalarField& Qr();
00173 
00174             //- Return direction
00175             inline const vector& d() const;
00176 
00177             //- Return the average vector inside the solid angle
00178             inline const vector& dAve() const;
00179 
00180             //- Return the number of bands
00181             inline scalar nLambda() const;
00182 
00183             //- Return the phi angle
00184             inline scalar phi() const;
00185 
00186             //- Return the theta angle
00187             inline scalar theta() const;
00188 
00189             //- Return the solid angle
00190             inline scalar omega() const;
00191 
00192             //- Return the radiative intensity for a given wavelength
00193             inline const volScalarField& ILambda(const label lambdaI) const;
00194 };
00195 
00196 
00197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00198 
00199 } // End namespace radiation
00200 } // End namespace Foam
00201 
00202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00203 
00204 #include "radiativeIntensityRayI.H"
00205 
00206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00207 
00208 #endif
00209 
00210 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd