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-2020 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  //- Disallow copy without setting internal field reference
123  (
125  ) = delete;
126 
127  //- Copy constructor setting internal field reference
129  (
132  );
133 
134  //- Construct and return a clone setting internal field reference
136  (
138  ) const
139  {
141  (
142  new SRFWallVelocityFvPatchVectorField(*this, iF)
143  );
144  }
145 
146 
147  // Member Functions
148 
149  // Mapping functions
150 
151  //- Map (and resize as needed) from self given a mapping object
152  // Used to update fields following mesh topology change
153  virtual void autoMap(const fvPatchFieldMapper&);
154 
155  //- Reverse map the given fvPatchField onto this fvPatchField
156  // Used to reconstruct fields
157  virtual void rmap(const fvPatchVectorField&, const labelList&);
158 
159 
160  // Evaluation functions
161 
162  //- Update the coefficients associated with the patch field
163  virtual void updateCoeffs();
164 
165 
166  // I-O
167 
168  //- Write
169  virtual void write(Ostream&) const;
170 };
171 
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 } // End namespace Foam
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 #endif
180 
181 // ************************************************************************* //
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.
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:62
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
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:54
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.