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 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 namespace radiation
73 {
74 /*---------------------------------------------------------------------------*\
75  Class MarshakRadiationFixedTemperatureFvPatchScalarField Declaration
76 \*---------------------------------------------------------------------------*/
77 
79 :
80  public mixedFvPatchScalarField
81  //public radiationCoupledBase
82 {
83 
84  // Private data
85 
86  //- Radiation temperature field
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 radiation
212 } // End namespace Foam
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 
216 #endif
217 
218 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:65
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::Trad
const scalarField & Trad() const
Return the radiation temperature.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.H:176
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.H:139
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::MarshakRadiationFixedTemperatureFvPatchScalarField
MarshakRadiationFixedTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.C:38
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.C:184
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::TypeName
TypeName("MarshakRadiationFixedTemperature")
Runtime type information.
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.C:141
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::Trad_
scalarField Trad_
Radiation temperature field.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.H:96
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
MarshakRadiationFixedTemperatureFvPatchScalarField
A 'mixed' boundary condition that implements a Marshak condition for the incident radiation field (us...
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
mixedFvPatchFields.H
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.H:87
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.C:116
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::rmap
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.C:126
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51