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