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 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 namespace radiation
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class MarshakRadiationFvPatchScalarField Declaration
77 \*---------------------------------------------------------------------------*/
78 
80 :
81  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  }
156 
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 radiation
208 } // End namespace Foam
209 
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 
212 #endif
213 
214 // ************************************************************************* //
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::MarshakRadiationFvPatchScalarField::TypeName
TypeName("MarshakRadiation")
Runtime type information.
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::radiation::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
MarshakRadiationFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: MarshakRadiationFvPatchScalarField.C:38
Foam::radiation::MarshakRadiationFvPatchScalarField
Definition: MarshakRadiationFvPatchScalarField.H:88
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::radiation::MarshakRadiationFvPatchScalarField::TName
const word & TName() const
Return the temperature field name.
Definition: MarshakRadiationFvPatchScalarField.H:172
radiation
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::radiation::MarshakRadiationFvPatchScalarField::TName_
word TName_
Name of temperature field.
Definition: MarshakRadiationFvPatchScalarField.H:96
Foam::radiation::MarshakRadiationFvPatchScalarField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: MarshakRadiationFvPatchScalarField.C:121
Foam::radiation::MarshakRadiationFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: MarshakRadiationFvPatchScalarField.C:185
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
MarshakRadiationFvPatchScalarField
A 'mixed' boundary condition that implements a Marshak condition for the incident radiation field (us...
mixedFvPatchFields.H
Foam::radiation::MarshakRadiationFvPatchScalarField::rmap
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: MarshakRadiationFvPatchScalarField.C:130
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::MarshakRadiationFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: MarshakRadiationFvPatchScalarField.C:139
Foam::radiation::MarshakRadiationFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: MarshakRadiationFvPatchScalarField.H:139
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51