Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
finiteVolume
fields
fvPatchFields
derived
rotatingPressureInletOutletVelocity
rotatingPressureInletOutletVelocityFvPatchVectorField.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) 1991-2010 OpenCFD Ltd.
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::rotatingPressureInletOutletVelocityFvPatchVectorField
26
27
Description
28
Velocity inlet/outlet boundary condition in a rotating frame
29
for patches where the pressure is specified. zero-gradient is applied for
30
outflow (as defined by the flux) and for inflow the velocity is obtained
31
from the flux with a direction normal to the patch faces.
32
33
SourceFiles
34
rotatingPressureInletOutletVelocityFvPatchVectorField.C
35
36
\*---------------------------------------------------------------------------*/
37
38
#ifndef rotatingPressureInletOutletVelocityFvPatchVectorField_H
39
#define rotatingPressureInletOutletVelocityFvPatchVectorField_H
40
41
#include <
finiteVolume/fvPatchFields.H
>
42
#include <
finiteVolume/pressureInletOutletVelocityFvPatchVectorField.H
>
43
44
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46
namespace
Foam
47
{
48
49
/*---------------------------------------------------------------------------*\
50
Class rotatingPressureInletOutletVelocityFvPatch Declaration
51
\*---------------------------------------------------------------------------*/
52
53
class
rotatingPressureInletOutletVelocityFvPatchVectorField
54
:
55
public
pressureInletOutletVelocityFvPatchVectorField
56
{
57
// Private data
58
59
//- Angular velocity of the frame
60
vector
omega_;
61
62
63
// Private member functions
64
65
//- Calculate the tangentialVelocity from omega
66
void
calcTangentialVelocity();
67
68
69
public
:
70
71
//- Runtime type information
72
TypeName
(
"rotatingPressureInletOutletVelocity"
);
73
74
75
// Constructors
76
77
//- Construct from patch and internal field
78
rotatingPressureInletOutletVelocityFvPatchVectorField
79
(
80
const
fvPatch
&,
81
const
DimensionedField<vector, volMesh>
&
82
);
83
84
//- Construct from patch, internal field and dictionary
85
rotatingPressureInletOutletVelocityFvPatchVectorField
86
(
87
const
fvPatch
&,
88
const
DimensionedField<vector, volMesh>
&,
89
const
dictionary
&
90
);
91
92
//- Construct by mapping given
93
// rotatingPressureInletOutletVelocityFvPatchVectorField
94
// onto a new patch
95
rotatingPressureInletOutletVelocityFvPatchVectorField
96
(
97
const
rotatingPressureInletOutletVelocityFvPatchVectorField
&,
98
const
fvPatch
&,
99
const
DimensionedField<vector, volMesh>
&,
100
const
fvPatchFieldMapper
&
101
);
102
103
//- Construct as copy
104
rotatingPressureInletOutletVelocityFvPatchVectorField
105
(
106
const
rotatingPressureInletOutletVelocityFvPatchVectorField
&
107
);
108
109
//- Construct and return a clone
110
virtual
tmp<fvPatchVectorField>
clone
()
const
111
{
112
return
tmp<fvPatchVectorField>
113
(
114
new
rotatingPressureInletOutletVelocityFvPatchVectorField
(*
this
)
115
);
116
}
117
118
//- Construct as copy setting internal field reference
119
rotatingPressureInletOutletVelocityFvPatchVectorField
120
(
121
const
rotatingPressureInletOutletVelocityFvPatchVectorField
&,
122
const
DimensionedField<vector, volMesh>
&
123
);
124
125
//- Construct and return a clone setting internal field reference
126
virtual
tmp<fvPatchVectorField>
clone
127
(
128
const
DimensionedField<vector, volMesh>
& iF
129
)
const
130
{
131
return
tmp<fvPatchVectorField>
132
(
133
new
rotatingPressureInletOutletVelocityFvPatchVectorField
134
(
135
*
this
,
136
iF
137
)
138
);
139
}
140
141
142
// Member functions
143
144
// Access
145
146
//- Return the angular velocity of rotation
147
const
vector
&
omega
()
const
148
{
149
return
omega_;
150
}
151
152
//- Reset the angular velocity of rotation
153
// and update the tangentialVelocity
154
void
setOmega
(
const
vector
&
omega
)
155
{
156
omega_ =
omega
;
157
calcTangentialVelocity();
158
}
159
160
161
//- Write
162
virtual
void
write
(
Ostream
&)
const
;
163
};
164
165
166
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168
}
// End namespace Foam
169
170
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171
172
#endif
173
174
// ************************ vim: set sw=4 sts=4 et: ************************ //