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  \endverbatim
57 
58  where the entries mean:
59  \table
60  Property | Description | Type | Reqd | Dflt
61  type | Type name: patchMeanVelocityForce | word | yes | -
62  patch | Name of operand patch | word | yes | -
63  \endtable
64 
65  The inherited entries are elaborated in:
66  - \link meanVelocityForce.H \endlink
67 
68 See also
69  - Foam::fv::meanVelocityForce
70 
71 SourceFiles
72  patchMeanVelocityForce.C
73 
74 \*---------------------------------------------------------------------------*/
75 
76 #ifndef patchMeanVelocityForce_H
77 #define patchMeanVelocityForce_H
78 
79 #include "meanVelocityForce.H"
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 namespace Foam
84 {
85 namespace fv
86 {
87 
88 /*---------------------------------------------------------------------------*\
89  Class patchMeanVelocityForce Declaration
90 \*---------------------------------------------------------------------------*/
91 
92 class patchMeanVelocityForce
93 :
94  public meanVelocityForce
95 {
96 protected:
97 
98  // Protected Data
99 
100  //- Name of operand patch
101  word patch_;
102 
103  //- Patch index
104  label patchi_;
106 
107  // Protected Member Functions
108 
109  //- Calculate and return the magnitude of the mean velocity
110  //- averaged over the specified patch
111  virtual scalar magUbarAve(const volVectorField& U) const;
112 
113 
114 public:
115 
116  //- Runtime type information
117  TypeName("patchMeanVelocityForce");
118 
119 
120  // Constructors
122  //- Construct from explicit source name and mesh
124  (
125  const word& sourceName,
126  const word& modelType,
127  const dictionary& dict,
128  const fvMesh& mesh
129  );
130 
131  //- No copy construct
133 
134  //- No copy assignment
135  void operator=(const patchMeanVelocityForce&) = delete;
136 
137 
138  //- Destructor
139  ~patchMeanVelocityForce() = default;
140 
141 };
142 
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 } // End namespace fv
147 } // End namespace Foam
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
patchMeanVelocityForce(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
dictionary dict
Applies the force over the specified patch to maintain the specified mean velocity for incompressible...
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:30
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
void operator=(const patchMeanVelocityForce &)=delete
No copy assignment.
word patch_
Name of operand patch.
virtual scalar magUbarAve(const volVectorField &U) const
Calculate and return the magnitude of the mean velocity averaged over the specified patch...
A class for handling words, derived from Foam::string.
Definition: word.H:63
labelList fv(nPoints)
TypeName("patchMeanVelocityForce")
Runtime type information.
~patchMeanVelocityForce()=default
Destructor.
U
Definition: pEqn.H:72
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Namespace for OpenFOAM.