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