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) 2011-2016 OpenFOAM Foundation
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 "volFields.H"
42 #include "dimensionedScalar.H"
43 #include "interpolationTable.H"
44 #include "Vector2D.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace radiation
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class blackBodyEmission Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 {
59 public:
60 
61  //- Static table of black body emissive power
63 
64 
65 private:
66 
67  // Private data
68 
69  //- Interpolation table of black body emissive power
70  mutable interpolationTable<scalar> table_;
71 
72  //- Constant C1
73  const dimensionedScalar C1_;
74 
75  //- Constant C2
76  const dimensionedScalar C2_;
77 
78  // Ptr List for black body emission energy field for each wavelength
79  PtrList<volScalarField> bLambda_;
80 
81  // Reference to the temperature field
82  const volScalarField& T_;
83 
84 
85  // Private Member Functions
86 
87  scalar fLambdaT(const scalar lambdaT) const;
88 
89 
90 public:
91 
92  // Constructors
93 
94  //- Construct from components
96  (
97  const label nLambda,
98  const volScalarField& T
99  );
100 
101 
102  //- Destructor
104 
105 
106  // Member functions
107 
108  // Access
109 
110  //- Black body spectrum
111  inline const volScalarField& bLambda(const label lambdaI) const
112  {
113  return bLambda_[lambdaI];
114  }
115 
116  //- Spectral emission for the black body at T and lambda
118  (
119  const dimensionedScalar& T,
120  const scalar lambda
121  ) const
122  {
123  return (C1_/(pow5(lambda)*(exp(C2_/(lambda*T)) - 1.0)));
124  }
125 
126  //- Integral energy at T from lambda1 to lambda2
128  (
129  const volScalarField& T,
130  const Vector2D<scalar>& band
131  ) const;
132 
133 
134  // Edit
135 
136  // Update black body emission
137  void correct(const label lambdaI, const Vector2D<scalar>& band);
138 };
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace Foam
144 } // End namespace radiation
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
Class black body emission.
static const List< Tuple2< scalar, scalar > > emissivePowerTable
Static table of black body emissive power.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:60
void correct(const label lambdaI, const Vector2D< scalar > &band)
dimensionedScalar pow5(const dimensionedScalar &ds)
blackBodyEmission(const label nLambda, const volScalarField &T)
Construct from components.
dimensionedScalar exp(const dimensionedScalar &ds)
tmp< Foam::volScalarField > EbDeltaLambdaT(const volScalarField &T, const Vector2D< scalar > &band) const
Integral energy at T from lambda1 to lambda2.
dimensionedScalar EblambdaT(const dimensionedScalar &T, const scalar lambda) const
Spectral emission for the black body at T and lambda.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const volScalarField & bLambda(const label lambdaI) const
Black body spectrum.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:63
dimensionedScalar lambda(laminarTransport.lookup("lambda"))
A class for managing temporary objects.
Definition: PtrList.H:53
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.