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-2015 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
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
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 // ************************************************************************* //
volFields.H
Foam::radiation::blackBodyEmission::EbDeltaLambdaT
tmp< Foam::volScalarField > EbDeltaLambdaT(const volScalarField &T, const Vector2D< scalar > &band) const
Integral energy at T from lambda1 to lambda2.
Definition: blackBodyEmission.C:202
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::radiation::blackBodyEmission::EblambdaT
dimensionedScalar EblambdaT(const dimensionedScalar &T, const scalar lambda) const
Spectral emission for the black body at T and lambda.
Definition: blackBodyEmission.H:117
interpolationTable.H
Foam::radiation::blackBodyEmission::fLambdaT
scalar fLambdaT(const scalar lambdaT) const
Definition: blackBodyEmission.C:192
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:252
Foam::Vector2D< scalar >
Foam::radiation::blackBodyEmission::blackBodyEmission
blackBodyEmission(const label nLambda, const volScalarField &T)
Construct from components.
Definition: blackBodyEmission.C:144
Foam::radiation::blackBodyEmission::C1_
const dimensionedScalar C1_
Constant C1.
Definition: blackBodyEmission.H:72
Foam::radiation::blackBodyEmission::T_
const volScalarField & T_
Definition: blackBodyEmission.H:81
Foam::label
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
Vector2D.H
Foam::radiation::blackBodyEmission::bLambda_
PtrList< volScalarField > bLambda_
Definition: blackBodyEmission.H:78
Foam::radiation::blackBodyEmission::correct
void correct(const label lambdaI, const Vector2D< scalar > &band)
Definition: blackBodyEmission.C:248
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
Foam::PtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:61
Foam::radiation::blackBodyEmission::bLambda
const volScalarField & bLambda(const label lambdaI) const
Black body spectrum.
Definition: blackBodyEmission.H:110
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Foam::pow5
dimensionedScalar pow5(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:109
Foam::radiation::blackBodyEmission::C2_
const dimensionedScalar C2_
Constant C2.
Definition: blackBodyEmission.H:75
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
dimensionedScalar.H
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::radiation::blackBodyEmission::emissivePowerTable
static const List< Tuple2< scalar, scalar > > emissivePowerTable
Static table of black body emissive power.
Definition: blackBodyEmission.H:61
Foam::radiation::blackBodyEmission::~blackBodyEmission
~blackBodyEmission()
Destructor.
Definition: blackBodyEmission.C:185
Foam::interpolationTable< scalar >
Foam::radiation::blackBodyEmission
Class black body emission.
Definition: blackBodyEmission.H:56
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
lambda
dimensionedScalar lambda(laminarTransport.lookup("lambda"))
Foam::radiation::blackBodyEmission::table_
interpolationTable< scalar > table_
Interpolation table of black body emissive power.
Definition: blackBodyEmission.H:69