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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::MarshakRadiationFixedTemperatureFvPatchScalarField
28 
29 Group
30  grpThermoBoundaryConditions
31 
32 Description
33  A 'mixed' boundary condition that implements a Marshak condition for the
34  incident radiation field (usually written as G)
35 
36  The radiation temperature field across the patch is supplied by the user
37  using the \c Trad entry.
38 
39 Usage
40  \table
41  Property | Description | Required | Default value
42  T | temperature field name | no | T
43  \endtable
44 
45  Example of the boundary condition specification:
46  \verbatim
47  <patchName>
48  {
49  type MarshakRadiationFixedTemperature;
50  Trad uniform 1000; // radiation temperature field
51  value uniform 0; // place holder
52  }
53  \endverbatim
54 
55 See also
56  Foam::radiationCoupledBase
57  Foam::mixedFvPatchField
58 
59 SourceFiles
60  MarshakRadiationFixedTemperatureFvPatchScalarField.C
61 
62 \*---------------------------------------------------------------------------*/
63 
64 #ifndef MarshakRadiationFixedTemperatureFvPatchScalarField_H
65 #define MarshakRadiationFixedTemperatureFvPatchScalarField_H
66 
67 #include "mixedFvPatchFields.H"
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 namespace Foam
72 {
73 namespace radiation
74 {
75 /*---------------------------------------------------------------------------*\
76  Class MarshakRadiationFixedTemperatureFvPatchScalarField Declaration
77 \*---------------------------------------------------------------------------*/
78 
80 :
81  public mixedFvPatchScalarField
82  //public radiationCoupledBase
83 {
84 
85  // Private data
86 
87  //- Radiation temperature field
88  scalarField Trad_;
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("MarshakRadiationFixedTemperature");
95 
96 
97  // Constructors
98 
99  //- Construct from patch and internal field
101  (
102  const fvPatch&,
104  );
105 
106  //- Construct from patch, internal field and dictionary
108  (
109  const fvPatch&,
111  const dictionary&
112  );
113 
114  //- Construct by mapping given MarshakRadiationFvPatchField onto a new
115  // patch
117  (
119  const fvPatch&,
121  const fvPatchFieldMapper&
122  );
123 
124  //- Construct as copy
126  (
128  );
129 
130  //- Construct and return a clone
131  virtual tmp<fvPatchScalarField> clone() const
132  {
134  (
136  );
137  }
138 
139  //- Construct as copy setting internal field reference
141  (
144  );
145 
146  //- Construct and return a clone setting internal field reference
148  (
150  ) const
151  {
153  (
155  (
156  *this,
157  iF
158  )
159  );
160  }
161 
162 
163  // Member functions
164 
165  // Access
166 
167  //- Return the radiation temperature
168  const scalarField& Trad() const
169  {
170  return Trad_;
171  }
172 
173  //- Return reference to the radiation temperature to allow
174  // adjustment
175  scalarField& Trad()
176  {
177  return Trad_;
178  }
179 
180 
181  // Mapping functions
182 
183  //- Map (and resize as needed) from self given a mapping object
184  virtual void autoMap
185  (
186  const fvPatchFieldMapper&
187  );
188 
189  //- Reverse map the given fvPatchField onto this fvPatchField
190  virtual void rmap
191  (
192  const fvPatchScalarField&,
193  const labelList&
194  );
195 
196 
197  // Evaluation functions
198 
199  //- Update the coefficients associated with the patch field
200  virtual void updateCoeffs();
201 
202 
203  // I-O
204 
205  //- Write
206  virtual void write(Ostream&) const;
207 };
208 
209 
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 
212 } // End namespace radiation
213 } // End namespace Foam
214 
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 
217 #endif
218 
219 // ************************************************************************* //
Foam::fvPatchField< scalar >
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::Trad
const scalarField & Trad() const
Return the radiation temperature.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.H:177
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.H:140
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::MarshakRadiationFixedTemperatureFvPatchScalarField
MarshakRadiationFixedTemperatureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.C:41
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.C:187
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:144
Foam::Field< scalar >
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
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 a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
mixedFvPatchFields.H
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.H:88
Foam::List< label >
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.C:119
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::rmap
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: MarshakRadiationFixedTemperatureFvPatchScalarField.C:129
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54