FreeFOAM The Cross-Platform CFD Toolkit
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 | Copyright (C) 1991-2010 OpenCFD Ltd.
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 \*---------------------------------------------------------------------------*/
25 
27 
28 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
32  namespace radiation
33  {
34  defineTypeNameAndDebug(absorptionEmissionModel, 0);
35  defineRunTimeSelectionTable(absorptionEmissionModel, dictionary);
36  }
37 }
38 
39 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40 
42 (
43  const dictionary& dict,
44  const fvMesh& mesh
45 )
46 :
47  dict_(dict),
48  mesh_(mesh)
49 {}
50 
51 
52 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
53 
55 {}
56 
57 
58 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
59 
62 {
63  return aDisp(bandI) + aCont(bandI);
64 }
65 
66 
69 {
70  return tmp<volScalarField>
71  (
72  new volScalarField
73  (
74  IOobject
75  (
76  "aCont",
77  mesh_.time().timeName(),
78  mesh_,
81  false
82  ),
83  mesh_,
84  dimensionedScalar("zero", dimless/dimLength, 0.0)
85  )
86  );
87 }
88 
89 
92 {
93  return tmp<volScalarField>
94  (
95  new volScalarField
96  (
97  IOobject
98  (
99  "aDisp",
100  mesh_.time().timeName(),
101  mesh_,
104  false
105  ),
106  mesh_,
107  dimensionedScalar("zero", dimless/dimLength, 0.0)
108  )
109  );
110 }
111 
112 
115 {
116  return eDisp(bandI) + eCont(bandI);
117 }
118 
119 
122 {
123  return tmp<volScalarField>
124  (
125  new volScalarField
126  (
127  IOobject
128  (
129  "eCont",
130  mesh_.time().timeName(),
131  mesh_,
134  false
135  ),
136  mesh_,
137  dimensionedScalar("zero", dimless/dimLength, 0.0)
138  )
139  );
140 }
141 
142 
145 {
146  return tmp<volScalarField>
147  (
148  new volScalarField
149  (
150  IOobject
151  (
152  "eDisp",
153  mesh_.time().timeName(),
154  mesh_,
157  false
158  ),
159  mesh_,
160  dimensionedScalar("zero", dimless/dimLength, 0.0)
161  )
162  );
163 }
164 
165 
168 {
169  return EDisp(bandI) + ECont(bandI);
170 }
171 
172 
175 {
176  return tmp<volScalarField>
177  (
178  new volScalarField
179  (
180  IOobject
181  (
182  "ECont",
183  mesh_.time().timeName(),
184  mesh_,
187  false
188  ),
189  mesh_,
191  )
192  );
193 }
194 
195 
198 {
199  return tmp<volScalarField>
200  (
201  new volScalarField
202  (
203  IOobject
204  (
205  "EDisp",
206  mesh_.time().timeName(),
207  mesh_,
210  false
211  ),
212  mesh_,
214  )
215  );
216 }
217 
218 
220 {
221  return pTraits<label>::one;
222 }
223 
224 
227 {
228  return Vector2D<scalar>::one;
229 }
230 
231 
233 {
234  return false;
235 }
236 
237 
240 (
241  const label rayI,
242  const volScalarField& ILambda
243 ) const
244 {
245  return ILambda;
246 }
247 
248 
250 (
251  volScalarField& a,
253 ) const
254 {
255  a.internalField() = this->a();
256  aj[0].internalField() = a.internalField();
257 }
258 
259 
260 // ************************ vim: set sw=4 sts=4 et: ************************ //