filmHeightInletVelocityFvPatchVectorField.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) 2011-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::filmHeightInletVelocityFvPatchVectorField
28
29Group
30 grpSurfaceFilmBoundaryConditions
31
32Description
33 This boundary condition is designed to be used in conjunction with
34 surface film modelling. It provides a velocity inlet boundary condition
35 for patches where the film height is specified. The inflow velocity is
36 obtained from the flux with a direction normal to the patch faces using:
37
38 \f[
39 U_p = \frac{n \phi}{\rho |Sf| \delta}
40 \f]
41
42 where
43 \vartable
44 U_p | patch velocity [m/s]
45 n | patch normal vector
46 \phi | mass flux [kg/s]
47 \rho | density [kg/m3]
48 Sf | patch face area vectors [m2]
49 \delta | film height [m]
50 \endvartable
51
52Usage
53 \table
54 Property | Description | Required | Default value
55 phi | Flux field name | no | phi
56 rho | density field name | no | rho
57 deltaf | height field name | no | deltaf
58 \endtable
59
60 Example of the boundary condition specification:
61 \verbatim
62 <patchName>
63 {
64 type filmHeightInletVelocity;
65 phi phi;
66 rho rho;
67 deltaf deltaf;
68 value uniform (0 0 0); // initial velocity / [m/s]
69 }
70 \endverbatim
71
72See also
73 Foam::fixedValueFvPatchField
74
75SourceFiles
76 filmHeightInletVelocityFvPatchVectorField.C
77
78\*---------------------------------------------------------------------------*/
79
80#ifndef filmHeightInletVelocityFvPatchVectorField_H
81#define filmHeightInletVelocityFvPatchVectorField_H
82
83#include "fvPatchFields.H"
85
86// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87
88namespace Foam
89{
90
91/*---------------------------------------------------------------------------*\
92 Class filmHeightInletVelocityFvPatchVectorField Declaration
93\*---------------------------------------------------------------------------*/
94
95class filmHeightInletVelocityFvPatchVectorField
96:
97 public fixedValueFvPatchVectorField
98{
99 // Private data
100
101 //- Name of flux field
102 word phiName_;
103
104 //- Name of density field
105 word rhoName_;
106
107 //- Name of film height field
108 word deltafName_;
109
110
111public:
112
113 //- Runtime type information
114 TypeName("filmHeightInletVelocity");
115
116
117 // Constructors
118
119 //- Construct from patch and internal field
121 (
122 const fvPatch&,
123 const DimensionedField<vector, volMesh>&
124 );
125
126 //- Construct from patch, internal field and dictionary
128 (
129 const fvPatch&,
130 const DimensionedField<vector, volMesh>&,
131 const dictionary&
132 );
133
134 //- Construct by mapping given filmHeightInletVelocityFvPatchVectorField
135 // onto a new patch
137 (
139 const fvPatch&,
141 const fvPatchFieldMapper&
142 );
143
144 //- Construct as copy
146 (
148 );
149
150 //- Construct and return a clone
151 virtual tmp<fvPatchVectorField> clone() const
152 {
154 (
156 );
158
159 //- Construct as copy setting internal field reference
161 (
164 );
165
166 //- Construct and return a clone setting internal field reference
168 (
170 ) const
171 {
173 (
175 );
176 }
177
178
179 // Member functions
180
181 // Attributes
182
183 //- Return true: this patch field is altered by assignment
184 virtual bool assignable() const
185 {
186 return true;
187 }
188
189
190 // Access
191
192 //- Return the name of phi
193 const word& phiName() const
195 return phiName_;
196 }
197
198 //- Return reference to the name of phi to allow adjustment
199 word& phiName()
200 {
201 return phiName_;
202 }
203
204 //- Return the name of rho
205 const word& rhoName() const
206 {
207 return rhoName_;
208 }
209
210 //- Return reference to the name of rho to allow adjustment
211 word& rhoName()
212 {
213 return rhoName_;
214 }
215
216 //- Return the name of deltaf
217 const word& deltafName() const
218 {
219 return deltafName_;
220 }
221
222 //- Return reference to the name of df to allow adjustment
223 word& deltafName()
224 {
225 return deltafName_;
226 }
228
229 //- Update the coefficients associated with the patch field
230 virtual void updateCoeffs();
231
232 //- Write
233 virtual void write(Ostream&) const;
234
235
236 // Member operators
237
238 virtual void operator=(const fvPatchField<vector>& pvf);
239};
240
241
242// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
243
244} // End namespace Foam
245
246// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
247
248#endif
249
250// ************************************************************************* //
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
This boundary condition is designed to be used in conjunction with surface film modelling....
word & phiName()
Return reference to the name of phi to allow adjustment.
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
word & deltafName()
Return reference to the name of df to allow adjustment.
word & rhoName()
Return reference to the name of rho to allow adjustment.
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
filmHeightInletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
TypeName("filmHeightInletVelocity")
Runtime type information.
virtual bool assignable() const
Return true: this patch field is altered by assignment.
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
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