mappedVelocityFluxFixedValueFvPatchField.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::mappedVelocityFluxFixedValueFvPatchField
26 
27 Group
28  grpInletBoundaryConditions grpCoupledBoundaryConditions
29 
30 Description
31  This boundary condition maps the velocity and flux from a neighbour patch
32  to this patch
33 
34  \heading Patch usage
35 
36  \table
37  Property | Description | Required | Default value
38  phi | flux field name | no | phi
39  \endtable
40 
41  Example of the boundary condition specification:
42  \verbatim
43  myPatch
44  {
45  type mappedVelocityFlux;
46  phi phi;
47  value uniform 0; // place holder
48  }
49  \endverbatim
50 
51  The underlying sample mode should be set to \c nearestPatchFace or
52  \c nearestFace
53 
54 Note
55  This boundary condition can only be applied to patches that are of
56  the \c mappedPolyPatch type.
57 
58 SeeAlso
59  Foam::mappedPatchBase
60  Foam::mappedPolyPatch
61  Foam::mappedFvPatch
62  Foam::fixedValueFvPatchVectorField
63 
64 SourceFiles
65  mappedVelocityFluxFixedValueFvPatchField.C
66 
67 \*---------------------------------------------------------------------------*/
68 
69 #ifndef mappedVelocityFluxFixedValueFvPatchField_H
70 #define mappedVelocityFluxFixedValueFvPatchField_H
71 
73 #include "mappedFvPatch.H"
74 
75 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
76 
77 namespace Foam
78 {
79 
80 /*---------------------------------------------------------------------------*\
81  Class mappedVelocityFluxFixedValueFvPatch Declaration
82 \*---------------------------------------------------------------------------*/
83 
84 class mappedVelocityFluxFixedValueFvPatchField
85 :
86  public fixedValueFvPatchVectorField
87 {
88  // Private data
89 
90  //- Name of flux field
91  word phiName_;
92 
93 public:
94 
95  //- Runtime type information
96  TypeName("mappedVelocityFlux");
97 
98 
99  // Constructors
100 
101  //- Construct from patch and internal field
103  (
104  const fvPatch&,
106  );
107 
108  //- Construct from patch, internal field and dictionary
110  (
111  const fvPatch&,
113  const dictionary&
114  );
115 
116  //- Construct by mapping given
117  // mappedVelocityFluxFixedValueFvPatchField
118  // onto a new patch
120  (
122  const fvPatch&,
124  const fvPatchFieldMapper&
125  );
126 
127  //- Construct as copy
129  (
131  );
132 
133  //- Construct and return a clone
134  virtual tmp<fvPatchVectorField> clone() const
135  {
137  (
139  );
140  }
141 
142  //- Construct as copy setting internal field reference
144  (
147  );
148 
149  //- Construct and return a clone setting internal field reference
151  (
153  ) const
154  {
156  (
158  );
159  }
160 
161 
162  // Member functions
163 
164  // Evaluation functions
165 
166  //- Update the coefficients associated with the patch field
167  virtual void updateCoeffs();
168 
169  //- Write
170  virtual void write(Ostream&) const;
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 } // End namespace Foam
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
mappedFvPatch.H
Foam::mappedVelocityFluxFixedValueFvPatchField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: mappedVelocityFluxFixedValueFvPatchField.C:137
Foam::mappedVelocityFluxFixedValueFvPatchField::TypeName
TypeName("mappedVelocityFlux")
Runtime type information.
Foam::mappedVelocityFluxFixedValueFvPatchField
This boundary condition maps the velocity and flux from a neighbour patch to this patch.
Definition: mappedVelocityFluxFixedValueFvPatchField.H:93
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::mappedVelocityFluxFixedValueFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: mappedVelocityFluxFixedValueFvPatchField.C:230
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::mappedVelocityFluxFixedValueFvPatchField::phiName_
word phiName_
Name of flux field.
Definition: mappedVelocityFluxFixedValueFvPatchField.H:100
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::mappedVelocityFluxFixedValueFvPatchField::mappedVelocityFluxFixedValueFvPatchField
mappedVelocityFluxFixedValueFvPatchField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Definition: mappedVelocityFluxFixedValueFvPatchField.C:38
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::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51
Foam::mappedVelocityFluxFixedValueFvPatchField::clone
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
Definition: mappedVelocityFluxFixedValueFvPatchField.H:143