Loading...
Searching...
No Matches
outletInletFaPatchField.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) 2023 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::outletInletFaPatchField
28
29Group
30 grpInletBoundaryConditions
31
32Description
33 This boundary condition provides a generic inflow condition, with
34 specified outflow for the case of reverse flow.
35
36Usage
37 \table
38 Property | Description | Required | Default value
39 phi | Flux field name | no | phi
40 outletValue | Outlet value for reverse flow | yes |
41 value | initial field value | optional |
42 \endtable
43
44 Example of the boundary condition specification:
45 \verbatim
46 <patchName>
47 {
48 type outletInlet;
49 phi phi;
50 outletValue uniform 0;
51 value uniform 0;
52 }
53 \endverbatim
54
55 The mode of operation is determined by the sign of the flux across the
56 patch edges.
57
58Note
59 Sign conventions:
60 - Positive flux (out of domain): apply the "outletValue" fixed-value
61 - Negative flux (into domain): apply zero-gradient condition
62
63See also
64 Foam::mixedFaPatchField
65 Foam::zeroGradientFaPatchField
66 Foam::inletOutletFaPatchField
67
68SourceFiles
69 outletInletFaPatchField.C
70
71\*---------------------------------------------------------------------------*/
72
73#ifndef Foam_outletInletFaPatchField_H
74#define Foam_outletInletFaPatchField_H
75
76#include "mixedFaPatchField.H"
77
78// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79
80namespace Foam
81{
82
83/*---------------------------------------------------------------------------*\
84 Class outletInletFaPatch Declaration
85\*---------------------------------------------------------------------------*/
86
87template<class Type>
89:
90 public mixedFaPatchField<Type>
91{
92protected:
93
94 // Protected Data
95
96 //- Name of flux field (default: phi)
97 word phiName_;
98
99
100public:
101
102 //- Runtime type information
103 TypeName("outletInlet");
104
105
106 // Constructors
107
108 //- Construct from patch and internal field
110 (
111 const faPatch&,
113 );
115 //- Construct from patch, internal field and dictionary
117 (
118 const faPatch&,
120 const dictionary&
121 );
123 //- Construct by mapping given outletInletFaPatchField onto a new patch
125 (
127 const faPatch&,
129 const faPatchFieldMapper&
130 );
131
132 //- Construct as copy
134 (
136 );
137
138 //- Construct as copy setting internal field reference
140 (
143 );
144
145 //- Return clone
146 virtual tmp<faPatchField<Type>> clone() const
147 {
148 return faPatchField<Type>::Clone(*this);
149 }
150
151 //- Clone with an internal field reference
153 (
155 ) const
156 {
157 return faPatchField<Type>::Clone(*this, iF);
158 }
159
160
161 // Member Functions
162
163 //- Update the coefficients associated with the patch field
164 virtual void updateCoeffs();
165
166 //- Write includes "value" entry
167 virtual void write(Ostream&) const;
168};
169
170
171// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172
173} // End namespace Foam
174
175// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176
177#ifdef NoRepository
179#endif
180
181// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182
183#endif
184
185// ************************************************************************* //
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 base class for 'mixed' type boundary conditions,...
mixedFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
This boundary condition provides a generic inflow condition, with specified outflow for the case of r...
virtual tmp< faPatchField< Type > > clone() const
Return clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
word phiName_
Name of flux field (default: phi).
virtual tmp< faPatchField< Type > > clone(const DimensionedField< Type, areaMesh > &iF) const
Clone with an internal field reference.
outletInletFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
TypeName("outletInlet")
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