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