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  mapped type.
51 
52 See also
53  Foam::mappedPolyPatch
54  Foam::mappedFvPatch
55  Foam::fixedValueFvPatchVectorField
56 
57 SourceFiles
58  mappedFlowRateVelocityFvPatchVectorField.C
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef mappedFlowRateVelocityFvPatchVectorField_H
63 #define mappedFlowRateVelocityFvPatchVectorField_H
64 
66 
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 
69 namespace Foam
70 {
71 /*---------------------------------------------------------------------------*\
72  Class mappedFlowRateVelocityFvPatchVectorField Declaration
73 \*---------------------------------------------------------------------------*/
74 
75 class mappedFlowRateVelocityFvPatchVectorField
76 :
77  public fixedValueFvPatchVectorField
78 {
79  // Private Data
80 
81  //- Name of the neighbor flux setting the inlet mass flux
82  word nbrPhiName_;
83 
84  //- Name of the local mass flux
85  word phiName_;
86 
87  //- Name of the density field used to normalise the mass flux
88  word rhoName_;
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("mappedFlowRateVelocity");
95 
96 
97  // Constructors
98 
99  //- Construct from patch, internal field and dictionary
101  (
102  const fvPatch&,
104  const dictionary&
105  );
106 
107  //- Construct by mapping given
108  // mappedFlowRateVelocityFvPatchVectorField
109  // onto a new patch
111  (
113  const fvPatch&,
115  const fieldMapper&
116  );
117 
118  //- Disallow copy without setting internal field reference
120  (
122  ) = delete;
123 
124  //- Copy constructor setting internal field reference
126  (
129  );
130 
131  //- Construct and return a clone setting internal field reference
133  (
135  ) const
136  {
138  (
140  );
141  }
142 
143 
144  // Member Functions
145 
146 
147  //- Update the coefficients associated with the patch field
148  virtual void updateCoeffs();
149 
150  //- Write
151  virtual void write(Ostream&) const;
152 
153 };
154 
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #endif
163 
164 // ************************************************************************* //
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:162
Abstract base class for field mapping.
Definition: fieldMapper.H:48
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.