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

radiationModel.H

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 Namespace
00026     Foam::radiation
00027 
00028 Description
00029     Namespace for radiation modelling
00030 
00031 Class
00032     Foam::radiation::radiationModel
00033 
00034 Description
00035     Top level model for radiation modelling
00036 
00037 SourceFiles
00038     radiationModel.C
00039 
00040 \*---------------------------------------------------------------------------*/
00041 
00042 #ifndef radiationModel_H
00043 #define radiationModel_H
00044 
00045 #include "IOdictionary.H"
00046 #include "autoPtr.H"
00047 #include "runTimeSelectionTables.H"
00048 #include "volFields.H"
00049 #include "basicThermo.H"
00050 #include "fvMatrices.H"
00051 #include "blackBodyEmission.H"
00052 
00053 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00054 
00055 namespace Foam
00056 {
00057 namespace radiation
00058 {
00059 
00060 // Forward declaration of classes
00061 class absorptionEmissionModel;
00062 class scatterModel;
00063 
00064 /*---------------------------------------------------------------------------*\
00065                        Class radiationModel Declaration
00066 \*---------------------------------------------------------------------------*/
00067 
00068 class radiationModel
00069 :
00070     public IOdictionary
00071 {
00072 protected:
00073 
00074     // Protected data
00075 
00076         //- Reference to the mesh database
00077         const fvMesh& mesh_;
00078 
00079         //- Reference to the time database
00080         const Time& time_;
00081 
00082         //- Reference to the temperature field
00083         const volScalarField& T_;
00084 
00085         //- Model specific dictionary input parameters
00086         Switch radiation_;
00087 
00088         //- Radiation model dictionary
00089         dictionary coeffs_;
00090 
00091         //- Radiation solver frequency - number flow solver iterations per
00092         //  radiation solver iteration
00093         label solverFreq_;
00094 
00095 
00096         // References to the radiation sub-models
00097 
00098             //- Absorption/emission model
00099             autoPtr<absorptionEmissionModel> absorptionEmission_;
00100 
00101             //- Scatter model
00102             autoPtr<scatterModel> scatter_;
00103 
00104 
00105 private:
00106 
00107     // Private Member Functions
00108 
00109         //- Disallow default bitwise copy construct
00110         radiationModel(const radiationModel&);
00111 
00112         //- Disallow default bitwise assignment
00113         void operator=(const radiationModel&);
00114 
00115 
00116 public:
00117 
00118     //- Runtime type information
00119     TypeName("radiationModel");
00120 
00121 
00122     // Declare runtime constructor selection table
00123 
00124          declareRunTimeSelectionTable
00125          (
00126              autoPtr,
00127              radiationModel,
00128              dictionary,
00129              (
00130                  const volScalarField& T
00131              ),
00132              (T)
00133          );
00134 
00135 
00136     // Constructors
00137 
00138         //- Null constructor
00139         radiationModel(const volScalarField& T);
00140 
00141         //- Construct from components
00142         radiationModel(const word& type, const volScalarField& T);
00143 
00144 
00145     // Selectors
00146 
00147          //- Return a reference to the selected radiation model
00148          static autoPtr<radiationModel> New(const volScalarField& T);
00149 
00150 
00151     //- Destructor
00152     virtual ~radiationModel();
00153 
00154 
00155     // Member Functions
00156 
00157         // Edit
00158 
00159             //- Main update/correction routine
00160             virtual void correct();
00161 
00162             //- Solve radiation equation(s)
00163             virtual void calculate() = 0;
00164 
00165             //- Read radiationProperties dictionary
00166             virtual bool read() = 0;
00167 
00168 
00169         // Access
00170 
00171             //- Source term component (for power of T^4)
00172             virtual tmp<volScalarField> Rp() const = 0;
00173 
00174             //- Source term component (constant)
00175             virtual tmp<DimensionedField<scalar, volMesh> > Ru() const = 0;
00176 
00177             //- Enthalpy source term
00178             virtual tmp<fvScalarMatrix> Sh(basicThermo& thermo) const;
00179 };
00180 
00181 
00182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00183 
00184 } // End namespace radiation
00185 } // End namespace Foam
00186 
00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00188 
00189 #endif
00190 
00191 // ************************************************************************* //
00192 
Copyright © 2000-2009 OpenCFD Ltd