Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / thermophysicalModels / radiation / submodels / absorptionEmissionModel / greyMeanAbsorptionEmission / greyMeanAbsorptionEmission.H
blob5f92f1f24a3a99e77921e36a55023850c897c5f0
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::radiation::greyMeanAbsorptionEmission
27 Description
28     greyMeanAbsorptionEmission radiation absorption and emission coefficients
29     for continuous phase
31     The coefficients for the species in the Look up table have to be specified
32     for use in moles x P [atm], i.e. (k[i] = species[i]*p*9.869231e-6).
34     The coefficients for CO and soot or any other added are multiplied by the
35     respective mass fraction being solved
37     All the species in the dictionary need either to be in the look-up table or
38     being solved. Conversely, all the species solved do not need to be included
39     in the calculation of the absorption coefficient
41     The names of the species in the absorption dictionary must match exactly the
42     name in the look-up table or the name of the field being solved
44     The look-up table ("speciesTable") file should be in constant
46     i.e. dictionary
48     LookUpTableFileName     "speciesTable";
50     EhrrCoeff                0.0;
52     CO2
53     {
54         Tcommon         300.;   // Common Temp
55         invTemp         true;   // Is the polynomial using inverse temperature?
56         Tlow            300.;   // Low Temp
57         Thigh           2500.;  // High Temp
59         loTcoeffs       // coeffs for T < Tcommon
60         (
61             0           //  a0            +
62             0           //  a1*T          +
63             0           //  a2*T^(+/-)2   +
64             0           //  a3*T^(+/-)3   +
65             0           //  a4*T^(+/-)4   +
66             0           //  a5*T^(+/-)5   +
67         );
68         hiTcoeffs       // coeffs for T > Tcommon
69         (
70             18.741
71             -121.31e3
72             273.5e6
73             -194.05e9
74             56.31e12
75             -5.8169e15
76         );
78     }
80 SourceFiles
81     greyMeanAbsorptionEmission.C
83 \*---------------------------------------------------------------------------*/
85 #ifndef greyMeanAbsorptionEmission_H
86 #define greyMeanAbsorptionEmission_H
88 #include "interpolationLookUpTable.H"
89 #include "absorptionEmissionModel.H"
90 #include "HashTable.H"
91 #include "absorptionCoeffs.H"
92 #include "basicThermo.H"
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 namespace Foam
98 namespace radiation
101 /*---------------------------------------------------------------------------*\
102                  Class greyMeanAbsorptionEmission Declaration
103 \*---------------------------------------------------------------------------*/
105 class greyMeanAbsorptionEmission
107     public absorptionEmissionModel
109 public:
111     // Public data
113         // - Maximum number of species considered for absorptivity
114         static const int nSpecies_ = 5;
116         //  Absorption Coefficients
117         absorptionCoeffs coeffs_[nSpecies_];
120 private:
122     // Private data
124         //- Absorption model dictionary
125         dictionary coeffsDict_;
127         //- Hash table of species names
128         HashTable<label> speciesNames_;
130         // Indices of species in the look-up table
131         FixedList<label, nSpecies_> specieIndex_;
133         // Look-up table of species related to ft
134         mutable interpolationLookUpTable<scalar> lookUpTable_;
136         // Thermo package
137         const basicThermo& thermo_;
139         //- Emission constant coefficient
140         const scalar EhrrCoeff_;
142         //- Pointer list of species in the registry involved in the absorption
143         UPtrList<volScalarField> Yj_;
146 public:
148     //- Runtime type information
149     TypeName("greyMeanAbsorptionEmission");
152     // Constructors
154         //- Construct from components
155         greyMeanAbsorptionEmission
156         (
157             const dictionary& dict,
158             const fvMesh& mesh
159         );
162     // Destructor
163     virtual ~greyMeanAbsorptionEmission();
166     // Member Operators
168         // Access
170             // Absorption coefficient
172                 //- Absorption coefficient for continuous phase
173                 tmp<volScalarField> aCont(const label bandI = 0) const;
176             // Emission coefficient
178                 //- Emission coefficient for continuous phase
179                 tmp<volScalarField> eCont(const label bandI = 0) const;
182             // Emission contribution
184                 //- Emission contribution for continuous phase
185                 tmp<volScalarField> ECont(const label bandI = 0) const;
188     // Member Functions
190         inline bool isGrey() const
191         {
192             return true;
193         }
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 } // End namespace radiation
200 } // End namespace Foam
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 #endif
206 // ************************************************************************* //