absorptionCoeffs.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::absorptionCoeffs
26 
27 Description
28  Absorption coefficients class used in greyMeanAbsorptionEmission and
29  wideBandAbsorptionEmission
30 
31 SourceFiles
32  absorptionCoeffs.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef absorptionCoeffs_H
37 #define absorptionCoeffs_H
38 
39 #include "List.H"
40 #include "IOstreams.H"
41 #include "IOdictionary.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
45 {
46 namespace radiation
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class absorptionCoeffs Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class absorptionCoeffs
54 {
55 public:
56 
57  // Public data members
58 
59  static const int nCoeffs_ = 6;
61 
62 
63 private:
64 
65  // Private data
66 
67  // Temperature limits of applicability for functions
68 
69  scalar Tcommon_;
70 
71  scalar Tlow_;
72 
73  scalar Thigh_;
74 
75 
76  // Polynomial using inverse temperatures
77  bool invTemp_;
78 
79  coeffArray highACoeffs_;
80  coeffArray lowACoeffs_;
81 
82 
83  // Private Member Functions
84 
85  //- Check given temperature is within the range of the fitted coeffs
86  void checkT(const scalar T) const;
87 
88 
89 public:
90 
91  // Constructors
92 
93  //- Construct from Istream
95 
96  // Null constructor
98  {}
99 
100 
101  //- Destructor
103 
104 
105  // Member functions
106 
107  //- Return the coefficients corresponding to the given temperature
108  const coeffArray& coeffs(const scalar T) const;
109 
110  // Initialise from a dictionary
111  void initialise(const dictionary&);
112 
113  // Initialise from an Istream
114  void initialise(Istream&);
115 
116 
117  // Access Functions
118 
119  inline bool invTemp() const;
120 
121  inline scalar Tcommon() const;
122 
123  inline scalar Tlow() const;
124 
125  inline scalar Thigh() const;
126 
127  inline const coeffArray& highACoeffs() const;
128 
129  inline const coeffArray& lowACoeffs() const;
130 };
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace Foam
135 } // End namespace radiation
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #include "absorptionCoeffsI.H"
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
void initialise(const dictionary &)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
const coeffArray & lowACoeffs() const
const coeffArray & highACoeffs() const
const coeffArray & coeffs(const scalar T) const
Return the coefficients corresponding to the given temperature.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
FixedList< scalar, nCoeffs_ > coeffArray
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.