1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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/>.
28 Absorption coefficients class used in greyMeanAbsorptionEmission and
29 wideBandAbsorptionEmission
34 \*---------------------------------------------------------------------------*/
36 #ifndef absorptionCoeffs_H
37 #define absorptionCoeffs_H
40 #include "IOstreams.H"
41 #include "IOdictionary.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class absorptionCoeffs Declaration
51 \*---------------------------------------------------------------------------*/
53 class absorptionCoeffs
57 // Public data members
59 static const int nCoeffs_ = 6;
60 typedef FixedList<scalar, nCoeffs_> coeffArray;
67 // Temperature limits of applicability for functions
76 // Polynomial using inverse temperatures
79 coeffArray highACoeffs_;
80 coeffArray lowACoeffs_;
83 // Private Member Functions
85 //- Check given temperature is within the range of the fitted coeffs
86 void checkT(const scalar T) const;
93 //- Construct from Istream
94 absorptionCoeffs(Istream&);
107 //- Return the coefficients corresponding to the given temperature
108 const coeffArray& coeffs(const scalar T) const;
110 // Initialise from a dictionary
111 void initialise(const dictionary&);
113 // Initialise from an Istream
114 void initialise(Istream&);
119 inline bool invTemp() const;
121 inline scalar Tcommon() const;
123 inline scalar Tlow() const;
125 inline scalar Thigh() const;
127 inline const coeffArray& highACoeffs() const;
129 inline const coeffArray& lowACoeffs() const;
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 } // End namespace Foam
135 } // End namespace radiation
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 #include "absorptionCoeffsI.H"
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 // ************************************************************************* //