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

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