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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::absorptionCoeffs
28 
29 Description
30  Absorption coefficients class used in greyMeanAbsorptionEmission and
31  wideBandAbsorptionEmission
32 
33 SourceFiles
34  absorptionCoeffs.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef absorptionCoeffs_H
39 #define absorptionCoeffs_H
40 
41 #include "List.H"
42 #include "IOstreams.H"
43 #include "IOdictionary.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
47 {
48 namespace radiation
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class absorptionCoeffs Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class absorptionCoeffs
56 {
57 public:
58 
59  // Public data members
60 
61  static const int nCoeffs_ = 6;
63 
64 
65 private:
66 
67  // Private data
68 
69  // Temperature limits of applicability of functions
70  scalar Tlow_, Thigh_, Tcommon_;
71 
72  // Polynomial using inverse temperatures
73  bool invTemp_;
74 
75  coeffArray highACoeffs_;
76  coeffArray lowACoeffs_;
77 
78 
79  // Private Member Functions
80 
81  //- Check given temperature is within the range of the fitted coeffs
82  void checkT(const scalar T) const;
83 
84 
85 public:
86 
87  // Constructors
88 
89  //- Default construct
90  absorptionCoeffs() = default;
91 
92 
93  //- Destructor
94  ~absorptionCoeffs() = default;
95 
96 
97  // Member functions
98 
99  //- Return the coefficients corresponding to the given temperature
100  const coeffArray& coeffs(const scalar T) const;
101 
102  // Initialise from a dictionary
103  void initialise(const dictionary&);
104 
105 
106  // Access Functions
107 
108  inline bool invTemp() const;
109 
110  inline scalar Tcommon() const;
111 
112  inline scalar Tlow() const;
113 
114  inline scalar Thigh() const;
115 
116  inline const coeffArray& highACoeffs() const;
117 
118  inline const coeffArray& lowACoeffs() const;
119 };
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace Foam
124 } // End namespace radiation
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #include "absorptionCoeffsI.H"
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
void initialise(const dictionary &)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
absorptionCoeffs()=default
Default construct.
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.
~absorptionCoeffs()=default
Destructor.
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.