1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "absorptionCoeffs.H"
27 #include "IOstreams.H"
29 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31 Foam::radiation::absorptionCoeffs::absorptionCoeffs(Istream& is)
33 Tcommon_(readScalar(is)),
34 Tlow_(readScalar(is)),
35 Thigh_(readScalar(is)),
36 invTemp_(readBool(is))
38 for (label coefLabel=0; absorptionCoeffs::nCoeffs_; coefLabel++)
40 is >> highACoeffs_[coefLabel];
43 for (label coefLabel=0; absorptionCoeffs::nCoeffs_; coefLabel++)
45 is >> lowACoeffs_[coefLabel];
50 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
52 Foam::radiation::absorptionCoeffs::~absorptionCoeffs()
56 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
58 void Foam::radiation::absorptionCoeffs::checkT(const scalar T) const
60 if (T < Tlow_ || T > Thigh_)
64 "absorptionCoeffs::checkT(const scalar T) const"
65 ) << "usinf absCoeff out of temperature range:" << nl
66 << " " << Tlow_ << " -> " << Thigh_ << "; T = " << T
72 const Foam::radiation::absorptionCoeffs::coeffArray&
73 Foam::radiation::absorptionCoeffs::coeffs
91 void Foam::radiation::absorptionCoeffs::initialise(Istream&)
93 absorptionCoeffs(Istream);
97 void Foam::radiation::absorptionCoeffs::initialise(const dictionary& dict)
99 dict.lookup("Tcommon") >> Tcommon_;
100 dict.lookup("Tlow") >> Tlow_;
101 dict.lookup("Thigh") >> Thigh_;
102 dict.lookup("invTemp") >> invTemp_;
104 dict.lookup("loTcoeffs") >> lowACoeffs_;
105 dict.lookup("hiTcoeffs") >> highACoeffs_;
109 // ************************************************************************* //