fixedIncidentRadiationFvPatchScalarField.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) 2016 OpenCFD Ltd.
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::radiation::fixedIncidentRadiationFvPatchScalarField
28 
29 Group
30  grpThermoBoundaryConditions
31 
32 Description
33  Boundary condition for thermal coupling for solid regions.
34  Used to emulate a fixed incident radiative heat flux on a wall.
35 
36  the gradient heat flux is calculated as :
37 
38  qr = emissivity*(qrIncident - sigma_*T^4)
39 
40  where:
41 
42  emissivity is the emissivity of the solid.
43  qrIncident is the specified fixed incident radiation.
44 
45  Example usage:
46 
47  wall
48  {
49  type fixedIncidentRadiation;
50  qrIncident uniform 500;
51  kappa solidThermo;
52  KappaName none;
53  }
54 
55  kappa:
56  - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
57  - 'solidThermo' : use solidThermo kappa()
58 
59  emissivity:
60  - 'lookup' : lookup volScalarField emissivity
61  - 'localSolidRadiation': Look up for local solidRadiation
62 
63 
64 SourceFiles
65  fixedIncidentRadiationFvPatchScalarField.C
66 
67 \*---------------------------------------------------------------------------*/
68 
69 #ifndef fixedIncidentRadiationFvPatchScalarField_H
70 #define fixedIncidentRadiationFvPatchScalarField_H
71 
73 #include "temperatureCoupledBase.H"
74 
75 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 
77 namespace Foam
78 {
79 namespace radiation
80 {
81 /*---------------------------------------------------------------------------*\
82  Class fixedIncidentRadiationFvPatchScalarField declaration
83 \*---------------------------------------------------------------------------*/
84 
86 :
87  public fixedGradientFvPatchScalarField,
89 {
91  typedef fixedGradientFvPatchScalarField parent_bctype;
92 
93  // Private data
94 
95  //- Incident radiative heat flux
96  scalarField qrIncident_;
97 
98 
99 public:
100 
101  //- Runtime type information
102  TypeName("fixedIncidentRadiation");
103 
104 
105  // Constructors
106 
107  //- Construct from patch and internal field
109  (
110  const fvPatch&,
112  );
113 
114  //- Construct from patch, internal field and dictionary
116  (
117  const fvPatch&,
119  const dictionary&
120  );
121 
122  //- Construct by mapping onto a new patch
124  (
125  const this_bctype&,
126  const fvPatch&,
128  const fvPatchFieldMapper&
129  );
130 
131  //- Construct as copy setting internal field reference
133  (
134  const this_bctype&,
136  );
137 
138  //- No copy without an internal field
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  // Mapping functions
155  //- Map (and resize as needed) from self given a mapping object
156  virtual void autoMap(const fvPatchFieldMapper&);
157 
158  //- Reverse map the given fvPatchField onto this fvPatchField
159  virtual void rmap
160  (
161  const fvPatchScalarField&,
162  const labelList&
163  );
164 
165  //- Update the coefficients associated with the patch field
166  virtual void updateCoeffs();
167 
168  //- Write
169  virtual void write(Ostream&) const;
170 
171 
172  // Member Operators
173 
174  //- Inherit assignment
175  using parent_bctype::operator=;
176 };
177 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace Foam
182 } // End namespace radiation
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 #endif
187 
188 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:130
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
TypeName("fixedIncidentRadiation")
Runtime type information.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
fixedIncidentRadiationFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Boundary condition for thermal coupling for solid regions. Used to emulate a fixed incident radiative...
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:635
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
A FieldMapper for finite-volume patch fields.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
Common functions used in temperature coupled boundaries.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
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
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
Namespace for OpenFOAM.