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

absorptionCoeffs.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::absorptionCoeffs
00026 
00027 Description
00028     Absorption coefficients class used in greyMeanAbsorptionEmission and
00029     wideBandAbsorptionEmission
00030 
00031 SourceFiles
00032     absorptionCoeffs.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef absorptionCoeffs_H
00037 #define absorptionCoeffs_H
00038 
00039 #include <OpenFOAM/List.H>
00040 #include <OpenFOAM/IOstreams.H>
00041 #include <OpenFOAM/IOdictionary.H>
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 namespace Foam
00045 {
00046 namespace radiation
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050                       Class absorptionCoeffs Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class absorptionCoeffs
00054 {
00055 public:
00056 
00057     // Public data members
00058 
00059         static const int nCoeffs_ = 6;
00060         typedef FixedList<scalar, nCoeffs_> coeffArray;
00061 
00062 
00063 private:
00064 
00065     // Private data
00066 
00067         // Temperature limits of applicability for functions
00068 
00069             scalar Tcommon_;
00070 
00071             scalar Tlow_;
00072 
00073             scalar Thigh_;
00074 
00075 
00076         // Polynomial using inverse temperatures
00077         bool invTemp_;
00078 
00079         coeffArray highACoeffs_;
00080         coeffArray lowACoeffs_;
00081 
00082 
00083     // Private member functions
00084 
00085         //- Check given temperature is within the range of the fitted coeffs
00086         void checkT(const scalar T) const;
00087 
00088 
00089 public:
00090 
00091     // Constructors
00092 
00093         //- Construct from Istream
00094         absorptionCoeffs(Istream&);
00095 
00096         // Null constructor
00097         absorptionCoeffs()
00098         {}
00099 
00100 
00101     // Destructor
00102     ~absorptionCoeffs();
00103 
00104 
00105     // Member functions
00106 
00107         //- Return the coefficients corresponding to the given temperature
00108         const coeffArray& coeffs(const scalar T) const;
00109 
00110         // Initialise from a dictionary
00111         void initialise(const dictionary&);
00112 
00113         // Initialise from an Istream
00114         void initialise(Istream&);
00115 
00116 
00117     // Access Functions
00118 
00119         inline bool invTemp() const;
00120 
00121         inline scalar Tcommon() const;
00122 
00123         inline scalar Tlow() const;
00124 
00125         inline scalar Thigh() const;
00126 
00127         inline const coeffArray& highACoeffs() const;
00128 
00129         inline const coeffArray& lowACoeffs() const;
00130 };
00131 
00132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00133 
00134 } // End namespace Foam
00135 } // End namespace radiation
00136 
00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00138 
00139 #include "absorptionCoeffsI.H"
00140 
00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00142 
00143 #endif
00144 
00145 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines