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

fvDOM.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) 2008-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 Class
00026     Foam::radiation::fvDOM
00027 
00028 Description
00029 
00030     Finite Volume Discrete Ordinates Method. Solves the RTE equation for n
00031     directions in a participating media, not including scatter.
00032 
00033     Available absorption models:
00034         greyMeanAbsoprtionEmission
00035         wideBandAbsorptionEmission
00036 
00037     i.e. dictionary
00038     fvDOMCoeffs
00039     {
00040         nPhi    1;          // azimuthal angles in PI/2 on X-Y.(from Y to X)
00041         nTheta  2;          // polar angles in PI (from Z to X-Y plane)
00042         convergence 1e-4;   // convergence criteria for radiation iteration
00043     }
00044 
00045     solverFreq   1; // Number of flow iterations per radiation iteration
00046 
00047     The total number of solid angles is  4*nPhi*nTheta.
00048 
00049     In 1D the direction of the rays is X (nPhi and nTheta are ignored)
00050     In 2D the direction of the rays is on X-Y plane (only nPhi is considered)
00051     In 3D (nPhi and nTheta are considered)
00052 
00053 SourceFiles
00054     fvDOM.C
00055 
00056 \*---------------------------------------------------------------------------*/
00057 
00058 #ifndef radiationModelfvDOM_H
00059 #define radiationModelfvDOM_H
00060 
00061 #include "radiativeIntensityRay.H"
00062 #include "radiationModel.H"
00063 
00064 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00065 
00066 namespace Foam
00067 {
00068 namespace radiation
00069 {
00070 
00071 /*---------------------------------------------------------------------------*\
00072                            Class fvDOM Declaration
00073 \*---------------------------------------------------------------------------*/
00074 
00075 class fvDOM
00076 :
00077     public radiationModel
00078 {
00079     // Private data
00080 
00081         //- Incident radiation  [W/m2]
00082         volScalarField G_;
00083 
00084         //- Total radiative heat flux [W/m2]
00085         volScalarField Qr_;
00086 
00087         //- Total absorption coefficient [1/m]
00088         volScalarField a_;
00089 
00090         //- Total emission coefficient [1/m]
00091         volScalarField e_;
00092 
00093         //- Emission contribution [Kg/m/s^3]
00094         volScalarField E_;
00095 
00096         //- Number of solid angles in theta
00097         label nTheta_;
00098 
00099         //- Number of solid angles in phi
00100         label nPhi_ ;
00101 
00102         //- Total number of rays (1 per direction)
00103         label nRay_;
00104 
00105         //- Number of wavelength bands
00106         label nLambda_;
00107 
00108         //- Wavelength total absorption coefficient [1/m]
00109         PtrList<volScalarField> aLambda_;
00110 
00111         //- Black body
00112         blackBodyEmission blackBody_;
00113 
00114         //- List of pointers to radiative intensity rays
00115         PtrList<radiativeIntensityRay> IRay_;
00116 
00117         //- Convergence criterion
00118         scalar convergence_;
00119 
00120         //- Maximum number of iterations
00121         scalar maxIter_;
00122 
00123 
00124     // Private member functions
00125 
00126         //- Disallow default bitwise copy construct
00127         fvDOM(const fvDOM&);
00128 
00129         //- Disallow default bitwise assignment
00130         void operator=(const fvDOM&);
00131 
00132         //- Update nlack body emission
00133         void updateBlackBodyEmission();
00134 
00135 
00136 public:
00137 
00138     //- Runtime type information
00139     TypeName("fvDOM");
00140 
00141 
00142     // Constructors
00143 
00144         //- Construct from components
00145         fvDOM(const volScalarField& T);
00146 
00147 
00148     //- Destructor
00149     virtual ~fvDOM();
00150 
00151 
00152     // Member functions
00153 
00154         // Edit
00155 
00156             //- Solve radiation equation(s)
00157             void calculate();
00158 
00159             //- Read radiation properties dictionary
00160             bool read();
00161 
00162             //- Update G and calculate total heat flux on boundary
00163             void updateG();
00164 
00165             //- Set the rayId and lambdaId from by decomposing an intensity
00166             //  field name
00167             void setRayIdLambdaId
00168             (
00169                 const word& name,
00170                 label& rayId,
00171                 label& lambdaId
00172             ) const;
00173 
00174             //- Source term component (for power of T^4)
00175             virtual tmp<volScalarField> Rp() const;
00176 
00177             //- Source term component (constant)
00178             virtual tmp<DimensionedField<scalar, volMesh> > Ru() const;
00179 
00180 
00181         // Access
00182 
00183             //- Ray intensity for rayI
00184             inline const radiativeIntensityRay& IRay(const label rayI) const;
00185 
00186             //- Ray intensity for rayI and lambda bandwidth
00187             inline const volScalarField& IRayLambda
00188             (
00189                 const label rayI,
00190                 const label lambdaI
00191             ) const;
00192 
00193             //- Number of angles in theta
00194             inline label nTheta() const;
00195 
00196             //- Number of angles in phi
00197             inline label nPhi() const;
00198 
00199             //- Number of rays
00200             inline label nRay() const;
00201 
00202             //- Number of wavelengths
00203             inline label nLambda() const;
00204 
00205             //- Const access to total absorption coefficient
00206             inline const volScalarField& a() const;
00207 
00208             //- Const access to wavelength total absorption coefficient
00209             inline const volScalarField& aLambda(const label lambdaI) const;
00210 
00211             //- Const access to incident radiation field
00212             inline const volScalarField& G() const;
00213 
00214             //- Const access to total radiative heat flux field
00215             inline const volScalarField& Qr() const;
00216 
00217             //- Const access to black body
00218             inline const blackBodyEmission& blackBody() const;
00219 };
00220 
00221 
00222 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00223 
00224 #include "fvDOMI.H"
00225 
00226 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00227 
00228 } // End namespace radiation
00229 } // End namespace Foam
00230 
00231 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00232 
00233 #endif
00234 
00235 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd