greyDiffusiveRadiationMixedFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 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 Class
25  Foam::greyDiffusiveRadiationMixedFvPatchScalarField
26 
27 Description
28  This boundary condition provides a grey-diffuse condition for radiation
29  intensity, \c I, for use with the finite-volume discrete-ordinates model
30  (fvDOM), in which the radiation temperature is retrieved from the
31  temperature field boundary condition.
32 
33 Usage
34  \table
35  Property | Description | Required | Default value
36  T | temperature field name | no | T
37  emissivityMode | emissivity mode: solidRadiation or lookup | yes |
38  \endtable
39 
40  Example of the boundary condition specification:
41  \verbatim
42  <patchName>
43  {
44  type greyDiffusiveRadiation;
45  T T;
46  emissivityMode solidRadiation;
47  value uniform 0;
48  }
49  \endverbatim
50 
51 See also
52  Foam::radiationCoupledBase
53  Foam::radiationModel
54  Foam::radiationModels::fvDOM
55  Foam::mixedFvPatchField
56 
57 SourceFiles
58  greyDiffusiveRadiationMixedFvPatchScalarField.C
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef greyDiffusiveRadiationMixedFvPatchScalarField_H
63 #define greyDiffusiveRadiationMixedFvPatchScalarField_H
64 
65 #include "mixedFvPatchFields.H"
66 #include "radiationCoupledBase.H"
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class greyDiffusiveRadiationMixedFvPatchScalarField Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 class greyDiffusiveRadiationMixedFvPatchScalarField
78 :
79  public mixedFvPatchScalarField,
80  public radiationCoupledBase
81 {
82  // Private Data
83 
84  //- Name of temperature field
85  word TName_;
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("greyDiffusiveRadiation");
92 
93 
94  // Constructors
95 
96  //- Construct from patch and internal field
98  (
99  const fvPatch&,
101  );
102 
103  //- Construct from patch, internal field and dictionary
105  (
106  const fvPatch&,
108  const dictionary&
109  );
110 
111  //- Construct by mapping given a
112  // greyDiffusiveRadiationMixedFvPatchScalarField onto a new patch
114  (
116  const fvPatch&,
118  const fvPatchFieldMapper&
119  );
120 
121  //- Copy constructor
123  (
125  );
126 
127  //- Construct and return a clone
128  virtual tmp<fvPatchScalarField> clone() const
129  {
131  (
133  );
134  }
135 
136  //- Copy constructor setting internal field reference
138  (
141  );
143  //- Construct and return a clone setting internal field reference
145  (
147  ) const
148  {
150  (
152  );
153  }
154 
155 
156  // Member Functions
157 
158  // Access
160  //- Return the temperature field name
161  const word& TName() const
162  {
163  return TName_;
164  }
165 
166  //- Return reference to the temperature field name to allow
167  // adjustment
168  word& TName()
169  {
170  return TName_;
171  }
172 
173 
174  // Mapping functions
176  //- Map (and resize as needed) from self given a mapping object
177  // Used to update fields following mesh topology change
178  virtual void autoMap(const fvPatchFieldMapper&);
179 
180  //- Reverse map the given fvPatchField onto this fvPatchField
181  // Used to reconstruct fields
182  virtual void rmap(const fvPatchScalarField&, const labelList&);
183 
184 
185  // Evaluation functions
186 
187  //- Update the coefficients associated with the patch field
188  virtual void updateCoeffs();
189 
190 
191  // I-O
192 
193  //- Write
194  virtual void write(Ostream&) const;
195 };
196 
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 } // End namespace Foam
201 
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 
204 #endif
205 
206 // ************************************************************************* //
This boundary condition provides a grey-diffuse condition for radiation intensity, I, for use with the finite-volume discrete-ordinates model (fvDOM), in which the radiation temperature is retrieved from the temperature field boundary condition.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
const word & TName() const
Return the temperature field name.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
greyDiffusiveRadiationMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("greyDiffusiveRadiation")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:59
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.