absorptionCoeffs.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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  // Null constructor
95  {}
96 
97 
98  //- Destructor
100 
101 
102  // Member functions
103 
104  //- Return the coefficients corresponding to the given temperature
105  const coeffArray& coeffs(const scalar T) const;
106 
107  // Initialise from a dictionary
108  void initialise(const dictionary&);
109 
110 
111  // Access Functions
112 
113  inline bool invTemp() const;
114 
115  inline scalar Tcommon() const;
116 
117  inline scalar Tlow() const;
118 
119  inline scalar Thigh() const;
120 
121  inline const coeffArray& highACoeffs() const;
122 
123  inline const coeffArray& lowACoeffs() const;
124 };
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 } // End namespace radiation
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #include "absorptionCoeffsI.H"
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
void initialise(const dictionary &)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
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)
const coeffArray & lowACoeffs() const
const coeffArray & highACoeffs() const
FixedList< scalar, nCoeffs_ > coeffArray
const coeffArray & coeffs(const scalar T) const
Return the coefficients corresponding to the given temperature.
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.