noRadiation.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) 2011-2016 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 \*---------------------------------------------------------------------------*/
25 
26 #include "noRadiation.H"
28 #include "fvMesh.H"
29 #include "Time.H"
30 #include "volFields.H"
32 
33 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37  namespace radiation
38  {
39  defineTypeNameAndDebug(noRadiation, 0);
41  }
42 }
43 
44 
45 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
46 
47 Foam::radiation::noRadiation::noRadiation(const volScalarField& T)
48 :
50 {}
51 
52 
53 Foam::radiation::noRadiation::noRadiation
54 (
55  const dictionary& dict,
56  const volScalarField& T
57 )
58 :
60 {}
61 
62 
63 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
64 
66 {}
67 
68 
69 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
70 
72 {
73  return radiationModel::read();
74 }
75 
76 
78 {}
79 
80 
82 {
83  return tmp<volScalarField>
84  (
85  new volScalarField
86  (
87  IOobject
88  (
89  "Rp",
90  mesh_.time().timeName(),
91  mesh_,
94  ),
95  mesh_,
97  (
98  "Rp",
100  0.0
101  )
102  )
103  );
104 }
105 
106 
109 {
111  (
113  (
114  IOobject
115  (
116  "Ru",
117  mesh_.time().timeName(),
118  mesh_,
121  ),
122  mesh_,
124  (
125  "Ru", dimMass/dimLength/pow3(dimTime), 0.0
126  )
127  )
128  );
129 }
130 
131 
132 // ************************************************************************* //
addToRadiationRunTimeSelectionTables(fvDOM)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
bool read()
Read radiationProperties dictionary.
Definition: noRadiation.C:71
void calculate()
Solve radiation equation(s)
Definition: noRadiation.C:77
defineTypeNameAndDebug(cloudAbsorptionEmission, 0)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
virtual ~noRadiation()
Destructor.
Definition: noRadiation.C:65
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Definition: Time.C:644
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:243
DimensionedField< scalar, volMesh > Internal
Type of the internal field from which this GeometricField is derived.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
virtual bool read()=0
Read radiationProperties dictionary.
const fvMesh & mesh_
Reference to the mesh database.
Top level model for radiation modelling.
tmp< volScalarField > Rp() const
Source term component (for power of T^4)
Definition: noRadiation.C:81
dimensionedScalar pow3(const dimensionedScalar &ds)
tmp< volScalarField::Internal > Ru() const
Source term component (constant)
Definition: noRadiation.C:108
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:50
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
A class for managing temporary objects.
Definition: PtrList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.