FreeFOAM The Cross-Platform CFD Toolkit
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) 2010-2010 OpenCFD Ltd.
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 the
13  Free Software Foundation; either version 3 of the License, or (at your
14  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, write to the Free Software Foundation,
23  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 
25 Class
26  Foam::cylindricalInletVelocityFvPatchVectorField
27 
28 Description
29  Describes an inlet vector boundary condition in cylindrical coordinates
30  given a central axis, central point, rpm, axial and radial velocity.
31 
32  Example of the boundary condition specification:
33  @verbatim
34  inlet
35  {
36  type cylindricalInletVelocity;
37  axis (0 0 1);
38  centre (0 0 0);
39  axialVelocity 30;
40  rpm 100;
41  radialVelocity -10;
42  }
43  @endverbatim
44 
45 
46 SourceFiles
47  cylindricalInletVelocityFvPatchVectorField.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef cylindricalInletVelocityFvPatchVectorField_H
52 #define cylindricalInletVelocityFvPatchVectorField_H
53 
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 /*---------------------------------------------------------------------------*\
61  Class cylindricalInletVelocityFvPatchVectorField Declaration
62 \*---------------------------------------------------------------------------*/
63 
65 :
66  public fixedValueFvPatchVectorField
67 {
68  // Private data
69 
70  //- Axial velocity
71  const scalar axialVelocity_;
72 
73  //- Central point
74  const vector centre_;
75 
76  //- Axis
77  const vector axis_;
78 
79  //- RPM
80  const scalar rpm_;
81 
82  //- Radial velocity
83  const scalar radialVelocity_;
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("cylindricalInletVelocity");
90 
91 
92  // Constructors
93 
94  //- Construct from patch and internal field
96  (
97  const fvPatch&,
99  );
100 
101  //- Construct from patch, internal field and dictionary
103  (
104  const fvPatch&,
106  const dictionary&
107  );
108 
109  //- Construct by mapping given
110  // flowRateInletVelocityFvPatchVectorField
111  // onto a new patch
113  (
115  const fvPatch&,
117  const fvPatchFieldMapper&
118  );
119 
120  //- Construct as copy
122  (
124  );
125 
126  //- Construct and return a clone
128  {
130  (
132  );
133  }
134 
135  //- Construct as copy setting internal field reference
137  (
140  );
141 
142  //- Construct and return a clone setting internal field reference
144  (
146  ) const
147  {
149  (
151  );
152  }
153 
154 
155  // Member functions
156 
157 
158  //- Update the coefficients associated with the patch field
159  virtual void updateCoeffs();
160 
161  //- Write
162  virtual void write(Ostream&) const;
163 };
164 
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 } // End namespace Foam
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************************************************************* //