Loading...
Searching...
No Matches
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 Foam_uniformNormalFixedValueFvPatchVectorField_H
68#define Foam_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
84:
85 public fixedValueFvPatchVectorField
86{
87 // Private Data
88
89 //- Function providing the value
90 autoPtr<PatchFunction1<scalar>> refValueFunc_;
91
92 //- Optional ramping
94
95
96public:
97
98 //- Runtime type information
99 TypeName("uniformNormalFixedValue");
100
101
102 // Constructors
103
104 //- Construct from patch and internal field
106 (
107 const fvPatch&,
109 );
110
111 //- Construct from patch, internal field and dictionary
113 (
114 const fvPatch&,
116 const dictionary&
117 );
118
119 //- Construct by mapping given
120 // uniformNormalFixedValueFvPatchVectorField
121 // onto a new patch
123 (
125 const fvPatch&,
127 const fvPatchFieldMapper&
128 );
129
130 //- Construct as copy
132 (
134 );
135
136 //- Construct as copy setting internal field reference
138 (
141 );
142
143 //- Return a clone
144 virtual tmp<fvPatchField<vector>> clone() const
145 {
146 return fvPatchField<vector>::Clone(*this);
147 }
148
149 //- Clone with an internal field reference
151 (
153 ) const
154 {
155 return fvPatchField<vector>::Clone(*this, iF);
156 }
157
158
159 // Member Functions
160
161 // Mapping Functions
162
163 //- Map (and resize as needed) from self given a mapping object
164 virtual void autoMap
165 (
166 const fvPatchFieldMapper&
167 );
168
169 //- Reverse map the given fvPatchField onto this fvPatchField
170 virtual void rmap
171 (
172 const fvPatchVectorField&,
174 );
175
176
177 // Evaluation Functions
178
179 //- Update the coefficients associated with the patch field
180 virtual void updateCoeffs();
182
183 //- Write
184 virtual void write(Ostream& os) const;
185};
186
187
188// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189
190} // End namespace Foam
191
192// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193
194#endif
195
196// ************************************************************************* //
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
A class for managing temporary objects.
Definition tmp.H:75
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 void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< fvPatchField< vector > > clone() const
Return a clone.
uniformNormalFixedValueFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
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.
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
fvPatchField< vector > fvPatchVectorField
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68