outletMappedUniformInletFvPatchField.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-2018 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::outletMappedUniformInletFvPatchField
28 
29 Group
30  grpInletBoundaryConditions
31 
32 Description
33  This boundary conditon averages the field over the "outlet" patch specified
34  by name "outletPatch" and applies this as the uniform value of the field
35  over this patch.
36 
37 Usage
38  \table
39  Property | Description | Required | Default value
40  outletPatch | Name of outlet patch | yes |
41  phi | Flux field name | no | phi
42  \endtable
43 
44  Example of the boundary condition specification:
45  \verbatim
46  <patchName>
47  {
48  type outletMappedUniformInlet;
49  outletPatch aPatch;
50  phi phi;
51  value uniform 0;
52  }
53  \endverbatim
54 
55 See also
56  Foam::fixedValueFvPatchField
57 
58 SourceFiles
59  outletMappedUniformInletFvPatchField.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef outletMappedUniformInletFvPatchField_H
64 #define outletMappedUniformInletFvPatchField_H
65 
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class outletMappedUniformInletFvPatchField Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 template<class Type>
78 class outletMappedUniformInletFvPatchField
79 :
80  public fixedValueFvPatchField<Type>
81 {
82  // Private data
83 
84  //- Name of the outlet patch to be mapped
85  word outletPatchName_;
86 
87  //- Name of the flux transporting the field
88  word phiName_;
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("outletMappedUniformInlet");
95 
96 
97  // Constructors
98 
99  //- Construct from patch and internal field
101  (
102  const fvPatch&,
104  );
105 
106  //- Construct from patch, internal field and dictionary
108  (
109  const fvPatch&,
111  const dictionary&
112  );
113 
114  //- Construct by mapping given outletMappedUniformInletFvPatchField
115  // onto a new patch
117  (
119  const fvPatch&,
121  const fvPatchFieldMapper&
122  );
123 
124  //- Construct as copy
126  (
128  );
129 
130  //- Construct and return a clone
131  virtual tmp<fvPatchField<Type>> clone() const
132  {
133  return tmp<fvPatchField<Type>>
134  (
136  );
137  }
138 
139  //- Construct as copy setting internal field reference
141  (
144  );
145 
146  //- Construct and return a clone setting internal field reference
148  (
150  ) const
151  {
152  return tmp<fvPatchField<Type>>
153  (
155  );
156  }
157 
158 
159  // Member functions
160 
161  // Access
162 
163  //- Name of the outlet patch to be mapped
164  const word& outletPatchName() const
165  {
166  return outletPatchName_;
167  }
168 
169 
170  // Evaluation functions
171 
172  //- Update the coefficients associated with the patch field
173  virtual void updateCoeffs();
174 
175 
176  //- Write
177  virtual void write(Ostream&) const;
178 };
179 
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #ifdef NoRepository
189 #endif
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::outletMappedUniformInletFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: outletMappedUniformInletFvPatchField.C:170
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::fixedValueFvPatchField
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
Definition: fixedValueFvPatchField.H:80
Foam::outletMappedUniformInletFvPatchField::TypeName
TypeName("outletMappedUniformInlet")
Runtime type information.
outletMappedUniformInletFvPatchField.C
Foam::outletMappedUniformInletFvPatchField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: outletMappedUniformInletFvPatchField.C:110
Foam::outletMappedUniformInletFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: outletMappedUniformInletFvPatchField.H:145
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:63
Foam::outletMappedUniformInletFvPatchField::outletPatchName
const word & outletPatchName() const
Name of the outlet patch to be mapped.
Definition: outletMappedUniformInletFvPatchField.H:178
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::outletMappedUniformInletFvPatchField
This boundary conditon averages the field over the "outlet" patch specified by name "outletPatch" and...
Definition: outletMappedUniformInletFvPatchField.H:92
fixedValueFvPatchFields.H
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::outletMappedUniformInletFvPatchField::outletMappedUniformInletFvPatchField
outletMappedUniformInletFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: outletMappedUniformInletFvPatchField.C:37
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54