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