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
swirlFlowRateInletVelocity
swirlFlowRateInletVelocityFvPatchVectorField.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) 2010-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 the
13
Free Software Foundation; either version 2 of the License, or (at your
14
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, write to the Free Software Foundation,
23
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
25
Class
26
Foam::swirlFlowRateInletVelocityFvPatchVectorField
27
28
Description
29
Describes a volumetric/mass flow normal vector boundary condition by its
30
magnitude as an integral over its area with a swirl component determined
31
by the RPM
32
33
The basis of the patch (volumetric or mass) is determined by the
34
dimensions of the flux, phi.
35
The current density is used to correct the velocity when applying the
36
mass basis.
37
38
Example of the boundary condition specification:
39
@verbatim
40
inlet
41
{
42
type swirlFlowRateInletVelocity;
43
flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s]
44
rpm 100;
45
}
46
@endverbatim
47
48
Note
49
- The value is positive inwards
50
51
SourceFiles
52
swirlFlowRateInletVelocityFvPatchVectorField.C
53
54
\*---------------------------------------------------------------------------*/
55
56
#ifndef swirlFlowRateInletVelocityFvPatchVectorField_H
57
#define swirlFlowRateInletVelocityFvPatchVectorField_H
58
59
#include <
finiteVolume/fixedValueFvPatchFields.H
>
60
61
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62
63
namespace
Foam
64
{
65
/*---------------------------------------------------------------------------*\
66
Class swirlFlowRateInletVelocityFvPatchVectorField Declaration
67
\*---------------------------------------------------------------------------*/
68
69
class
swirlFlowRateInletVelocityFvPatchVectorField
70
:
71
public
fixedValueFvPatchVectorField
72
{
73
// Private data
74
75
//- Inlet integral flow rate
76
const
scalar flowRate_;
77
78
//- Name of the flux transporting the field
79
const
word
phiName_;
80
81
//- Name of the density field used to normalize the mass flux
82
const
word
rhoName_;
83
84
//- RPM
85
const
scalar rpm_;
86
87
88
public
:
89
90
//- Runtime type information
91
TypeName
(
"swirlFlowRateInletVelocity"
);
92
93
94
// Constructors
95
96
//- Construct from patch and internal field
97
swirlFlowRateInletVelocityFvPatchVectorField
98
(
99
const
fvPatch
&,
100
const
DimensionedField<vector, volMesh>
&
101
);
102
103
//- Construct from patch, internal field and dictionary
104
swirlFlowRateInletVelocityFvPatchVectorField
105
(
106
const
fvPatch
&,
107
const
DimensionedField<vector, volMesh>
&,
108
const
dictionary
&
109
);
110
111
//- Construct by mapping given
112
// flowRateInletVelocityFvPatchVectorField
113
// onto a new patch
114
swirlFlowRateInletVelocityFvPatchVectorField
115
(
116
const
swirlFlowRateInletVelocityFvPatchVectorField
&,
117
const
fvPatch
&,
118
const
DimensionedField<vector, volMesh>
&,
119
const
fvPatchFieldMapper
&
120
);
121
122
//- Construct as copy
123
swirlFlowRateInletVelocityFvPatchVectorField
124
(
125
const
swirlFlowRateInletVelocityFvPatchVectorField
&
126
);
127
128
//- Construct and return a clone
129
virtual
tmp<fvPatchVectorField>
clone
()
const
130
{
131
return
tmp<fvPatchVectorField>
132
(
133
new
swirlFlowRateInletVelocityFvPatchVectorField
(*
this
)
134
);
135
}
136
137
//- Construct as copy setting internal field reference
138
swirlFlowRateInletVelocityFvPatchVectorField
139
(
140
const
swirlFlowRateInletVelocityFvPatchVectorField
&,
141
const
DimensionedField<vector, volMesh>
&
142
);
143
144
//- Construct and return a clone setting internal field reference
145
virtual
tmp<fvPatchVectorField>
clone
146
(
147
const
DimensionedField<vector, volMesh>
& iF
148
)
const
149
{
150
return
tmp<fvPatchVectorField>
151
(
152
new
swirlFlowRateInletVelocityFvPatchVectorField
(*
this
, iF)
153
);
154
}
155
156
157
// Member functions
158
159
// Access
160
161
//- Return the flux
162
scalar
flowRate
()
const
163
{
164
return
flowRate_;
165
}
166
167
168
//- Update the coefficients associated with the patch field
169
virtual
void
updateCoeffs
();
170
171
//- Write
172
virtual
void
write
(
Ostream
&)
const
;
173
174
};
175
176
177
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179
}
// End namespace Foam
180
181
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182
183
#endif
184
185
// ************************************************************************* //