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
timeVaryingFlowRateInletVelocity
timeVaryingFlowRateInletVelocityFvPatchVectorField.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) 2006-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::timeVaryingFlowRateInletVelocityFvPatchVectorField
26
27
Description
28
A time-varying form of a flow normal vector boundary condition.
29
30
Example of the boundary condition specification:
31
@verbatim
32
inlet
33
{
34
type timeVaryingFlowRateInletVelocity;
35
flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s]
36
value uniform (0 0 0); // placeholder
37
fileName "$FOAM_CASE/time-series";
38
outOfBounds repeat; // (error|warn|clamp|repeat)
39
}
40
@endverbatim
41
42
Note
43
- The value is positive inwards
44
- may not work correctly for transonic inlets!
45
- strange behaviour with potentialFoam since the U equation is not solved
46
47
See Also
48
Foam::interpolationTable and Foam::flowRateInletVelocityFvPatchVectorField
49
50
SourceFiles
51
timeVaryingFlowRateInletVelocityFvPatchVectorField.C
52
53
\*---------------------------------------------------------------------------*/
54
55
#ifndef timeVaryingFlowRateInletVelocityFvPatchVectorField_H
56
#define timeVaryingFlowRateInletVelocityFvPatchVectorField_H
57
58
#include <
finiteVolume/flowRateInletVelocityFvPatchVectorField.H
>
59
#include <
OpenFOAM/interpolationTable.H
>
60
61
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62
63
namespace
Foam
64
{
65
/*---------------------------------------------------------------------------*\
66
Class timeVaryingFlowRateInletVelocityFvPatch Declaration
67
\*---------------------------------------------------------------------------*/
68
69
class
timeVaryingFlowRateInletVelocityFvPatchVectorField
70
:
71
public
flowRateInletVelocityFvPatchVectorField
72
{
73
// Private data
74
75
//- the time series being used, including the bounding treatment
76
interpolationTable<scalar>
timeSeries_;
77
78
79
public
:
80
81
//- Runtime type information
82
TypeName
(
"timeVaryingFlowRateInletVelocity"
);
83
84
85
// Constructors
86
87
//- Construct from patch and internal field
88
timeVaryingFlowRateInletVelocityFvPatchVectorField
89
(
90
const
fvPatch
&,
91
const
DimensionedField<vector, volMesh>
&
92
);
93
94
//- Construct from patch, internal field and dictionary
95
timeVaryingFlowRateInletVelocityFvPatchVectorField
96
(
97
const
fvPatch
&,
98
const
DimensionedField<vector, volMesh>
&,
99
const
dictionary
&
100
);
101
102
//- Construct by mapping given patch field onto a new patch
103
timeVaryingFlowRateInletVelocityFvPatchVectorField
104
(
105
const
timeVaryingFlowRateInletVelocityFvPatchVectorField
&,
106
const
fvPatch
&,
107
const
DimensionedField<vector, volMesh>
&,
108
const
fvPatchFieldMapper
&
109
);
110
111
//- Construct as copy
112
timeVaryingFlowRateInletVelocityFvPatchVectorField
113
(
114
const
timeVaryingFlowRateInletVelocityFvPatchVectorField
&
115
);
116
117
//- Construct and return a clone
118
virtual
tmp<fvPatchVectorField>
clone
()
const
119
{
120
return
tmp<fvPatchVectorField>
121
(
122
new
timeVaryingFlowRateInletVelocityFvPatchVectorField
(*
this
)
123
);
124
}
125
126
//- Construct as copy setting internal field reference
127
timeVaryingFlowRateInletVelocityFvPatchVectorField
128
(
129
const
timeVaryingFlowRateInletVelocityFvPatchVectorField
&,
130
const
DimensionedField<vector, volMesh>
&
131
);
132
133
//- Construct and return a clone setting internal field reference
134
virtual
tmp<fvPatchVectorField>
clone
135
(
136
const
DimensionedField<vector, volMesh>
& iF
137
)
const
138
{
139
return
tmp<fvPatchVectorField>
140
(
141
new
timeVaryingFlowRateInletVelocityFvPatchVectorField
142
(
143
*
this
,
144
iF
145
)
146
);
147
}
148
149
150
// Member functions
151
152
// Access
153
154
//- Return the time series used
155
const
interpolationTable<scalar>
&
timeSeries
()
const
156
{
157
return
timeSeries_;
158
}
159
160
161
// Evaluation functions
162
163
//- Update the coefficients associated with the patch field
164
virtual
void
updateCoeffs
();
165
166
167
//- Write
168
virtual
void
write
(
Ostream
&)
const
;
169
};
170
171
172
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173
174
}
// End namespace Foam
175
176
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177
178
#endif
179
180
// ************************ vim: set sw=4 sts=4 et: ************************ //