FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 \*---------------------------------------------------------------------------*/
00025 
00026 #include "constantAbsorptionEmission.H"
00027 #include <OpenFOAM/addToRunTimeSelectionTable.H>
00028 
00029 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
00030 
00031 namespace Foam
00032 {
00033     namespace radiation
00034     {
00035         defineTypeNameAndDebug(constantAbsorptionEmission, 0);
00036 
00037         addToRunTimeSelectionTable
00038         (
00039             absorptionEmissionModel,
00040             constantAbsorptionEmission,
00041             dictionary
00042         );
00043     }
00044 }
00045 
00046 
00047 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00048 
00049 Foam::radiation::constantAbsorptionEmission::constantAbsorptionEmission
00050 (
00051     const dictionary& dict,
00052     const fvMesh& mesh
00053 )
00054 :
00055     absorptionEmissionModel(dict, mesh),
00056     coeffsDict_(dict.subDict(typeName + "Coeffs")),
00057     a_(coeffsDict_.lookup("a")),
00058     e_(coeffsDict_.lookup("e")),
00059     E_(coeffsDict_.lookup("E"))
00060 {}
00061 
00062 
00063 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
00064 
00065 Foam::radiation::constantAbsorptionEmission::~constantAbsorptionEmission()
00066 {}
00067 
00068 
00069 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00070 
00071 Foam::tmp<Foam::volScalarField>
00072 Foam::radiation::constantAbsorptionEmission::aCont(const label bandI) const
00073 {
00074     tmp<volScalarField> ta
00075     (
00076         new volScalarField
00077         (
00078             IOobject
00079             (
00080                 "a",
00081                 mesh_.time().timeName(),
00082                 mesh_,
00083                 IOobject::NO_READ,
00084                 IOobject::NO_WRITE,
00085                 false
00086             ),
00087             mesh_,
00088             a_
00089         )
00090     );
00091 
00092     return ta;
00093 }
00094 
00095 
00096 Foam::tmp<Foam::volScalarField>
00097 Foam::radiation::constantAbsorptionEmission::eCont(const label bandI) const
00098 {
00099     tmp<volScalarField> te
00100     (
00101         new volScalarField
00102         (
00103             IOobject
00104             (
00105                 "e",
00106                 mesh_.time().timeName(),
00107                 mesh_,
00108                 IOobject::NO_READ,
00109                 IOobject::NO_WRITE,
00110                 false
00111             ),
00112             mesh_,
00113             e_
00114         )
00115     );
00116 
00117     return te;
00118 }
00119 
00120 
00121 Foam::tmp<Foam::volScalarField>
00122 Foam::radiation::constantAbsorptionEmission::ECont(const label bandI) const
00123 {
00124     tmp<volScalarField> tE
00125     (
00126         new volScalarField
00127         (
00128             IOobject
00129             (
00130                 "E",
00131                 mesh_.time().timeName(),
00132                 mesh_,
00133                 IOobject::NO_READ,
00134                 IOobject::NO_WRITE,
00135                 false
00136             ),
00137             mesh_,
00138             E_
00139         )
00140     );
00141 
00142     return tE;
00143 }
00144 
00145 
00146 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines