yPlus.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::yPlus
26 
27 Group
28  grpFieldFunctionObjects
29 
30 Description
31  Evaluates and outputs turbulence y+ for models. Values written to
32  time directories as field 'yPlus'.
33 
34  Example of function object specification:
35  \verbatim
36  yPlus1
37  {
38  type yPlus;
39  libs ("libfieldFunctionObjects.so");
40  ...
41  }
42  \endverbatim
43 
44 Usage
45  \table
46  Property | Description | Required | Default value
47  type | type name: yPlus | yes |
48  \endtable
49 
50 Note
51  Writing field 'yPlus' is done by default, but it can be overridden by
52  defining an empty \c objects list. For details see writeLocalObjects.
53 
54 See also
55  Foam::functionObject
56  Foam::functionObjects::fvMeshFunctionObject
57  Foam::functionObjects::logFiles
58  Foam::functionObjects::writeLocalObjects
59  Foam::functionObjects::timeControl
60 
61 SourceFiles
62  yPlus.C
63 
64 \*---------------------------------------------------------------------------*/
65 
66 #ifndef functionObjects_yPlus_H
67 #define functionObjects_yPlus_H
68 
69 #include "fvMeshFunctionObject.H"
70 #include "logFiles.H"
71 #include "writeLocalObjects.H"
72 #include "volFieldsFwd.H"
73 
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75 
76 namespace Foam
77 {
78 
79 // Forward declaration of classes
80 class turbulenceModel;
81 
82 namespace functionObjects
83 {
84 
85 /*---------------------------------------------------------------------------*\
86  Class yPlus Declaration
87 \*---------------------------------------------------------------------------*/
88 
89 class yPlus
90 :
91  public fvMeshFunctionObject,
92  public logFiles,
93  public writeLocalObjects
94 {
95  // Private Member Functions
96 
97  //- File header information
98  virtual void writeFileHeader(const label i);
99 
100  //- Calculate y+
101  void calcYPlus
102  (
103  const turbulenceModel& turbModel,
105  );
106 
107  //- Disallow default bitwise copy construct
108  yPlus(const yPlus&);
109 
110  //- Disallow default bitwise assignment
111  void operator=(const yPlus&);
112 
113 
114 public:
115 
116  //- Runtime type information
117  TypeName("yPlus");
118 
119 
120  // Constructors
121 
122  //- Construct from Time and dictionary
123  yPlus
124  (
125  const word& name,
126  const Time& runTime,
127  const dictionary& dict
128  );
129 
130 
131  //- Destructor
132  virtual ~yPlus();
133 
134 
135  // Member Functions
136 
137  //- Read the yPlus data
138  virtual bool read(const dictionary&);
139 
140  //- Calculate the yPlus field
141  virtual bool execute();
142 
143  //- Write the yPlus field
144  virtual bool write();
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace functionObjects
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #endif
156 
157 // ************************************************************************* //
virtual bool read(const dictionary &)
Read the yPlus data.
Definition: yPlus.C:160
dictionary dict
virtual bool write()
Write the yPlus field.
Definition: yPlus.C:194
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.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual bool execute()
Calculate the yPlus field.
Definition: yPlus.C:169
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
Abstract base class for turbulence models (RAS, LES and laminar).
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
A class for handling words, derived from string.
Definition: word.H:59
virtual ~yPlus()
Destructor.
Definition: yPlus.C:154
scalar yPlus
TypeName("yPlus")
Runtime type information.
Evaluates and outputs turbulence y+ for models. Values written to time directories as field &#39;yPlus&#39;...
Definition: yPlus.H:98
Namespace for OpenFOAM.