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
nutSpalartAllmarasStandardRoughWallFunction
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.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) 1991-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::nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
26
27
Description
28
Wall function boundary condition for rough walls
29
30
SourceFiles
31
nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
36
#define nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H
37
38
#include <
incompressibleRASModels/nutWallFunctionFvPatchScalarField.H
>
39
40
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42
namespace
Foam
43
{
44
namespace
incompressible
45
{
46
namespace
RASModels
47
{
48
49
/*---------------------------------------------------------------------------*\
50
Class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField Declaration
51
\*---------------------------------------------------------------------------*/
52
53
class
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
54
:
55
public
nutWallFunctionFvPatchScalarField
56
{
57
// Private data
58
59
// Roughness model parameters
60
61
//- Height
62
scalar roughnessHeight_;
63
64
//- Constant
65
scalar roughnessConstant_;
66
67
//- Scale factor
68
scalar roughnessFudgeFactor_;
69
70
71
// Protected member functions
72
73
//- Calculate yPLus
74
virtual
tmp<scalarField>
calcYPlus(
const
scalarField
& magUp)
const
;
75
76
//- Calculate the turbulence viscosity
77
virtual
tmp<scalarField>
calcNut()
const
;
78
79
80
public
:
81
82
//- Runtime type information
83
TypeName
(
"nutSpalartAllmarasStandardRoughWallFunction"
);
84
85
86
// Constructors
87
88
//- Construct from patch and internal field
89
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
90
(
91
const
fvPatch
&,
92
const
DimensionedField<scalar, volMesh>
&
93
);
94
95
//- Construct from patch, internal field and dictionary
96
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
97
(
98
const
fvPatch
&,
99
const
DimensionedField<scalar, volMesh>
&,
100
const
dictionary
&
101
);
102
103
//- Construct by mapping given
104
// nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
105
// onto a new patch
106
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
107
(
108
const
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
&,
109
const
fvPatch
&,
110
const
DimensionedField<scalar, volMesh>
&,
111
const
fvPatchFieldMapper
&
112
);
113
114
//- Construct as copy
115
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
116
(
117
const
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
&
118
);
119
120
//- Construct and return a clone
121
virtual
tmp<fvPatchScalarField>
clone
()
const
122
{
123
return
tmp<fvPatchScalarField>
124
(
125
new
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
126
(
127
*
this
128
)
129
);
130
}
131
132
//- Construct as copy setting internal field reference
133
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
134
(
135
const
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
&,
136
const
DimensionedField<scalar, volMesh>
&
137
);
138
139
//- Construct and return a clone setting internal field reference
140
virtual
tmp<fvPatchScalarField>
clone
141
(
142
const
DimensionedField<scalar, volMesh>
& iF
143
)
const
144
{
145
return
tmp<fvPatchScalarField>
146
(
147
new
nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField
148
(
149
*
this
,
150
iF
151
)
152
);
153
}
154
155
156
// Member functions
157
158
// Access
159
160
//- Return the roughness height
161
const
scalar&
roughnessHeight
()
const
162
{
163
return
roughnessHeight_;
164
}
165
166
//- Return reference to the roughness height to allow adjustment
167
scalar&
roughnessHeight
()
168
{
169
return
roughnessHeight_;
170
}
171
172
173
//- Return the roughness constant scale
174
const
scalar&
roughnessConstant
()
const
175
{
176
return
roughnessConstant_;
177
}
178
179
//- Return reference to the roughness constant to allow adjustment
180
scalar&
roughnessConstant
()
181
{
182
return
roughnessConstant_;
183
}
184
185
//- Return the roughness scale factor
186
const
scalar&
roughnessFudgeFactor
()
const
187
{
188
return
roughnessFudgeFactor_;
189
}
190
191
//- Return reference to the roughness scale factor to allow
192
// adjustment
193
scalar&
roughnessFudgeFactor
()
194
{
195
return
roughnessFudgeFactor_;
196
}
197
198
199
// I-O
200
201
// Evaluation functions
202
203
//- Calculate and return the yPlus at the boundary
204
virtual
tmp<scalarField>
yPlus
()
const
;
205
206
207
// I-O
208
209
//- Write
210
virtual
void
write
(
Ostream
& os)
const
;
211
};
212
213
214
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215
216
}
// End namespace RASModels
217
}
// End namespace incompressible
218
}
// End namespace Foam
219
220
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221
222
#endif
223
224
// ************************ vim: set sw=4 sts=4 et: ************************ //