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  (
131  const volScalarField& T,
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 // ************************************************************************* //
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:237
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
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:119
interpolationTable.H
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:261
Foam::Vector2D< scalar >
Foam::radiation::blackBodyEmission::blackBodyEmission
blackBodyEmission(const label nLambda, const volScalarField &T)
Construct from components.
Definition: blackBodyEmission.C:141
Vector2D.H
Foam::radiation::blackBodyEmission::correct
void correct(const label lambdaI, const Vector2D< scalar > &band)
Definition: blackBodyEmission.C:293
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:62
Foam::radiation::blackBodyEmission::bLambda
const volScalarField & bLambda(const label lambdaI) const
Black body spectrum.
Definition: blackBodyEmission.H:112
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Foam::pow5
dimensionedScalar pow5(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:111
lambda
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
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: BitOps.H:63
Foam::radiation::blackBodyEmission::emissivePowerTable
static const List< Tuple2< scalar, scalar > > emissivePowerTable
Static table of black body emissive power.
Definition: blackBodyEmission.H:63
Foam::radiation::blackBodyEmission::~blackBodyEmission
~blackBodyEmission()
Destructor.
Definition: blackBodyEmission.C:182
Foam::interpolationTable< scalar >
Foam::radiation::blackBodyEmission
Class black body emission.
Definition: blackBodyEmission.H:58
Foam::radiation::blackBodyEmission::deltaLambdaT
tmp< Foam::volScalarField > deltaLambdaT(const volScalarField &T, const Vector2D< scalar > &band) const
Proportion of total energy at T from lambda1 to lambda2.
Definition: blackBodyEmission.C:199
Foam::GeometricField< scalar, fvPatchField, volMesh >