Loading...
Searching...
No Matches
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
82:
83 public fixedValueFvPatchVectorField
84{
85 // Private Data
86
87 scalarField refValue_;
88
89 //- Optional time ramping
90 autoPtr<Function1<scalar>> ramp_;
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 as copy setting internal field reference
135 (
138 );
139
140 //- Return a clone
141 virtual tmp<fvPatchField<vector>> clone() const
142 {
143 return fvPatchField<vector>::Clone(*this);
144 }
145
146 //- Clone with an internal field reference
148 (
150 ) const
151 {
152 return fvPatchField<vector>::Clone(*this, iF);
153 }
154
155
156 // Member functions
157
158 // Mapping functions
159
160 //- Map (and resize as needed) from self given a mapping object
161 virtual void autoMap
162 (
163 const fvPatchFieldMapper&
164 );
165
166 //- Reverse map the given fvPatchField onto this fvPatchField
167 virtual void rmap
169 const fvPatchVectorField&,
170 const labelList&
171 );
172
173
174 // Evaluation functions
175
176 //- Update the coefficients associated with the patch field
177 virtual void updateCoeffs();
178
179
180 //- Write
181 virtual void write(Ostream&) const;
182};
183
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187} // End namespace Foam
188
189// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190
191#endif
192
193// ************************************************************************* //
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:59
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
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 void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< fvPatchField< vector > > clone() const
Return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual tmp< fvPatchField< vector > > clone(const DimensionedField< vector, volMesh > &iF) const
Clone with an internal field reference.
TypeName("surfaceNormalFixedValue")
Runtime type information.
surfaceNormalFixedValueFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
A class for managing temporary objects.
Definition tmp.H:75
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
fvPatchField< vector > fvPatchVectorField
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68