OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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