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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::fixedShearStressFvPatchVectorField
29 
30 Group
31  grpTurbulenceBoundaryConditions
32 
33 Description
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 
41 Usage
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 
65 SourceFiles
66  fixedShearStressFvPatchVectorField.C
67 
68 \*---------------------------------------------------------------------------*/
69 
70 #ifndef fixedShearStressFvPatchVectorField_H
71 #define fixedShearStressFvPatchVectorField_H
72 
73 #include "fvPatchFields.H"
75 
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 
78 namespace Foam
79 {
80 
81 /*---------------------------------------------------------------------------*\
82  Class fixedShearStressFvPatchVectorField Declaration
83 \*---------------------------------------------------------------------------*/
84 
85 class fixedShearStressFvPatchVectorField
86 :
87  public fixedValueFvPatchVectorField
88 {
89  // Private Data
90 
91  //- Constant shear stress
92  const vector tau0_;
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("fixedShearStress");
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
112  (
113  const fvPatch&,
115  const dictionary&
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 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  // Evaluation
159 
160  //- Update the coefficients associated with the patch field
161  virtual void updateCoeffs();
162 
163 
164  // I-O
165 
166  //- Write
167  virtual void write(Ostream&) const;
168 };
169 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************************************************************* //
TypeName("fixedShearStress")
Runtime type information.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual tmp< fvPatchField< vector > > clone() const
Return a clone.
This boundary condition sets a user-defined shear stress constant and uniform across a given patch by...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:597
A FieldMapper for finite-volume patch fields.
Vector< scalar > vector
Definition: vector.H:57
fixedShearStressFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.