Loading...
Searching...
No Matches
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#include "Function1.H"
76
77// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78
79namespace Foam
80{
81
82/*---------------------------------------------------------------------------*\
83 Class outletMappedUniformInletHeatAdditionFvPatchField Declaration
84\*---------------------------------------------------------------------------*/
85
87:
88 public fixedValueFvPatchScalarField
89{
90 // Private data
91
92 //- Input energy
93 autoPtr<Function1<scalar>> Qptr_;
94
95 //- Name of the outlet patch to be mapped
96 word outletPatchName_;
97
98 //- Name of the flux transporting the field
99 word phiName_;
100
101 //- Minimum Temperature Limit
102 scalar TMin_;
103
104 //- Maximum Temperature Limit
105 scalar TMax_;
106
107
108public:
109
110 //- Runtime type information
111 TypeName("outletMappedUniformInletHeatAddition");
112
113
114 // Constructors
115
116 //- Construct from patch and internal field
118 (
119 const fvPatch&,
121 );
122
123 //- Construct from patch, internal field and dictionary
125 (
126 const fvPatch&,
128 const dictionary&
129 );
130
131 //- Construct by mapping onto a new patch
133 (
135 const fvPatch&,
137 const fvPatchFieldMapper&
138 );
139
140 //- Construct as copy
142 (
144 );
145
146 //- Construct as copy setting internal field reference
148 (
151 );
152
153 //- Return a clone
154 virtual tmp<fvPatchField<scalar>> clone() const
155 {
156 return fvPatchField<scalar>::Clone(*this);
157 }
158
159 //- Clone with an internal field reference
161 (
163 ) const
164 {
165 return fvPatchField<scalar>::Clone(*this, iF);
166 }
167
168
169 // Member functions
170
171 // Access
172
173 //- Name of the outlet patch to be mapped
174 const word& outletPatchName() const
175 {
176 return outletPatchName_;
177 }
178
179
180 // Evaluation functions
181
182 //- Update the coefficients associated with the patch field
183 virtual void updateCoeffs();
184
185
186 //- Write
187 virtual void write(Ostream&) const;
188};
189
190
191// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192
193} // End namespace Foam
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197#endif
198
199// ************************************************************************* //
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:59
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
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
Clone with an internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
outletMappedUniformInletHeatAdditionFvPatchField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
TypeName("outletMappedUniformInletHeatAddition")
Runtime type information.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68