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
timeVaryingMappedTotalPressure
timeVaryingMappedTotalPressureFvPatchScalarField.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::timeVaryingMappedTotalPressureFvPatchScalarField
26
27
Description
28
Foam::timeVaryingMappedTotalPressureFvPatchScalarField
29
30
SourceFiles
31
timeVaryingMappedTotalPressureFvPatchScalarField.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef timeVaryingMappedTotalPressureFvPatchScalarField_H
36
#define timeVaryingMappedTotalPressureFvPatchScalarField_H
37
38
#include <
finiteVolume/timeVaryingMappedFixedValueFvPatchFields.H
>
39
40
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42
namespace
Foam
43
{
44
45
/*---------------------------------------------------------------------------*\
46
Class timeVaryingMappedTotalPressureFvPatch Declaration
47
\*---------------------------------------------------------------------------*/
48
49
class
timeVaryingMappedTotalPressureFvPatchScalarField
50
:
51
public
timeVaryingMappedFixedValueFvPatchScalarField
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
//- Rho value used to normalise the total pressure for incompressible flow
66
scalar rho_;
67
68
//- Name of the compressibility field used to calculate the wave speed
69
word
psiName_;
70
71
//- Heat capacity ratio
72
scalar gamma_;
73
74
75
public
:
76
77
//- Runtime type information
78
TypeName
(
"timeVaryingMappedTotalPressure"
);
79
80
81
// Constructors
82
83
//- Construct from patch and internal field
84
timeVaryingMappedTotalPressureFvPatchScalarField
85
(
86
const
fvPatch
&,
87
const
DimensionedField<scalar, volMesh>
&
88
);
89
90
//- Construct from patch, internal field and dictionary
91
timeVaryingMappedTotalPressureFvPatchScalarField
92
(
93
const
fvPatch
&,
94
const
DimensionedField<scalar, volMesh>
&,
95
const
dictionary
&
96
);
97
98
//- Construct by mapping given timeVaryingMappedTotalPressureFvPatchScalarField
99
// onto a new patch
100
timeVaryingMappedTotalPressureFvPatchScalarField
101
(
102
const
timeVaryingMappedTotalPressureFvPatchScalarField
&,
103
const
fvPatch
&,
104
const
DimensionedField<scalar, volMesh>
&,
105
const
fvPatchFieldMapper
&
106
);
107
108
//- Construct as copy
109
timeVaryingMappedTotalPressureFvPatchScalarField
110
(
111
const
timeVaryingMappedTotalPressureFvPatchScalarField
&
112
);
113
114
//- Construct and return a clone
115
virtual
tmp<fvPatchScalarField>
clone
()
const
116
{
117
return
tmp<fvPatchScalarField>
118
(
119
new
timeVaryingMappedTotalPressureFvPatchScalarField
(*
this
)
120
);
121
}
122
123
//- Construct as copy setting internal field reference
124
timeVaryingMappedTotalPressureFvPatchScalarField
125
(
126
const
timeVaryingMappedTotalPressureFvPatchScalarField
&,
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
timeVaryingMappedTotalPressureFvPatchScalarField
(*
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
173
// Mapping functions
174
175
//- Map (and resize as needed) from self given a mapping object
176
virtual
void
autoMap
177
(
178
const
fvPatchFieldMapper
&
179
);
180
181
//- Reverse map the given fvPatchField onto this fvPatchField
182
virtual
void
rmap
183
(
184
const
fvPatchScalarField
&,
185
const
labelList
&
186
);
187
188
189
// Evaluation functions
190
191
//- Update the coefficients associated with the patch field
192
// using the given patch velocity field
193
virtual
void
updateCoeffs
(
const
vectorField
& Up);
194
195
//- Update the coefficients associated with the patch field
196
virtual
void
updateCoeffs
();
197
198
199
//- Write
200
virtual
void
write
(
Ostream
&)
const
;
201
};
202
203
204
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205
206
}
// End namespace Foam
207
208
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209
210
#endif
211
212
// ************************ vim: set sw=4 sts=4 et: ************************ //