freestreamPressureFvPatchScalarField.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::freestreamPressureFvPatchScalarField
28
29Group
30 grpInletBoundaryConditions grpOutletBoundaryConditions
31
32Description
33 This boundary condition provides a free-stream condition for pressure.
34
35 It is an outlet-inlet condition that uses the velocity orientation to
36 continuously blend between zero gradient for normal inlet and fixed value
37 for normal outlet flow.
38
39Usage
40 \table
41 Property | Description | Required | Default value
42 U | velocity field name | no | U
43 freestreamValue | freestream pressure | yes |
44 \endtable
45
46 Example of the boundary condition specification:
47 \verbatim
48 <patchName>
49 {
50 type freestreamPressure;
51 freestreamValue uniform 1e5;
52 }
53 \endverbatim
54
55Note
56 This condition is designed to operate with a freestreamVelocity condition
57
58See also
59 Foam::mixedFvPatchField
60 Foam::freestreamFvPatchField
61
62SourceFiles
63 freestreamPressureFvPatchScalarField.C
64
65\*---------------------------------------------------------------------------*/
66
67#ifndef freestreamPressureFvPatchScalarField_H
68#define freestreamPressureFvPatchScalarField_H
69
70#include "fvPatchFields.H"
71#include "mixedFvPatchFields.H"
72
73// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74
75namespace Foam
76{
77
78/*---------------------------------------------------------------------------*\
79 Class freestreamPressureFvPatchScalarField Declaration
80\*---------------------------------------------------------------------------*/
81
82class freestreamPressureFvPatchScalarField
83:
84 public mixedFvPatchScalarField
85{
86 // Private data
87
88 //- Name of the velocity field
89 word UName_;
90
91
92public:
93
94 //- Runtime type information
95 TypeName("freestreamPressure");
97
98 // Constructors
99
100 //- Construct from patch and internal field
102 (
103 const fvPatch&,
105 );
106
107 //- Construct from patch, internal field and dictionary
110 const fvPatch&,
112 const dictionary&
113 );
114
115 //- Construct by mapping given freestreamPressureFvPatchScalarField onto
116 // a new patch
118 (
120 const fvPatch&,
122 const fvPatchFieldMapper&
123 );
124
125 //- Construct as copy
127 (
129 );
130
131 //- Construct and return a clone
132 virtual tmp<fvPatchScalarField> clone() const
133 {
135 (
137 );
138 }
139
140 //- Construct as copy setting internal field reference
142 (
145 );
147 //- Construct and return a clone setting internal field reference
149 (
151 ) const
152 {
154 (
156 );
157 }
158
159
160 // Member functions
161
163 {
164 return refValue();
165 }
166
168 {
169 return refValue();
170 }
171
172
173 // Evaluation functions
174
175 //- Update the coefficients associated with the patch field
176 virtual void updateCoeffs();
177
178
179 //- Write
180 virtual void write(Ostream&) const;
182
183
184// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185
186} // End namespace Foam
187
188// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189
190#endif
191
192// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
This boundary condition provides a free-stream condition for pressure.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("freestreamPressure")
Runtime type information.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73