MarshakRadiationFixedTemperatureFvPatchScalarField.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::MarshakRadiationFixedTemperatureFvPatchScalarField
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 field across the patch is supplied by the user
35  using the \c Trad entry.
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 MarshakRadiationFixedTemperature;
49  Trad uniform 1000; // radiation temperature field
50  value uniform 0; // place holder
51  }
52  \endverbatim
53 
54 SeeAlso
55  Foam::radiationCoupledBase
56  Foam::mixedFvPatchField
57 
58 SourceFiles
59  MarshakRadiationFixedTemperatureFvPatchScalarField.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef MarshakRadiationFixedTemperatureFvPatchScalarField_H
64 #define MarshakRadiationFixedTemperatureFvPatchScalarField_H
65 
66 #include "mixedFvPatchFields.H"
67 #include "radiationCoupledBase.H"
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 namespace Foam
72 {
73 
74 /*---------------------------------------------------------------------------*\
75  Class MarshakRadiationFixedTemperatureFvPatchScalarField Declaration
76 \*---------------------------------------------------------------------------*/
77 
78 class MarshakRadiationFixedTemperatureFvPatchScalarField
79 :
80  public mixedFvPatchScalarField,
82 {
83 
84  // Private data
85 
86  //- Radiation temperature field
87  scalarField Trad_;
88 
89 
90 public:
91 
92  //- Runtime type information
93  TypeName("MarshakRadiationFixedTemperature");
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  *this,
156  iF
157  )
158  );
159  }
160 
161 
162  // Member functions
163 
164  // Access
165 
166  //- Return the radiation temperature
167  const scalarField& Trad() const
168  {
169  return Trad_;
170  }
171 
172  //- Return reference to the radiation temperature to allow
173  // adjustment
174  scalarField& Trad()
175  {
176  return Trad_;
177  }
178 
179 
180  // Mapping functions
181 
182  //- Map (and resize as needed) from self given a mapping object
183  virtual void autoMap
184  (
185  const fvPatchFieldMapper&
186  );
187 
188  //- Reverse map the given fvPatchField onto this fvPatchField
189  virtual void rmap
190  (
191  const fvPatchScalarField&,
192  const labelList&
193  );
194 
195 
196  // Evaluation functions
197 
198  //- Update the coefficients associated with the patch field
199  virtual void updateCoeffs();
200 
201 
202  // I-O
203 
204  //- Write
205  virtual void write(Ostream&) const;
206 };
207 
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 
211 } // End namespace Foam
212 
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 
215 #endif
216 
217 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A &#39;mixed&#39; boundary condition that implements a Marshak condition for the incident radiation field (us...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
TypeName("MarshakRadiationFixedTemperature")
Runtime type information.
Foam::fvPatchFieldMapper.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
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.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:65
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
const scalarField & Trad() const
Return the radiation temperature.
MarshakRadiationFixedTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition: PtrList.H:118