mappedFlowRateFvPatchVectorField.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::mappedFlowRateFvPatchVectorField
28
29Group
30 grpInletBoundaryConditions grpCoupledBoundaryConditions
31
32Description
33 Describes a volumetric/mass flow normal vector boundary condition by its
34 magnitude as an integral over its area.
35
36 The inlet mass flux is taken from the neighbour region.
37
38 The basis of the patch (volumetric or mass) is determined by the
39 dimensions of the flux, phi. The current density is used to correct the
40 velocity when applying the mass basis.
41
42Usage
43 \table
44 Property | Description | Required | Default value
45 phi | flux field name | no | phi
46 rho | density field name | no | rho
47 neigPhi | name of flux field on neighbour mesh | yes |
48 \endtable
49
50 Example of the boundary condition specification:
51 \verbatim
52 <patchName>
53 {
54 type mappedFlowRate;
55 phi phi;
56 rho rho;
57 neigPhi phi;
58 value uniform (0 0 0); // placeholder
59 }
60 \endverbatim
61
62SourceFiles
63 mappedFlowRateFvPatchVectorField.C
64
65\*---------------------------------------------------------------------------*/
66
67#ifndef mappedFlowRateFvPatchVectorField_H
68#define mappedFlowRateFvPatchVectorField_H
69
71
72// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73
74namespace Foam
75{
76/*---------------------------------------------------------------------------*\
77 Class flowRateInletVelocityFvPatch Declaration
78\*---------------------------------------------------------------------------*/
79
80class mappedFlowRateFvPatchVectorField
81:
82 public fixedValueFvPatchVectorField
83{
84 // Private data
85
86 //- Name of the neighbour flux setting the inlet mass flux
87 word nbrPhiName_;
88
89 //- Name of the local mass flux
90 word phiName_;
91
92 //- Name of the density field used to normalize the mass flux
93 word rhoName_;
94
95
96public:
97
98 //- Runtime type information
99 TypeName("mappedFlowRate");
100
101
102 // Constructors
103
104 //- Construct from patch and internal field
106 (
107 const fvPatch&,
109 );
110
111 //- Construct from patch, internal field and dictionary
113 (
114 const fvPatch&,
116 const dictionary&
117 );
119 //- Construct by mapping given
120 // mappedFlowRateFvPatchVectorField
121 // onto a new patch
123 (
125 const fvPatch&,
127 const fvPatchFieldMapper&
128 );
129
130 //- Construct as copy
132 (
134 );
135
136 //- Construct and return a clone
137 virtual tmp<fvPatchVectorField> clone() const
138 {
140 (
142 );
143 }
144
145 //- Construct as copy setting internal field reference
147 (
150 );
151
152 //- Construct and return a clone setting internal field reference
154 (
156 ) const
157 {
159 (
161 );
162 }
163
164
165 // Member functions
166
167
168 //- Update the coefficients associated with the patch field
169 virtual void updateCoeffs();
170
171 //- Write
172 virtual void write(Ostream&) const;
173
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:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
Describes a volumetric/mass flow normal vector boundary condition by its magnitude as an integral ove...
TypeName("mappedFlowRate")
Runtime type information.
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73