FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

absorptionEmissionModel.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) 1991-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::radiation::absorptionEmissionModel
00026 
00027 Description
00028     Model to supply absorption and emission coefficients for radiation
00029     modelling
00030 
00031 \*---------------------------------------------------------------------------*/
00032 
00033 #ifndef radiationAbsorptionEmissionModel_H
00034 #define radiationAbsorptionEmissionModel_H
00035 
00036 #include <OpenFOAM/IOdictionary.H>
00037 #include <OpenFOAM/autoPtr.H>
00038 #include <OpenFOAM/runTimeSelectionTables.H>
00039 #include <finiteVolume/volFields.H>
00040 #include <OpenFOAM/Vector2D_.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 namespace radiation
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050                    Class absorptionEmissionModel Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class absorptionEmissionModel
00054 {
00055 
00056 protected:
00057 
00058     // Protected data
00059 
00060         //- Radiation model dictionary
00061         const dictionary dict_;
00062 
00063         //- Reference to the fvMesh
00064         const fvMesh& mesh_;
00065 
00066 
00067 public:
00068 
00069     //- Runtime type information
00070     TypeName("absorptionEmissionModel");
00071 
00072     //- Declare runtime constructor selection table
00073 
00074         declareRunTimeSelectionTable
00075         (
00076             autoPtr,
00077             absorptionEmissionModel,
00078             dictionary,
00079             (
00080                 const dictionary& dict,
00081                 const fvMesh& mesh
00082             ),
00083             (dict, mesh)
00084         );
00085 
00086 
00087     // Constructors
00088 
00089         //- Construct from components
00090         absorptionEmissionModel
00091         (
00092             const dictionary& dict,
00093             const fvMesh& mesh
00094         );
00095 
00096 
00097     //- Selector
00098     static autoPtr<absorptionEmissionModel> New
00099     (
00100         const dictionary& dict,
00101         const fvMesh& mesh
00102     );
00103 
00104 
00105     //- Destructor
00106     virtual ~absorptionEmissionModel();
00107 
00108 
00109     // Member Functions
00110 
00111         // Access
00112 
00113             //- Reference to the mesh
00114             inline const fvMesh& mesh() const
00115             {
00116                 return mesh_;
00117             }
00118 
00119             //- Reference to the dictionary
00120             inline const dictionary& dict() const
00121             {
00122                 return dict_;
00123             }
00124 
00125 
00126             // Absorption coefficient
00127 
00128                 //- Absorption coefficient (net)
00129                 virtual tmp<volScalarField> a(const label bandI = 0) const;
00130 
00131                 //- Absorption coefficient for continuous phase
00132                 virtual tmp<volScalarField> aCont(const label bandI = 0) const;
00133 
00134                 //- Absorption coefficient for dispersed phase
00135                 virtual tmp<volScalarField> aDisp(const label bandI = 0) const;
00136 
00137 
00138             // Emission coefficient
00139 
00140                 //- Emission coefficient (net)
00141                 virtual tmp<volScalarField> e(const label bandI = 0) const;
00142 
00143                 //- Return emission coefficient for continuous phase
00144                 virtual tmp<volScalarField> eCont(const label bandI = 0) const;
00145 
00146                 //- Return emission coefficient for dispersed phase
00147                 virtual tmp<volScalarField> eDisp(const label bandI = 0) const;
00148 
00149 
00150             // Emission contribution
00151 
00152                 //- Emission contribution (net)
00153                 virtual tmp<volScalarField> E(const label bandI = 0) const;
00154 
00155                 //- Emission contribution for continuous phase
00156                 virtual tmp<volScalarField> ECont(const label bandI = 0) const;
00157 
00158                 //- Emission contribution for dispersed phase
00159                 virtual tmp<volScalarField> EDisp(const label bandI = 0) const;
00160 
00161 
00162             //- Const access to the number of bands - defaults to 1 for grey
00163             //  absorption/emission
00164             virtual label nBands() const;
00165 
00166             //- Const access to the bands - defaults to Vector2D::one for grey
00167             //  absorption/emission
00168             virtual const Vector2D<scalar>& bands(const label n) const;
00169 
00170             //- Flag for whether the absorption/emission is for a grey gas
00171             virtual bool isGrey() const;
00172 
00173             //- Add radiative intensity for ray i
00174             virtual tmp<volScalarField> addIntensity
00175             (
00176                 const label rayI,
00177                 const volScalarField& ILambda
00178             ) const;
00179 
00180             //- Correct absorption coefficients
00181             virtual void correct
00182             (
00183                 volScalarField& a,
00184                 PtrList<volScalarField>& aj
00185             ) const;
00186 };
00187 
00188 
00189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00190 
00191 } // End namespace radiation
00192 } // End namespace Foam
00193 
00194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00195 
00196 #endif
00197 
00198 // ************************ vim: set sw=4 sts=4 et: ************************ //
00199 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines