wallShearStress.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 | Copyright (C) 2013-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::functionObjects::wallShearStress
26 
27 Group
28  grpForcesFunctionObjects
29 
30 Description
31  Calculates and write the shear-stress at wall patches as
32  the volVectorField field 'wallShearStress'.
33 
34  \f[
35  Stress = R \dot n
36  \f]
37 
38  where
39  \vartable
40  R | stress tensor
41  n | patch normal vector (into the domain)
42  \endvartable
43 
44  The shear-stress symmetric tensor field is retrieved from the turbulence
45  model. All wall patches are included by default; to restrict the
46  calculation to certain patches, use the optional 'patches' entry.
47 
48  Example of function object specification:
49  \verbatim
50  wallShearStress1
51  {
52  type wallShearStress;
53  libs ("libfieldFunctionObjects.so");
54  ...
55  patches (".*Wall");
56  }
57  \endverbatim
58 
59 Usage
60  \table
61  Property | Description | Required | Default value
62  type | type name: wallShearStress | yes |
63  patches | list of patches to process | no | all wall patches
64  \endtable
65 
66 Note
67  Writing field 'wallShearStress' is done by default, but it can be overridden
68  by defining an empty \c objects list. For details see writeLocalObjects.
69 
70 See also
71  Foam::functionObject
72  Foam::functionObjects::fvMeshFunctionObject
73  Foam::functionObjects::logFiles
74  Foam::functionObjects::writeLocalObjects
75  Foam::functionObjects::pressureTools
76  Foam::functionObjects::timeControl
77 
78 SourceFiles
79  wallShearStress.C
80 
81 \*---------------------------------------------------------------------------*/
82 
83 #ifndef functionObjects_wallShearStress_H
84 #define functionObjects_wallShearStress_H
85 
86 #include "fvMeshFunctionObject.H"
87 #include "logFiles.H"
88 #include "writeLocalObjects.H"
89 #include "volFieldsFwd.H"
90 #include "HashSet.H"
91 
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 
94 namespace Foam
95 {
96 namespace functionObjects
97 {
98 
99 /*---------------------------------------------------------------------------*\
100  Class wallShearStress Declaration
101 \*---------------------------------------------------------------------------*/
102 
103 class wallShearStress
104 :
105  public fvMeshFunctionObject,
106  public logFiles,
107  public writeLocalObjects
108 {
109 
110 protected:
111 
112  // Protected data
113 
114  //- Optional list of patches to process
116 
117 
118  // Protected Member Functions
119 
120  //- File header information
121  virtual void writeFileHeader(const label i);
122 
123  //- Calculate the shear-stress
124  void calcShearStress
125  (
126  const volSymmTensorField& Reff,
127  volVectorField& shearStress
128  );
129 
130 
131 private:
132 
133  // Private member functions
134 
135  //- Disallow default bitwise copy construct
138  //- Disallow default bitwise assignment
139  void operator=(const wallShearStress&);
140 
141 
142 public:
143 
144  //- Runtime type information
145  TypeName("wallShearStress");
146 
147 
148  // Constructors
149 
150  //- Construct from Time and dictionary
152  (
153  const word& name,
154  const Time& runTime,
155  const dictionary&
156  );
157 
158 
159  //- Destructor
160  virtual ~wallShearStress();
161 
162 
163  // Member Functions
164 
165  //- Read the wallShearStress data
166  virtual bool read(const dictionary&);
167 
168  //- Calculate the wall shear-stress
169  virtual bool execute();
170 
171  //- Write the wall shear-stress
172  virtual bool write();
173 };
174 
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 } // End namespace functionObjects
179 } // End namespace Foam
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 #endif
184 
185 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
const word & name() const
Return the name of this functionObject.
virtual bool read(const dictionary &)
Read the wallShearStress data.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
labelHashSet patchSet_
Optional list of patches to process.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
virtual bool execute()
Calculate the wall shear-stress.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
Definition: HashSet.H:210
virtual void writeFileHeader(const label i)
File header information.
void calcShearStress(const volSymmTensorField &Reff, volVectorField &shearStress)
Calculate the shear-stress.
A class for handling words, derived from string.
Definition: word.H:59
Calculates and write the shear-stress at wall patches as the volVectorField field &#39;wallShearStress&#39;...
virtual bool write()
Write the wall shear-stress.
TypeName("wallShearStress")
Runtime type information.
Namespace for OpenFOAM.