outletMappedUniformInletHeatAdditionFvPatchField.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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::outletMappedUniformInletHeatAdditionFvPatchField
28
29Group
30 grpInletBoundaryConditions
31
32Description
33
34 This temperature boundary condition averages the temperature over the
35 "outlet" patch specified by name "outletPatchName" and applies an extra
36 heat source. This is set as a uniform temperature value on this patch.
37 Additionally TMin/TMax limits can be applied
38
39 \heading Patch usage
40
41 \table
42 Property | Description | Required | Default value
43 outletPatch | name of outlet patch | yes |
44 Q | Heat addition | yes
45 phi | flux field name | no | phi
46 TMin | min temperature limit | no | 0.0
47 TMax | max temperature limit | no | 5000.0
48 \endtable
49
50 Example of the boundary condition specification:
51 \verbatim
52 myPatch
53 {
54 type outletMappedUniformInletHeatAddition;
55 outletPatch aPatch;
56 Q 10; // Heat addition in W
57 phi phi;
58 value uniform 0;
59 }
60 \endverbatim
61
62SeeAlso
63 Foam::fixedValueFvPatchField
64
65SourceFiles
66 outletMappedUniformInletHeatAdditionFvPatchField.C
67
68\*---------------------------------------------------------------------------*/
69
70#ifndef outletMappedUniformInletHeatAdditionFvPatchField_H
71#define outletMappedUniformInletHeatAdditionFvPatchField_H
72
74#include "fvPatchFields.H"
75
76// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77
78namespace Foam
79{
80
81/*---------------------------------------------------------------------------*\
82 Class outletMappedUniformInletHeatAdditionFvPatchField Declaration
83\*---------------------------------------------------------------------------*/
84
85class outletMappedUniformInletHeatAdditionFvPatchField
86:
87 public fixedValueFvPatchScalarField
88{
89 // Private data
90
91 //- Name of the outlet patch to be mapped
92 word outletPatchName_;
93
94 //- Name of the flux transporting the field
95 word phiName_;
96
97 //- Input energy
98 scalar Q_;
99
100 //- Minimum Temperature Limit
101 scalar TMin_;
102
103 //- Maximum Temperature Limit
104 scalar TMax_;
105
106
107public:
108
109 //- Runtime type information
110 TypeName("outletMappedUniformInletHeatAddition");
111
112
113 // Constructors
114
115 //- Construct from patch and internal field
117 (
118 const fvPatch&,
120 );
121
122 //- Construct from patch, internal field and dictionary
124 (
125 const fvPatch&,
127 const dictionary&
128 );
129
130 //- Construct by mapping onto a new patch
132 (
134 const fvPatch&,
136 const fvPatchFieldMapper&
137 );
139 //- Construct as copy
141 (
143 );
144
145 //- Construct and return a clone
146 virtual tmp<fvPatchField<scalar>> clone() const
147 {
149 (
151 );
152 }
153
154 //- Construct as copy setting internal field reference
156 (
159 );
160
161 //- Construct and return a clone setting internal field reference
163 (
165 ) const
166 {
168 (
170 );
171 }
172
173
174 // Member functions
175
176 // Access
177
178 //- Name of the outlet patch to be mapped
179 const word& outletPatchName() const
180 {
181 return outletPatchName_;
182 }
183
184
185 // Evaluation functions
186
187 //- Update the coefficients associated with the patch field
188 virtual void updateCoeffs();
189
191 //- Write
192 virtual void write(Ostream&) const;
193};
194
195
196// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197
198} // End namespace Foam
199
200// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201
202#endif
203
204// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
This temperature boundary condition averages the temperature over the "outlet" patch specified by nam...
const word & outletPatchName() const
Name of the outlet patch to be mapped.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("outletMappedUniformInletHeatAddition")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73