Loading...
Searching...
No Matches
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>
87:
88 public mixedFvPatchField<Type>
89{
90
91protected:
92
93 // Protected data
94
95 //- Name of flux field
97
98 //- Value
100
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
119 (
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 as copy setting internal field reference
143 (
146 );
147
148 //- Return a clone
149 virtual tmp<fvPatchField<Type>> clone() const
150 {
151 return fvPatchField<Type>::Clone(*this);
152 }
153
154 //- Clone with an internal field reference
156 (
158 ) const
159 {
160 return fvPatchField<Type>::Clone(*this, iF);
161 }
162
163
164 // Member functions
165
166 //- True: this patch field is altered by assignment
167 virtual bool assignable() const { return true; }
168
169
170 // Mapping functions
171
172 //- Map (and resize as needed) from self given a mapping object
173 virtual void autoMap
174 (
175 const fvPatchFieldMapper&
176 );
177
178 //- Reverse map the given fvPatchField onto this fvPatchField
179 virtual void rmap
180 (
181 const fvPatchField<Type>&,
182 const labelList&
183 );
184
185
186 //- Update the coefficients associated with the patch field
187 virtual void updateCoeffs();
188
189 //- Write
190 virtual void write(Ostream&) const;
191
192
193 // Member operators
194
195 virtual void operator=(const fvPatchField<Type>& pvf);
196};
197
198
199// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201} // End namespace Foam
202
203// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204
205#ifdef NoRepository
207#endif
208
209// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210
211#endif
212
213// ************************************************************************* //
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.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
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 boundary condition provides a base class for 'mixed' type boundary conditions,...
mixedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition tmp.H:75
Variant of inletOutlet boundary condition with uniform inletValue.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
uniformInletOutletFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
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
Return a clone.
virtual bool assignable() const
True: this patch field is altered by assignment.
autoPtr< Function1< Type > > uniformInletValue_
Value.
virtual tmp< fvPatchField< Type > > clone(const DimensionedField< Type, volMesh > &iF) const
Clone with an internal field reference.
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68