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 for functions
70 
71  scalar Tcommon_;
72 
73  scalar Tlow_;
74 
75  scalar Thigh_;
76 
77 
78  // Polynomial using inverse temperatures
79  bool invTemp_;
80 
81  coeffArray highACoeffs_;
82  coeffArray lowACoeffs_;
83 
84 
85  // Private Member Functions
86 
87  //- Check given temperature is within the range of the fitted coeffs
88  void checkT(const scalar T) const;
89 
90 
91 public:
92 
93  // Constructors
94 
95  // Null constructor
97  {}
98 
99 
100  //- Destructor
102 
103 
104  // Member functions
105 
106  //- Return the coefficients corresponding to the given temperature
107  const coeffArray& coeffs(const scalar T) const;
108 
109  // Initialise from a dictionary
110  void initialise(const dictionary&);
111 
112 
113  // Access Functions
114 
115  inline bool invTemp() const;
116 
117  inline scalar Tcommon() const;
118 
119  inline scalar Tlow() const;
120 
121  inline scalar Thigh() const;
122 
123  inline const coeffArray& highACoeffs() const;
124 
125  inline const coeffArray& lowACoeffs() const;
126 };
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 } // End namespace radiation
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #include "absorptionCoeffsI.H"
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
Foam::radiation::absorptionCoeffs::coeffs
const coeffArray & coeffs(const scalar T) const
Return the coefficients corresponding to the given temperature.
Definition: absorptionCoeffs.C:53
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::lowACoeffs
const coeffArray & lowACoeffs() const
Definition: absorptionCoeffsI.H:60
Foam::radiation::absorptionCoeffs::Tlow
scalar Tlow() const
Definition: absorptionCoeffsI.H:40
Foam::radiation::absorptionCoeffs
Definition: absorptionCoeffs.H:54
Foam::radiation::absorptionCoeffs::nCoeffs_
static const int nCoeffs_
Definition: absorptionCoeffs.H:60
Foam::radiation::absorptionCoeffs::Tcommon
scalar Tcommon() const
Definition: absorptionCoeffsI.H:34
Foam::radiation::absorptionCoeffs::initialise
void initialise(const dictionary &)
Definition: absorptionCoeffs.C:70
Foam::radiation::absorptionCoeffs::invTemp
bool invTemp() const
Definition: absorptionCoeffsI.H:28
Foam::radiation::absorptionCoeffs::absorptionCoeffs
absorptionCoeffs()
Definition: absorptionCoeffs.H:95
Foam::radiation::absorptionCoeffs::highACoeffs
const coeffArray & highACoeffs() const
Definition: absorptionCoeffsI.H:53
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
absorptionCoeffsI.H
IOdictionary.H
Foam::radiation::absorptionCoeffs::Thigh
scalar Thigh() const
Definition: absorptionCoeffsI.H:46
Foam::FixedList< scalar, nCoeffs_ >
Foam::radiation::absorptionCoeffs::~absorptionCoeffs
~absorptionCoeffs()
Destructor.
Definition: absorptionCoeffs.C:33
Foam::radiation::absorptionCoeffs::coeffArray
FixedList< scalar, nCoeffs_ > coeffArray
Definition: absorptionCoeffs.H:61