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
supersonicFreestream
supersonicFreestreamFvPatchVectorField.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::supersonicFreestreamFvPatchVectorField
26
27
Description
28
Supersonic free stream condition.
29
30
Supersonic outflow is vented according to ???
31
32
Supersonic inflow is assumed to occur according to the Prandtl-Meyer
33
expansion process.
34
35
Subsonic outflow is zero-gradiented from inside the domain.
36
37
N.B. This boundary condition is ill-posed if the free-stream flow is
38
normal to the boundary.
39
40
SourceFiles
41
supersonicFreestreamFvPatchVectorField.C
42
43
\*---------------------------------------------------------------------------*/
44
45
#ifndef supersonicFreestreamFvPatchVectorFields_H
46
#define supersonicFreestreamFvPatchVectorFields_H
47
48
#include <
finiteVolume/fvPatchFields.H
>
49
#include <
finiteVolume/mixedFvPatchFields.H
>
50
51
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53
namespace
Foam
54
{
55
56
/*---------------------------------------------------------------------------*\
57
Class supersonicFreestreamFvPatch Declaration
58
\*---------------------------------------------------------------------------*/
59
60
class
supersonicFreestreamFvPatchVectorField
61
:
62
public
mixedFvPatchVectorField
63
{
64
// Private data
65
66
//- Velocity of the free stream
67
vector
UInf_;
68
69
//- Pressure of the free stream
70
scalar pInf_;
71
72
//- Temperature of the free stream
73
scalar TInf_;
74
75
//- Heat capacity ratio
76
scalar gamma_;
77
78
79
public
:
80
81
//- Runtime type information
82
TypeName
(
"supersonicFreestream"
);
83
84
85
// Constructors
86
87
//- Construct from patch and internal field
88
supersonicFreestreamFvPatchVectorField
89
(
90
const
fvPatch
&,
91
const
DimensionedField<vector, volMesh>
&
92
);
93
94
//- Construct from patch, internal field and dictionary
95
supersonicFreestreamFvPatchVectorField
96
(
97
const
fvPatch
&,
98
const
DimensionedField<vector, volMesh>
&,
99
const
dictionary
&
100
);
101
102
//- Construct by mapping given supersonicFreestreamFvPatchVectorField
103
// onto a new patch
104
supersonicFreestreamFvPatchVectorField
105
(
106
const
supersonicFreestreamFvPatchVectorField
&,
107
const
fvPatch
&,
108
const
DimensionedField<vector, volMesh>
&,
109
const
fvPatchFieldMapper
&
110
);
111
112
//- Construct as copy
113
supersonicFreestreamFvPatchVectorField
114
(
115
const
supersonicFreestreamFvPatchVectorField
&
116
);
117
118
//- Construct and return a clone
119
virtual
tmp<fvPatchVectorField>
clone
()
const
120
{
121
return
tmp<fvPatchVectorField>
122
(
123
new
supersonicFreestreamFvPatchVectorField
(*
this
)
124
);
125
}
126
127
//- Construct as copy setting internal field reference
128
supersonicFreestreamFvPatchVectorField
129
(
130
const
supersonicFreestreamFvPatchVectorField
&,
131
const
DimensionedField<vector, volMesh>
&
132
);
133
134
//- Construct and return a clone setting internal field reference
135
virtual
tmp<fvPatchVectorField>
clone
136
(
137
const
DimensionedField<vector, volMesh>
& iF
138
)
const
139
{
140
return
tmp<fvPatchVectorField>
141
(
142
new
supersonicFreestreamFvPatchVectorField
(*
this
, iF)
143
);
144
}
145
146
147
// Member functions
148
149
// Access
150
151
//- Return the velocity at infinity
152
const
vector
&
UInf
()
const
153
{
154
return
UInf_;
155
}
156
157
//- Return reference to the velocity at infinity to allow adjustment
158
vector
&
UInf
()
159
{
160
return
UInf_;
161
}
162
163
//- Return the pressure at infinity
164
scalar
pInf
()
const
165
{
166
return
pInf_;
167
}
168
169
//- Return reference to the pressure at infinity to allow adjustment
170
scalar&
pInf
()
171
{
172
return
pInf_;
173
}
174
175
//- Return the temperature at infinity
176
scalar
TInf
()
const
177
{
178
return
TInf_;
179
}
180
181
//- Return reference to the temperature at infinity
182
// to allow adjustment
183
scalar&
TInf
()
184
{
185
return
TInf_;
186
}
187
188
189
// Evaluation functions
190
191
//- Update the coefficients associated with the patch field
192
virtual
void
updateCoeffs
();
193
194
195
//- Write
196
virtual
void
write
(
Ostream
&)
const
;
197
};
198
199
200
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201
202
}
// End namespace Foam
203
204
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205
206
#endif
207
208
// ************************ vim: set sw=4 sts=4 et: ************************ //