fixedShearStressFvPatchVectorField.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-2015 OpenFOAM Foundation
9 Copyright (C) 2022 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::fixedShearStressFvPatchVectorField
29
30Group
31 grpTurbulenceBoundaryConditions
32
33Description
34 This boundary condition sets a user-defined shear stress
35 constant and uniform across a given patch by using the expression:
36
37 \f[
38 tau_0 = -\nu_{eff} \frac{dU}{dn}
39 \f]
40
41Usage
42 Example of the boundary condition specification:
43 \verbatim
44 <patchName>
45 {
46 // Mandatory entries
47 type fixedShearStress;
48 tau <vector>;
49
50 // Inherited entries
51 ...
52 }
53 \endverbatim
54
55 where the entries mean:
56 \table
57 Property | Description | Type | Reqd | Deflt
58 type | Type name: fixedShearStress | word | yes | -
59 tau | Shear stress | vector | yes | -
60 \endtable
61
62 The inherited entries are elaborated in:
63 - \link fixedValueFvPatchFields.H \endlink
64
65SourceFiles
66 fixedShearStressFvPatchVectorField.C
67
68\*---------------------------------------------------------------------------*/
69
70#ifndef fixedShearStressFvPatchVectorField_H
71#define fixedShearStressFvPatchVectorField_H
72
73#include "fvPatchFields.H"
75
76// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77
78namespace Foam
79{
80
81/*---------------------------------------------------------------------------*\
82 Class fixedShearStressFvPatchVectorField Declaration
83\*---------------------------------------------------------------------------*/
84
85class fixedShearStressFvPatchVectorField
86:
87 public fixedValueFvPatchVectorField
88{
89 // Private Data
90
91 //- Constant shear stress
92 const vector tau0_;
93
94
95public:
96
97 //- Runtime type information
98 TypeName("fixedShearStress");
99
100
101 // Constructors
103 //- Construct from patch and internal field
105 (
106 const fvPatch&,
108 );
109
110 //- Construct from patch, internal field and dictionary
112 (
113 const fvPatch&,
116 );
117
118 //- Construct by mapping given
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 );
148
149 //- Construct and return a clone setting internal field reference
153 ) const
154 {
156 (
158 );
159 }
160
161
162 // Member Functions
163
164 // Evaluation
165
166 //- Update the coefficients associated with the patch field
167 virtual void updateCoeffs();
168
169
170 // I-O
171
172 //- Write
173 virtual void write(Ostream&) const;
174};
175
176
177// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179} // End namespace Foam
180
181// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182
183#endif
184
185// ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
This boundary condition sets a user-defined shear stress constant and uniform across a given patch by...
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("fixedShearStress")
Runtime type information.
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
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73