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 
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 // ************************************************************************* //
Foam::radiation::absorptionCoeffs::coeffs
const coeffArray & coeffs(const scalar T) const
Return the coefficients corresponding to the given temperature.
Definition: absorptionCoeffs.C:72
Foam::radiation::absorptionCoeffs::highACoeffs_
coeffArray highACoeffs_
Definition: absorptionCoeffs.H:78
IOstreams.H
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
List.H
Foam::radiation::absorptionCoeffs::Tcommon_
scalar Tcommon_
Definition: absorptionCoeffs.H:68
Foam::radiation::absorptionCoeffs::Thigh_
scalar Thigh_
Definition: absorptionCoeffs.H:72
Foam::radiation::absorptionCoeffs::lowACoeffs
const coeffArray & lowACoeffs() const
Definition: absorptionCoeffsI.H:58
Foam::radiation::absorptionCoeffs::Tlow
scalar Tlow() const
Definition: absorptionCoeffsI.H:38
Foam::radiation::absorptionCoeffs
Definition: absorptionCoeffs.H:52
Foam::radiation::absorptionCoeffs::invTemp_
bool invTemp_
Definition: absorptionCoeffs.H:76
Foam::radiation::absorptionCoeffs::nCoeffs_
static const int nCoeffs_
Definition: absorptionCoeffs.H:58
Foam::radiation::absorptionCoeffs::Tcommon
scalar Tcommon() const
Definition: absorptionCoeffsI.H:32
Foam::radiation::absorptionCoeffs::checkT
void checkT(const scalar T) const
Check given temperature is within the range of the fitted coeffs.
Definition: absorptionCoeffs.C:58
Foam::radiation::absorptionCoeffs::initialise
void initialise(const dictionary &)
Definition: absorptionCoeffs.C:95
Foam::radiation::absorptionCoeffs::Tlow_
scalar Tlow_
Definition: absorptionCoeffs.H:70
Foam::radiation::absorptionCoeffs::invTemp
bool invTemp() const
Definition: absorptionCoeffsI.H:26
Foam::radiation::absorptionCoeffs::absorptionCoeffs
absorptionCoeffs()
Definition: absorptionCoeffs.H:96
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::radiation::absorptionCoeffs::highACoeffs
const coeffArray & highACoeffs() const
Definition: absorptionCoeffsI.H:51
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
absorptionCoeffsI.H
IOdictionary.H
Foam::radiation::absorptionCoeffs::Thigh
scalar Thigh() const
Definition: absorptionCoeffsI.H:44
Foam::FixedList< scalar, nCoeffs_ >
Foam::radiation::absorptionCoeffs::~absorptionCoeffs
~absorptionCoeffs()
Destructor.
Definition: absorptionCoeffs.C:52
Foam::radiation::absorptionCoeffs::coeffArray
FixedList< scalar, nCoeffs_ > coeffArray
Definition: absorptionCoeffs.H:59
Foam::radiation::absorptionCoeffs::lowACoeffs_
coeffArray lowACoeffs_
Definition: absorptionCoeffs.H:79