mappedFlowRateVelocityFvPatchVectorField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::mappedFlowRateVelocityFvPatchVectorField
26 
27 Description
28  This boundary condition maps the flow rate from a neighbouring patch to
29  this patch, then uses it to set a corresponding velocity in a direction
30  normal to the patch.
31 
32 Usage
33  \table
34  Property | Description | Required | Default value
35  nbrPhi | name of flux field on neighbour mesh | no | phi
36  phi | flux field name | no | phi
37  rho | density field name | no | rho
38  \endtable
39 
40  Example of the boundary condition specification:
41  \verbatim
42  <patchName>
43  {
44  type mappedFlowRateVelocity;
45  value uniform (0 0 0);
46  }
47  \endverbatim
48 
49  This boundary condition can only be applied to patches that are of
50  mappedPatchBase type.
51 
52 See also
53  Foam::mappedPatchBase
54  Foam::mappedPolyPatch
55  Foam::mappedFvPatch
56  Foam::fixedValueFvPatchVectorField
57 
58 SourceFiles
59  mappedFlowRateVelocityFvPatchVectorField.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef mappedFlowRateVelocityFvPatchVectorField_H
64 #define mappedFlowRateVelocityFvPatchVectorField_H
65 
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 /*---------------------------------------------------------------------------*\
73  Class mappedFlowRateVelocityFvPatchVectorField Declaration
74 \*---------------------------------------------------------------------------*/
75 
76 class mappedFlowRateVelocityFvPatchVectorField
77 :
78  public fixedValueFvPatchVectorField
79 {
80  // Private Data
81 
82  //- Name of the neighbor flux setting the inlet mass flux
83  word nbrPhiName_;
84 
85  //- Name of the local mass flux
86  word phiName_;
87 
88  //- Name of the density field used to normalise the mass flux
89  word rhoName_;
90 
91 
92 public:
93 
94  //- Runtime type information
95  TypeName("mappedFlowRateVelocity");
96 
97 
98  // Constructors
99 
100  //- Construct from patch, internal field and dictionary
102  (
103  const fvPatch&,
105  const dictionary&
106  );
107 
108  //- Construct by mapping given
109  // mappedFlowRateVelocityFvPatchVectorField
110  // onto a new patch
112  (
114  const fvPatch&,
116  const fvPatchFieldMapper&
117  );
118 
119  //- Disallow copy without setting internal field reference
121  (
123  ) = delete;
124 
125  //- Copy constructor setting internal field reference
127  (
130  );
131 
132  //- Construct and return a clone setting internal field reference
134  (
136  ) const
137  {
139  (
141  );
142  }
143 
144 
145  // Member Functions
146 
147 
148  //- Update the coefficients associated with the patch field
149  virtual void updateCoeffs();
150 
151  //- Write
152  virtual void write(Ostream&) const;
153 
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
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:57
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Foam::fvPatchFieldMapper.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
This boundary condition maps the flow rate from a neighbouring patch to this patch,...
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("mappedFlowRateVelocity")
Runtime type information.
mappedFlowRateVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.