OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

constantAbsorptionEmission.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 \*---------------------------------------------------------------------------*/
00026 
00027 #include "constantAbsorptionEmission.H"
00028 #include "addToRunTimeSelectionTable.H"
00029 
00030 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
00031 
00032 namespace Foam
00033 {
00034     namespace radiation
00035     {
00036         defineTypeNameAndDebug(constantAbsorptionEmission, 0);
00037 
00038         addToRunTimeSelectionTable
00039         (
00040             absorptionEmissionModel,
00041             constantAbsorptionEmission,
00042             dictionary
00043         );
00044     }
00045 }
00046 
00047 
00048 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00049 
00050 Foam::radiation::constantAbsorptionEmission::constantAbsorptionEmission
00051 (
00052     const dictionary& dict,
00053     const fvMesh& mesh
00054 )
00055 :
00056     absorptionEmissionModel(dict, mesh),
00057     coeffsDict_(dict.subDict(typeName + "Coeffs")),
00058     a_(coeffsDict_.lookup("a")),
00059     e_(coeffsDict_.lookup("e")),
00060     E_(coeffsDict_.lookup("E"))
00061 {}
00062 
00063 
00064 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
00065 
00066 Foam::radiation::constantAbsorptionEmission::~constantAbsorptionEmission()
00067 {}
00068 
00069 
00070 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00071 
00072 Foam::tmp<Foam::volScalarField>
00073 Foam::radiation::constantAbsorptionEmission::aCont(const label bandI) const
00074 {
00075     tmp<volScalarField> ta
00076     (
00077         new volScalarField
00078         (
00079             IOobject
00080             (
00081                 "a",
00082                 mesh_.time().timeName(),
00083                 mesh_,
00084                 IOobject::NO_READ,
00085                 IOobject::NO_WRITE,
00086                 false
00087             ),
00088             mesh_,
00089             a_
00090         )
00091     );
00092 
00093     return ta;
00094 }
00095 
00096 
00097 Foam::tmp<Foam::volScalarField>
00098 Foam::radiation::constantAbsorptionEmission::eCont(const label bandI) const
00099 {
00100     tmp<volScalarField> te
00101     (
00102         new volScalarField
00103         (
00104             IOobject
00105             (
00106                 "e",
00107                 mesh_.time().timeName(),
00108                 mesh_,
00109                 IOobject::NO_READ,
00110                 IOobject::NO_WRITE,
00111                 false
00112             ),
00113             mesh_,
00114             e_
00115         )
00116     );
00117 
00118     return te;
00119 }
00120 
00121 
00122 Foam::tmp<Foam::volScalarField>
00123 Foam::radiation::constantAbsorptionEmission::ECont(const label bandI) const
00124 {
00125     tmp<volScalarField> tE
00126     (
00127         new volScalarField
00128         (
00129             IOobject
00130             (
00131                 "E",
00132                 mesh_.time().timeName(),
00133                 mesh_,
00134                 IOobject::NO_READ,
00135                 IOobject::NO_WRITE,
00136                 false
00137             ),
00138             mesh_,
00139             E_
00140         )
00141     );
00142 
00143     return tE;
00144 }
00145 
00146 
00147 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd