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-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 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 Usage
38  \table
39  Property | Description | Required | Default value
40  T | temperature field name | no | T
41  \endtable
42 
43  Example of the boundary condition specification:
44  \verbatim
45  <patchName>
46  {
47  type MarshakRadiationFixedTemperature;
48  Trad uniform 1000; // radiation temperature field
49  value uniform 0; // place holder
50  }
51  \endverbatim
52 
53 See also
54  Foam::radiationCoupledBase
55  Foam::mixedFvPatchField
56 
57 SourceFiles
58  MarshakRadiationFixedTemperatureFvPatchScalarField.C
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef MarshakRadiationFixedTemperatureFvPatchScalarField_H
63 #define MarshakRadiationFixedTemperatureFvPatchScalarField_H
64 
65 #include "mixedFvPatchFields.H"
66 #include "radiationCoupledBase.H"
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class MarshakRadiationFixedTemperatureFvPatchScalarField Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 class MarshakRadiationFixedTemperatureFvPatchScalarField
78 :
79  public mixedFvPatchScalarField,
80  public radiationCoupledBase
81 {
82 
83  // Private data
84 
85  //- Radiation temperature field
86  scalarField Trad_;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("MarshakRadiationFixedTemperature");
93 
94 
95  // Constructors
96 
97  //- Construct from patch and internal field
99  (
100  const fvPatch&,
102  );
103 
104  //- Construct from patch, internal field and dictionary
106  (
107  const fvPatch&,
109  const dictionary&
110  );
111 
112  //- Construct by mapping given MarshakRadiationFvPatchField onto a new
113  // patch
115  (
117  const fvPatch&,
119  const fvPatchFieldMapper&
120  );
121 
122  //- Construct as copy
124  (
126  );
127 
128  //- Construct and return a clone
129  virtual tmp<fvPatchScalarField> clone() const
130  {
132  (
134  );
135  }
136 
137  //- Construct as copy setting internal field reference
139  (
142  );
143 
144  //- Construct and return a clone setting internal field reference
146  (
148  ) const
149  {
151  (
153  (
154  *this,
155  iF
156  )
157  );
158  }
159 
160 
161  // Member functions
162 
163  // Access
164 
165  //- Return the radiation temperature
166  const scalarField& Trad() const
167  {
168  return Trad_;
169  }
170 
171  //- Return reference to the radiation temperature to allow
172  // adjustment
173  scalarField& Trad()
174  {
175  return Trad_;
176  }
177 
178 
179  // Mapping functions
180 
181  //- Map (and resize as needed) from self given a mapping object
182  virtual void autoMap
183  (
184  const fvPatchFieldMapper&
185  );
186 
187  //- Reverse map the given fvPatchField onto this fvPatchField
188  virtual void rmap
189  (
190  const fvPatchScalarField&,
191  const labelList&
192  );
193 
194 
195  // Evaluation functions
196 
197  //- Update the coefficients associated with the patch field
198  virtual void updateCoeffs();
199 
200 
201  // I-O
202 
203  //- Write
204  virtual void write(Ostream&) const;
205 };
206 
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 } // End namespace Foam
211 
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213 
214 #endif
215 
216 // ************************************************************************* //
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
const scalarField & Trad() const
Return the radiation temperature.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
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:65
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
MarshakRadiationFixedTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Foam::fvPatchFieldMapper.
TypeName("MarshakRadiationFixedTemperature")
Runtime type information.
A &#39;mixed&#39; boundary condition that implements a Marshak condition for the incident radiation field (us...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
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:54
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Namespace for OpenFOAM.