Loading...
Searching...
No Matches
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
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
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 );
118
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 as copy setting internal field reference
138 (
141 );
142
143 //- Return a clone
144 virtual tmp<fvPatchField<vector>> clone() const
145 {
146 return fvPatchField<vector>::Clone(*this);
147 }
148
149 //- Clone with an internal field reference
151 (
153 ) const
154 {
155 return fvPatchField<vector>::Clone(*this, iF);
156 }
157
158
159 // Member functions
160
161 //- Update the coefficients associated with the patch field
162 virtual void updateCoeffs();
163
164 //- Write
165 virtual void write(Ostream&) const;
166
167};
168
169
170// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171
172} // End namespace Foam
173
174// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175
176#endif
177
178// ************************************************************************* //
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:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
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< fvPatchField< vector > > clone() const
Return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual tmp< fvPatchField< vector > > clone(const DimensionedField< vector, volMesh > &iF) const
Clone with an internal field reference.
mappedFlowRateFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68