freestreamVelocityFvPatchVectorField.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) 2018 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::freestreamVelocityFvPatchVectorField
28
29Group
30 grpInletBoundaryConditions grpOutletBoundaryConditions
31
32Description
33 This boundary condition provides a free-stream condition for velocity.
34
35 It is an inlet-outlet condition that uses the velocity orientation to
36 continuously blend between fixed value for normal inlet and zero gradient
37 for normal outlet flow.
38
39Usage
40 \table
41 Property | Description | Required | Default value
42 freestreamValue | freestream velocity | yes |
43 \endtable
44
45 Example of the boundary condition specification:
46 \verbatim
47 <patchName>
48 {
49 type freestreamVelocity;
50 freestreamValue uniform (300 0 0);
51 }
52 \endverbatim
53
54Note
55 This condition is designed to operate with the freestreamPressure condition
56
57See also
58 Foam::mixedFvPatchField
59 Foam::freestreamFvPatchField
60
61SourceFiles
62 freestreamVelocityFvPatchVectorField.C
63
64\*---------------------------------------------------------------------------*/
65
66#ifndef freestreamVelocityFvPatchVectorField_H
67#define freestreamVelocityFvPatchVectorField_H
68
69#include "fvPatchFields.H"
70#include "mixedFvPatchFields.H"
71
72// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73
74namespace Foam
75{
76
77/*---------------------------------------------------------------------------*\
78 Class freestreamVelocityFvPatchVectorField Declaration
79\*---------------------------------------------------------------------------*/
80
81class freestreamVelocityFvPatchVectorField
82:
83 public mixedFvPatchVectorField
84{
85
86public:
87
88 //- Runtime type information
89 TypeName("freestreamVelocity");
91
92 // Constructors
93
94 //- Construct from patch and internal field
96 (
97 const fvPatch&,
99 );
100
101 //- Construct from patch, internal field and dictionary
103 (
104 const fvPatch&,
106 const dictionary&
107 );
108
109 //- Construct by mapping given freestreamVelocityFvPatchVectorField onto
110 // a new patch
112 (
114 const fvPatch&,
116 const fvPatchFieldMapper&
117 );
118
119 //- Construct as copy
121 (
123 );
124
125 //- Construct and return a clone
126 virtual tmp<fvPatchVectorField> clone() const
127 {
129 (
131 );
132 }
133
134 //- Construct as copy setting internal field reference
136 (
139 );
140
141 //- Construct and return a clone setting internal field reference
143 (
145 ) const
146 {
148 (
150 );
152
153
154 // Member functions
155
156 const vectorField& freestreamValue() const
157 {
158 return refValue();
159 }
160
162 {
163 return refValue();
164 }
166
167 // Evaluation functions
168
169 //- Update the coefficients associated with the patch field
170 virtual void updateCoeffs();
171
172
173 //- Write
174 virtual void write(Ostream&) const;
175};
176
177
178// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179
180} // End namespace Foam
181
182// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183
184#endif
185
186// ************************************************************************* //
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 velocity.
TypeName("freestreamVelocity")
Runtime type information.
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual tmp< fvPatchVectorField > 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
Namespace for OpenFOAM.
Field< vector > vectorField
Specialisation of Field<T> for vector.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73