DOC: Corrected class names in the file descriptions
[freefoam.git] / src / thermophysicalModels / radiation / submodels / absorptionEmissionModel / wideBandAbsorptionEmission / wideBandAbsorptionEmission.H
blob71ce6fa793e59198fc064b5b30b0a2c29fc56e61
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-2010 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
13     the Free Software Foundation, either version 3 of the License, or
14     (at your 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, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::radiation::wideBandAbsorptionEmission
27 Description
29     wideBandAbsorptionEmission radiation absorption and emission coefficients
30     for continuous phase.
32     All the bands should have the same number of species and have to be entered
33     in the same order.
35     There is no check of continuity of the bands. They should not ovelap or
36     have gaps.
38     The emission constant proportionality is specified per band (EhrrCoeff).
40     The coefficients for the species in the LookUpTable have to be specified
41     for use in moles x P [atm].i.e. (k[i] = species[i]*p*9.869231e-6).
43     The coefficients for CO and soot or any other added are multiplied by the
44     respective mass fraction being solved.
46     The look Up table file should be in the constant directory.
48     band dictionary:
50     band0
51     {
52         bandLimits (1.0e-6 2.63e-6);
53         EhrrCoeff       0.0;
54         species
55         {
56             CH4
57             {
58                 Tcommon         300.;
59                 Tlow            300.;
60                 Thigh           2500.;
61                 invTemp         false;
62                 loTcoeffs (0 0 0 0 0 0) ;
63                 hiTcoeffs (.1 0 0 0 0 0);
64             }
65             CO2
66             {
67                 Tcommon         300.;
68                 Tlow            300.;
69                 Thigh           2500.;
70                 invTemp         false;
71                 loTcoeffs (0 0 0 0 0 0) ;
72                 hiTcoeffs (.1 0 0 0 0 0);
73             }
75             H2O
76             {
77                 Tcommon         300.;
78                 Tlow            300.;
79                 Thigh           2500.;
80                 invTemp         false;
81                 loTcoeffs (0 0 0 0 0 0) ;
82                 hiTcoeffs (.1 0 0 0 0 0);
83             }
85             Ysoot
86             {
87                 Tcommon         300.;
88                 Tlow            300.;
89                 Thigh           2500.;
90                 invTemp         false;
91                 loTcoeffs (0 0 0 0 0 0) ;
92                 hiTcoeffs (.1 0 0 0 0 0);
93             }
94         }
95     }
98 SourceFiles
99     wideBandAbsorptionEmission.C
101 \*---------------------------------------------------------------------------*/
103 #ifndef wideBandAbsorptionEmission_H
104 #define wideBandAbsorptionEmission_H
106 #include <radiation/interpolationLookUpTable.H>
107 #include <radiation/absorptionEmissionModel.H>
108 #include <OpenFOAM/HashTable.H>
109 #include <radiation/absorptionCoeffs.H>
110 #include <basicThermophysicalModels/basicThermo.H>
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 namespace Foam
116 namespace radiation
119 /*---------------------------------------------------------------------------*\
120                   Class wideBandAbsorptionEmission Declaration
121 \*---------------------------------------------------------------------------*/
123 class wideBandAbsorptionEmission
125     public absorptionEmissionModel
127 public:
129     // Public data
131         //- Maximum number of species considered for absorptivity
132         static const int nSpecies_ = 5;
134         //- Maximum number of bands
135         static const int maxBands_ = 10;
137         //-  Absorption coefficients
138         FixedList<FixedList<absorptionCoeffs, nSpecies_>, maxBands_> coeffs_;
141 private:
143     // Private data
145         //- Absorption model dictionary
146         dictionary coeffsDict_;
148         //- Hash table with species names
149         HashTable<label> speciesNames_;
151         //- Indices of species in the look-up table
152         FixedList<label, nSpecies_> specieIndex_;
154         //- Bands
155         FixedList<Vector2D<scalar>, maxBands_> iBands_;
157         //- Proportion of the heat released rate emitted
158         FixedList<scalar, maxBands_> iEhrrCoeffs_;
160         //- Look-up table of species related to ft
161         mutable interpolationLookUpTable<scalar> lookUpTable_;
163         //- Thermo package
164         const basicThermo& thermo_;
166         //- Bands
167         label nBands_;
169         //- Pointer list of species being solved involved in the absorption
170         UPtrList<volScalarField> Yj_;
172         // Total wave length covered by the bands
173         scalar totalWaveLength_;
176 public:
178     //- Runtime type information
179     TypeName("wideBandAbsorptionEmission");
182     // Constructors
184         //- Construct from components
185         wideBandAbsorptionEmission
186         (
187             const dictionary& dict,
188             const fvMesh& mesh
189         );
192     // Destructor
193     virtual ~wideBandAbsorptionEmission();
196     // Member Functions
198         // Access
200             // Absorption coefficient
202                 //- Absorption coefficient for continuous phase
203                 tmp<volScalarField> aCont(const label bandI = 0) const;
206             // Emission coefficient
208                 //- Emission coefficient for continuous phase
209                 tmp<volScalarField> eCont(const label bandI = 0) const;
212             // Emission contribution
214                 //- Emission contribution for continuous phase
215                 tmp<volScalarField> ECont(const label bandI = 0) const;
218         inline bool isGrey() const
219         {
220             return false;
221         }
223         //- Number of bands
224         inline label nBands() const
225         {
226             return nBands_;
227         }
229         //- Lower and upper limit of band i
230         inline const Vector2D<scalar>& bands(const label i) const
231         {
232             return iBands_[i];
233         }
235         //- Add contribution of ILambda to the total radiative intensity in
236         //  direction i
237         tmp<volScalarField> addIntensity
238         (
239             const label i,
240             const volScalarField& ILambda
241         ) const;
243         void correct
244         (
245             volScalarField& a_,
246             PtrList<volScalarField>& aLambda
247         ) const;
251 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
253 } // End namespace radiation
254 } // End namespace Foam
256 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
258 #endif
260 // ************************ vim: set sw=4 sts=4 et: ************************ //