surfaceNormalFixedValueFvPatchVectorField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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 Description
28  This boundary condition provides a surface-normal vector boundary condition
29  by its magnitude.
30 
31 Usage
32  \table
33  Property | Description | Required | Default value
34  refValue | reference value | yes |
35  \endtable
36 
37  Example of the boundary condition specification:
38  \verbatim
39  <patchName>
40  {
41  type surfaceNormalFixedValue;
42  refValue uniform -10; // 10 INTO the domain
43  }
44  \endverbatim
45 
46 Note
47  Sign conventions:
48  - the value is positive for outward-pointing vectors
49 
50 See also
51  Foam::fixedValueFvPatchField
52 
53 SourceFiles
54  surfaceNormalFixedValueFvPatchVectorField.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef surfaceNormalFixedValueFvPatchVectorField_H
59 #define surfaceNormalFixedValueFvPatchVectorField_H
60 
61 #include "fvPatchFields.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class surfaceNormalFixedValueFvPatchVectorField Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 class surfaceNormalFixedValueFvPatchVectorField
74 :
75  public fixedValueFvPatchVectorField
76 {
77  // Private data
78 
79  scalarField refValue_;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("surfaceNormalFixedValue");
86 
87 
88  // Constructors
89 
90  //- Construct from patch and internal field
92  (
93  const fvPatch&,
95  );
96 
97  //- Construct from patch, internal field and dictionary
99  (
100  const fvPatch&,
102  const dictionary&
103  );
104 
105  //- Construct by mapping given
106  // surfaceNormalFixedValueFvPatchVectorField
107  // onto a new patch
109  (
111  const fvPatch&,
113  const fvPatchFieldMapper&
114  );
115 
116  //- Construct as copy
118  (
120  );
121 
122  //- Construct and return a clone
123  virtual tmp<fvPatchVectorField> clone() const
124  {
126  (
128  );
129  }
130 
131  //- Construct as copy setting internal field reference
133  (
136  );
137 
138  //- Construct and return a clone setting internal field reference
140  (
142  ) const
143  {
145  (
147  (
148  *this,
149  iF
150  )
151  );
152  }
153 
154 
155  // Member functions
156 
157  // Mapping functions
158 
159  //- Map (and resize as needed) from self given a mapping object
160  virtual void autoMap
161  (
162  const fvPatchFieldMapper&
163  );
164 
165  //- Reverse map the given fvPatchField onto this fvPatchField
166  virtual void rmap
167  (
168  const fvPatchVectorField&,
169  const labelList&
170  );
171 
172 
173  // Evaluation functions
174 
175  //- Update the coefficients associated with the patch field
176  virtual void updateCoeffs();
177 
178 
179  //- Write
180  virtual void write(Ostream&) const;
181 };
182 
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 } // End namespace Foam
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 #endif
191 
192 // ************************************************************************* //
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.