movingWallVelocityFvPatchVectorField.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::movingWallVelocityFvPatchVectorField
26 
27 Group
28  grpWallBoundaryConditions
29 
30 Description
31  This boundary condition provides a velocity condition for cases with
32  moving walls. In addition, it should also be applied to 'moving' walls
33  for moving reference frame (MRF) calculations.
34 
35 
36  \heading Patch usage
37 
38  \table
39  Property | Description | Required | Default value
40  U | velociy field name | no | U
41  \endtable
42 
43  Example of the boundary condition specification:
44  \verbatim
45  myPatch
46  {
47  type movingWallVelocity;
48  U U;
49  value uniform 0; // initial value
50  }
51  \endverbatim
52 
53 SeeAlso
54  Foam::fixedValueFvPatchVectorField
55  Foam::MRFZone
56 
57 SourceFiles
58  movingWallVelocityFvPatchVectorField.C
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef movingWallVelocityFvPatchVectorField_H
63 #define movingWallVelocityFvPatchVectorField_H
64 
65 #include "fvPatchFields.H"
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class movingWallVelocityFvPatchVectorField Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 class movingWallVelocityFvPatchVectorField
78 :
79  public fixedValueFvPatchVectorField
80 {
81  // Private data
82 
83  //- Name of velocity field
84  word UName_;
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("movingWallVelocity");
91 
92 
93  // Constructors
94 
95  //- Construct from patch and internal field
97  (
98  const fvPatch&,
100  );
101 
102  //- Construct from patch, internal field and dictionary
104  (
105  const fvPatch&,
107  const dictionary&
108  );
109 
110  //- Construct by mapping given movingWallVelocityFvPatchVectorField
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
127  virtual tmp<fvPatchVectorField> clone() const
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 
155  // Member functions
156 
157  //- Update the coefficients associated with the patch field
158  virtual void updateCoeffs();
159 
160  //- Write
161  virtual void write(Ostream&) const;
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
This boundary condition provides a velocity condition for cases with moving walls. In addition, it should also be applied to 'moving' walls for moving reference frame (MRF) calculations.
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("movingWallVelocity")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:138
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:62
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
movingWallVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
Foam::fvPatchFieldMapper.