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
turbulenceModel
turbulenceModel.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
Namespace
25
Foam::incompressible::turbulenceModels
26
27
Description
28
Namespace for incompressible turbulence turbulence models.
29
30
Class
31
Foam::incompressible::turbulenceModel
32
33
Description
34
Abstract base class for incompressible turbulence models
35
(RAS, LES and laminar).
36
37
SourceFiles
38
turbulenceModel.C
39
newTurbulenceModel.C
40
41
\*---------------------------------------------------------------------------*/
42
43
#ifndef turbulenceModel_H
44
#define turbulenceModel_H
45
46
#include <
OpenFOAM/primitiveFieldsFwd.H
>
47
#include <
finiteVolume/volFieldsFwd.H
>
48
#include <
finiteVolume/surfaceFieldsFwd.H
>
49
#include <
finiteVolume/fvMatricesFwd.H
>
50
#include <
incompressibleTransportModels/transportModel.H
>
51
#include <
OpenFOAM/autoPtr.H
>
52
#include <
OpenFOAM/runTimeSelectionTables.H
>
53
54
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55
56
namespace
Foam
57
{
58
59
// Forward declarations
60
class
fvMesh;
61
62
namespace
incompressible
63
{
64
65
/*---------------------------------------------------------------------------*\
66
Class turbulenceModel Declaration
67
\*---------------------------------------------------------------------------*/
68
69
class
turbulenceModel
70
{
71
72
protected
:
73
74
// Protected data
75
76
const
Time
&
runTime_
;
77
const
fvMesh
&
mesh_
;
78
79
const
volVectorField
&
U_
;
80
const
surfaceScalarField
&
phi_
;
81
82
transportModel
&
transportModel_
;
83
84
85
private
:
86
87
// Private Member Functions
88
89
//- Disallow default bitwise copy construct
90
turbulenceModel
(
const
turbulenceModel
&);
91
92
//- Disallow default bitwise assignment
93
void
operator=
(
const
turbulenceModel
&);
94
95
96
public
:
97
98
//- Runtime type information
99
TypeName
(
"turbulenceModel"
);
100
101
102
// Declare run-time New selection table
103
104
declareRunTimeNewSelectionTable
105
(
106
autoPtr
,
107
turbulenceModel
,
108
turbulenceModel
,
109
(
110
const
volVectorField
&
U
,
111
const
surfaceScalarField
&
phi
,
112
transportModel
& lamTransportModel
113
),
114
(U, phi, lamTransportModel)
115
);
116
117
118
// Constructors
119
120
//- Construct from components
121
turbulenceModel
122
(
123
const
volVectorField
& U,
124
const
surfaceScalarField
& phi,
125
transportModel
& lamTransportModel
126
);
127
128
129
// Selectors
130
131
//- Return a reference to the selected turbulence model
132
static
autoPtr<turbulenceModel>
New
133
(
134
const
volVectorField
& U,
135
const
surfaceScalarField
& phi,
136
transportModel
& lamTransportModel
137
);
138
139
140
//- Destructor
141
virtual
~turbulenceModel
()
142
{}
143
144
145
// Member Functions
146
147
//- Access function to velocity field
148
inline
const
volVectorField
&
U
()
const
149
{
150
return
U_
;
151
}
152
153
//- Access function to flux field
154
inline
const
surfaceScalarField
&
phi
()
const
155
{
156
return
phi_
;
157
}
158
159
//- Access function to incompressible transport model
160
inline
transportModel
&
transport
()
const
161
{
162
return
transportModel_
;
163
}
164
165
//- Return the laminar viscosity
166
const
volScalarField
&
nu
()
const
167
{
168
return
transportModel_
.
nu
();
169
}
170
171
//- Return the turbulence viscosity
172
virtual
tmp<volScalarField>
nut()
const
= 0;
173
174
//- Return the effective viscosity
175
virtual
tmp<volScalarField>
nuEff()
const
= 0;
176
177
//- Return the turbulence kinetic energy
178
virtual
tmp<volScalarField>
k
()
const
= 0;
179
180
//- Return the turbulence kinetic energy dissipation rate
181
virtual
tmp<volScalarField>
epsilon()
const
= 0;
182
183
//- Return the Reynolds stress tensor
184
virtual
tmp<volSymmTensorField>
R
()
const
= 0;
185
186
//- Return the effective stress tensor including the laminar stress
187
virtual
tmp<volSymmTensorField>
devReff()
const
= 0;
188
189
//- Return the source term for the momentum equation
190
virtual
tmp<fvVectorMatrix>
divDevReff(
volVectorField
& U)
const
= 0;
191
192
//- Solve the turbulence equations and correct the turbulence viscosity
193
virtual
void
correct
() = 0;
194
195
//- Read turbulenceProperties dictionary
196
virtual
bool
read() = 0;
197
};
198
199
200
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201
202
}
// End namespace incompressible
203
}
// End namespace Foam
204
205
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206
207
#endif
208
209
// ************************ vim: set sw=4 sts=4 et: ************************ //