Loading...
Searching...
No Matches
CelikEtaIndex.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::resolutionIndexModels::CelikEtaIndex
28
29Description
30 Computes a single-mesh resolution index according to Celik et al.'s index
31 using Kolmogorov length scale, which is used as a LES/DES quality/post
32 verification metric that does not require any experimental or DNS data.
33
34 \f[
35 \Gamma_{Celik,\eta}(\mathbf{x}, t) =
36 \frac{1}{1 + \alpha_\eta \left(\frac{h}{\eta_{eff}}\right)^m}
37 \f]
38
39 with
40
41 \f[
42 \eta_{eff} = \left(\frac{\nu^3}{\epsilon}\right)^{1/4}
43 \f]
44
45 \f[
46 \epsilon = \nu_{eff} \frac{k_{sgs}}{C_k \Delta^2}
47 \f]
48
49 \f[
50 \nu_{eff} = \nu_{num} + \nu_{sgs} + \nu
51 \f]
52
53 \f[
54 \nu_{num} = {sgn}(k_{num}) C_\nu \Delta \sqrt{k_{num}}
55 \f]
56
57 \f[
58 k_{num} = C_n \left(\frac{h}{\Delta}\right)^2 k_{sgs}
59 \f]
60
61 where
62 \vartable
63 \Gamma_{Celik,\eta}(\mathbf{x}, t) | Celik et al.'s index [-]
64 \alpha_\eta | Empirical constant [-]
65 h | Characteristic length scale with \f$h = V^{1/3} \f$ [m]
66 V | Cell volume [m^3]
67 \eta_{eff} | Kolmogorov length scale [m]
68 m | Empirical exponent [-]
69 \nu | Kinematic viscosity of fluid [m^2/s]
70 \epsilon | Kinetic energy dissipation rate [m^2/s^3]
71 \nu_{eff} | Effective eddy viscosity [m^2/s]
72 \nu_{num} | Numerical eddy viscosity [m^2/s]
73 \nu_{sgs} | Subgrid-scale eddy viscosity [m^2/s]
74 k_{num} | Numerical turbulent kinetic energy [m^2/s^2]
75 C_\nu | Empirical constant [-]
76 \Delta | Filter length scale [m]
77 k_{sgs} | Subgrid-scale turbulent kinetic energy [m^2/s^2]
78 C_n | Empirical constant [-]
79 C_k | Empirical constant [-]
80 \endvartable
81
82 References:
83 \verbatim
84 Governing equations (tag:CCY):
85 Celik, I. B., Cehreli Z. N., Yavuz I. (2005).
86 Index of resolution quality for large eddy simulations.
87 Journal of Fluids Engineering. 127:949–958.
88 DOI:10.1115/1.1990201
89
90 Governing equations (tag:CKJ):
91 Celik, I., Klein, M., & Janicka, J. (2009).
92 Assessment measures for engineering LES applications.
93 Journal of fluids engineering, 131(3).
94 DOI:10.1115/1.3059703
95 \endverbatim
96
97Usage
98 Minimal example by using \c system/controlDict.functions:
99 \verbatim
100 resolutionIndexFO
101 {
102 // Inherited entries
103 ...
104 model CelikEtaIndex;
105
106 // Optional entries
107 alphaEta <scalar>;
108 m <scalar>;
109 Cnu <scalar>;
110 Cn <scalar>;
111 Ck <scalar>;
112 k <word>;
113 delta <word>;
114 nu <word>;
115 nut <word>;
116 }
117 \endverbatim
118
119 where the entries mean:
120 \table
121 Property | Description | Type | Reqd | Deflt
122 model | Model name: CelikEtaIndex | word | yes | -
123 alphaEta | Empirical constant | scalar | no | 0.05
124 m | Empirical exponent | scalar | no | 0.5
125 Cnu | Empirical constant | scalar | no | 0.1
126 Cn | Empirical constant | scalar | no | 1.0
127 Ck | Empirical constant | scalar | no | 0.0376
128 k | Name of subgrid-scale turbulent kinetic energy field <!--
129 --> | word | no | k
130 delta | Name of filter field | word | no | delta
131 nu | Name of kinematic viscosity field | word | no | nu
132 nut | Name of subgrid-scale eddy viscosity field | word | no | nut
133 \endtable
134
135SourceFiles
136 CelikEtaIndex.C
137
138\*---------------------------------------------------------------------------*/
139
140#ifndef Foam_resolutionIndexModels_CelikEtaIndex_H
141#define Foam_resolutionIndexModels_CelikEtaIndex_H
142
143#include "resolutionIndexModel.H"
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147namespace Foam
148{
149namespace resolutionIndexModels
150{
151
152/*---------------------------------------------------------------------------*\
153 Class CelikEtaIndex Declaration
154\*---------------------------------------------------------------------------*/
155
156class CelikEtaIndex
157:
158 public resolutionIndexModel
159{
160 // Private Data
161
162 //- Empirical constant
163 scalar alphaEta_;
164
165 //- Empirical exponent
166 scalar m_;
167
168 //- Empirical constant
169 scalar Cnu_;
170
171 //- Empirical constant
172 scalar Cn_;
173
174 //- Empirical constant
175 scalar Ck_;
176
177 //- Name of subgrid-scale turbulent kinetic energy field
178 word kName_;
179
180 //- Name of filter field
181 word deltaName_;
182
183 //- Name of kinematic viscosity field
184 word nuName_;
185
186 //- Name of subgrid-scale eddy viscosity field
187 word nutName_;
188
189
190 // Private Member Functions
191
192 //- Return Kolmogorov length scale field
193 tmp<volScalarField> eta() const;
194
195 //- Return kinetic energy dissipation rate field
196 tmp<volScalarField> epsilon() const;
197
198 //- Return effective eddy viscosity field
199 tmp<volScalarField> nuEff() const;
200
201 //- Return numerical eddy viscosity field
202 tmp<volScalarField> nuNum() const;
203
204 //- Return numerical turbulent kinetic energy field
205 tmp<volScalarField> kNum() const;
206
207
208public:
209
210 //- Runtime type information
211 TypeName("CelikEtaIndex");
212
213
214 // Constructors
215
216 //- Construct from components
218 (
219 const word& name,
220 const fvMesh& mesh,
221 const dictionary& dict
222 );
223
224 //- No copy construct
225 CelikEtaIndex(const CelikEtaIndex&) = delete;
226
227 //- No copy assignment
228 void operator=(const CelikEtaIndex&) = delete;
229
230
231 // Destructor
232 virtual ~CelikEtaIndex() = default;
233
234
235 // Member Functions
236
237 //- Read the function-object dictionary
238 virtual bool read(const dictionary& dict);
239
240 //- Execute the function-object operations
241 virtual bool execute();
242
243 //- Write the function-object results
244 virtual bool write();
245};
246
247
248// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
249
250} // End namespace resolutionIndexModels
251} // End namespace Foam
252
253// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
254
255#endif
256
257// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
const fvMesh & mesh() const noexcept
Return const reference to the mesh.
resolutionIndexModel(const word &name, const fvMesh &mesh, const dictionary &dict)
Construct from components.
Computes a single-mesh resolution index according to Celik et al.'s index using Kolmogorov length sca...
CelikEtaIndex(const word &name, const fvMesh &mesh, const dictionary &dict)
Construct from components.
TypeName("CelikEtaIndex")
Runtime type information.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
void operator=(const CelikEtaIndex &)=delete
No copy assignment.
CelikEtaIndex(const CelikEtaIndex &)=delete
No copy construct.
virtual bool execute()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
scalar epsilon
auto & name
A namespace for various resolutionIndex model implementations.
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