patchMeanVelocityForce.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) 2015-2017 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::fv::patchMeanVelocityForce
29 
30 Description
31  Applies the force over the specified patch to maintain
32  the specified mean velocity for incompressible flows.
33 
34  Sources applied to:
35  \verbatim
36  U | Velocity [m/s]
37  \endverbatim
38 
39  Required fields:
40  \verbatim
41  U | Velocity [m/s]
42  \endverbatim
43 
44 Usage
45  Minimal example by using \c constant/fvOptions:
46  \verbatim
47  patchMeanVelocityForce1
48  {
49  // Mandatory entries (unmodifiable)
50  type patchMeanVelocityForce;
51  patch <patchName>;
52 
53  // Mandatory/Optional (inherited) entries
54  ...
55  }
56 
57  where the entries mean:
58  \table
59  Property | Description | Type | Reqd | Dflt
60  type | Type name: patchMeanVelocityForce | word | yes | -
61  patch | Name of operand patch | word | yes | -
62  \endtable
63 
64  The inherited entries are elaborated in:
65  - \link meanVelocityForce.H \endlink
66 
67 See also
68  - Foam::fv::meanVelocityForce
69 
70 SourceFiles
71  patchMeanVelocityForce.C
72 
73 \*---------------------------------------------------------------------------*/
74 
75 #ifndef patchMeanVelocityForce_H
76 #define patchMeanVelocityForce_H
77 
78 #include "meanVelocityForce.H"
79 
80 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81 
82 namespace Foam
83 {
84 namespace fv
85 {
86 
87 /*---------------------------------------------------------------------------*\
88  Class patchMeanVelocityForce Declaration
89 \*---------------------------------------------------------------------------*/
90 
91 class patchMeanVelocityForce
92 :
93  public meanVelocityForce
94 {
95 protected:
96 
97  // Protected Data
98 
99  //- Name of operand patch
100  word patch_;
101 
102  //- Patch index
103  label patchi_;
104 
105 
106  // Protected Member Functions
107 
108  //- Calculate and return the magnitude of the mean velocity
109  //- averaged over the specified patch
110  virtual scalar magUbarAve(const volVectorField& U) const;
111 
112 
113 public:
114 
115  //- Runtime type information
116  TypeName("patchMeanVelocityForce");
117 
118 
119  // Constructors
120 
121  //- Construct from explicit source name and mesh
122  patchMeanVelocityForce
123  (
124  const word& sourceName,
125  const word& modelType,
126  const dictionary& dict,
127  const fvMesh& mesh
128  );
129 
130  //- No copy construct
131  patchMeanVelocityForce(const patchMeanVelocityForce&) = delete;
132 
133  //- No copy assignment
134  void operator=(const patchMeanVelocityForce&) = delete;
135 
136 
137  //- Destructor
138  ~patchMeanVelocityForce() = default;
139 
140 };
141 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace fv
146 } // End namespace Foam
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************************************************************* //
TypeName
#define TypeName(TypeNameString)
Definition: typeInfo.H:71
dict
dictionary dict
Definition: searchingEngine.H:14
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Definition: atmBoundaryLayer.C:26
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
fv
labelList fv(nPoints)
U
U
Definition: pEqn.H:72
meanVelocityForce.H