initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / radiation / submodels / absorptionEmissionModel / absorptionEmissionModel / absorptionEmissionModel.H
blobd7a0230b16a7ee6ca45ebc1ddce3ad8292276234
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-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::absorptionEmissionModel
28 Description
29     Model to supply absorption and emission coefficients for radiation
30     modelling
32 \*---------------------------------------------------------------------------*/
34 #ifndef radiationAbsorptionEmissionModel_H
35 #define radiationAbsorptionEmissionModel_H
37 #include "IOdictionary.H"
38 #include "autoPtr.H"
39 #include "runTimeSelectionTables.H"
40 #include "volFields.H"
41 #include "Vector2D.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
47 namespace radiation
50 /*---------------------------------------------------------------------------*\
51                    Class absorptionEmissionModel Declaration
52 \*---------------------------------------------------------------------------*/
54 class absorptionEmissionModel
57 protected:
59     // Protected data
61         //- Radiation model dictionary
62         const dictionary dict_;
64         //- Reference to the fvMesh
65         const fvMesh& mesh_;
68 public:
70     //- Runtime type information
71     TypeName("absorptionEmissionModel");
73     //- Declare runtime constructor selection table
75         declareRunTimeSelectionTable
76         (
77             autoPtr,
78             absorptionEmissionModel,
79             dictionary,
80             (
81                 const dictionary& dict,
82                 const fvMesh& mesh
83             ),
84             (dict, mesh)
85         );
88     // Constructors
90         //- Construct from components
91         absorptionEmissionModel
92         (
93             const dictionary& dict,
94             const fvMesh& mesh
95         );
98     //- Selector
99     static autoPtr<absorptionEmissionModel> New
100     (
101         const dictionary& dict,
102         const fvMesh& mesh
103     );
106     //- Destructor
107     virtual ~absorptionEmissionModel();
110     // Member Functions
112         // Access
114             //- Reference to the mesh
115             inline const fvMesh& mesh() const
116             {
117                 return mesh_;
118             }
120             //- Reference to the dictionary
121             inline const dictionary& dict() const
122             {
123                 return dict_;
124             }
127             // Absorption coefficient
129                 //- Absorption coefficient (net)
130                 virtual tmp<volScalarField> a(const label bandI = 0) const;
132                 //- Absorption coefficient for continuous phase
133                 virtual tmp<volScalarField> aCont(const label bandI = 0) const;
135                 //- Absorption coefficient for dispersed phase
136                 virtual tmp<volScalarField> aDisp(const label bandI = 0) const;
139             // Emission coefficient
141                 //- Emission coefficient (net)
142                 virtual tmp<volScalarField> e(const label bandI = 0) const;
144                 //- Return emission coefficient for continuous phase
145                 virtual tmp<volScalarField> eCont(const label bandI = 0) const;
147                 //- Return emission coefficient for dispersed phase
148                 virtual tmp<volScalarField> eDisp(const label bandI = 0) const;
151             // Emission contribution
153                 //- Emission contribution (net)
154                 virtual tmp<volScalarField> E(const label bandI = 0) const;
156                 //- Emission contribution for continuous phase
157                 virtual tmp<volScalarField> ECont(const label bandI = 0) const;
159                 //- Emission contribution for dispersed phase
160                 virtual tmp<volScalarField> EDisp(const label bandI = 0) const;
163             //- Const access to the number of bands - defaults to 1 for grey
164             //  absorption/emission
165             virtual label nBands() const;
167             //- Const access to the bands - defaults to Vector2D::one for grey
168             //  absorption/emission
169             virtual const Vector2D<scalar>& bands(const label n) const;
171             //- Flag for whether the absorption/emission is for a grey gas
172             virtual bool isGrey() const;
174             //- Add radiative intensity for ray i
175             virtual tmp<volScalarField> addIntensity
176             (
177                 const label rayI,
178                 const volScalarField& ILambda
179             ) const;
181             //- Correct absorption coefficients
182             virtual void correct
183             (
184                 volScalarField& a,
185                 PtrList<volScalarField>& aj
186             ) const;
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 } // End namespace radiation
193 } // End namespace Foam
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 #endif
199 // ************************************************************************* //