absorptionCoeffs.C
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-2019 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 \*---------------------------------------------------------------------------*/
25 
26 #include "absorptionCoeffs.H"
27 #include "IOstreams.H"
28 
29 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
30 
32 {}
33 
34 
35 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
36 
37 void Foam::radiationModels::absorptionCoeffs::checkT(const scalar T) const
38 {
39  if (T < Tlow_ || T > Thigh_)
40  {
42  << "using absorptionCoeffs out of temperature range:" << nl
43  << " " << Tlow_ << " -> " << Thigh_ << "; T = " << T
44  << nl << endl;
45  }
46 }
47 
48 
51 (
52  const scalar T
53 ) const
54 {
55  checkT(T);
56 
57  if (T < Tcommon_)
58  {
59  return lowACoeffs_;
60  }
61  else
62  {
63  return highACoeffs_;
64  }
65 }
66 
67 
69 {
70  dict.lookup("Tcommon") >> Tcommon_;
71  dict.lookup("Tlow") >> Tlow_;
72  dict.lookup("Thigh") >> Thigh_;
73  dict.lookup("invTemp") >> invTemp_;
74  dict.lookup("loTcoeffs") >> lowACoeffs_;
75  dict.lookup("hiTcoeffs") >> highACoeffs_;
76 }
77 
78 
79 // ************************************************************************* //
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
const coeffArray & coeffs(const scalar T) const
Return the coefficients corresponding to the given temperature.
#define WarningInFunction
Report a warning using Foam::Warning.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:257
static const char nl
Definition: Ostream.H:266
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dictionary dict