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