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-2020 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  //- Disallow copy without setting internal field reference
141  (
143  ) = delete;
144 
145  //- Copy constructor setting internal field reference
147  (
150  );
151 
152  //- Construct and return a clone setting internal field reference
154  (
156  ) const
157  {
159  (
161  );
162  }
163 
164 
165  // Member Functions
166 
167  // Attributes
168 
169  //- Return true: this patch field is altered by assignment
170  virtual bool assignable() const
171  {
172  return true;
173  }
174 
175 
176  // Access
177 
178  //- Return the name of phi
179  const word& phiName() const
180  {
181  return phiName_;
182  }
183 
184  //- Return reference to the name of phi to allow adjustment
185  word& phiName()
186  {
187  return phiName_;
188  }
189 
190  //- Return the name of rho
191  const word& rhoName() const
192  {
193  return rhoName_;
194  }
195 
196  //- Return reference to the name of rho to allow adjustment
198  {
199  return rhoName_;
200  }
201 
202  //- Return the name of deltaf
203  const word& deltafName() const
204  {
205  return deltafName_;
206  }
207 
208  //- Return reference to the name of df to allow adjustment
209  word& deltafName()
210  {
211  return deltafName_;
212  }
214 
215  //- Update the coefficients associated with the patch field
216  virtual void updateCoeffs();
217 
218  //- Write
219  virtual void write(Ostream&) const;
220 
221 
222  // Member Operators
223 
224  virtual void operator=(const fvPatchField<vector>& pvf);
225 };
226 
227 
228 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
229 
230 } // End namespace Foam
231 
232 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
233 
234 #endif
235 
236 // ************************************************************************* //
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:63
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 DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
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:54
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.