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