cylindricalInletVelocityFvPatchVectorField.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-2018 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::cylindricalInletVelocityFvPatchVectorField
26 
27 Description
28  This boundary condition describes an inlet vector boundary condition in
29  cylindrical co-ordinates given a central axis, central point, rpm, axial
30  and radial velocity.
31 
32 Usage
33  \table
34  Property | Description | Required | Default value
35  axis | axis of rotation | yes |
36  origin | origin of rotation | yes |
37  axialVelocity | axial velocity profile [m/s] | yes |
38  radialVelocity | radial velocity profile [m/s] | yes |
39  rpm | rotational speed (revolutions per minute) | yes|
40  \endtable
41 
42  Example of the boundary condition specification:
43  \verbatim
44  <patchName>
45  {
46  type cylindricalInletVelocity;
47  axis (0 0 1);
48  origin (0 0 0);
49  axialVelocity constant 30;
50  radialVelocity constant -10;
51  rpm constant 100;
52  }
53  \endverbatim
54 
55 Note
56  The \c axialVelocity, \c radialVelocity and \c rpm entries are Function1
57  types, able to describe time varying functions. The example above gives
58  the usage for supplying constant values.
59 
60 See also
61  Foam::fixedValueFvPatchField
62  Foam::Function1Types
63 
64 SourceFiles
65  cylindricalInletVelocityFvPatchVectorField.C
66 
67 \*---------------------------------------------------------------------------*/
68 
69 #ifndef cylindricalInletVelocityFvPatchVectorField_H
70 #define cylindricalInletVelocityFvPatchVectorField_H
71 
73 #include "Function1.H"
74 
75 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 
77 namespace Foam
78 {
79 /*---------------------------------------------------------------------------*\
80  Class cylindricalInletVelocityFvPatchVectorField Declaration
81 \*---------------------------------------------------------------------------*/
82 
83 class cylindricalInletVelocityFvPatchVectorField
84 :
85  public fixedValueFvPatchVectorField
86 {
87  // Private data
88 
89  //- Origin of the rotation
90  const vector origin_;
91 
92  //- Axis of the rotation
93  const vector axis_;
94 
95  //- Axial velocity
96  autoPtr<Function1<scalar>> axialVelocity_;
97 
98  //- Radial velocity
99  autoPtr<Function1<scalar>> radialVelocity_;
100 
101  //- RPM
102  autoPtr<Function1<scalar>> rpm_;
103 
104 
105 public:
106 
107  //- Runtime type information
108  TypeName("cylindricalInletVelocity");
109 
110 
111  // Constructors
113  //- Construct from patch and internal field
115  (
116  const fvPatch&,
118  );
119 
120  //- Construct from patch, internal field and dictionary
122  (
123  const fvPatch&,
125  const dictionary&
126  );
127 
128  //- Construct by mapping given
129  // flowRateInletVelocityFvPatchVectorField
130  // onto a new patch
132  (
134  const fvPatch&,
136  const fvPatchFieldMapper&
137  );
138 
139  //- Construct as copy
141  (
143  );
144 
145  //- Construct and return a clone
146  virtual tmp<fvPatchVectorField> clone() const
147  {
149  (
151  );
152  }
153 
154  //- Construct as copy 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
176  //- Update the coefficients associated with the patch field
177  virtual void updateCoeffs();
178 
179  //- Write
180  virtual void write(Ostream&) const;
181 };
182 
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 } // End namespace Foam
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 #endif
191 
192 // ************************************************************************* //
This boundary condition describes an inlet vector boundary condition in cylindrical co-ordinates give...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
cylindricalInletVelocityFvPatchVectorField(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
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:49
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
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...
TypeName("cylindricalInletVelocity")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.