initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / thermophysicalModels / radiation / submodels / absorptionEmissionModel / constantAbsorptionEmission / constantAbsorptionEmission.C
blob512a5920e5350ab7279f36c0771e0deb7a603842
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "constantAbsorptionEmission.H"
28 #include "addToRunTimeSelectionTable.H"
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 namespace Foam
34     namespace radiation
35     {
36         defineTypeNameAndDebug(constantAbsorptionEmission, 0);
38         addToRunTimeSelectionTable
39         (
40             absorptionEmissionModel,
41             constantAbsorptionEmission,
42             dictionary
43         );
44     }
48 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
50 Foam::radiation::constantAbsorptionEmission::constantAbsorptionEmission
52     const dictionary& dict,
53     const fvMesh& mesh
56     absorptionEmissionModel(dict, mesh),
57     coeffsDict_(dict.subDict(typeName + "Coeffs")),
58     a_(coeffsDict_.lookup("a")),
59     e_(coeffsDict_.lookup("e")),
60     E_(coeffsDict_.lookup("E"))
64 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
66 Foam::radiation::constantAbsorptionEmission::~constantAbsorptionEmission()
70 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
72 Foam::tmp<Foam::volScalarField>
73 Foam::radiation::constantAbsorptionEmission::aCont() const
75     tmp<volScalarField> ta
76     (
77         new volScalarField
78         (
79             IOobject
80             (
81                 "a",
82                 mesh_.time().timeName(),
83                 mesh_,
84                 IOobject::NO_READ,
85                 IOobject::NO_WRITE,
86                 false
87             ),
88             mesh_,
89             a_
90         )
91     );
93     return ta;
97 Foam::tmp<Foam::volScalarField>
98 Foam::radiation::constantAbsorptionEmission::eCont() const
100     tmp<volScalarField> te
101     (
102         new volScalarField
103         (
104             IOobject
105             (
106                 "e",
107                 mesh_.time().timeName(),
108                 mesh_,
109                 IOobject::NO_READ,
110                 IOobject::NO_WRITE,
111                 false
112             ),
113             mesh_,
114             e_
115         )
116     );
118     return te;
122 Foam::tmp<Foam::volScalarField>
123 Foam::radiation::constantAbsorptionEmission::ECont() const
125     tmp<volScalarField> tE
126     (
127         new volScalarField
128         (
129             IOobject
130             (
131                 "E",
132                 mesh_.time().timeName(),
133                 mesh_,
134                 IOobject::NO_READ,
135                 IOobject::NO_WRITE,
136                 false
137             ),
138             mesh_,
139             E_
140         )
141     );
143     return tE;
147 // ************************************************************************* //