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-2023 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::Function1s
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
112 
113  //- Construct from patch, internal field and dictionary
115  (
116  const fvPatch&,
118  const dictionary&
119  );
120 
121  //- Construct by mapping given
122  // flowRateInletVelocityFvPatchVectorField
123  // onto a new patch
125  (
127  const fvPatch&,
129  const fvPatchFieldMapper&
130  );
131 
132  //- Disallow copy without setting internal field reference
134  (
136  ) = delete;
137 
138  //- Copy constructor setting internal field reference
140  (
143  );
144 
145  //- Construct and return a clone setting internal field reference
147  (
149  ) const
150  {
152  (
154  );
155  }
156 
157 
158  // Member Functions
159 
160  //- Update the coefficients associated with the patch field
161  virtual void updateCoeffs();
162 
163  //- Write
164  virtual void write(Ostream&) const;
165 };
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 } // End namespace Foam
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #endif
175 
176 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
This boundary condition describes an inlet vector boundary condition in cylindrical co-ordinates give...
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
cylindricalInletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
TypeName("cylindricalInletVelocity")
Runtime type information.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Foam::fvPatchFieldMapper.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:49