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
laminar
laminar.C
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
\*---------------------------------------------------------------------------*/
25
26
#include "
laminar.H
"
27
#include <
OpenFOAM/Time.H
>
28
#include <
finiteVolume/volFields.H
>
29
#include <
finiteVolume/fvcGrad.H
>
30
#include <
finiteVolume/fvcDiv.H
>
31
#include <
finiteVolume/fvmLaplacian.H
>
32
#include <
OpenFOAM/addToRunTimeSelectionTable.H
>
33
34
35
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36
37
namespace
Foam
38
{
39
namespace
incompressible
40
{
41
42
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
43
44
defineTypeNameAndDebug
(laminar, 0);
45
addToRunTimeSelectionTable
(turbulenceModel, laminar, turbulenceModel);
46
47
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48
49
laminar::laminar
50
(
51
const
volVectorField
&
U
,
52
const
surfaceScalarField
&
phi
,
53
transportModel
& lamTransportModel
54
)
55
:
56
turbulenceModel
(U, phi, lamTransportModel)
57
{}
58
59
60
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
61
62
autoPtr<laminar>
laminar::New
63
(
64
const
volVectorField
& U,
65
const
surfaceScalarField
& phi,
66
transportModel
& lamTransportModel
67
)
68
{
69
return
autoPtr<laminar>
(
new
laminar
(U, phi, lamTransportModel));
70
}
71
72
73
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
74
75
tmp<volScalarField>
laminar::nut()
const
76
{
77
return
tmp<volScalarField>
78
(
79
new
volScalarField
80
(
81
IOobject
82
(
83
"nut"
,
84
runTime_.timeName(),
85
mesh_,
86
IOobject::NO_READ
,
87
IOobject::NO_WRITE
88
),
89
mesh_,
90
dimensionedScalar
(
"nut"
,
nu
().dimensions(), 0.0)
91
)
92
);
93
}
94
95
96
tmp<volScalarField>
laminar::nuEff()
const
97
{
98
return
tmp<volScalarField>
(
new
volScalarField
(
"nuEff"
,
nu
()));
99
}
100
101
102
tmp<volScalarField>
laminar::k
()
const
103
{
104
return
tmp<volScalarField>
105
(
106
new
volScalarField
107
(
108
IOobject
109
(
110
"k"
,
111
runTime_.timeName(),
112
mesh_,
113
IOobject::NO_READ
,
114
IOobject::NO_WRITE
115
),
116
mesh_,
117
dimensionedScalar
(
"k"
,
sqr
(U_.dimensions()), 0.0)
118
)
119
);
120
}
121
122
123
tmp<volScalarField>
laminar::epsilon()
const
124
{
125
return
tmp<volScalarField>
126
(
127
new
volScalarField
128
(
129
IOobject
130
(
131
"epsilon"
,
132
runTime_.timeName(),
133
mesh_,
134
IOobject::NO_READ
,
135
IOobject::NO_WRITE
136
),
137
mesh_,
138
dimensionedScalar
139
(
140
"epsilon"
,
sqr
(U_.dimensions())/
dimTime
, 0.0
141
)
142
)
143
);
144
}
145
146
147
tmp<volSymmTensorField>
laminar::R
()
const
148
{
149
return
tmp<volSymmTensorField>
150
(
151
new
volSymmTensorField
152
(
153
IOobject
154
(
155
"R"
,
156
runTime_.timeName(),
157
mesh_,
158
IOobject::NO_READ
,
159
IOobject::NO_WRITE
160
),
161
mesh_,
162
dimensionedSymmTensor
163
(
164
"R"
,
sqr
(U_.dimensions()),
symmTensor::zero
165
)
166
)
167
);
168
}
169
170
171
tmp<volSymmTensorField>
laminar::devReff()
const
172
{
173
return
tmp<volSymmTensorField>
174
(
175
new
volSymmTensorField
176
(
177
IOobject
178
(
179
"devRhoReff"
,
180
runTime_.timeName(),
181
mesh_,
182
IOobject::NO_READ
,
183
IOobject::NO_WRITE
184
),
185
-
nu
()*
dev
(
twoSymm
(
fvc::grad
(U_)))
186
)
187
);
188
}
189
190
191
tmp<fvVectorMatrix>
laminar::divDevReff(
volVectorField
& U)
const
192
{
193
return
194
(
195
-
fvm::laplacian
(nuEff(), U)
196
-
fvc::div
(nuEff()*
dev
(
fvc::grad
(U)().
T
()))
197
);
198
}
199
200
201
bool
laminar::read()
202
{
203
return
true
;
204
}
205
206
207
void
laminar::correct
()
208
{
209
turbulenceModel::correct
();
210
}
211
212
213
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214
215
}
// End namespace incompressible
216
}
// End namespace Foam
217
218
// ************************ vim: set sw=4 sts=4 et: ************************ //