00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 2008-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 Class 00025 Foam::radiation::blackBodyEmission 00026 00027 Description 00028 Class black body emission 00029 00030 Table of black body emissive power taken from: 00031 Modest, "Radiative Heat Transfer", pp.775-777, 1993 00032 00033 SourceFiles 00034 blackBodyEmission.C 00035 00036 \*---------------------------------------------------------------------------*/ 00037 00038 #ifndef blackModyEmission_H 00039 #define blackModyEmission_H 00040 00041 #include <finiteVolume/volFields.H> 00042 #include <OpenFOAM/dimensionedScalar.H> 00043 #include <OpenFOAM/mathematicalConstants.H> 00044 #include <radiation/radiationConstants.H> 00045 #include <OpenFOAM/interpolationTable.H> 00046 #include <OpenFOAM/Vector2D_.H> 00047 00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00049 00050 namespace Foam 00051 { 00052 namespace radiation 00053 { 00054 00055 /*---------------------------------------------------------------------------*\ 00056 Class blackBodyEmission Declaration 00057 \*---------------------------------------------------------------------------*/ 00058 00059 class blackBodyEmission 00060 { 00061 public: 00062 00063 //- Static table of black body emissive power 00064 static const List<Tuple2<scalar, scalar> > emissivePowerTable; 00065 00066 00067 private: 00068 00069 // Private data 00070 00071 //- Interpolation table of black body emissive power 00072 mutable interpolationTable<scalar> table_; 00073 00074 //- Constant C1 00075 const dimensionedScalar C1_; 00076 00077 //- Constant C2 00078 const dimensionedScalar C2_; 00079 00080 // Ptr List for black body emission energy field for each wavelength 00081 PtrList<volScalarField> bLambda_; 00082 00083 // Reference to the temperature field 00084 const volScalarField& T_; 00085 00086 00087 // Private member functions 00088 00089 scalar fLambdaT(const scalar lambdaT) const; 00090 00091 00092 public: 00093 00094 // Constructors 00095 00096 //- Construct from components 00097 blackBodyEmission 00098 ( 00099 const label nLambda, 00100 const volScalarField& T 00101 ); 00102 00103 00104 // Destructor 00105 ~blackBodyEmission(); 00106 00107 00108 // Member functions 00109 00110 // Access 00111 00112 //- Black body spectrum 00113 inline const volScalarField& bLambda(const label lambdaI) const 00114 { 00115 return bLambda_[lambdaI]; 00116 } 00117 00118 //- Spectral emission for the black body at T and lambda 00119 inline dimensionedScalar EblambdaT 00120 ( 00121 const dimensionedScalar& T, 00122 const scalar lambda 00123 ) const 00124 { 00125 return (C1_/(pow5(lambda)*(exp(C2_/(lambda*T)) - 1.0))); 00126 } 00127 00128 //- Integral energy at T from lambda1 to lambda2 00129 tmp<Foam::volScalarField> EbDeltaLambdaT 00130 ( 00131 const volScalarField& T, 00132 const Vector2D<scalar>& band 00133 ) const; 00134 00135 00136 // Edit 00137 00138 // Update black body emission 00139 void correct(const label lambdaI, const Vector2D<scalar>& band); 00140 }; 00141 00142 00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00144 00145 } // End namespace Foam 00146 } // End namespace radiation 00147 00148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00149 00150 #endif 00151 00152 // ************************ vim: set sw=4 sts=4 et: ************************ //