Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
turbulenceModels
incompressible
RAS
derivedFvPatchFields
wallFunctions
nutWallFunctions
nutWallFunction
nutWallFunctionFvPatchScalarField.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 | Copyright (C) 2008-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
Class
25
Foam::incompressible::RASModels::nutWallFunctionFvPatchScalarField
26
27
Description
28
Boundary condition for turbulent (kinematic) viscosity when using wall
29
functions
30
- replicates OpenFOAM v1.5 (and earlier) behaviour
31
32
SourceFiles
33
nutWallFunctionFvPatchScalarField.C
34
35
\*---------------------------------------------------------------------------*/
36
37
#ifndef nutWallFunctionFvPatchScalarField_H
38
#define nutWallFunctionFvPatchScalarField_H
39
40
#include <
finiteVolume/fixedValueFvPatchFields.H
>
41
42
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44
namespace
Foam
45
{
46
namespace
incompressible
47
{
48
namespace
RASModels
49
{
50
51
/*---------------------------------------------------------------------------*\
52
Class nutWallFunctionFvPatchScalarField Declaration
53
\*---------------------------------------------------------------------------*/
54
55
class
nutWallFunctionFvPatchScalarField
56
:
57
public
fixedValueFvPatchScalarField
58
{
59
protected
:
60
61
// Protected data
62
63
//- Cmu coefficient
64
scalar
Cmu_
;
65
66
//- Von Karman constant
67
scalar
kappa_
;
68
69
//- E coefficient
70
scalar
E_
;
71
72
//- Y+ at the edge of the laminar sublayer
73
scalar
yPlusLam_
;
74
75
76
// Protected member functions
77
78
//- Check the type of the patch
79
virtual
void
checkType
();
80
81
//- Calculate the Y+ at the edge of the laminar sublayer
82
virtual
scalar
calcYPlusLam
(
const
scalar
kappa
,
const
scalar
E
)
const
;
83
84
//- Calculate the turbulence viscosity
85
virtual
tmp<scalarField>
calcNut
()
const
;
86
87
//- Write local wall function variables
88
virtual
void
writeLocalEntries
(
Ostream
&)
const
;
89
90
91
public
:
92
93
//- Runtime type information
94
TypeName
(
"nutWallFunction"
);
95
96
97
// Constructors
98
99
//- Construct from patch and internal field
100
nutWallFunctionFvPatchScalarField
101
(
102
const
fvPatch
&,
103
const
DimensionedField<scalar, volMesh>
&
104
);
105
106
//- Construct from patch, internal field and dictionary
107
nutWallFunctionFvPatchScalarField
108
(
109
const
fvPatch
&,
110
const
DimensionedField<scalar, volMesh>
&,
111
const
dictionary
&
112
);
113
114
//- Construct by mapping given
115
// nutWallFunctionFvPatchScalarField
116
// onto a new patch
117
nutWallFunctionFvPatchScalarField
118
(
119
const
nutWallFunctionFvPatchScalarField
&,
120
const
fvPatch
&,
121
const
DimensionedField<scalar, volMesh>
&,
122
const
fvPatchFieldMapper
&
123
);
124
125
//- Construct as copy
126
nutWallFunctionFvPatchScalarField
127
(
128
const
nutWallFunctionFvPatchScalarField
&
129
);
130
131
//- Construct and return a clone
132
virtual
tmp<fvPatchScalarField>
clone
()
const
133
{
134
return
tmp<fvPatchScalarField>
135
(
136
new
nutWallFunctionFvPatchScalarField
(*
this
)
137
);
138
}
139
140
//- Construct as copy setting internal field reference
141
nutWallFunctionFvPatchScalarField
142
(
143
const
nutWallFunctionFvPatchScalarField
&,
144
const
DimensionedField<scalar, volMesh>
&
145
);
146
147
//- Construct and return a clone setting internal field reference
148
virtual
tmp<fvPatchScalarField>
clone
149
(
150
const
DimensionedField<scalar, volMesh>
& iF
151
)
const
152
{
153
return
tmp<fvPatchScalarField>
154
(
155
new
nutWallFunctionFvPatchScalarField
(*
this
, iF)
156
);
157
}
158
159
160
// Member functions
161
162
// Evaluation functions
163
164
//- Calculate and return the yPlus at the boundary
165
virtual
tmp<scalarField>
yPlus
()
const
;
166
167
//- Update the coefficients associated with the patch field
168
virtual
void
updateCoeffs
();
169
170
171
// I-O
172
173
//- Write
174
virtual
void
write
(
Ostream
&)
const
;
175
};
176
177
178
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179
180
}
// End namespace RASModels
181
}
// End namespace incompressible
182
}
// End namespace Foam
183
184
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185
186
#endif
187
188
// ************************ vim: set sw=4 sts=4 et: ************************ //