Loading...
Searching...
No Matches
inletOutletFaPatchField.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-2017 Wikki Ltd
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::inletOutletFaPatchField
29
30Group
31 grpOutletBoundaryConditions
32
33Description
34 This boundary condition provides a generic outflow condition, with
35 specified inflow for the case of return flow.
36
37Usage
38 \table
39 Property | Description | Required | Default value
40 phi | Flux field name | no | phi
41 inletValue | Inlet value for reverse flow | yes |
42 value | initial field value | optional |
43 \endtable
44
45 Example of the boundary condition specification:
46 \verbatim
47 <patchName>
48 {
49 type inletOutlet;
50 phi phi;
51 inletValue uniform 0;
52 value uniform 0;
53 }
54 \endverbatim
55
56 The mode of operation is determined by the sign of the flux across the
57 patch edges.
58
59Note
60 Sign conventions:
61 - Positive flux (out of domain): apply zero-gradient condition
62 - Negative flux (into domain): apply the "inletValue" fixed-value
63
64See also
65 Foam::mixedFaPatchField
66 Foam::zeroGradientFaPatchField
67 Foam::outletInletFaPatchField
68
69SourceFiles
70 inletOutletFaPatchField.C
71
72\*---------------------------------------------------------------------------*/
73
74#ifndef Foam_inletOutletFaPatchField_H
75#define Foam_inletOutletFaPatchField_H
76
77#include "mixedFaPatchField.H"
78
79// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80
81namespace Foam
82{
83
84/*---------------------------------------------------------------------------*\
85 Class inletOutletFaPatchField Declaration
86\*---------------------------------------------------------------------------*/
87
88template<class Type>
90:
91 public mixedFaPatchField<Type>
92{
93protected:
94
95 // Protected Data
96
97 //- Name of flux field
98 word phiName_;
99
100
101public:
102
103 //- Runtime type information
104 TypeName("inletOutlet");
105
106
107 // Constructors
108
109 //- Construct from patch and internal field
111 (
112 const faPatch&,
114 );
116 //- Construct from patch, internal field and dictionary
118 (
119 const faPatch&,
121 const dictionary&
122 );
124 //- Construct by mapping given inletOutletFaPatchField onto a new patch
126 (
128 const faPatch&,
130 const faPatchFieldMapper&
131 );
132
133 //- Construct as copy
135 (
137 );
138
139 //- Construct as copy setting internal field reference
141 (
144 );
145
146 //- Return clone
147 virtual tmp<faPatchField<Type>> clone() const
148 {
149 return faPatchField<Type>::Clone(*this);
150 }
151
152 //- Clone with an internal field reference
154 (
156 ) const
157 {
158 return faPatchField<Type>::Clone(*this, iF);
159 }
160
161
162 //- Destructor
163 virtual ~inletOutletFaPatchField() = default;
164
165
166 // Member Functions
167
168 //- Update the coefficients associated with the patch field
169 virtual void updateCoeffs();
170
171 //- Write includes "value" entry
172 virtual void write(Ostream&) const;
173};
174
175
176// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177
178} // End namespace Foam
179
180// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181
182#ifdef NoRepository
184#endif
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188#endif
189
190// ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-area patch fields.
static tmp< faPatchField< Type > > Clone(const DerivedPatchField &pf)
Clone a patch field with its own internal field reference.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition faPatch.H:76
This boundary condition provides a generic outflow condition, with specified inflow for the case of r...
virtual tmp< faPatchField< Type > > clone() const
Return clone.
virtual ~inletOutletFaPatchField()=default
Destructor.
inletOutletFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual tmp< faPatchField< Type > > clone(const DimensionedField< Type, areaMesh > &iF) const
Clone with an internal field reference.
TypeName("inletOutlet")
Runtime type information.
This boundary condition provides a base class for 'mixed' type boundary conditions,...
mixedFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
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