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 | Copyright (C) 2011-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::filmHeightInletVelocityFvPatchVectorField
26 
27 Group
28  grpSurfaceFilmBoundaryConditions
29 
30 Description
31  This boundary condition is designed to be used in conjunction with
32  surface film modelling. It provides a velocity inlet boundary condition
33  for patches where the film height is specified. The inflow velocity is
34  obtained from the flux with a direction normal to the patch faces using:
35 
36  \f[
37  U_p = \frac{n \phi}{\rho |Sf| \delta}
38  \f]
39 
40  where
41  \vartable
42  U_p | patch velocity [m/s]
43  n | patch normal vector
44  \phi | mass flux [kg/s]
45  \rho | density [kg/m3]
46  Sf | patch face area vectors [m2]
47  \delta | film height [m]
48  \endvartable
49 
50 Usage
51  \table
52  Property | Description | Required | Default value
53  phi | Flux field name | no | phi
54  rho | density field name | no | rho
55  deltaf | height field name | no | deltaf
56  \endtable
57 
58  Example of the boundary condition specification:
59  \verbatim
60  <patchName>
61  {
62  type filmHeightInletVelocity;
63  phi phi;
64  rho rho;
65  deltaf deltaf;
66  value uniform (0 0 0); // initial velocity / [m/s]
67  }
68  \endverbatim
69 
70 See also
71  Foam::fixedValueFvPatchField
72 
73 SourceFiles
74  filmHeightInletVelocityFvPatchVectorField.C
75 
76 \*---------------------------------------------------------------------------*/
77 
78 #ifndef filmHeightInletVelocityFvPatchVectorField_H
79 #define filmHeightInletVelocityFvPatchVectorField_H
80 
81 #include "fvPatchFields.H"
83 
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85 
86 namespace Foam
87 {
88 
89 /*---------------------------------------------------------------------------*\
90  Class filmHeightInletVelocityFvPatchVectorField Declaration
91 \*---------------------------------------------------------------------------*/
92 
93 class filmHeightInletVelocityFvPatchVectorField
94 :
95  public fixedValueFvPatchVectorField
96 {
97  // Private data
98 
99  //- Name of flux field
100  word phiName_;
101 
102  //- Name of density field
103  word rhoName_;
104 
105  //- Name of film height field
106  word deltafName_;
107 
108 
109 public:
110 
111  //- Runtime type information
112  TypeName("filmHeightInletVelocity");
113 
114 
115  // Constructors
116 
117  //- Construct from patch and internal field
119  (
120  const fvPatch&,
121  const DimensionedField<vector, volMesh>&
122  );
123 
124  //- Construct from patch, internal field and dictionary
126  (
127  const fvPatch&,
128  const DimensionedField<vector, volMesh>&,
129  const dictionary&
130  );
131 
132  //- Construct by mapping given filmHeightInletVelocityFvPatchVectorField
133  // onto a new patch
135  (
137  const fvPatch&,
139  const fvPatchFieldMapper&
140  );
141 
142  //- Construct as copy
144  (
146  );
147 
148  //- Construct and return a clone
149  virtual tmp<fvPatchVectorField> clone() const
150  {
152  (
154  );
155  }
156 
157  //- Construct as copy setting internal field reference
159  (
162  );
163 
164  //- Construct and return a clone setting internal field reference
166  (
168  ) const
169  {
171  (
173  );
174  }
175 
176 
177  // Member functions
178 
179  // Attributes
180 
181  //- Return true: this patch field is altered by assignment
182  virtual bool assignable() const
183  {
184  return true;
185  }
186 
187 
188  // Access
189 
190  //- Return the name of phi
191  const word& phiName() const
192  {
193  return phiName_;
194  }
195 
196  //- Return reference to the name of phi to allow adjustment
197  word& phiName()
198  {
199  return phiName_;
200  }
201 
202  //- Return the name of rho
203  const word& rhoName() const
204  {
205  return rhoName_;
206  }
207 
208  //- Return reference to the name of rho to allow adjustment
210  {
211  return rhoName_;
212  }
213 
214  //- Return the name of deltaf
215  const word& deltafName() const
216  {
217  return deltafName_;
218  }
219 
220  //- Return reference to the name of df to allow adjustment
221  word& deltafName()
222  {
223  return deltafName_;
224  }
226 
227  //- Update the coefficients associated with the patch field
228  virtual void updateCoeffs();
229 
230  //- Write
231  virtual void write(Ostream&) const;
232 
233 
234  // Member operators
235 
236  virtual void operator=(const fvPatchField<vector>& pvf);
237 };
238 
239 
240 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
241 
242 } // End namespace Foam
243 
244 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
245 
246 #endif
247 
248 // ************************************************************************* //
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
virtual bool assignable() const
Return true: this patch field is altered by assignment.
TypeName("filmHeightInletVelocity")
Runtime type information.
filmHeightInletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:65
This boundary condition is designed to be used in conjunction with surface film modelling. It provides a velocity inlet boundary condition for patches where the film height is specified. The inflow velocity is obtained from the flux with a direction normal to the patch faces using:
A class for handling words, derived from string.
Definition: word.H:59
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:54
Namespace for OpenFOAM.
const word & deltafName() const
Return the name of deltaf.