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

wideBandAbsorptionEmission.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) 2008-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::greyMeanAbsorptionEmission
00027 
00028 Description
00029 
00030     wideBandAbsorptionEmission radiation absorption and emission coefficients
00031     for continuous phase.
00032 
00033     All the bands should have the same number of species and have to be entered
00034     in the same order.
00035 
00036     There is no check of continuity of the bands. They should not ovelap or
00037     have gaps.
00038 
00039     The emission constant proportionality is specified per band (EhrrCoeff).
00040 
00041     The coefficients for the species in the LookUpTable have to be specified
00042     for use in moles x P [atm].i.e. (k[i] = species[i]*p*9.869231e-6).
00043 
00044     The coefficients for CO and soot or any other added are multiplied by the
00045     respective mass fraction being solved.
00046 
00047     The look Up table file should be in the constant directory.
00048 
00049     band dictionary:
00050 
00051     band0
00052     {
00053         bandLimits (1.0e-6 2.63e-6);
00054         EhrrCoeff       0.0;
00055         species
00056         {
00057             CH4
00058             {
00059                 Tcommon         300.;
00060                 Tlow            300.;
00061                 Thigh           2500.;
00062                 invTemp         false;
00063                 loTcoeffs (0 0 0 0 0 0) ;
00064                 hiTcoeffs (.1 0 0 0 0 0);
00065             }
00066             CO2
00067             {
00068                 Tcommon         300.;
00069                 Tlow            300.;
00070                 Thigh           2500.;
00071                 invTemp         false;
00072                 loTcoeffs (0 0 0 0 0 0) ;
00073                 hiTcoeffs (.1 0 0 0 0 0);
00074             }
00075 
00076             H2O
00077             {
00078                 Tcommon         300.;
00079                 Tlow            300.;
00080                 Thigh           2500.;
00081                 invTemp         false;
00082                 loTcoeffs (0 0 0 0 0 0) ;
00083                 hiTcoeffs (.1 0 0 0 0 0);
00084             }
00085 
00086             Ysoot
00087             {
00088                 Tcommon         300.;
00089                 Tlow            300.;
00090                 Thigh           2500.;
00091                 invTemp         false;
00092                 loTcoeffs (0 0 0 0 0 0) ;
00093                 hiTcoeffs (.1 0 0 0 0 0);
00094             }
00095         }
00096     }
00097 
00098 
00099 SourceFiles
00100     wideBandAbsorptionEmission.C
00101 
00102 \*---------------------------------------------------------------------------*/
00103 
00104 #ifndef wideBandAbsorptionEmission_H
00105 #define wideBandAbsorptionEmission_H
00106 
00107 #include "interpolationLookUpTable.H"
00108 #include "absorptionEmissionModel.H"
00109 #include "HashTable.H"
00110 #include "absorptionCoeffs.H"
00111 #include "basicThermo.H"
00112 
00113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00114 
00115 namespace Foam
00116 {
00117 namespace radiation
00118 {
00119 
00120 /*---------------------------------------------------------------------------*\
00121                   Class wideBandAbsorptionEmission Declaration
00122 \*---------------------------------------------------------------------------*/
00123 
00124 class wideBandAbsorptionEmission
00125 :
00126     public absorptionEmissionModel
00127 {
00128 public:
00129 
00130     // Public data
00131 
00132         //- Maximum number of species considered for absorptivity
00133         static const int nSpecies_ = 5;
00134 
00135         //- Maximum number of bands
00136         static const int maxBands_ = 10;
00137 
00138         //-  Absorption coefficients
00139         FixedList<FixedList<absorptionCoeffs, nSpecies_>, maxBands_> coeffs_;
00140 
00141 
00142 private:
00143 
00144     // Private data
00145 
00146         //- Absorption model dictionary
00147         dictionary coeffsDict_;
00148 
00149         //- Hash table with species names
00150         HashTable<label> speciesNames_;
00151 
00152         //- Indices of species in the look-up table
00153         FixedList<label, nSpecies_> specieIndex_;
00154 
00155         //- Bands
00156         FixedList<Vector2D<scalar>, maxBands_> iBands_;
00157 
00158         //- Proportion of the heat released rate emitted
00159         FixedList<scalar, maxBands_> iEhrrCoeffs_;
00160 
00161         //- Look-up table of species related to ft
00162         mutable interpolationLookUpTable<scalar> lookUpTable_;
00163 
00164         //- Thermo package
00165         const basicThermo& thermo_;
00166 
00167         //- Bands
00168         label nBands_;
00169 
00170         //- Pointer list of species being solved involved in the absorption
00171         UPtrList<volScalarField> Yj_;
00172 
00173         // Total wave length covered by the bands
00174         scalar totalWaveLength_;
00175 
00176 
00177 public:
00178 
00179     //- Runtime type information
00180     TypeName("wideBandAbsorptionEmission");
00181 
00182 
00183     // Constructors
00184 
00185         //- Construct from components
00186         wideBandAbsorptionEmission
00187         (
00188             const dictionary& dict,
00189             const fvMesh& mesh
00190         );
00191 
00192 
00193     // Destructor
00194     virtual ~wideBandAbsorptionEmission();
00195 
00196 
00197     // Member Functions
00198 
00199         // Access
00200 
00201             // Absorption coefficient
00202 
00203                 //- Absorption coefficient for continuous phase
00204                 tmp<volScalarField> aCont(const label bandI = 0) const;
00205 
00206 
00207             // Emission coefficient
00208 
00209                 //- Emission coefficient for continuous phase
00210                 tmp<volScalarField> eCont(const label bandI = 0) const;
00211 
00212 
00213             // Emission contribution
00214 
00215                 //- Emission contribution for continuous phase
00216                 tmp<volScalarField> ECont(const label bandI = 0) const;
00217 
00218 
00219         inline bool isGrey() const
00220         {
00221             return false;
00222         }
00223 
00224         //- Number of bands
00225         inline label nBands() const
00226         {
00227             return nBands_;
00228         }
00229 
00230         //- Lower and upper limit of band i
00231         inline const Vector2D<scalar>& bands(const label i) const
00232         {
00233             return iBands_[i];
00234         }
00235 
00236         //- Add contribution of ILambda to the total radiative intensity in
00237         //  direction i
00238         tmp<volScalarField> addIntensity
00239         (
00240             const label i,
00241             const volScalarField& ILambda
00242         ) const;
00243 
00244         void correct
00245         (
00246             volScalarField& a_,
00247             PtrList<volScalarField>& aLambda
00248         ) const;
00249 };
00250 
00251 
00252 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00253 
00254 } // End namespace radiation
00255 } // End namespace Foam
00256 
00257 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00258 
00259 #endif
00260 
00261 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd