cylindricalInletVelocityFvPatchVectorField.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::cylindricalInletVelocityFvPatchVectorField
26 
27 Group
28  grpInletBoundaryConditions
29 
30 Description
31  This boundary condition describes an inlet vector boundary condition in
32  cylindrical co-ordinates given a central axis, central point, rpm, axial
33  and radial velocity.
34 
35  \heading Patch usage
36 
37  \table
38  Property | Description | Required | Default value
39  axis | axis of rotation | yes |
40  centre | centre of rotation | yes |
41  axialVelocity | axial velocity profile [m/s] | yes |
42  radialVelocity | radial velocity profile [m/s] | yes |
43  rpm | rotational speed (revolutions per minute) | yes|
44  \endtable
45 
46  Example of the boundary condition specification:
47  \verbatim
48  myPatch
49  {
50  type cylindricalInletVelocity;
51  axis (0 0 1);
52  centre (0 0 0);
53  axialVelocity constant 30;
54  radialVelocity constant -10;
55  rpm constant 100;
56  }
57  \endverbatim
58 
59 Note
60  The \c axialVelocity, \c radialVelocity and \c rpm entries are DataEntry
61  types, able to describe time varying functions. The example above gives
62  the usage for supplying constant values.
63 
64 SeeAlso
65  Foam::fixedValueFvPatchField
66  Foam::DataEntry
67 
68 SourceFiles
69  cylindricalInletVelocityFvPatchVectorField.C
70 
71 \*---------------------------------------------------------------------------*/
72 
73 #ifndef cylindricalInletVelocityFvPatchVectorField_H
74 #define cylindricalInletVelocityFvPatchVectorField_H
75 
77 #include "DataEntry.H"
78 
79 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80 
81 namespace Foam
82 {
83 /*---------------------------------------------------------------------------*\
84  Class cylindricalInletVelocityFvPatchVectorField Declaration
85 \*---------------------------------------------------------------------------*/
86 
87 class cylindricalInletVelocityFvPatchVectorField
88 :
89  public fixedValueFvPatchVectorField
90 {
91  // Private data
92 
93  //- Central point
94  const vector centre_;
95 
96  //- Axis
97  const vector axis_;
98 
99  //- Axial velocity
100  autoPtr<DataEntry<scalar> > axialVelocity_;
101 
102  //- Radial velocity
103  autoPtr<DataEntry<scalar> > radialVelocity_;
104 
105  //- RPM
106  autoPtr<DataEntry<scalar> > rpm_;
107 
108 
109 public:
110 
111  //- Runtime type information
112  TypeName("cylindricalInletVelocity");
113 
114 
115  // Constructors
116 
117  //- Construct from patch and internal field
119  (
120  const fvPatch&,
122  );
123 
124  //- Construct from patch, internal field and dictionary
126  (
127  const fvPatch&,
129  const dictionary&
130  );
131 
132  //- Construct by mapping given
133  // flowRateInletVelocityFvPatchVectorField
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
150  virtual tmp<fvPatchVectorField> clone() const
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  //- Update the coefficients associated with the patch field
181  virtual void updateCoeffs();
182 
183  //- Write
184  virtual void write(Ostream&) const;
185 };
186 
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 } // End namespace Foam
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************************************************************* //
Foam::cylindricalInletVelocityFvPatchVectorField::TypeName
TypeName("cylindricalInletVelocity")
Runtime type information.
Foam::cylindricalInletVelocityFvPatchVectorField::radialVelocity_
autoPtr< DataEntry< scalar > > radialVelocity_
Radial velocity.
Definition: cylindricalInletVelocityFvPatchVectorField.H:132
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::cylindricalInletVelocityFvPatchVectorField::clone
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
Definition: cylindricalInletVelocityFvPatchVectorField.H:179
Foam::cylindricalInletVelocityFvPatchVectorField::axialVelocity_
autoPtr< DataEntry< scalar > > axialVelocity_
Axial velocity.
Definition: cylindricalInletVelocityFvPatchVectorField.H:129
Foam::cylindricalInletVelocityFvPatchVectorField::centre_
const vector centre_
Central point.
Definition: cylindricalInletVelocityFvPatchVectorField.H:123
DataEntry.H
Foam::cylindricalInletVelocityFvPatchVectorField::axis_
const vector axis_
Axis.
Definition: cylindricalInletVelocityFvPatchVectorField.H:126
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::cylindricalInletVelocityFvPatchVectorField::cylindricalInletVelocityFvPatchVectorField
cylindricalInletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Definition: cylindricalInletVelocityFvPatchVectorField.C:37
Foam::cylindricalInletVelocityFvPatchVectorField::rpm_
autoPtr< DataEntry< scalar > > rpm_
RPM.
Definition: cylindricalInletVelocityFvPatchVectorField.H:135
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::cylindricalInletVelocityFvPatchVectorField
This boundary condition describes an inlet vector boundary condition in cylindrical co-ordinates give...
Definition: cylindricalInletVelocityFvPatchVectorField.H:116
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:49
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::Vector< scalar >
fixedValueFvPatchFields.H
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::cylindricalInletVelocityFvPatchVectorField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: cylindricalInletVelocityFvPatchVectorField.C:119
Foam::cylindricalInletVelocityFvPatchVectorField::write
virtual void write(Ostream &) const
Write.
Definition: cylindricalInletVelocityFvPatchVectorField.C:147
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51