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
85  autoPtr<Function1<vector>> U_;
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 and return a clone
128  virtual tmp<fvPatchVectorField> clone() const
129  {
131  (
133  );
134  }
135 
136  //- Construct as copy setting internal field reference
138  (
141  );
142 
143  //- Construct and return a clone setting internal field reference
145  (
147  ) const
148  {
150  (
152  );
153  }
154 
155 
156  // Member functions
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 // ************************************************************************* //
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Function1.H
Foam::translatingWallVelocityFvPatchVectorField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: translatingWallVelocityFvPatchVectorField.C:102
Foam::translatingWallVelocityFvPatchVectorField::translatingWallVelocityFvPatchVectorField
translatingWallVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Definition: translatingWallVelocityFvPatchVectorField.C:37
Foam::translatingWallVelocityFvPatchVectorField
This boundary condition provides a velocity condition for translational motion on walls.
Definition: translatingWallVelocityFvPatchVectorField.H:87
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::translatingWallVelocityFvPatchVectorField::TypeName
TypeName("translatingWallVelocity")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::translatingWallVelocityFvPatchVectorField::write
virtual void write(Ostream &) const
Write.
Definition: translatingWallVelocityFvPatchVectorField.C:120
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
fixedValueFvPatchFields.H
Foam::translatingWallVelocityFvPatchVectorField::clone
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
Definition: translatingWallVelocityFvPatchVectorField.H:137
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54