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
pressureInletOutletVelocity
pressureInletOutletVelocityFvPatchVectorField.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::pressureInletOutletVelocityFvPatchVectorField
26
27
Description
28
Velocity inlet/outlet boundary condition patches for where the pressure is
29
specified. zero-gradient is applied for outflow (as defined by the flux)
30
and for inflow the velocity is obtained from the patch-face normal
31
component of the internal-cell value.
32
33
SourceFiles
34
pressureInletOutletVelocityFvPatchVectorField.C
35
36
\*---------------------------------------------------------------------------*/
37
38
#ifndef pressureInletOutletVelocityFvPatchVectorField_H
39
#define pressureInletOutletVelocityFvPatchVectorField_H
40
41
#include <
finiteVolume/fvPatchFields.H
>
42
#include <
finiteVolume/directionMixedFvPatchFields.H
>
43
44
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46
namespace
Foam
47
{
48
49
/*---------------------------------------------------------------------------*\
50
Class pressureInletOutletVelocityFvPatch Declaration
51
\*---------------------------------------------------------------------------*/
52
53
class
pressureInletOutletVelocityFvPatchVectorField
54
:
55
public
directionMixedFvPatchVectorField
56
{
57
// Private data
58
59
word
phiName_;
60
61
//- Optional tangential velocity component
62
vectorField
tangentialVelocity_;
63
64
65
public
:
66
67
//- Runtime type information
68
TypeName
(
"pressureInletOutletVelocity"
);
69
70
71
// Constructors
72
73
//- Construct from patch and internal field
74
pressureInletOutletVelocityFvPatchVectorField
75
(
76
const
fvPatch
&,
77
const
DimensionedField<vector, volMesh>
&
78
);
79
80
//- Construct from patch, internal field and dictionary
81
pressureInletOutletVelocityFvPatchVectorField
82
(
83
const
fvPatch
&,
84
const
DimensionedField<vector, volMesh>
&,
85
const
dictionary
&
86
);
87
88
//- Construct by mapping given
89
// pressureInletOutletVelocityFvPatchVectorField onto a new patch
90
pressureInletOutletVelocityFvPatchVectorField
91
(
92
const
pressureInletOutletVelocityFvPatchVectorField
&,
93
const
fvPatch
&,
94
const
DimensionedField<vector, volMesh>
&,
95
const
fvPatchFieldMapper
&
96
);
97
98
//- Construct as copy
99
pressureInletOutletVelocityFvPatchVectorField
100
(
101
const
pressureInletOutletVelocityFvPatchVectorField
&
102
);
103
104
//- Construct and return a clone
105
virtual
tmp<fvPatchVectorField>
clone
()
const
106
{
107
return
tmp<fvPatchVectorField>
108
(
109
new
pressureInletOutletVelocityFvPatchVectorField
(*
this
)
110
);
111
}
112
113
//- Construct as copy setting internal field reference
114
pressureInletOutletVelocityFvPatchVectorField
115
(
116
const
pressureInletOutletVelocityFvPatchVectorField
&,
117
const
DimensionedField<vector, volMesh>
&
118
);
119
120
//- Construct and return a clone setting internal field reference
121
virtual
tmp<fvPatchVectorField>
clone
122
(
123
const
DimensionedField<vector, volMesh>
& iF
124
)
const
125
{
126
return
tmp<fvPatchVectorField>
127
(
128
new
pressureInletOutletVelocityFvPatchVectorField
(*
this
, iF)
129
);
130
}
131
132
133
// Member functions
134
135
// Access
136
137
//- Return the name of phi
138
const
word
&
phiName
()
const
139
{
140
return
phiName_;
141
}
142
143
//- Return reference to the name of phi to allow adjustment
144
word
&
phiName
()
145
{
146
return
phiName_;
147
}
148
149
//- Return the tangential velocity
150
const
vectorField
&
tangentialVelocity
()
const
151
{
152
return
tangentialVelocity_;
153
}
154
155
//- Reset the tangential velocity
156
void
setTangentialVelocity
(
const
vectorField
&
tangentialVelocity
);
157
158
159
// Mapping functions
160
161
//- Map (and resize as needed) from self given a mapping object
162
virtual
void
autoMap
163
(
164
const
fvPatchFieldMapper
&
165
);
166
167
//- Reverse map the given fvPatchField onto this fvPatchField
168
virtual
void
rmap
169
(
170
const
fvPatchVectorField
&,
171
const
labelList
&
172
);
173
174
175
//- Update the coefficients associated with the patch field
176
virtual
void
updateCoeffs
();
177
178
//- Write
179
virtual
void
write
(
Ostream
&)
const
;
180
181
182
// Member operators
183
184
virtual
void
operator=
(
const
fvPatchField<vector>
& pvf);
185
};
186
187
188
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189
190
}
// End namespace Foam
191
192
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193
194
#endif
195
196
// ************************ vim: set sw=4 sts=4 et: ************************ //