Loading...
Searching...
No Matches
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
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 as copy setting internal field reference
134 (
137 );
138
139 //- Return a clone
140 virtual tmp<fvPatchField<vector>> clone() const
141 {
142 return fvPatchField<vector>::Clone(*this);
143 }
144
145 //- Clone with an internal field reference
147 (
149 ) const
150 {
151 return fvPatchField<vector>::Clone(*this, iF);
152 }
153
154
155 // Member functions
157 // Mapping functions
158
159 //- Map (and resize as needed) from self given a mapping object
160 virtual void autoMap
161 (
162 const fvPatchFieldMapper&
163 );
165 //- Reverse map the given fvPatchField onto this fvPatchField
166 virtual void rmap
167 (
168 const fvPatchVectorField&,
169 const labelList&
170 );
171
172
173 // Evaluation functions
174
175 //- Update the coefficients associated with the patch field
176 virtual void updateCoeffs();
177
178
179 // I-O
180
181 //- Write
182 virtual void write(Ostream&) const;
183};
184
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188} // End namespace Foam
189
190// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191
192#endif
193
194// ************************************************************************* //
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:59
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 void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< fvPatchField< vector > > clone() const
Return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
SRFWallVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchField< vector > > clone(const DimensionedField< vector, volMesh > &iF) const
Clone with an internal field reference.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
fvPatchField< vector > fvPatchVectorField
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68