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