SRFWallVelocityFvPatchVectorField.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) 2016 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::SRFWallVelocityFvPatchVectorField
26 
27 Group
28  grpWallBoundaryConditions
29 
30 Description
31  Wall-velocity condition to be used in conjunction with the single rotating
32  frame (SRF) model (see: FOAM::SRFModel)
33 
34  The condition applies the appropriate rotation transformation in time and
35  space to determine the local SRF velocity of the wall.
36 
37  \f[
38  U_p = - U_{p,srf}
39  \f]
40 
41  where
42  \vartable
43  U_p = patch velocity [m/s]
44  U_{p,srf} = SRF velocity
45  \endvartable
46 
47  The normal component of \f$ U_p \f$ is removed to ensure 0 wall-flux even
48  if the wall patch faces are irregular.
49 
50 Usage
51  Example of the boundary condition specification:
52  \verbatim
53  <patchName>
54  {
55  type SRFWallVelocity;
56  value uniform (0 0 0); // Initial value
57  }
58  \endverbatim
59 
60 See also
61  Foam::SRFModel
62  Foam::SRFVelocityFvPatchVectorField
63  Foam::fixedValueFvPatchField
64 
65 SourceFiles
66  SRFWallVelocityFvPatchVectorField.C
67 
68 \*---------------------------------------------------------------------------*/
69 
70 #ifndef SRFWallVelocityFvPatchVectorField_H
71 #define SRFWallVelocityFvPatchVectorField_H
72 
73 #include "fvPatchFields.H"
75 #include "Switch.H"
76 
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 
79 namespace Foam
80 {
81 
82 /*---------------------------------------------------------------------------*\
83  Class SRFWallVelocityFvPatchVectorField Declaration
84 \*---------------------------------------------------------------------------*/
85 
86 class SRFWallVelocityFvPatchVectorField
87 :
88  public fixedValueFvPatchVectorField
89 {
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("SRFWallVelocity");
95 
96 
97  // Constructors
98 
99  //- Construct from patch and internal field
101  (
102  const fvPatch&,
104  );
105 
106  //- Construct from patch, internal field and dictionary
108  (
109  const fvPatch&,
111  const dictionary&
112  );
113 
114  //- Construct by mapping given SRFWallVelocityFvPatchVectorField
115  // onto a new patch
117  (
119  const fvPatch&,
121  const fvPatchFieldMapper&
122  );
123 
124  //- Construct as copy
126  (
128  );
129 
130  //- Construct and return a clone
131  virtual tmp<fvPatchVectorField> clone() const
132  {
134  (
136  );
137  }
138 
139  //- Construct as copy setting internal field reference
141  (
144  );
145 
146  //- Construct and return a clone setting internal field reference
148  (
150  ) const
151  {
153  (
154  new SRFWallVelocityFvPatchVectorField(*this, iF)
155  );
156  }
157 
158 
159  // Member functions
160 
161  // Mapping functions
162 
163  //- Map (and resize as needed) from self given a mapping object
164  virtual void autoMap
165  (
166  const fvPatchFieldMapper&
167  );
168 
169  //- Reverse map the given fvPatchField onto this fvPatchField
170  virtual void rmap
171  (
172  const fvPatchVectorField&,
173  const labelList&
174  );
175 
176 
177  // Evaluation functions
178 
179  //- Update the coefficients associated with the patch field
180  virtual void updateCoeffs();
181 
182 
183  // I-O
184 
185  //- Write
186  virtual void write(Ostream&) const;
187 };
188 
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 } // End namespace Foam
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 
196 #endif
197 
198 // ************************************************************************* //
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
Foam::fvPatchFieldMapper.
Wall-velocity condition to be used in conjunction with the single rotating frame (SRF) model (see: FO...
TypeName("SRFWallVelocity")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
SRFWallVelocityFvPatchVectorField(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...
A class for managing temporary objects.
Definition: PtrList.H:53
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Namespace for OpenFOAM.