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
nutRoughWallFunction
nutRoughWallFunctionFvPatchScalarField.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::nutRoughWallFunctionFvPatchScalarField
26
27
Description
28
Boundary condition for turbulent (kinematic) viscosity when using wall
29
functions for rough walls.
30
31
Manipulates the E parameter to account for roughness effects, based on
32
KsPlus.
33
34
- roughness height = sand-grain roughness (0 for smooth walls)
35
- roughness constant = 0.5-1.0 (0.5 default)
36
37
SourceFiles
38
nutRoughWallFunctionFvPatchScalarField.C
39
40
\*---------------------------------------------------------------------------*/
41
42
#ifndef nutRoughWallFunctionFvPatchScalarField_H
43
#define nutRoughWallFunctionFvPatchScalarField_H
44
45
#include <
incompressibleRASModels/nutWallFunctionFvPatchScalarField.H
>
46
47
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49
namespace
Foam
50
{
51
namespace
incompressible
52
{
53
namespace
RASModels
54
{
55
56
/*---------------------------------------------------------------------------*\
57
Class nutRoughWallFunctionFvPatchScalarField Declaration
58
\*---------------------------------------------------------------------------*/
59
60
class
nutRoughWallFunctionFvPatchScalarField
61
:
62
public
nutWallFunctionFvPatchScalarField
63
{
64
protected
:
65
66
// Protected data
67
68
//- Roughness height
69
scalarField
Ks_
;
70
71
//- Roughness constant
72
scalarField
Cs_
;
73
74
75
// Protected member functions
76
77
//- Compute the roughness function
78
virtual
scalar
fnRough
(
const
scalar KsPlus,
const
scalar
Cs
)
const
;
79
80
//- Calculate the turbulence viscosity
81
virtual
tmp<scalarField>
calcNut
()
const
;
82
83
84
public
:
85
86
//- Runtime type information
87
TypeName
(
"nutRoughWallFunction"
);
88
89
90
// Constructors
91
92
//- Construct from patch and internal field
93
nutRoughWallFunctionFvPatchScalarField
94
(
95
const
fvPatch
&,
96
const
DimensionedField<scalar, volMesh>
&
97
);
98
99
//- Construct from patch, internal field and dictionary
100
nutRoughWallFunctionFvPatchScalarField
101
(
102
const
fvPatch
&,
103
const
DimensionedField<scalar, volMesh>
&,
104
const
dictionary
&
105
);
106
107
//- Construct by mapping given
108
// nutRoughWallFunctionFvPatchScalarField
109
// onto a new patch
110
nutRoughWallFunctionFvPatchScalarField
111
(
112
const
nutRoughWallFunctionFvPatchScalarField
&,
113
const
fvPatch
&,
114
const
DimensionedField<scalar, volMesh>
&,
115
const
fvPatchFieldMapper
&
116
);
117
118
//- Construct as copy
119
nutRoughWallFunctionFvPatchScalarField
120
(
121
const
nutRoughWallFunctionFvPatchScalarField
&
122
);
123
124
//- Construct and return a clone
125
virtual
tmp<fvPatchScalarField>
clone
()
const
126
{
127
return
tmp<fvPatchScalarField>
128
(
129
new
nutRoughWallFunctionFvPatchScalarField
(*
this
)
130
);
131
}
132
133
//- Construct as copy setting internal field reference
134
nutRoughWallFunctionFvPatchScalarField
135
(
136
const
nutRoughWallFunctionFvPatchScalarField
&,
137
const
DimensionedField<scalar, volMesh>
&
138
);
139
140
//- Construct and return a clone setting internal field reference
141
virtual
tmp<fvPatchScalarField>
clone
142
(
143
const
DimensionedField<scalar, volMesh>
& iF
144
)
const
145
{
146
return
tmp<fvPatchScalarField>
147
(
148
new
nutRoughWallFunctionFvPatchScalarField
(*
this
, iF)
149
);
150
}
151
152
153
// Member functions
154
155
// Acces functions
156
157
scalarField
&
Ks
()
158
{
159
return
Ks_
;
160
}
161
162
scalarField
&
Cs
()
163
{
164
return
Cs_
;
165
}
166
167
// Mapping functions
168
169
//- Map (and resize as needed) from self given a mapping object
170
virtual
void
autoMap
(
const
fvPatchFieldMapper
&);
171
172
//- Reverse map the given fvPatchField onto this fvPatchField
173
virtual
void
rmap
174
(
175
const
fvPatchScalarField
&,
176
const
labelList
&
177
);
178
179
180
// I-O
181
182
//- Write
183
virtual
void
write
(
Ostream
&)
const
;
184
};
185
186
187
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188
189
}
// End namespace RASModels
190
}
// End namespace incompressible
191
}
// End namespace Foam
192
193
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194
195
#endif
196
197
// ************************ vim: set sw=4 sts=4 et: ************************ //