surfaceNormalFixedValueFvPatchVectorField.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-2016 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::surfaceNormalFixedValueFvPatchVectorField
26 
27 Group
28  grpGenericBoundaryConditions grpInletBoundaryConditions
29 
30 Description
31  This boundary condition provides a surface-normal vector boundary condition
32  by its magnitude.
33 
34 Usage
35  \table
36  Property | Description | Required | Default value
37  refValue | reference value | yes |
38  \endtable
39 
40  Example of the boundary condition specification:
41  \verbatim
42  <patchName>
43  {
44  type surfaceNormalFixedValue;
45  refValue uniform -10; // 10 INTO the domain
46  }
47  \endverbatim
48 
49 Note
50  Sign conventions:
51  - the value is positive for outward-pointing vectors
52 
53 See also
54  Foam::fixedValueFvPatchField
55 
56 SourceFiles
57  surfaceNormalFixedValueFvPatchVectorField.C
58 
59 \*---------------------------------------------------------------------------*/
60 
61 #ifndef surfaceNormalFixedValueFvPatchVectorField_H
62 #define surfaceNormalFixedValueFvPatchVectorField_H
63 
64 #include "fvPatchFields.H"
66 
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 
69 namespace Foam
70 {
71 
72 /*---------------------------------------------------------------------------*\
73  Class surfaceNormalFixedValueFvPatchVectorField Declaration
74 \*---------------------------------------------------------------------------*/
75 
76 class surfaceNormalFixedValueFvPatchVectorField
77 :
78  public fixedValueFvPatchVectorField
79 {
80  // Private data
81 
82  scalarField refValue_;
83 
84 
85 public:
86 
87  //- Runtime type information
88  TypeName("surfaceNormalFixedValue");
89 
90 
91  // Constructors
92 
93  //- Construct from patch and internal field
95  (
96  const fvPatch&,
98  );
99 
100  //- Construct from patch, internal field and dictionary
102  (
103  const fvPatch&,
105  const dictionary&
106  );
107 
108  //- Construct by mapping given
109  // surfaceNormalFixedValueFvPatchVectorField
110  // onto a new patch
112  (
114  const fvPatch&,
116  const fvPatchFieldMapper&
117  );
118 
119  //- Construct as copy
121  (
123  );
124 
125  //- Construct and return a clone
126  virtual tmp<fvPatchVectorField> clone() const
127  {
129  (
131  );
132  }
133 
134  //- Construct as copy setting internal field reference
136  (
139  );
140 
141  //- Construct and return a clone setting internal field reference
143  (
145  ) const
146  {
148  (
150  (
151  *this,
152  iF
153  )
154  );
155  }
156 
157 
158  // Member functions
159 
160  // Mapping functions
161 
162  //- Map (and resize as needed) from self given a mapping object
163  virtual void autoMap
164  (
165  const fvPatchFieldMapper&
166  );
167 
168  //- Reverse map the given fvPatchField onto this fvPatchField
169  virtual void rmap
170  (
171  const fvPatchVectorField&,
172  const labelList&
173  );
174 
175 
176  // Evaluation functions
177 
178  //- Update the coefficients associated with the patch field
179  virtual void updateCoeffs();
180 
181 
182  //- Write
183  virtual void write(Ostream&) const;
184 };
185 
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 } // End namespace Foam
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
surfaceNormalFixedValueFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
This boundary condition provides a surface-normal vector boundary condition by its magnitude...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Foam::fvPatchFieldMapper.
TypeName("surfaceNormalFixedValue")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.