uniformNormalFixedValueFvPatchVectorField.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) 2019 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::uniformNormalFixedValueFvPatchVectorField
28
29Group
30 grpGenericBoundaryConditions grpInletBoundaryConditions
31
32Description
33 This boundary condition provides a uniform surface-normal
34 vector boundary condition by its magnitude.
35
36Usage
37 \table
38 Property | Description | Required | Default
39 uniformValue | uniform value | yes |
40 ramp | time-based ramping | no |
41 \endtable
42
43 Example of the boundary condition specification:
44 \verbatim
45 <patchName>
46 {
47 type uniformNormalFixedValue;
48 uniformValue constant -10; // 10 INTO the domain
49 }
50 \endverbatim
51
52Note
53 Sign conventions:
54 - the value is positive for outward-pointing vectors
55
56See also
57 Foam::Function1Types
58 Foam::fixedValueFvPatchField
59 Foam::surfaceNormalFixedValueFvPatchVectorField
60 Foam::uniformFixedValueFvPatchVectorField
61
62SourceFiles
63 uniformNormalFixedValueFvPatchVectorField.C
64
65\*---------------------------------------------------------------------------*/
66
67#ifndef uniformNormalFixedValueFvPatchVectorField_H
68#define uniformNormalFixedValueFvPatchVectorField_H
69
70#include "fvPatchFields.H"
72#include "PatchFunction1.H"
73
74// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75
76namespace Foam
77{
78
79/*---------------------------------------------------------------------------*\
80 Class uniformNormalFixedValueFvPatchVectorField Declaration
81\*---------------------------------------------------------------------------*/
82
83class uniformNormalFixedValueFvPatchVectorField
84:
85 public fixedValueFvPatchVectorField
86{
87 // Private Data
88
89 autoPtr<PatchFunction1<scalar>> uniformValue_;
90
91 //- Optional time ramping
92 autoPtr<Function1<scalar>> ramp_;
93
94
95public:
96
97 //- Runtime type information
98 TypeName("uniformNormalFixedValue");
99
100
101 // Constructors
102
103 //- Construct from patch and internal field
105 (
106 const fvPatch&,
108 );
109
110 //- Construct from patch, internal field and dictionary
113 const fvPatch&,
115 const dictionary&
116 );
117
118 //- Construct by mapping given
119 // uniformNormalFixedValueFvPatchVectorField
120 // onto a new patch
122 (
124 const fvPatch&,
126 const fvPatchFieldMapper&
127 );
128
129 //- Construct as copy
131 (
133 );
134
135 //- Construct and return a clone
136 virtual tmp<fvPatchVectorField> clone() const
137 {
139 (
141 );
142 }
143
144 //- Construct as copy setting internal field reference
146 (
149 );
151 //- Construct and return a clone setting internal field reference
153 (
155 ) const
156 {
158 (
160 (
161 *this,
162 iF
163 )
164 );
165 }
167
168 // Member Functions
169
170 // Mapping Functions
171
172 //- Map (and resize as needed) from self given a mapping object
173 virtual void autoMap
174 (
175 const fvPatchFieldMapper&
176 );
177
178 //- Reverse map the given fvPatchField onto this fvPatchField
179 virtual void rmap
180 (
181 const fvPatchVectorField&,
182 const labelList&
183 );
184
185
186 // Evaluation Functions
187
188 //- Update the coefficients associated with the patch field
189 virtual void updateCoeffs();
190
191
192 //- Write
193 virtual void write(Ostream& os) const;
194};
195
196
197// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198
199} // End namespace Foam
200
201// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202
203#endif
204
205// ************************************************************************* //
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
A class for managing temporary objects.
Definition: tmp.H:65
This boundary condition provides a uniform surface-normal vector boundary condition by its magnitude.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
TypeName("uniformNormalFixedValue")
Runtime type information.
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.
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73