translatingWallVelocityFvPatchVectorField.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::translatingWallVelocityFvPatchVectorField
28 
29 Group
30  grpWallBoundaryConditions grpGenericBoundaryConditions
31 
32 Description
33  This boundary condition provides a velocity condition for translational
34  motion on walls.
35 
36 Usage
37  \table
38  Property | Description | Required | Default value
39  U | translational velocity | yes |
40  \endtable
41 
42  Example of the boundary condition specification:
43  \verbatim
44  <patchName>
45  {
46  type translatingWallVelocity;
47  U (100 0 0);
48  }
49  \endverbatim
50 
51  The \c U entry is a Function1 of time, see Foam::Function1Types.
52 
53 
54 See also
55  Foam::fixedValueFvPatchField
56  Foam::Function1Types
57 
58 SourceFiles
59  translatingWallVelocityFvPatchVectorField.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef translatingWallVelocityFvPatchVectorField_H
64 #define translatingWallVelocityFvPatchVectorField_H
65 
67 #include "Function1.H"
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 namespace Foam
72 {
73 
74 /*---------------------------------------------------------------------------*\
75  Class translatingWallVelocityFvPatchField Declaration
76 \*---------------------------------------------------------------------------*/
77 
78 class translatingWallVelocityFvPatchVectorField
79 :
80  public fixedValueFvPatchVectorField
81 {
82  // Private data
83 
84  //- Translational velocity
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("translatingWallVelocity");
92 
93 
94  // Constructors
95 
96  //- Construct from patch and internal field
98  (
99  const fvPatch&,
101  );
102 
103  //- Construct from patch, internal field and dictionary
105  (
106  const fvPatch&,
108  const dictionary&
109  );
110 
111  //- Construct by mapping given a
112  // translatingWallVelocityFvPatchVectorField onto a new patch
114  (
116  const fvPatch&,
118  const fvPatchFieldMapper&
119  );
120 
121  //- Construct as copy
123  (
125  );
126 
127  //- Construct as copy setting internal field reference
129  (
132  );
133 
134  //- Return a clone
135  virtual tmp<fvPatchField<vector>> clone() const
136  {
137  return fvPatchField<vector>::Clone(*this);
138  }
139 
140  //- Clone with an internal field reference
142  (
144  ) const
145  {
146  return fvPatchField<vector>::Clone(*this, iF);
147  }
148 
149 
150  // Member functions
151 
152  //- Update the coefficients associated with the patch field
153  virtual void updateCoeffs();
154 
155  //- Write
156  virtual void write(Ostream&) const;
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
This boundary condition provides a velocity condition for translational motion on walls...
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:597
A FieldMapper for finite-volume patch fields.
translatingWallVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
A class for managing temporary objects.
Definition: HashPtrTable.H:50
virtual tmp< fvPatchField< vector > > clone() const
Return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("translatingWallVelocity")
Runtime type information.
Namespace for OpenFOAM.