1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2009 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 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
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
29 Absorption coefficients class used in greyMeanAbsorptionEmission and
30 wideBandAbsorptionEmission
35 \*---------------------------------------------------------------------------*/
37 #ifndef absorptionCoeffs_H
38 #define absorptionCoeffs_H
41 #include "IOstreams.H"
42 #include "IOdictionary.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class absorptionCoeffs Declaration
52 \*---------------------------------------------------------------------------*/
54 class absorptionCoeffs
58 // Public data members
60 static const int nCoeffs_ = 6;
61 typedef FixedList<scalar, nCoeffs_> coeffArray;
68 // Temperature limits of applicability for functions
77 // Polynomial using inverse temperatures
80 coeffArray highACoeffs_;
81 coeffArray lowACoeffs_;
84 // Private member functions
86 //- Check given temperature is within the range of the fitted coeffs
87 void checkT(const scalar T) const;
94 //- Construct from Istream
95 absorptionCoeffs(Istream&);
108 //- Return the coefficients corresponding to the given temperature
109 const coeffArray& coeffs(const scalar T) const;
111 // Initialise from a dictionary
112 void initialise(const dictionary&);
114 // Initialise from an Istream
115 void initialise(Istream&);
120 inline bool invTemp() const;
122 inline scalar Tcommon() const;
124 inline scalar Tlow() const;
126 inline scalar Thigh() const;
128 inline const coeffArray& highACoeffs() const;
130 inline const coeffArray& lowACoeffs() const;
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 } // End namespace Foam
136 } // End namespace radiation
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 #include "absorptionCoeffsI.H"
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 // ************************************************************************* //