absorptionEmissionModel.C
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-2015 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 \*---------------------------------------------------------------------------*/
27 
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34  namespace radiation
35  {
36  defineTypeNameAndDebug(absorptionEmissionModel, 0);
38  }
39 }
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 (
45  const dictionary& dict,
46  const fvMesh& mesh
47 )
48 :
49  dict_(dict),
50  mesh_(mesh)
51 {}
52 
53 
54 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
55 
57 {}
58 
59 
60 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
61 
64 {
65  return aDisp(bandI) + aCont(bandI);
66 }
67 
68 
71 {
72  return volScalarField::New
73  (
74  "aCont",
76  mesh_,
78  );
79 }
80 
81 
84 {
85  return volScalarField::New
86  (
87  "aDisp",
89  mesh_,
91  );
92 }
93 
94 
97 {
98  return eDisp(bandI) + eCont(bandI);
99 }
100 
101 
104 {
105  return volScalarField::New
106  (
107  "eCont",
109  mesh_,
111  );
112 }
113 
114 
117 {
118  return volScalarField::New
119  (
120  "eDisp",
122  mesh_,
124  );
125 }
126 
127 
130 {
131  return EDisp(bandI) + ECont(bandI);
132 }
133 
134 
137 {
138  return volScalarField::New
139  (
140  "ECont",
142  mesh_,
144  );
145 }
146 
147 
150 {
151  return volScalarField::New
152  (
153  "EDisp",
155  mesh_,
157  );
158 }
159 
160 
162 {
163  return pTraits<label>::one;
164 }
165 
166 
169 {
170  return Vector2D<scalar>::one;
171 }
172 
173 
175 {
176  return false;
177 }
178 
179 
181 (
182  volScalarField& a,
184 ) const
185 {
186  a = this->a();
187  aj[0] = a;
188 }
189 
190 
191 // ************************************************************************* //
virtual tmp< volScalarField > EDisp(const label bandI=0) const
Emission contribution for dispersed phase.
dictionary dict
virtual label nBands() const
Const access to the number of bands - defaults to 1 for grey.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual tmp< volScalarField > eDisp(const label bandI=0) const
Return emission coefficient for dispersed phase.
defineTypeNameAndDebug(cloudAbsorptionEmission, 0)
A traits class, which is primarily used for primitives and vector-space.
Definition: pTraits.H:75
virtual tmp< volScalarField > aDisp(const label bandI=0) const
Absorption coefficient for dispersed phase.
virtual tmp< volScalarField > ECont(const label bandI=0) const
Emission contribution for continuous phase.
const dimensionSet dimless
Dimensionless.
Model to supply absorption and emission coefficients for radiation modelling.
virtual bool isGrey() const
Flag for whether the absorption/emission is for a grey gas.
defineRunTimeSelectionTable(radiationModel, T)
virtual const Vector2D< scalar > & bands(const label n) const
Const access to the bands - defaults to Vector2D::one for grey.
absorptionEmissionModel(const dictionary &dict, const fvMesh &mesh)
Construct from components.
dynamicFvMesh & mesh
virtual tmp< volScalarField > a(const label bandI=0) const
Absorption coefficient (net)
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
virtual void correct(volScalarField &a, PtrList< volScalarField > &aj) const
Correct absorption coefficients.
dimensionedScalar pow3(const dimensionedScalar &ds)
virtual tmp< volScalarField > e(const label bandI=0) const
Emission coefficient (net)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:50
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition: List.H:55
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
label n
virtual tmp< volScalarField > aCont(const label bandI=0) const
Absorption coefficient for continuous phase.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Templated 2D Vector derived from VectorSpace adding construction from 2 components, element access using x() and y() member functions and the inner-product (dot-product).
Definition: Vector2D.H:51
Do not request registration (bool: false)
virtual tmp< volScalarField > eCont(const label bandI=0) const
Return emission coefficient for continuous phase.
virtual tmp< volScalarField > E(const label bandI=0) const
Emission contribution (net)
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127