uniformInletOutletFvPatchField.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) 2013-2016 OpenFOAM Foundation
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::uniformInletOutletFvPatchField
28
29Group
30 grpOutletBoundaryConditions
31
32Description
33 Variant of inletOutlet boundary condition with uniform inletValue.
34
35Usage
36 \table
37 Property | Description | Required | Default value
38 phi | flux field name | no | phi
39 uniformInletValue | inlet value for reverse flow | yes |
40 \endtable
41
42 Example of the boundary condition specification:
43 \verbatim
44 <patchName>
45 {
46 type uniformInletOutlet;
47 phi phi;
48 uniformInletValue 0;
49 value uniform 0;
50 }
51 \endverbatim
52
53 The mode of operation is determined by the sign of the flux across the
54 patch faces.
55
56Note
57 Sign conventions:
58 - positive flux (out of domain): apply zero-gradient condition
59 - negative flux (into of domain): apply the user-specified fixed value
60
61See also
62 Foam::inletOutletFvPatchField
63 Foam::Function1Types
64
65SourceFiles
66 uniformInletOutletFvPatchField.C
67
68\*---------------------------------------------------------------------------*/
69
70#ifndef uniformInletOutletFvPatchField_H
71#define uniformInletOutletFvPatchField_H
72
73#include "mixedFvPatchField.H"
74#include "Function1.H"
75
76// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77
78namespace Foam
79{
80
81/*---------------------------------------------------------------------------*\
82 Class uniformInletOutletFvPatchField Declaration
83\*---------------------------------------------------------------------------*/
84
85template<class Type>
86class uniformInletOutletFvPatchField
87:
88 public mixedFvPatchField<Type>
89{
90
91protected:
92
93 // Protected data
94
95 //- Name of flux field
96 word phiName_;
97
98 //- Value
99 autoPtr<Function1<Type>> uniformInletValue_;
101
102public:
103
104 //- Runtime type information
105 TypeName("uniformInletOutlet");
106
107
108 // Constructors
109
110 //- Construct from patch and internal field
112 (
113 const fvPatch&,
115 );
116
117 //- Construct from patch, internal field and dictionary
120 const fvPatch&,
122 const dictionary&
123 );
124
125 //- Construct by mapping given uniformInletOutletFvPatchField
126 // onto a new patch
128 (
130 const fvPatch&,
132 const fvPatchFieldMapper&
133 );
134
135 //- Construct as copy
137 (
139 );
140
141 //- Construct and return a clone
142 virtual tmp<fvPatchField<Type>> clone() const
143 {
145 (
147 );
148 }
149
150 //- Construct as copy setting internal field reference
152 (
155 );
157 //- Construct and return a clone setting internal field reference
159 (
161 ) const
162 {
164 (
166 );
167 }
168
169
170 // Member functions
171
172 // Attributes
173
174 //- Return true: this patch field is altered by assignment
175 virtual bool assignable() const
176 {
177 return true;
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 fvPatchField<Type>&,
193 const labelList&
194 );
195
196
197 //- Update the coefficients associated with the patch field
198 virtual void updateCoeffs();
199
200 //- Write
201 virtual void write(Ostream&) const;
202
203
204 // Member operators
205
206 virtual void operator=(const fvPatchField<Type>& pvf);
207};
208
209
210// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211
212} // End namespace Foam
213
214// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215
216#ifdef NoRepository
218#endif
219
220// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221
222#endif
223
224// ************************************************************************* //
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
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
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.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:82
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
This boundary condition provides a base class for 'mixed' type boundary conditions,...
A class for managing temporary objects.
Definition: tmp.H:65
Variant of inletOutlet boundary condition with uniform inletValue.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void operator=(const fvPatchField< Type > &pvf)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("uniformInletOutlet")
Runtime type information.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
virtual bool assignable() const
Return true: this patch field is altered by assignment.
autoPtr< Function1< Type > > uniformInletValue_
Value.
virtual tmp< fvPatchField< Type > > clone(const DimensionedField< Type, volMesh > &iF) const
Construct and return a clone setting internal field reference.
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