Loading...
Searching...
No Matches
rotatingPressureInletOutletVelocityFvPatchVectorField.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::rotatingPressureInletOutletVelocityFvPatchVectorField
28
29Group
30 grpInletBoundaryConditions grpOutletBoundaryConditions
31
32Description
33 This velocity inlet/outlet boundary condition is applied to patches in a
34 rotating frame where the pressure is specified. A zero-gradient is applied
35 for outflow (as defined by the flux); for inflow, the velocity is obtained
36 from the flux with a direction normal to the patch faces.
37
38Usage
39 \table
40 Property | Description | Required | Default value
41 phi | flux field name | no | phi
42 tangentialVelocity | tangential velocity field | no |
43 omega | angular velocity of the frame [rad/s] | yes |
44 \endtable
45
46 Example of the boundary condition specification:
47 \verbatim
48 <patchName>
49 {
50 type rotatingPressureInletOutletVelocity;
51 phi phi;
52 tangentialVelocity uniform (0 0 0);
53 omega 100;
54 }
55 \endverbatim
56
57 The \c omega entry is a Function1 type, able to describe time varying
58 functions.
59
60Note
61 Sign conventions:
62 - positive flux (out of domain): apply zero-gradient condition
63 - negative flux (into of domain): derive from the flux in the patch-normal
64 direction
65
66See also
67 Foam::pressureInletOutletVelocityFvPatchVectorField
68 Foam::Function1Types
69
70SourceFiles
71 rotatingPressureInletOutletVelocityFvPatchVectorField.C
72
73\*---------------------------------------------------------------------------*/
74
75#ifndef rotatingPressureInletOutletVelocityFvPatchVectorField_H
76#define rotatingPressureInletOutletVelocityFvPatchVectorField_H
77
78#include "fvPatchFields.H"
80#include "Function1.H"
81
82// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83
84namespace Foam
85{
86
87/*---------------------------------------------------------------------------*\
88 Class rotatingPressureInletOutletVelocityFvPatchVectorField Declaration
89\*---------------------------------------------------------------------------*/
90
92:
94{
95 // Private data
96
97 //- Angular velocity of the frame
98 autoPtr<Function1<vector>> omega_;
99
100
101 // Private Member Functions
102
103 //- Calculate the tangentialVelocity from omega
104 void calcTangentialVelocity();
105
107public:
108
109 //- Runtime type information
110 TypeName("rotatingPressureInletOutletVelocity");
111
112
113 // Constructors
114
115 //- Construct from patch and internal field
117 (
118 const fvPatch&,
120 );
121
122 //- Construct from patch, internal field and dictionary
124 (
125 const fvPatch&,
127 const dictionary&
128 );
129
130 //- Construct by mapping given
131 // rotatingPressureInletOutletVelocityFvPatchVectorField
132 // onto a new patch
134 (
136 const fvPatch&,
138 const fvPatchFieldMapper&
139 );
140
141 //- Construct as copy
143 (
145 );
146
147 //- Construct as copy setting internal field reference
149 (
152 );
153
154 //- Return a clone
155 virtual tmp<fvPatchField<vector>> clone() const
156 {
157 return fvPatchField<vector>::Clone(*this);
158 }
159
160 //- Clone with an internal field reference
162 (
164 ) const
165 {
166 return fvPatchField<vector>::Clone(*this, iF);
167 }
168
169
170 // Member functions
171
172 //- Write
173 virtual void write(Ostream&) const;
174};
175
176
177// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179} // End namespace Foam
180
181// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182
183#endif
184
185// ************************************************************************* //
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
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
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
This velocity inlet/outlet boundary condition is applied to velocity boundaries where the pressure is...
pressureInletOutletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
This velocity inlet/outlet boundary condition is applied to patches in a rotating frame where the pre...
virtual tmp< fvPatchField< vector > > clone(const DimensionedField< vector, volMesh > &iF) const
Clone with an internal field reference.
rotatingPressureInletOutletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
TypeName("rotatingPressureInletOutletVelocity")
Runtime type information.
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68