greyDiffusiveViewFactorFixedValueFvPatchScalarField.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-2017 OpenFOAM Foundation
9  Copyright (C) 2016 OpenCFD Ltd
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::radiation::greyDiffusiveViewFactorFixedValueFvPatchScalarField
29 
30 Group
31  grpThermoBoundaryConditions
32 
33 Description
34  This boundary condition provides a grey-diffuse condition for radiative
35  heat flux, \c qr, for use with the view factor model
36 
37 Usage
38  \table
39  Property | Description | Required | Default value
40  qro | external radiative heat flux | yes |
41  \endtable
42 
43  Example of the boundary condition specification:
44  \verbatim
45  <patchName>
46  {
47  type greyDiffusiveRadiationViewFactor;
48  qro uniform 0;
49  }
50  \endverbatim
51 
52 See also
53  Foam::radiation::radiationModel
54  Foam::radiation::viewFactor
55  Foam::radiationCoupledBase
56  Foam::fixedValueFvPatchField
57 
58 SourceFiles
59  greyDiffusiveViewFactorFixedValueFvPatchScalarField.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef greyDiffusiveViewFactorFixedValueFvPatchScalarField_H
64 #define greyDiffusiveViewFactorFixedValueFvPatchScalarField_H
65 
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 namespace radiation
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class greyDiffusiveViewFactorFixedValueFvPatchScalarField declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class greyDiffusiveViewFactorFixedValueFvPatchScalarField
80 :
81  public fixedValueFvPatchScalarField
82 {
83  // Private data
84 
85  //- External radiative heat flux
86  scalarField qro_;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("greyDiffusiveRadiationViewFactor");
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 a
113  // greyDiffusiveViewFactorFixedValueFvPatchScalarField onto a new patch
115  (
117  const fvPatch&,
119  const fvPatchFieldMapper&
120  );
121 
122  //- Construct as copy
124  (
126  );
127 
128  //- Construct as copy setting internal field reference
130  (
133  );
134 
135  //- Return a clone
136  virtual tmp<fvPatchField<scalar>> clone() const
137  {
138  return fvPatchField<scalar>::Clone(*this);
139  }
140 
141  //- Clone with an internal field reference
143  (
145  ) const
146  {
147  return fvPatchField<scalar>::Clone(*this, iF);
148  }
149 
150 
151  // Member functions
152 
153  // Access
154 
155  //- Return external + solar load radiative heat flux
156  tmp<scalarField> qro(label bandI = 0) const;
157 
159  // Evaluation functions
160 
161  //- Update the coefficients associated with the patch field
162  virtual void updateCoeffs();
163 
164 
165  // Mapping functions
166 
167  //- Map (and resize as needed) from self given a mapping object
168  virtual void autoMap
169  (
170  const fvPatchFieldMapper&
171  );
172 
173  //- Reverse map the given fvPatchField onto this fvPatchField
174  virtual void rmap
175  (
176  const fvPatchScalarField&,
177  const labelList&
178  );
179 
180 
181  // I-O
182 
183  //- Write
184  virtual void write(Ostream&) const;
185 };
186 
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 } // End namespace radiation
191 } // End namespace Foam
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 #endif
196 
197 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
TypeName("greyDiffusiveRadiationViewFactor")
Runtime type information.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:597
greyDiffusiveViewFactorFixedValueFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A FieldMapper for finite-volume patch fields.
tmp< scalarField > qro(label bandI=0) const
Return external + solar load radiative heat flux.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
This boundary condition provides a grey-diffuse condition for radiative heat flux, qr, for use with the view factor model.
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: HashPtrTable.H:50
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.