initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / radiation / submodels / absorptionEmissionModel / wideBandAbsorptionEmission / wideBandAbsorptionEmission.H
blob5a0dd1d20e0a6477110bc084537fa3ba2b13a4af
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-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::greyMeanAbsorptionEmission
28 Description
30     wideBandAbsorptionEmission radiation absorption and emission coefficients
31     for continuous phase.
33     All the bands should have the same number of species and have to be entered
34     in the same order.
36     There is no check of continuity of the bands. They should not ovelap or
37     have gaps.
39     The emission constant proportionality is specified per band (EhrrCoeff).
41     The coefficients for the species in the LookUpTable have to be specified
42     for use in moles x P [atm].i.e. (k[i] = species[i]*p*9.869231e-6).
44     The coefficients for CO and soot or any other added are multiplied by the
45     respective mass fraction being solved.
47     The look Up table file should be in the constant directory.
49     band dictionary:
51     band0
52     {
53         bandLimits (1.0e-6 2.63e-6);
54         EhrrCoeff       0.0;
55         species
56         {
57             CH4
58             {
59                 Tcommon         300.;
60                 Tlow            300.;
61                 Thigh           2500.;
62                 invTemp         false;
63                 loTcoeffs (0 0 0 0 0 0) ;
64                 hiTcoeffs (.1 0 0 0 0 0);
65             }
66             CO2
67             {
68                 Tcommon         300.;
69                 Tlow            300.;
70                 Thigh           2500.;
71                 invTemp         false;
72                 loTcoeffs (0 0 0 0 0 0) ;
73                 hiTcoeffs (.1 0 0 0 0 0);
74             }
76             H2O
77             {
78                 Tcommon         300.;
79                 Tlow            300.;
80                 Thigh           2500.;
81                 invTemp         false;
82                 loTcoeffs (0 0 0 0 0 0) ;
83                 hiTcoeffs (.1 0 0 0 0 0);
84             }
86             Ysoot
87             {
88                 Tcommon         300.;
89                 Tlow            300.;
90                 Thigh           2500.;
91                 invTemp         false;
92                 loTcoeffs (0 0 0 0 0 0) ;
93                 hiTcoeffs (.1 0 0 0 0 0);
94             }
95         }
96     }
99 SourceFiles
100     wideBandAbsorptionEmission.C
102 \*---------------------------------------------------------------------------*/
104 #ifndef wideBandAbsorptionEmission_H
105 #define wideBandAbsorptionEmission_H
107 #include "interpolationLookUpTable.H"
108 #include "absorptionEmissionModel.H"
109 #include "HashTable.H"
110 #include "absorptionCoeffs.H"
111 #include "basicThermo.H"
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 namespace Foam
117 namespace radiation
120 /*---------------------------------------------------------------------------*\
121                   Class wideBandAbsorptionEmission Declaration
122 \*---------------------------------------------------------------------------*/
124 class wideBandAbsorptionEmission
126     public absorptionEmissionModel
128 public:
130     // Public data
132         //- Maximum number of species considered for absorptivity
133         static const int nSpecies_ = 5;
135         //- Maximum number of bands
136         static const int maxBands_ = 10;
138         //-  Absorption coefficients
139         FixedList<FixedList<absorptionCoeffs, nSpecies_>, maxBands_> coeffs_;
142 private:
144     // Private data
146         //- Absorption model dictionary
147         dictionary coeffsDict_;
149         //- Hash table with species names
150         HashTable<label> speciesNames_;
152         //- Indices of species in the look-up table
153         FixedList<label, nSpecies_> specieIndex_;
155         //- Bands
156         FixedList<Vector2D<scalar>, maxBands_> iBands_;
158         //- Proportion of the heat released rate emitted
159         FixedList<scalar, maxBands_> iEhrrCoeffs_;
161         //- Look-up table of species related to ft
162         mutable interpolationLookUpTable<scalar> lookUpTable_;
164         //- Thermo package
165         const basicThermo& thermo_;
167         //- Bands
168         label nBands_;
170         //- Pointer list of species being solved involved in the absorption
171         UPtrList<volScalarField> Yj_;
173         // Total wave length covered by the bands
174         scalar totalWaveLength_;
177 public:
179     //- Runtime type information
180     TypeName("wideBandAbsorptionEmission");
183     // Constructors
185         //- Construct from components
186         wideBandAbsorptionEmission
187         (
188             const dictionary& dict,
189             const fvMesh& mesh
190         );
193     // Destructor
194     virtual ~wideBandAbsorptionEmission();
197     // Member Functions
199         // Access
201             // Absorption coefficient
203                 //- Absorption coefficient for continuous phase
204                 tmp<volScalarField> aCont(const label bandI = 0) const;
207             // Emission coefficient
209                 //- Emission coefficient for continuous phase
210                 tmp<volScalarField> eCont(const label bandI = 0) const;
213             // Emission contribution
215                 //- Emission contribution for continuous phase
216                 tmp<volScalarField> ECont(const label bandI = 0) const;
219         inline bool isGrey() const
220         {
221             return false;
222         }
224         //- Number of bands
225         inline label nBands() const
226         {
227             return nBands_;
228         }
230         //- Lower and upper limit of band i
231         inline const Vector2D<scalar>& bands(const label i) const
232         {
233             return iBands_[i];
234         }
236         //- Add contribution of ILambda to the total radiative intensity in
237         //  direction i
238         tmp<volScalarField> addIntensity
239         (
240             const label i,
241             const volScalarField& ILambda
242         ) const;
244         void correct
245         (
246             volScalarField& a_,
247             PtrList<volScalarField>& aLambda
248         ) const;
252 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
254 } // End namespace radiation
255 } // End namespace Foam
257 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
259 #endif
261 // ************************************************************************* //