Loading...
Searching...
No Matches
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
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:
94
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
110 (
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 as copy setting internal field reference
135 (
138 );
139
140 //- Return a clone
141 virtual tmp<fvPatchField<vector>> clone() const
142 {
143 return fvPatchField<vector>::Clone(*this);
144 }
145
146 //- Clone with an internal field reference
148 (
150 ) const
151 {
152 return fvPatchField<vector>::Clone(*this, iF);
153 }
154
155
156 // Member functions
157
158 // Access
159
160 //- Return the flux
161 scalar Umean() const
162 {
163 return Umean_;
164 }
165
166 //- Return reference to the flux to allow adjustment
167 scalar& Umean()
168 {
169 return Umean_;
171
172
173 //- Update the coefficients associated with the patch field
174 virtual void updateCoeffs();
175
176 //- Write
177 virtual void write(Ostream&) const;
179
180
181// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182
183} // End namespace Foam
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187#endif
188
189// ************************************************************************* //
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-volume patch fields.
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 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< fvPatchField< vector > > clone() const
Return a clone.
outletPhaseMeanVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual tmp< fvPatchField< vector > > clone(const DimensionedField< vector, volMesh > &iF) const
Clone with an internal field reference.
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