FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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