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
fixedPressureCompressibleDensity
fixedPressureCompressibleDensityFvPatchScalarField.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::fixedPressureCompressibleDensityFvPatchScalarField
26
27
Description
28
Calculate compressible density as a function of pressure and fluid
29
properties.
30
31
Example of the boundary condition specification:
32
@verbatim
33
inlet
34
{
35
type fixedPressureCompressibleDensity;
36
p p; // Name of static pressure field
37
value uniform 1; // Initial value
38
}
39
@endverbatim
40
41
SourceFiles
42
fixedPressureCompressibleDensityFvPatchScalarField.C
43
44
\*---------------------------------------------------------------------------*/
45
46
#ifndef fixedPressureCompressibleDensityFvPatchScalarField_H
47
#define fixedPressureCompressibleDensityFvPatchScalarField_H
48
49
#include <
finiteVolume/fixedValueFvPatchFields.H
>
50
51
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53
namespace
Foam
54
{
55
56
/*---------------------------------------------------------------------------*\
57
Class fixedPressureCompressibleDensityFvPatchScalarField Declaration
58
\*---------------------------------------------------------------------------*/
59
60
class
fixedPressureCompressibleDensityFvPatchScalarField
61
:
62
public
fixedValueFvPatchScalarField
63
{
64
// Private data
65
66
//- Name of static pressure field
67
word
pName_;
68
69
70
public
:
71
72
//- Runtime type information
73
TypeName
(
"fixedPressureCompressibleDensity"
);
74
75
76
// Constructors
77
78
//- Construct from patch and internal field
79
fixedPressureCompressibleDensityFvPatchScalarField
80
(
81
const
fvPatch
&,
82
const
DimensionedField<scalar, volMesh>
&
83
);
84
85
//- Construct from patch, internal field and dictionary
86
fixedPressureCompressibleDensityFvPatchScalarField
87
(
88
const
fvPatch
&,
89
const
DimensionedField<scalar, volMesh>
&,
90
const
dictionary
&
91
);
92
93
//- Construct by mapping given
94
// fixedPressureCompressibleDensityFvPatchScalarField
95
// onto a new patch
96
fixedPressureCompressibleDensityFvPatchScalarField
97
(
98
const
fixedPressureCompressibleDensityFvPatchScalarField
&,
99
const
fvPatch
&,
100
const
DimensionedField<scalar, volMesh>
&,
101
const
fvPatchFieldMapper
&
102
);
103
104
//- Construct as copy
105
fixedPressureCompressibleDensityFvPatchScalarField
106
(
107
const
fixedPressureCompressibleDensityFvPatchScalarField
&
108
);
109
110
//- Construct and return a clone
111
virtual
tmp<fvPatchScalarField>
clone
()
const
112
{
113
return
tmp<fvPatchScalarField>
114
(
115
new
fixedPressureCompressibleDensityFvPatchScalarField
(*
this
)
116
);
117
}
118
119
//- Construct as copy setting internal field reference
120
fixedPressureCompressibleDensityFvPatchScalarField
121
(
122
const
fixedPressureCompressibleDensityFvPatchScalarField
&,
123
const
DimensionedField<scalar, volMesh>
&
124
);
125
126
//- Construct and return a clone setting internal field reference
127
virtual
tmp<fvPatchScalarField>
clone
128
(
129
const
DimensionedField<scalar, volMesh>
& iF
130
)
const
131
{
132
return
tmp<fvPatchScalarField>
133
(
134
new
fixedPressureCompressibleDensityFvPatchScalarField
135
(
136
*
this
,
137
iF
138
)
139
);
140
}
141
142
143
// Member functions
144
145
//- Update the coefficients associated with the patch field
146
virtual
void
updateCoeffs
();
147
148
//- Write
149
virtual
void
write
(
Ostream
&)
const
;
150
};
151
152
153
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154
155
}
// End namespace Foam
156
157
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158
159
#endif
160
161
// ************************ vim: set sw=4 sts=4 et: ************************ //