Loading...
Searching...
No Matches
resolutionIndex.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) 2022 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::functionObjects::resolutionIndex
28
29Group
30 grpFieldFunctionObjects
31
32Description
33 Computes a single-mesh resolution index according to the specified model,
34 which is used as a LES/DES quality/post-verification metric that does
35 not require any experimental or DNS data.
36
37 Operands:
38 \table
39 Operand | Type | Location
40 input | vol<Type>Field(s) | <time>/inputFields
41 output file | - | -
42 output field | volScalarField | <time>/outputField
43 \endtable
44
45 where \c Type can be one of:
46 \c Scalar, \c Vector, \c SphericalTensor, \c SymmTensor, or \c Tensor.
47
48 References:
49 \verbatim
50 Governing equation (tag:P):
51 Pope, S. B. (2000).
52 Turbulent flows.
53 Cambridge, UK: Cambridge Univ. Press
54 DOI:10.1017/CBO9780511840531
55
56 Governing equations (tag:CKJ):
57 Celik, I., Klein, M., & Janicka, J. (2009).
58 Assessment measures for engineering LES applications.
59 Journal of fluids engineering, 131(3).
60 DOI:10.1115/1.3059703
61 \endverbatim
62
63Usage
64 Minimal example by using \c system/controlDict.functions:
65 \verbatim
66 resolutionIndexFO
67 {
68 // Mandatory entries
69 type resolutionIndex;
70 libs (fieldFunctionObjects);
71 model <word>;
72
73 // Conditional entries
74
75 // Option-1: when model == PopeIndex
76
77 // Option-2: when model == CelikNuIndex
78
79 // Option-3: when model == CelikEtaIndex
80
81 // Inherited entries
82 ...
83 }
84 \endverbatim
85
86 where the entries mean:
87 \table
88 Property | Description | Type | Reqd | Deflt
89 type | Type name: resolutionIndex | word | yes | -
90 libs | Library name: fieldFunctionObjects | word | yes | -
91 model | Name of the resolutionIndex model | word | yes | -
92 \endtable
93
94 Options for the \c model entry:
95 \verbatim
96 PopeIndex | Resolution method proposed by Pope (2000)
97 CelikNuIndex | Resolution method proposed by Celik et al. (2009)
98 CelikEtaIndex | Resolution method proposed by Celik et al. (2009)
99 \endverbatim
100
101 The inherited entries are elaborated in:
102 - \link functionObject.H \endlink
103
104Note
105 - The \c resolutionIndex throws runtime error when the turbulence model is
106 RANS based.
107 - Resolution-estimator models strictly assume that the flow is in a fully
108 turbulent regime.
109
110SourceFiles
111 resolutionIndex.C
112
113\*---------------------------------------------------------------------------*/
114
115#ifndef Foam_functionObjects_resolutionIndex_H
116#define Foam_functionObjects_resolutionIndex_H
117
118#include "fvMeshFunctionObject.H"
119
120// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121
122namespace Foam
123{
124
125// Forward Declarations
127
128namespace functionObjects
129{
130
131/*---------------------------------------------------------------------------*\
132 Class resolutionIndex Declaration
133\*---------------------------------------------------------------------------*/
134
135class resolutionIndex
136:
138{
139 // Private Data
140
141 //- Resolution index model
142 autoPtr<resolutionIndexModel> resolutionIndexModelPtr_;
143
144
145public:
146
147 //- Runtime type information
148 TypeName("resolutionIndex");
149
150
151 // Constructors
152
153 //- Construct from name, Time and dictionary
155 (
156 const word& name,
157 const Time& runTime,
158 const dictionary& dict
159 );
160
161 //- No copy construct
162 resolutionIndex(const resolutionIndex&) = delete;
163
164 //- No copy assignment
165 void operator=(const resolutionIndex&) = delete;
166
167
168 // Destructor
169 virtual ~resolutionIndex();
171
172 // Member Functions
173
174 //- Read the function-object dictionary
175 virtual bool read(const dictionary& dict);
176
177 //- Execute the function-object operations
178 virtual bool execute();
179
180 //- Write the function-object results
181 virtual bool write();
182};
183
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187} // End namespace functionObjects
188} // End namespace Foam
189
190// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191
192#endif
193
194// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
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...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
Computes a single-mesh resolution index according to the specified model, which is used as a LES/DES ...
TypeName("resolutionIndex")
Runtime type information.
resolutionIndex(const resolutionIndex &)=delete
No copy construct.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
resolutionIndex(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
void operator=(const resolutionIndex &)=delete
No copy assignment.
virtual bool execute()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
A base class for resolutionIndex models.
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68