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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::surfaceNormalFixedValueFvPatchVectorField
29
30Group
31 grpGenericBoundaryConditions grpInletBoundaryConditions
32
33Description
34 This boundary condition provides a surface-normal vector boundary condition
35 by its magnitude.
36
37Usage
38 \table
39 Property | Description | Required | Default
40 refValue | reference value | yes |
41 ramp | time-based ramping | no |
42 \endtable
43
44 Example of the boundary condition specification:
45 \verbatim
46 <patchName>
47 {
48 type surfaceNormalFixedValue;
49 refValue uniform -10; // 10 INTO the domain
50 }
51 \endverbatim
52
53Note
54 Sign conventions:
55 - the value is positive for outward-pointing vectors
56
57See also
58 Foam::fixedValueFvPatchField
59
60SourceFiles
61 surfaceNormalFixedValueFvPatchVectorField.C
62
63\*---------------------------------------------------------------------------*/
64
65#ifndef surfaceNormalFixedValueFvPatchVectorField_H
66#define surfaceNormalFixedValueFvPatchVectorField_H
67
68#include "fvPatchFields.H"
70#include "Function1.H"
71
72// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73
74namespace Foam
75{
76
77/*---------------------------------------------------------------------------*\
78 Class surfaceNormalFixedValueFvPatchVectorField Declaration
79\*---------------------------------------------------------------------------*/
80
81class surfaceNormalFixedValueFvPatchVectorField
82:
83 public fixedValueFvPatchVectorField
84{
85 // Private Data
86
87 scalarField refValue_;
88
89 //- Optional time ramping
90 autoPtr<Function1<scalar>> ramp_;
91
92
93public:
94
95 //- Runtime type information
96 TypeName("surfaceNormalFixedValue");
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
111 const fvPatch&,
113 const dictionary&
114 );
115
116 //- Construct by mapping given
117 // surfaceNormalFixedValueFvPatchVectorField
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 );
149 //- Construct and return a clone setting internal field reference
151 (
153 ) const
154 {
156 (
158 (
159 *this,
160 iF
161 )
162 );
163 }
165
166 // Member functions
167
168 // Mapping functions
169
170 //- Map (and resize as needed) from self given a mapping object
171 virtual void autoMap
172 (
173 const fvPatchFieldMapper&
174 );
175
176 //- Reverse map the given fvPatchField onto this fvPatchField
177 virtual void rmap
178 (
179 const fvPatchVectorField&,
180 const labelList&
181 );
182
183
184 // Evaluation functions
185
186 //- Update the coefficients associated with the patch field
187 virtual void updateCoeffs();
188
189
190 //- Write
191 virtual void write(Ostream&) const;
192};
193
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197} // End namespace Foam
198
199// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200
201#endif
202
203// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
This boundary condition provides a surface-normal vector boundary condition by its magnitude.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("surfaceNormalFixedValue")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73