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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2013-2016 OpenFOAM Foundation
9  Copyright (C) 2015-2020 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::functionObjects::yPlus
29 
30 Group
31  grpFieldFunctionObjects
32 
33 Description
34  Computes the near wall \f$y_1^+\f$ for turbulence models.
35 
36  Operands:
37  \table
38  Operand | Type | Location
39  input | - | -
40  output file | dat | $FOAM_CASE/postProcessing/<FO>/<time>/<file>
41  output field | volScalarField | $FOAM_CASE/<time>/<outField>
42  \endtable
43 
44 Usage
45  Minimal example by using \c system/controlDict.functions:
46  \verbatim
47  yPlus1
48  {
49  // Mandatory entries (unmodifiable)
50  type yPlus;
51  libs (fieldFunctionObjects);
52 
53  // Optional (inherited) entries
54  ...
55  }
56  \endverbatim
57 
58  where the entries mean:
59  \table
60  Property | Description | Type | Req'd | Dflt
61  type | Type name: yPlus | word | yes | -
62  libs | Library name: fieldFunctionObjects | word | yes | -
63  \endtable
64 
65  The inherited entries are elaborated in:
66  - \link functionObject.H \endlink
67  - \link writeFile.H \endlink
68 
69  Minimal example by using the \c postProcess utility:
70  \verbatim
71  <solver> -postProcess -func yPlus
72  \endverbatim
73 
74 See also
75  - Foam::functionObject
76  - Foam::functionObjects::fvMeshFunctionObject
77  - Foam::functionObjects::writeFile
78  - ExtendedCodeGuide::functionObjects::field::yPlus
79 
80 SourceFiles
81  yPlus.C
82 
83 \*---------------------------------------------------------------------------*/
84 
85 #ifndef functionObjects_yPlus_H
86 #define functionObjects_yPlus_H
87 
88 #include "fvMeshFunctionObject.H"
89 #include "writeFile.H"
90 #include "volFieldsFwd.H"
91 
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 
94 namespace Foam
95 {
96 
97 namespace functionObjects
98 {
99 
100 /*---------------------------------------------------------------------------*\
101  Class yPlus Declaration
102 \*---------------------------------------------------------------------------*/
103 
104 class yPlus
105 :
106  public fvMeshFunctionObject,
107  public writeFile
108 {
109  // Private Member Functions
110 
111  //- File header information
112  virtual void writeFileHeader(Ostream& os) const;
113 
114 
115 public:
116 
117  //- Runtime type information
118  TypeName("yPlus");
119 
120 
121  // Constructors
122 
123  //- Construct from Time and dictionary
124  yPlus
125  (
126  const word& name,
127  const Time& runTime,
128  const dictionary& dict
129  );
130 
131  //- No copy construct
132  yPlus(const yPlus&) = delete;
133 
134  //- No copy assignment
135  void operator=(const yPlus&) = delete;
136 
137 
138  //- Destructor
139  virtual ~yPlus() = default;
140 
141 
142  // Member Functions
143 
144  //- Read the yPlus data
145  virtual bool read(const dictionary&);
146 
147  //- Calculate the yPlus field
148  virtual bool execute();
149 
150  //- Write the yPlus field
151  virtual bool write();
152 };
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace functionObjects
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #endif
163 
164 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
volFieldsFwd.H
writeFile.H
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::functionObjects::yPlus::read
virtual bool read(const dictionary &)
Read the yPlus data.
Definition: yPlus.C:102
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
fvMeshFunctionObject.H
Foam::functionObjects::fvMeshFunctionObject
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Definition: fvMeshFunctionObject.H:64
Foam::functionObjects::yPlus::operator=
void operator=(const yPlus &)=delete
No copy assignment.
Foam::functionObjects::yPlus::write
virtual bool write()
Write the yPlus field.
Definition: yPlus.C:176
Foam::functionObjects::yPlus::yPlus
yPlus(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: yPlus.C:66
Foam::functionObjects::yPlus::TypeName
TypeName("yPlus")
Runtime type information.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::functionObjects::yPlus
Computes the near wall for turbulence models.
Definition: yPlus.H:137
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::functionObjects::yPlus::execute
virtual bool execute()
Calculate the yPlus field.
Definition: yPlus.C:111
Foam::functionObject::name
const word & name() const
Return the name of this functionObject.
Definition: functionObject.C:131
Foam::functionObjects::writeFile
Base class for writing single files from the function objects.
Definition: writeFile.H:119
yPlus
scalar yPlus
Definition: evaluateNearWall.H:16
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::functionObjects::yPlus::~yPlus
virtual ~yPlus()=default
Destructor.