outletPhaseMeanVelocityFvPatchVectorField.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::outletPhaseMeanVelocityFvPatchVectorField
28
29Group
30 grpOutletBoundaryConditions
31
32Description
33 This boundary condition adjusts the velocity for the given phase to achieve
34 the specified mean thus causing the phase-fraction to adjust according to
35 the mass flow rate.
36
37 Typical usage is as the outlet condition for a towing-tank ship simulation
38 to maintain the outlet water level at the level as the inlet.
39
40Usage
41 \table
42 Property | Description | Required | Default value
43 Umean | mean velocity normal to the boundary [m/s] | yes |
44 alpha | phase-fraction field | yes |
45 \endtable
46
47 Example of the boundary condition specification:
48 \verbatim
49 <patchName>
50 {
51 type outletPhaseMeanVelocity;
52 Umean 1.2;
53 alpha alpha.water;
54 value uniform (1.2 0 0);
55 }
56 \endverbatim
57
58See also
59 Foam::mixedFvPatchField
60 Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
61
62SourceFiles
63 outletPhaseMeanVelocityFvPatchVectorField.C
64
65\*---------------------------------------------------------------------------*/
66
67#ifndef outletPhaseMeanVelocityFvPatchVectorField_H
68#define outletPhaseMeanVelocityFvPatchVectorField_H
69
70#include "mixedFvPatchFields.H"
71
72// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73
74namespace Foam
75{
76/*---------------------------------------------------------------------------*\
77 Class outletPhaseMeanVelocityFvPatchVectorField Declaration
78\*---------------------------------------------------------------------------*/
79
80class outletPhaseMeanVelocityFvPatchVectorField
81:
82 public mixedFvPatchVectorField
83{
84 // Private data
85
86 //- Inlet integral flow rate
87 scalar Umean_;
88
89 //- Name of the phase-fraction field
90 word alphaName_;
91
92
93public:
95 //- Runtime type information
96 TypeName("outletPhaseMeanVelocity");
97
98
99 // Constructors
100
101 //- Construct from patch and internal field
103 (
104 const fvPatch&,
106 );
107
108 //- Construct from patch, internal field and dictionary
111 const fvPatch&,
113 const dictionary&
114 );
115
116 //- Construct by mapping given
117 // outletPhaseMeanVelocityFvPatchVectorField
118 // onto a new patch
120 (
122 const fvPatch&,
124 const fvPatchFieldMapper&
125 );
126
127 //- Construct as copy
129 (
131 );
132
133 //- Construct and return a clone
134 virtual tmp<fvPatchVectorField> clone() const
135 {
137 (
139 );
140 }
141
142 //- Construct as copy setting internal field reference
144 (
147 );
149 //- Construct and return a clone setting internal field reference
151 (
153 ) const
154 {
156 (
158 (
159 *this,
160 iF
161 )
162 );
163 }
165
166 // Member functions
167
168 // Access
169
170 //- Return the flux
171 scalar Umean() const
172 {
173 return Umean_;
174 }
175
176 //- Return reference to the flux to allow adjustment
177 scalar& Umean()
178 {
179 return Umean_;
180 }
181
182
183 //- Update the coefficients associated with the patch field
184 virtual void updateCoeffs();
186 //- Write
187 virtual void write(Ostream&) const;
188};
189
190
191// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192
193} // End namespace Foam
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197#endif
198
199// ************************************************************************* //
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.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
This boundary condition adjusts the velocity for the given phase to achieve the specified mean thus c...
TypeName("outletPhaseMeanVelocity")
Runtime type information.
scalar & Umean()
Return reference to the flux to allow adjustment.
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
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.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73