wallFunctionCoefficients.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::wallFunctionCoefficients
28
29Description
30 Class to host the wall-function coefficients being
31 used in the wall function boundary conditions.
32
33Usage
34 Example of the boundary condition specification:
35 \verbatim
36 <patchName>
37 {
38 // Top-level entries
39 ...
40
41 // Optional entries
42 Cmu 0.09;
43 kappa 0.41;
44 E 9.8;
45
46 // Inherited entries
47 ...
48 }
49 \endverbatim
50
51 where the entries mean:
52 \table
53 Property | Description | Type | Reqd | Deflt
54 Cmu | Empirical model coefficient | scalar | no | 0.09
55 kappa | von Karman constant | scalar | no | 0.41
56 E | Wall roughness parameter | scalar | no | 9.8
57 \endtable
58
59SourceFiles
60 wallFunctionCoefficients.C
61
62\*---------------------------------------------------------------------------*/
63
64#ifndef Foam_wallFunctionCoefficients_H
65#define Foam_wallFunctionCoefficients_H
66
67#include "scalarFwd.H"
68
69// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70
71namespace Foam
72{
73
74// Forward Declarations
75class dictionary;
76class Ostream;
77
78/*---------------------------------------------------------------------------*\
79 Class wallFunctionCoefficients Declaration
80\*---------------------------------------------------------------------------*/
81
82class wallFunctionCoefficients
83{
84 // Private Data
85
86 //- Empirical model coefficient
87 scalar Cmu_;
88
89 //- von Karman constant
90 scalar kappa_;
91
92 //- Wall roughness parameter
93 scalar E_;
94
95 //- Estimated y+ value at the intersection
96 //- of the viscous and inertial sublayers
97 scalar yPlusLam_;
98
99
100public:
101
102 // Constructors
103
104 //- Construct with default coefficients
106
107 //- Construct from dictionary
109
110
111 // Member Functions
112
113 // Access
114
115 //- Return the object: Cmu
116 scalar Cmu() const noexcept
117 {
118 return Cmu_;
119 }
120
121 //- Return the object: kappa
122 scalar kappa() const noexcept
123 {
124 return kappa_;
125 }
126
127 //- Return the object: E
128 scalar E() const noexcept
129 {
130 return E_;
131 }
132
133 //- Return the object: yPlusLam
134 scalar yPlusLam() const noexcept
135 {
136 return yPlusLam_;
137 }
138
140 // I-O
141
142 //- Write wall-function coefficients as dictionary entries
143 void writeEntries(Ostream&) const;
144};
146
147// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148
149} // End namespace Foam
150
151// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152
153#endif
154
155// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Class to host the wall-function coefficients being used in the wall function boundary conditions.
scalar kappa() const noexcept
Return the object: kappa.
scalar E() const noexcept
Return the object: E.
void writeEntries(Ostream &) const
Write wall-function coefficients as dictionary entries.
wallFunctionCoefficients()
Construct with default coefficients.
scalar yPlusLam() const noexcept
Return the object: yPlusLam.
scalar Cmu() const noexcept
Return the object: Cmu.
Namespace for OpenFOAM.
const direction noexcept
Definition: Scalar.H:223
Typedefs for float/double/scalar without requiring scalar.H.
dictionary dict