MarshakRadiationFvPatchScalarField.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) 2011-2015 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::MarshakRadiationFvPatchScalarField
26 
27 Group
28  grpThermoBoundaryConditions
29 
30 Description
31  A 'mixed' boundary condition that implements a Marshak condition for the
32  incident radiation field (usually written as G)
33 
34  The radiation temperature is retrieved from the mesh database, using a
35  user specified temperature field name.
36 
37  \heading Patch usage
38 
39  \table
40  Property | Description | Required | Default value
41  T | temperature field name | no | T
42  \endtable
43 
44  Example of the boundary condition specification:
45  \verbatim
46  myPatch
47  {
48  type MarshakRadiation;
49  T T;
50  value uniform 0;
51  }
52  \endverbatim
53 
54 SeeAlso
55  Foam::radiationCoupledBase
56  Foam::mixedFvPatchField
57 
58 SourceFiles
59  MarshakRadiationFvPatchScalarField.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef MarshakRadiationMixedFvPatchField_H
64 #define MarshakRadiationMixedFvPatchField_H
65 
66 #include "mixedFvPatchFields.H"
67 #include "radiationCoupledBase.H"
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 namespace Foam
72 {
73 
74 /*---------------------------------------------------------------------------*\
75  Class MarshakRadiationFvPatchScalarField Declaration
76 \*---------------------------------------------------------------------------*/
77 
78 class MarshakRadiationFvPatchScalarField
79 :
80  public mixedFvPatchScalarField,
82 {
83 
84  // Private data
85 
86  //- Name of temperature field
87  word TName_;
88 
89 
90 public:
91 
92  //- Runtime type information
93  TypeName("MarshakRadiation");
94 
95 
96  // Constructors
97 
98  //- Construct from patch and internal field
100  (
101  const fvPatch&,
103  );
104 
105  //- Construct from patch, internal field and dictionary
107  (
108  const fvPatch&,
110  const dictionary&
111  );
112 
113  //- Construct by mapping given MarshakRadiationFvPatchField onto a new
114  // patch
116  (
118  const fvPatch&,
120  const fvPatchFieldMapper&
121  );
122 
123  //- Construct as copy
125  (
127  );
128 
129  //- Construct and return a clone
130  virtual tmp<fvPatchScalarField> clone() const
131  {
133  (
135  );
136  }
137 
138  //- Construct as copy setting internal field reference
140  (
143  );
144 
145  //- Construct and return a clone setting internal field reference
147  (
149  ) const
150  {
152  (
154  );
155  }
157 
158  // Member functions
159 
160  // Access
161 
162  //- Return the temperature field name
163  const word& TName() const
164  {
165  return TName_;
166  }
167 
168  //- Return reference to the temperature field name to allow
169  // adjustment
170  word& TName()
171  {
172  return TName_;
173  }
174 
175 
176  // Mapping functions
177 
178  //- Map (and resize as needed) from self given a mapping object
179  virtual void autoMap
180  (
181  const fvPatchFieldMapper&
182  );
183 
184  //- Reverse map the given fvPatchField onto this fvPatchField
185  virtual void rmap
186  (
187  const fvPatchScalarField&,
188  const labelList&
189  );
190 
191 
192  // Evaluation functions
193 
194  //- Update the coefficients associated with the patch field
195  virtual void updateCoeffs();
196 
197 
198  // I-O
199 
200  //- Write
201  virtual void write(Ostream&) const;
202 };
203 
204 
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 
207 } // End namespace Foam
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 
211 #endif
212 
213 // ************************************************************************* //
const word & TName() const
Return the temperature field name.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
TypeName("MarshakRadiation")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:59
Foam::fvPatchFieldMapper.
Common functions to emissivity. It gets supplied from lookup into a dictionary or calculated by the s...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:65
MarshakRadiationFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
A &#39;mixed&#39; boundary condition that implements a Marshak condition for the incident radiation field (us...
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.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A class for managing temporary objects.
Definition: PtrList.H:118