blackBodyEmission.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 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::radiationModels::blackBodyEmission
26 
27 Description
28  Class black body emission
29 
30  Table of black body emissive power from:
31  Modest, "Radiative Heat Transfer", pp.775-777, 1993
32 
33 SourceFiles
34  blackBodyEmission.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef blackBodyEmission_H
39 #define blackBodyEmission_H
40 
41 #include "volFields.H"
42 #include "dimensionedScalar.H"
43 #include "Table.H"
44 #include "Vector2D.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace radiationModels
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 Function1s::Table<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  //- Proportion of total energy at T from lambda1 to lambda2
128  (
129  const volScalarField& T,
130  const Vector2D<scalar>& band
131  ) const;
132 
133  //- Integral energy at T from lambda1 to lambda2
135  (
136  const volScalarField& T,
137  const Vector2D<scalar>& band
138  ) const;
139 
140  // Edit
141 
142  // Update black body emission
143  void correct(const label lambdaI, const Vector2D<scalar>& band);
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
150 } // End namespace radiationModels
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
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
dimensionedScalar lambda(laminarTransport.lookup("lambda"))
tmp< Foam::volScalarField > deltaLambdaT(const volScalarField &T, const Vector2D< scalar > &band) const
Proportion of total energy at T from lambda1 to lambda2.
const volScalarField & bLambda(const label lambdaI) const
Black body spectrum.
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
dimensionedScalar pow5(const dimensionedScalar &ds)
void correct(const label lambdaI, const Vector2D< scalar > &band)
dimensionedScalar exp(const dimensionedScalar &ds)
blackBodyEmission(const label nLambda, const volScalarField &T)
Construct from components.
static const List< Tuple2< scalar, scalar > > emissivePowerTable
Static table of black body emissive power.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
A class for managing temporary objects.
Definition: PtrList.H:53
tmp< Foam::volScalarField > EbDeltaLambdaT(const volScalarField &T, const Vector2D< scalar > &band) const
Integral energy at T from lambda1 to lambda2.
Namespace for OpenFOAM.
dimensionedScalar EblambdaT(const dimensionedScalar &T, const scalar lambda) const
Spectral emission for the black body at T and lambda.