SRFWallVelocityFvPatchVectorField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2019 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 Description
28  Wall-velocity condition to be used in conjunction with the single rotating
29  frame (SRF) model (see: FOAM::SRFModel)
30 
31  The condition applies the appropriate rotation transformation in time and
32  space to determine the local SRF velocity of the wall.
33 
34  \f[
35  U_p = - U_{p,srf}
36  \f]
37 
38  where
39  \vartable
40  U_p = patch velocity [m/s]
41  U_{p,srf} = SRF velocity
42  \endvartable
43 
44  The normal component of \f$ U_p \f$ is removed to ensure 0 wall-flux even
45  if the wall patch faces are irregular.
46 
47 Usage
48  Example of the boundary condition specification:
49  \verbatim
50  <patchName>
51  {
52  type SRFWallVelocity;
53  value uniform (0 0 0); // Initial value
54  }
55  \endverbatim
56 
57 See also
58  Foam::SRFModel
59  Foam::SRFVelocityFvPatchVectorField
60  Foam::fixedValueFvPatchField
61 
62 SourceFiles
63  SRFWallVelocityFvPatchVectorField.C
64 
65 \*---------------------------------------------------------------------------*/
66 
67 #ifndef SRFWallVelocityFvPatchVectorField_H
68 #define SRFWallVelocityFvPatchVectorField_H
69 
70 #include "fvPatchFields.H"
72 #include "Switch.H"
73 
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75 
76 namespace Foam
77 {
78 
79 /*---------------------------------------------------------------------------*\
80  Class SRFWallVelocityFvPatchVectorField Declaration
81 \*---------------------------------------------------------------------------*/
82 
83 class SRFWallVelocityFvPatchVectorField
84 :
85  public fixedValueFvPatchVectorField
86 {
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("SRFWallVelocity");
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 SRFWallVelocityFvPatchVectorField
112  // onto a new patch
114  (
116  const fvPatch&,
118  const fvPatchFieldMapper&
119  );
120 
121  //- Copy constructor
123  (
125  );
126 
127  //- Construct and return a clone
128  virtual tmp<fvPatchVectorField> clone() const
129  {
131  (
133  );
134  }
135 
136  //- Copy constructor setting internal field reference
138  (
141  );
142 
143  //- Construct and return a clone setting internal field reference
145  (
147  ) const
148  {
150  (
151  new SRFWallVelocityFvPatchVectorField(*this, iF)
152  );
153  }
154 
155 
156  // Member Functions
157 
158  // Mapping functions
159 
160  //- Map (and resize as needed) from self given a mapping object
161  // Used to update fields following mesh topology change
162  virtual void autoMap(const fvPatchFieldMapper&);
163 
164  //- Reverse map the given fvPatchField onto this fvPatchField
165  // Used to reconstruct fields
166  virtual void rmap(const fvPatchVectorField&, const labelList&);
167 
168 
169  // Evaluation functions
170 
171  //- Update the coefficients associated with the patch field
172  virtual void updateCoeffs();
173 
174 
175  // I-O
176 
177  //- Write
178  virtual void write(Ostream&) const;
179 };
180 
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 } // End namespace Foam
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 #endif
189 
190 // ************************************************************************* //
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:158
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.