Loading...
Searching...
No Matches
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
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");
96
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 as copy setting internal field reference
133 (
136 );
137
138 //- Return a clone
139 virtual tmp<fvPatchField<scalar>> clone() const
140 {
141 return fvPatchField<scalar>::Clone(*this);
142 }
143
144 //- Clone with an internal field reference
146 (
148 ) const
149 {
150 return fvPatchField<scalar>::Clone(*this, iF);
151 }
152
153
154 // Member Functions
155
156 //- Same as refValue()
157 const scalarField& freestreamValue() const { return refValue(); }
158
159 //- Same as refValue()
160 scalarField& freestreamValue() { return refValue(); }
161
162
163 //- Update the coefficients associated with the patch field
164 virtual void updateCoeffs();
165
166 //- Write
167 virtual void write(Ostream&) const;
168};
169
170
171// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172
173} // End namespace Foam
175// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176
177#endif
178
179// ************************************************************************* //
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:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
This boundary condition provides a free-stream condition for pressure.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
freestreamPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
const scalarField & freestreamValue() const
Same as refValue().
TypeName("freestreamPressure")
Runtime type information.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68