boundaryRadiationPropertiesFvPatchField.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 | Copyright (C) 2015 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 Class
25  Foam::boundaryRadiationPropertiesFvPatchField
26 
27 Description
28  Common functions to emissivity. It gets supplied from lookup into a
29  dictionary or calculated by the solidThermo:
30 
31  - 'lookup' : lookup volScalarField with name
32  - 'solidThermo' : use solidThermo
33  - 'model' : use a model
34 
35 SourceFiles
36  boundaryRadiationPropertiesFvPatchField.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef boundaryRadiationPropertiesFvPatchField_H
41 #define boundaryRadiationPropertiesFvPatchField_H
42 
43 #include "scalarField.H"
44 #include "NamedEnum.H"
45 #include "fvPatch.H"
47 #include "transmissivityModel.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 namespace radiation
55 {
56 /*---------------------------------------------------------------------------*\
57  Class boundaryRadiationPropertiesFvPatchField Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 :
62  public calculatedFvPatchScalarField
63 {
64 public:
65 
66  // - Type of look up
67  enum methodType
68  {
71  MODEL
72  };
73 
74 
75 private:
76 
77  // Private data
78 
80 
81  //- How to get property
82  const methodType method_;
83 
84  //- Dictionary
85  const dictionary dict_;
86 
87  //- Absorption/emission model
89 
90  //- transmissivity model
92 
93 
94  // Private functions
95 
96  //- Return nbr patch index
97  label nbrPatchIndex() const;
98 
99  //- Return nbr mesh
100  const fvMesh& nbrRegion() const;
101 
102 
103 public:
104 
105  //- Runtime type information
106  TypeName("boundaryRadiation");
107 
108  // Constructors
109 
110 
111  //- Construct from patch and internal field
113  (
114  const fvPatch&,
116  );
117 
118  //- Construct from patch, internal field and dictionary
120  (
121  const fvPatch&,
123  const dictionary&
124  );
125 
126  //- Construct by mapping given a
127  // greyDiffusiveViewFactorFixedValueFvPatchScalarField onto a new patch
129  (
131  const fvPatch&,
133  const fvPatchFieldMapper&
134  );
135 
136  //- Construct as copy
138  (
140  );
141 
142  //- Construct as copy setting internal field reference
144  (
147  );
148 
149  //- Construct and return a clone
150  virtual tmp<fvPatchScalarField> clone() const
151  {
153  (
155  );
156  }
157 
158  //- Construct and return a clone setting internal field reference
160  (
162  ) const
163  {
165  (
167  );
168  }
169 
170 
171  // Member functions
172 
173  //- Method to obtain properties
174  word method() const
175  {
176  return methodTypeNames_[method_];
177  }
178 
179 
180  //- Return absorptionEmissionModel
182 
183  //- Return transmissivityModel
184  const transmissivityModel& transmissiveModel() const;
185 
186  //- Calculate corresponding emissivity field for bandI
187  tmp<scalarField> emissivity(const label bandI = 0) const;
188 
189  //- Calculate corresponding absorptivity field for bandI
190  tmp<scalarField> absorptivity(const label bandI = 0) const;
191 
192  //- Calculate corresponding transmissivity field for bandI
193  tmp<scalarField> transmissivity(const label bandI = 0) const;
194 
195  //- Calculate corresponding reflectivity field
196  tmp<scalarField> reflectivity(const label bandI = 0) const;
197 
198  //- Write
199  virtual void write(Ostream&) const;
200 };
201 
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 } // End namespace Foam
206 } // End namespace radiation
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 #endif
211 
212 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
scalarField.H
Foam::radiation::boundaryRadiationPropertiesFvPatchField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: boundaryRadiationPropertiesFvPatchField.H:149
Foam::radiation::boundaryRadiationPropertiesFvPatchField::methodType
methodType
Definition: boundaryRadiationPropertiesFvPatchField.H:66
calculatedFvPatchFields.H
Foam::radiation::boundaryRadiationPropertiesFvPatchField::boundaryRadiationPropertiesFvPatchField
boundaryRadiationPropertiesFvPatchField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: boundaryRadiationPropertiesFvPatchField.C:85
NamedEnum.H
Foam::radiation::boundaryRadiationPropertiesFvPatchField::absorptivity
tmp< scalarField > absorptivity(const label bandI=0) const
Calculate corresponding absorptivity field for bandI.
Definition: boundaryRadiationPropertiesFvPatchField.C:309
Foam::radiation::boundaryRadiationPropertiesFvPatchField::nbrRegion
const fvMesh & nbrRegion() const
Return nbr mesh.
Definition: boundaryRadiationPropertiesFvPatchField.C:72
Foam::radiation::boundaryRadiationPropertiesFvPatchField::transmissivity_
autoPtr< transmissivityModel > transmissivity_
transmissivity model
Definition: boundaryRadiationPropertiesFvPatchField.H:90
Foam::radiation::boundaryRadiationPropertiesFvPatchField::reflectivity
tmp< scalarField > reflectivity(const label bandI=0) const
Calculate corresponding reflectivity field.
Definition: boundaryRadiationPropertiesFvPatchField.C:462
Foam::radiation::boundaryRadiationPropertiesFvPatchField::absorptionEmission
const absorptionEmissionModel & absorptionEmission() const
Return absorptionEmissionModel.
Definition: boundaryRadiationPropertiesFvPatchField.C:219
Foam::radiation::transmissivityModel
Base class for radiation scattering.
Definition: transmissivityModel.H:50
Foam::radiation::boundaryRadiationPropertiesFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: boundaryRadiationPropertiesFvPatchField.C:472
Foam::label
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
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::radiation::boundaryRadiationPropertiesFvPatchField::transmissivity
tmp< scalarField > transmissivity(const label bandI=0) const
Calculate corresponding transmissivity field for bandI.
Definition: boundaryRadiationPropertiesFvPatchField.C:385
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
transmissivityModel.H
absorptionEmissionModel.H
Foam::radiation::boundaryRadiationPropertiesFvPatchField::transmissiveModel
const transmissivityModel & transmissiveModel() const
Return transmissivityModel.
Definition: boundaryRadiationPropertiesFvPatchField.C:227
Foam::radiation::boundaryRadiationPropertiesFvPatchField::LOOKUP
@ LOOKUP
Definition: boundaryRadiationPropertiesFvPatchField.H:69
Foam::radiation::boundaryRadiationPropertiesFvPatchField::dict_
const dictionary dict_
Dictionary.
Definition: boundaryRadiationPropertiesFvPatchField.H:84
Foam::radiation::boundaryRadiationPropertiesFvPatchField::TypeName
TypeName("boundaryRadiation")
Runtime type information.
Foam::radiation::boundaryRadiationPropertiesFvPatchField::methodTypeNames_
static const NamedEnum< methodType, 3 > methodTypeNames_
Definition: boundaryRadiationPropertiesFvPatchField.H:78
Foam::radiation::boundaryRadiationPropertiesFvPatchField::SOLIDRADIATION
@ SOLIDRADIATION
Definition: boundaryRadiationPropertiesFvPatchField.H:68
Foam::radiation::boundaryRadiationPropertiesFvPatchField
Definition: boundaryRadiationPropertiesFvPatchField.H:59
Foam::radiation::boundaryRadiationPropertiesFvPatchField::absorptionEmission_
autoPtr< absorptionEmissionModel > absorptionEmission_
Absorption/emission model.
Definition: boundaryRadiationPropertiesFvPatchField.H:87
Foam::radiation::boundaryRadiationPropertiesFvPatchField::method
word method() const
Method to obtain properties.
Definition: boundaryRadiationPropertiesFvPatchField.H:173
Foam::radiation::boundaryRadiationPropertiesFvPatchField::emissivity
tmp< scalarField > emissivity(const label bandI=0) const
Calculate corresponding emissivity field for bandI.
Definition: boundaryRadiationPropertiesFvPatchField.C:235
Foam::radiation::absorptionEmissionModel
Model to supply absorption and emission coefficients for radiation modelling.
Definition: absorptionEmissionModel.H:52
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
fvPatch.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::radiation::boundaryRadiationPropertiesFvPatchField::MODEL
@ MODEL
Definition: boundaryRadiationPropertiesFvPatchField.H:70
Foam::radiation::boundaryRadiationPropertiesFvPatchField::method_
const methodType method_
How to get property.
Definition: boundaryRadiationPropertiesFvPatchField.H:81
Foam::radiation::boundaryRadiationPropertiesFvPatchField::nbrPatchIndex
label nbrPatchIndex() const
Return nbr patch index.
Definition: boundaryRadiationPropertiesFvPatchField.C:61
Foam::NamedEnum< methodType, 3 >
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51