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-2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::functionObjects::yPlus
29
30Group
31 grpFieldFunctionObjects
32
33Description
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
44Usage
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 entries
54 useWallFunction true;
55
56 // Optional (inherited) entries
57 ...
58 }
59 \endverbatim
60
61 where the entries mean:
62 \table
63 Property | Description | Type | Req'd | Dflt
64 type | Type name: yPlus | word | yes | -
65 libs | Library name: fieldFunctionObjects | word | yes | -
66 useWallFunction | Flag to use the local expressions of <!--
67 --> the selected nut wall function to compute yPlus, <!--
68 --> otherwise directly compute yPlus from flow field <!--
69 --> | bool | no | true
70 \endtable
71
72 The inherited entries are elaborated in:
73 - \link functionObject.H \endlink
74 - \link writeFile.H \endlink
75
76 Minimal example by using the \c postProcess utility:
77 \verbatim
78 <solver> -postProcess -func yPlus
79 \endverbatim
80
81See also
82 - Foam::functionObject
83 - Foam::functionObjects::fvMeshFunctionObject
84 - Foam::functionObjects::writeFile
85 - ExtendedCodeGuide::functionObjects::field::yPlus
86
87SourceFiles
88 yPlus.C
89
90\*---------------------------------------------------------------------------*/
91
92#ifndef functionObjects_yPlus_H
93#define functionObjects_yPlus_H
94
96#include "writeFile.H"
97#include "volFieldsFwd.H"
98
99// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100
101namespace Foam
102{
103
104namespace functionObjects
105{
106
107/*---------------------------------------------------------------------------*\
108 Class yPlus Declaration
109\*---------------------------------------------------------------------------*/
110
111class yPlus
112:
113 public fvMeshFunctionObject,
114 public writeFile
115{
116 // Private Data
117
118 //- Flag to use the wall function expressions to compute yPlus
119 bool useWallFunction_;
120
121
122 // Private Member Functions
123
124 //- File header information
125 virtual void writeFileHeader(Ostream& os) const;
126
127
128public:
129
130 //- Runtime type information
131 TypeName("yPlus");
132
133
134 // Constructors
135
136 //- Construct from Time and dictionary
137 yPlus
138 (
139 const word& name,
140 const Time& runTime,
141 const dictionary& dict
142 );
143
144 //- No copy construct
145 yPlus(const yPlus&) = delete;
146
147 //- No copy assignment
148 void operator=(const yPlus&) = delete;
149
150
151 //- Destructor
152 virtual ~yPlus() = default;
153
154
155 // Member Functions
157 //- Read the yPlus data
158 virtual bool read(const dictionary&);
159
160 //- Calculate the yPlus field
161 virtual bool execute();
162
163 //- Write the yPlus field
164 virtual bool write();
165};
166
167
168// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169
170} // End namespace functionObjects
171} // End namespace Foam
172
173// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174
175#endif
177// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const word & name() const noexcept
Return the name of this functionObject.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Base class for writing single files from the function objects.
Definition: writeFile.H:120
Computes the near wall for turbulence models.
Definition: yPlus.H:160
TypeName("yPlus")
Runtime type information.
virtual ~yPlus()=default
Destructor.
void operator=(const yPlus &)=delete
No copy assignment.
yPlus(const yPlus &)=delete
No copy construct.
yPlus(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: yPlus.C:66
virtual bool execute()
Calculate the yPlus field.
Definition: yPlus.C:116
virtual bool write()
Write the yPlus field.
Definition: yPlus.C:192
virtual bool read(const dictionary &)
Read the yPlus data.
Definition: yPlus.C:103
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
scalar yPlus
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73