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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2018 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::radiation::blackBodyEmission
28 
29 Description
30  Class black body emission
31 
32  Table of black body emissive power from:
33  Modest, "Radiative Heat Transfer", pp.775-777, 1993
34 
35 SourceFiles
36  blackBodyEmission.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef radiation_blackBodyEmission_H
41 #define radiation_blackBodyEmission_H
42 
43 #include "volFields.H"
44 #include "dimensionedScalar.H"
45 #include "interpolationTable.H"
46 #include "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  //- Proportion of total energy at T from lambda1 to lambda2
130  (
132  const Vector2D<scalar>& band
133  ) const;
134 
135  //- Integral energy at T from lambda1 to lambda2
137  (
138  const volScalarField& T,
139  const Vector2D<scalar>& band
140  ) const;
141 
142  // Edit
143 
144  // Update black body emission
145  void correct(const label lambdaI, const Vector2D<scalar>& band);
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace Foam
152 } // End namespace radiation
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 #endif
157 
158 // ************************************************************************* //
Class black body emission.
static const List< Tuple2< scalar, scalar > > emissivePowerTable
Static table of black body emissive power.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: BitOps.H:56
void correct(const label lambdaI, const Vector2D< scalar > &band)
tmp< Foam::volScalarField > deltaLambdaT(const volScalarField &T, const Vector2D< scalar > &band) const
Proportion of total energy at T from lambda1 to lambda2.
dimensionedScalar pow5(const dimensionedScalar &ds)
blackBodyEmission(const label nLambda, const volScalarField &T)
Construct from components.
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
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 list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition: List.H:55
A class for managing temporary objects.
Definition: HashPtrTable.H:50
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.