FreeFOAM The Cross-Platform CFD Toolkit
blackBodyEmission.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::radiation::blackBodyEmission
26 
27 Description
28  Class black body emission
29 
30  Table of black body emissive power taken from:
31  Modest, "Radiative Heat Transfer", pp.775-777, 1993
32 
33 SourceFiles
34  blackBodyEmission.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef blackModyEmission_H
39 #define blackModyEmission_H
40 
41 #include <finiteVolume/volFields.H>
46 #include <OpenFOAM/Vector2D_.H>
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 namespace radiation
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class blackBodyEmission Declaration
57 \*---------------------------------------------------------------------------*/
58 
60 {
61 public:
62 
63  //- Static table of black body emissive power
65 
66 
67 private:
68 
69  // Private data
70 
71  //- Interpolation table of black body emissive power
72  mutable interpolationTable<scalar> table_;
73 
74  //- Constant C1
75  const dimensionedScalar C1_;
76 
77  //- Constant C2
78  const dimensionedScalar C2_;
79 
80  // Ptr List for black body emission energy field for each wavelength
81  PtrList<volScalarField> bLambda_;
82 
83  // Reference to the temperature field
84  const volScalarField& T_;
85 
86 
87  // Private member functions
88 
89  scalar fLambdaT(const scalar lambdaT) const;
90 
91 
92 public:
93 
94  // Constructors
95 
96  //- Construct from components
98  (
99  const label nLambda,
100  const volScalarField& T
101  );
102 
103 
104  // Destructor
106 
107 
108  // Member functions
109 
110  // Access
111 
112  //- Black body spectrum
113  inline const volScalarField& bLambda(const label lambdaI) const
114  {
115  return bLambda_[lambdaI];
116  }
117 
118  //- Spectral emission for the black body at T and lambda
120  (
121  const dimensionedScalar& T,
122  const scalar lambda
123  ) const
124  {
125  return (C1_/(pow5(lambda)*(exp(C2_/(lambda*T)) - 1.0)));
126  }
127 
128  //- Integral energy at T from lambda1 to lambda2
130  (
131  const volScalarField& T,
132  const Vector2D<scalar>& band
133  ) const;
134 
135 
136  // Edit
137 
138  // Update black body emission
139  void correct(const label lambdaI, const Vector2D<scalar>& band);
140 };
141 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace Foam
146 } // End namespace radiation
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************ vim: set sw=4 sts=4 et: ************************ //