pressurePermeableAlphaInletOutletVelocityFvPatchVectorField.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) 2021 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::pressurePermeableAlphaInletOutletVelocityFvPatchVectorField
28
29Group
30 grpInletBoundaryConditions grpOutletBoundaryConditions
31
32Description
33 The \c pressurePermeableAlphaInletOutletVelocity is a velocity inlet-outlet
34 boundary condition which can be applied to velocity boundaries for
35 multiphase flows when the pressure boundary condition is specified.
36
37 In the \c pressurePermeableAlphaInletOutletVelocity, an open condition is
38 applied when \c alpha is under a user-defined \c alphaMin value and a wall
39 condition is applied when \c alpha is larger than the \c alphaMin.
40
41 This boundary condition can be used in conjunction with
42 \c prghPermeableAlphaTotalPressure for the \c p_rgh variable.
43
44Usage
45 Example of the boundary condition specification:
46 \verbatim
47 <patchName>
48 {
49 // Mandatory entries
50 type pressurePermeableAlphaInletOutletVelocity;
51
52 // Optional entries
53 phi phi;
54 rho rho;
55 alpha alpha.water;
56 alphaMin 0.01;
57
58 // Inherited entries
59 value uniform (0 0 0);
60 ...
61 }
62 \endverbatim
63
64 where the entries mean:
65 \table
66 Property | Description | Type | Reqd | Deflt
67 phi | Name of flux field | word | no | phi
68 rho | Name of density field | word | no | rho
69 alpha | Name of mixture field | word | no | none
70 alphaMin | Minimum alpha | scalar | no | 1
71 \endtable
72
73 The inherited entries are elaborated in:
74 - \link mixedFvPatchFields.H \endlink
75
76See also
77 - Foam::prghPermeableAlphaTotalPressureFvPatchScalarField
78 - Foam::mixedFvPatchVectorField
79
80SourceFiles
81 pressurePermeableAlphaInletOutletVelocityFvPatchVectorField.C
82
83\*---------------------------------------------------------------------------*/
84
85#ifndef pressurePermeableAlphaInletOutletVelocityFvPatchVectorField_H
86#define pressurePermeableAlphaInletOutletVelocityFvPatchVectorField_H
87
88#include "fvPatchFields.H"
89#include "mixedFvPatchFields.H"
90
91// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92
93namespace Foam
94{
95
96/*---------------------------------------------------------------------------*\
97Class pressurePermeableAlphaInletOutletVelocityFvPatchVectorField Declaration
98\*---------------------------------------------------------------------------*/
99
100class pressurePermeableAlphaInletOutletVelocityFvPatchVectorField
101:
102 public mixedFvPatchVectorField
103{
104 // Private Data
105
106 //- Name of flux field
107 word phiName_;
108
109 //- Name of density field
110 word rhoName_;
111
112 //- Name of the mixture VOF field (if used)
113 word alphaName_;
114
115 //- Minimum alpha value to outlet blockage
116 scalar alphaMin_;
117
118
119public:
120
121 //- Runtime type information
122 TypeName("permeableAlphaPressureInletOutletVelocity");
123
124
125 // Constructors
126
127 //- Construct from patch and internal field
130 const fvPatch&,
132 );
133
134 //- Construct from patch, internal field and dictionary
136 (
137 const fvPatch&,
139 const dictionary&
140 );
141
142 //- Construct by mapping given
143 //- pressurePermeableAlphaInletOutletVelocityFvPatchVectorField
144 //- onto a new patch
146 (
148 const fvPatch&,
150 const fvPatchFieldMapper&
151 );
152
153 //- Construct as copy
155 (
157 );
158
159 //- Construct and return a clone
160 virtual tmp<fvPatchVectorField> clone() const
161 {
163 (
165 (
166 *this
167 )
168 );
169 }
170
171 //- Construct as copy setting internal field reference
173 (
176 );
177
178 //- Construct and return a clone setting internal field reference
180 (
182 ) const
183 {
185 (
187 (
188 *this,
189 iF
190 )
191 );
192 }
193
194
195 // Member Functions
196
197 // Attributes
198
199 //- Return true: this patch field is altered by assignment
200 virtual bool assignable() const
201 {
202 return true;
203 }
204
205
206 // Access
207
208 //- Return the name of rho
209 const word& rhoName() const noexcept
210 {
211 return rhoName_;
212 }
213
214 //- Return reference to the name of rho to allow adjustment
215 word& rhoName()
216 {
217 return rhoName_;
218 }
219
220 //- Return the name of phi
221 const word& phiName() const noexcept
222 {
223 return phiName_;
224 }
225
226 //- Return reference to the name of phi to allow adjustment
227 word& phiName()
228 {
229 return phiName_;
230 }
231
232
233 //- Update the coefficients associated with the patch field
234 virtual void updateCoeffs();
235
236 //- Write
237 virtual void write(Ostream&) const;
239
240 // Member Operators
241
242 //- Copy assignment
243 virtual void operator=(const fvPatchField<vector>& pvf);
245
246
247// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
248
249} // End namespace Foam
251// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
252
253#endif
254
255// ************************************************************************* //
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
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
The pressurePermeableAlphaInletOutletVelocity is a velocity inlet-outlet boundary condition which can...
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual bool assignable() const
Return true: this patch field is altered by assignment.
pressurePermeableAlphaInletOutletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
TypeName("permeableAlphaPressureInletOutletVelocity")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
const direction noexcept
Definition: Scalar.H:223
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73