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
timeVaryingUniformTotalPressure
timeVaryingUniformTotalPressureFvPatchScalarField.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::timeVaryingUniformTotalPressureFvPatchScalarField
26
27
Description
28
A time-varying form of a uniform total pressure boundary condition.
29
30
See Also
31
Foam::timeVaryingUniformFixedValueFvPatchField
32
and Foam::totalPressureFvPatchScalarField.H
33
34
SourceFiles
35
timeVaryingUniformTotalPressureFvPatchScalarField.C
36
37
\*---------------------------------------------------------------------------*/
38
39
#ifndef timeVaryingUniformTotalPressureFvPatchScalarField_H
40
#define timeVaryingUniformTotalPressureFvPatchScalarField_H
41
42
#include <
finiteVolume/fixedValueFvPatchFields.H
>
43
#include <
OpenFOAM/interpolationTable.H
>
44
45
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47
namespace
Foam
48
{
49
50
/*---------------------------------------------------------------------------*\
51
Class timeVaryingTotalPressureFvPatch Declaration
52
\*---------------------------------------------------------------------------*/
53
54
class
timeVaryingUniformTotalPressureFvPatchScalarField
55
:
56
public
fixedValueFvPatchScalarField
57
{
58
// Private data
59
60
//- Name of the velocity field
61
word
UName_;
62
63
//- Name of the flux transporting the field
64
word
phiName_;
65
66
//- Name of the density field used to normalise the mass flux
67
// if neccessary
68
word
rhoName_;
69
70
//- Name of the compressibility field used to calculate the wave speed
71
word
psiName_;
72
73
//- Heat capacity ratio
74
scalar gamma_;
75
76
//- Total pressure
77
scalar p0_;
78
79
//- Table of time vs total pressure, including the bounding treatment
80
interpolationTable<scalar>
timeSeries_;
81
82
83
public
:
84
85
//- Runtime type information
86
TypeName
(
"timeVaryingTotalPressure"
);
87
88
89
// Constructors
90
91
//- Construct from patch and internal field
92
timeVaryingUniformTotalPressureFvPatchScalarField
93
(
94
const
fvPatch
&,
95
const
DimensionedField<scalar, volMesh>
&
96
);
97
98
//- Construct from patch, internal field and dictionary
99
timeVaryingUniformTotalPressureFvPatchScalarField
100
(
101
const
fvPatch
&,
102
const
DimensionedField<scalar, volMesh>
&,
103
const
dictionary
&
104
);
105
106
//- Construct by mapping given patch field onto a new patch
107
timeVaryingUniformTotalPressureFvPatchScalarField
108
(
109
const
timeVaryingUniformTotalPressureFvPatchScalarField
&,
110
const
fvPatch
&,
111
const
DimensionedField<scalar, volMesh>
&,
112
const
fvPatchFieldMapper
&
113
);
114
115
//- Construct as copy
116
timeVaryingUniformTotalPressureFvPatchScalarField
117
(
118
const
timeVaryingUniformTotalPressureFvPatchScalarField
&
119
);
120
121
//- Construct and return a clone
122
virtual
tmp<fvPatchScalarField>
clone
()
const
123
{
124
return
tmp<fvPatchScalarField>
125
(
126
new
timeVaryingUniformTotalPressureFvPatchScalarField
(*
this
)
127
);
128
}
129
130
//- Construct as copy setting internal field reference
131
timeVaryingUniformTotalPressureFvPatchScalarField
132
(
133
const
timeVaryingUniformTotalPressureFvPatchScalarField
&,
134
const
DimensionedField<scalar, volMesh>
&
135
);
136
137
//- Construct and return a clone setting internal field reference
138
virtual
tmp<fvPatchScalarField>
clone
139
(
140
const
DimensionedField<scalar, volMesh>
& iF
141
)
const
142
{
143
return
tmp<fvPatchScalarField>
144
(
145
new
timeVaryingUniformTotalPressureFvPatchScalarField
(*
this
, iF)
146
);
147
}
148
149
150
// Member functions
151
152
// Access
153
154
//- Return the name of the velocity field
155
const
word
&
UName
()
const
156
{
157
return
UName_;
158
}
159
160
//- Return reference to the name of the velocity field
161
// to allow adjustment
162
word
&
UName
()
163
{
164
return
UName_;
165
}
166
167
//- Return the heat capacity ratio
168
scalar
gamma
()
const
169
{
170
return
gamma_;
171
}
172
173
//- Return reference to the heat capacity ratio to allow adjustment
174
scalar&
gamma
()
175
{
176
return
gamma_;
177
}
178
179
//- Return the total pressure
180
scalar
p0
()
const
181
{
182
return
p0_;
183
}
184
185
//- Return reference to the total pressure to allow adjustment
186
scalar
p0
()
187
{
188
return
p0_;
189
}
190
191
//- Return the time series used
192
const
interpolationTable<scalar>
&
totalPressureTimeSeries
()
const
193
{
194
return
timeSeries_;
195
}
196
197
198
// Evaluation functions
199
200
//- Update the coefficients associated with the patch field
201
// using the given patch velocity field
202
virtual
void
updateCoeffs
(
const
vectorField
& Up);
203
204
//- Update the coefficients associated with the patch field
205
virtual
void
updateCoeffs
();
206
207
208
//- Write
209
virtual
void
write
(
Ostream
&)
const
;
210
};
211
212
213
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214
215
}
// End namespace Foam
216
217
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218
219
#endif
220
221
// ************************ vim: set sw=4 sts=4 et: ************************ //