initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / radiation / radiationModel / fvDOM / absorptionCoeffs / absorptionCoeffs.H
blob685d1052195db864aec04aec74b26a7c0f17dcce
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::janafThermo
28 Description
29     Absorption coefficients class used in greyMeanAbsorptionEmission and
30     wideBandAbsorptionEmission
32 SourceFiles
33     absorptionCoeffs.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef absorptionCoeffs_H
38 #define absorptionCoeffs_H
40 #include "List.H"
41 #include "IOstreams.H"
42 #include "IOdictionary.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
47 namespace radiation
50 /*---------------------------------------------------------------------------*\
51                       Class absorptionCoeffs Declaration
52 \*---------------------------------------------------------------------------*/
54 class absorptionCoeffs
56 public:
58     // Public data members
60         static const int nCoeffs_ = 6;
61         typedef FixedList<scalar, nCoeffs_> coeffArray;
64 private:
66     // Private data
68         // Temperature limits of applicability for functions
70             scalar Tcommon_;
72             scalar Tlow_;
74             scalar Thigh_;
77         // Polynomial using inverse temperatures
78         bool invTemp_;
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;
90 public:
92     // Constructors
94         //- Construct from Istream
95         absorptionCoeffs(Istream&);
97         // Null constructor
98         absorptionCoeffs()
99         {}
102     // Destructor
103     ~absorptionCoeffs();
106     // Member functions
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&);
118     // Access Functions
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 #endif
146 // ************************************************************************* //