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-2015 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  \heading Patch usage
35 
36  \table
37  Property | Description | Required | Default value
38  refValue | reference value | yes |
39  \endtable
40 
41  Example of the boundary condition specification:
42  \verbatim
43  myPatch
44  {
45  type surfaceNormalFixedValue;
46  refValue uniform -10; // 10 INTO the domain
47  }
48  \endverbatim
49 
50 Note
51  Sign conventions:
52  - the value is positive for outward-pointing vectors
53 
54 SeeAlso
55  Foam::fixedValueFvPatchField
56 
57 SourceFiles
58  surfaceNormalFixedValueFvPatchVectorField.C
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef surfaceNormalFixedValueFvPatchVectorField_H
63 #define surfaceNormalFixedValueFvPatchVectorField_H
64 
65 #include "fvPatchFields.H"
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class surfaceNormalFixedValueFvPatchVectorField Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 class surfaceNormalFixedValueFvPatchVectorField
78 :
79  public fixedValueFvPatchVectorField
80 {
81  // Private data
82 
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("surfaceNormalFixedValue");
90 
91 
92  // Constructors
93 
94  //- Construct from patch and internal field
96  (
97  const fvPatch&,
99  );
100 
101  //- Construct from patch, internal field and dictionary
103  (
104  const fvPatch&,
106  const dictionary&
107  );
108 
109  //- Construct by mapping given
110  // surfaceNormalFixedValueFvPatchVectorField
111  // onto a new patch
113  (
115  const fvPatch&,
117  const fvPatchFieldMapper&
118  );
119 
120  //- Construct as copy
122  (
124  );
125 
126  //- Construct and return a clone
127  virtual tmp<fvPatchVectorField> clone() const
128  {
130  (
132  );
133  }
134 
135  //- Construct as copy setting internal field reference
137  (
140  );
141 
142  //- Construct and return a clone setting internal field reference
144  (
146  ) const
147  {
149  (
151  (
152  *this,
153  iF
154  )
155  );
156  }
157 
158 
159 
160  // Member functions
161 
162  // Mapping functions
163 
164  //- Map (and resize as needed) from self given a mapping object
165  virtual void autoMap
166  (
167  const fvPatchFieldMapper&
168  );
169 
170  //- Reverse map the given fvPatchField onto this fvPatchField
171  virtual void rmap
172  (
173  const fvPatchVectorField&,
174  const labelList&
175  );
176 
177 
178  // Evaluation functions
179 
180  //- Update the coefficients associated with the patch field
181  virtual void updateCoeffs();
182 
183 
184  //- Write
185  virtual void write(Ostream&) const;
186 };
187 
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 } // End namespace Foam
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 #endif
196 
197 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:65
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:48
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::surfaceNormalFixedValueFvPatchVectorField::write
virtual void write(Ostream &) const
Write.
Definition: surfaceNormalFixedValueFvPatchVectorField.C:147
Foam::surfaceNormalFixedValueFvPatchVectorField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: surfaceNormalFixedValueFvPatchVectorField.C:111
Foam::surfaceNormalFixedValueFvPatchVectorField::refValue_
scalarField refValue_
Definition: surfaceNormalFixedValueFvPatchVectorField.H:92
Foam::surfaceNormalFixedValueFvPatchVectorField::clone
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
Definition: surfaceNormalFixedValueFvPatchVectorField.H:136
Foam::surfaceNormalFixedValueFvPatchVectorField::TypeName
TypeName("surfaceNormalFixedValue")
Runtime type information.
Foam::surfaceNormalFixedValueFvPatchVectorField::surfaceNormalFixedValueFvPatchVectorField
surfaceNormalFixedValueFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Definition: surfaceNormalFixedValueFvPatchVectorField.C:35
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
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::surfaceNormalFixedValueFvPatchVectorField
This boundary condition provides a surface-normal vector boundary condition by its magnitude.
Definition: surfaceNormalFixedValueFvPatchVectorField.H:86
fvPatchFields.H
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
fixedValueFvPatchFields.H
Foam::surfaceNormalFixedValueFvPatchVectorField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: surfaceNormalFixedValueFvPatchVectorField.C:135
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::surfaceNormalFixedValueFvPatchVectorField::rmap
virtual void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: surfaceNormalFixedValueFvPatchVectorField.C:121
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51