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-2012 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  \heading Patch usage
51 
52  \table
53  Property | Description | Required | Default value
54  phi | Flux field name | no | phi
55  rho | density field name | no | rho
56  deltaf | height field name | no | deltaf
57  \endtable
58 
59  Example of the boundary condition specification:
60  \verbatim
61  myPatch
62  {
63  type filmHeightInletVelocity;
64  phi phi;
65  rho rho;
66  deltaf deltaf;
67  value uniform (0 0 0); // initial velocity / [m/s]
68  }
69  \endverbatim
70 
71 SeeAlso
72  Foam::fixedValueFvPatchField
73 
74 SourceFiles
75  filmHeightInletVelocityFvPatchVectorField.C
76 
77 \*---------------------------------------------------------------------------*/
78 
79 #ifndef filmHeightInletVelocityFvPatchVectorField_H
80 #define filmHeightInletVelocityFvPatchVectorField_H
81 
82 #include "fvPatchFields.H"
84 
85 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86 
87 namespace Foam
88 {
89 
90 /*---------------------------------------------------------------------------*\
91  Class filmHeightInletVelocityFvPatchVectorField Declaration
92 \*---------------------------------------------------------------------------*/
93 
94 class filmHeightInletVelocityFvPatchVectorField
95 :
96  public fixedValueFvPatchVectorField
97 {
98  // Private data
99 
100  //- Name of flux field
101  word phiName_;
102 
103  //- Name of density field
104  word rhoName_;
105 
106  //- Name of film height field
107  word deltafName_;
108 
109 
110 public:
111 
112  //- Runtime type information
113  TypeName("filmHeightInletVelocity");
114 
115 
116  // Constructors
117 
118  //- Construct from patch and internal field
120  (
121  const fvPatch&,
122  const DimensionedField<vector, volMesh>&
123  );
124 
125  //- Construct from patch, internal field and dictionary
127  (
128  const fvPatch&,
129  const DimensionedField<vector, volMesh>&,
130  const dictionary&
131  );
132 
133  //- Construct by mapping given filmHeightInletVelocityFvPatchVectorField
134  // onto a new patch
136  (
138  const fvPatch&,
140  const fvPatchFieldMapper&
141  );
142 
143  //- Construct as copy
145  (
147  );
148 
149  //- Construct and return a clone
151  {
153  (
155  );
156  }
157 
158  //- Construct as copy setting internal field reference
160  (
163  );
164 
165  //- Construct and return a clone setting internal field reference
167  (
169  ) const
170  {
172  (
174  );
175  }
176 
177 
178  // Member functions
179 
180  // Access
181 
182  //- Return the name of phi
183  const word& phiName() const
184  {
185  return phiName_;
186  }
187 
188  //- Return reference to the name of phi to allow adjustment
189  word& phiName()
190  {
191  return phiName_;
192  }
193 
194  //- Return the name of rho
195  const word& rhoName() const
196  {
197  return rhoName_;
198  }
199 
200  //- Return reference to the name of rho to allow adjustment
201  word& rhoName()
202  {
203  return rhoName_;
204  }
205 
206  //- Return the name of deltaf
207  const word& deltafName() const
208  {
209  return deltafName_;
210  }
211 
212  //- Return reference to the name of df to allow adjustment
213  word& deltafName()
214  {
215  return deltafName_;
216  }
217 
218 
219  //- Update the coefficients associated with the patch field
220  virtual void updateCoeffs();
221 
222  //- Write
223  virtual void write(Ostream&) const;
224 
225 
226  // Member operators
227 
228  virtual void operator=(const fvPatchField<vector>& pvf);
229 };
230 
231 
232 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
233 
234 } // End namespace Foam
235 
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
237 
238 #endif
239 
240 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:65
Foam::filmHeightInletVelocityFvPatchVectorField::phiName
word & phiName()
Return reference to the name of phi to allow adjustment.
Definition: filmHeightInletVelocityFvPatchVectorField.H:232
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::filmHeightInletVelocityFvPatchVectorField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: filmHeightInletVelocityFvPatchVectorField.C:109
Foam::filmHeightInletVelocityFvPatchVectorField::operator=
virtual void operator=(const fvPatchField< vector > &pvf)
Definition: filmHeightInletVelocityFvPatchVectorField.C:147
Foam::filmHeightInletVelocityFvPatchVectorField::phiName_
word phiName_
Name of flux field.
Definition: filmHeightInletVelocityFvPatchVectorField.H:144
Foam::filmHeightInletVelocityFvPatchVectorField::phiName
const word & phiName() const
Return the name of phi.
Definition: filmHeightInletVelocityFvPatchVectorField.H:226
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::filmHeightInletVelocityFvPatchVectorField
This boundary condition is designed to be used in conjunction with surface film modelling....
Definition: filmHeightInletVelocityFvPatchVectorField.H:137
Foam::filmHeightInletVelocityFvPatchVectorField::deltafName_
word deltafName_
Name of film height field.
Definition: filmHeightInletVelocityFvPatchVectorField.H:150
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::filmHeightInletVelocityFvPatchVectorField::deltafName
word & deltafName()
Return reference to the name of df to allow adjustment.
Definition: filmHeightInletVelocityFvPatchVectorField.H:256
Foam::filmHeightInletVelocityFvPatchVectorField::deltafName
const word & deltafName() const
Return the name of deltaf.
Definition: filmHeightInletVelocityFvPatchVectorField.H:250
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::filmHeightInletVelocityFvPatchVectorField::write
virtual void write(Ostream &) const
Write.
Definition: filmHeightInletVelocityFvPatchVectorField.C:134
Foam::filmHeightInletVelocityFvPatchVectorField::filmHeightInletVelocityFvPatchVectorField
filmHeightInletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Definition: filmHeightInletVelocityFvPatchVectorField.C:35
Foam::filmHeightInletVelocityFvPatchVectorField::rhoName_
word rhoName_
Name of density field.
Definition: filmHeightInletVelocityFvPatchVectorField.H:147
Foam::filmHeightInletVelocityFvPatchVectorField::rhoName
const word & rhoName() const
Return the name of rho.
Definition: filmHeightInletVelocityFvPatchVectorField.H:238
fvPatchFields.H
fixedValueFvPatchFields.H
Foam::filmHeightInletVelocityFvPatchVectorField::clone
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
Definition: filmHeightInletVelocityFvPatchVectorField.H:193
Foam::filmHeightInletVelocityFvPatchVectorField::TypeName
TypeName("filmHeightInletVelocity")
Runtime type information.
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::filmHeightInletVelocityFvPatchVectorField::rhoName
word & rhoName()
Return reference to the name of rho to allow adjustment.
Definition: filmHeightInletVelocityFvPatchVectorField.H:244
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51