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
LES
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/addToRunTimeSelectionTable.H
>
28
29
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30
31
namespace
Foam
32
{
33
namespace
incompressible
34
{
35
namespace
LESModels
36
{
37
38
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39
40
defineTypeNameAndDebug
(laminar, 0);
41
addToRunTimeSelectionTable
(LESModel, laminar, dictionary);
42
43
44
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
45
46
laminar::laminar
47
(
48
const
volVectorField
&
U
,
49
const
surfaceScalarField
&
phi
,
50
transportModel
& transport
51
)
52
:
53
LESModel(typeName, U, phi, transport)
54
{}
55
56
57
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
58
59
tmp<volScalarField>
laminar::k
()
const
60
{
61
return
tmp<volScalarField>
62
(
63
new
volScalarField
64
(
65
IOobject
66
(
67
"k"
,
68
runTime_
.
timeName
(),
69
mesh_
,
70
IOobject::NO_READ
,
71
IOobject::NO_WRITE
72
),
73
mesh_
,
74
dimensionedScalar
(
"k"
,
sqr
(
U
().dimensions()), 0.0)
75
)
76
);
77
}
78
79
tmp<volScalarField>
laminar::epsilon
()
const
80
{
81
return
2*
nu
()*
magSqr
(
symm
(
fvc::grad
(
U
())));
82
}
83
84
tmp<volScalarField>
laminar::nuSgs
()
const
85
{
86
return
tmp<volScalarField>
87
(
88
new
volScalarField
89
(
90
IOobject
91
(
92
"nuSgs"
,
93
runTime_
.
timeName
(),
94
mesh_
,
95
IOobject::NO_READ
,
96
IOobject::NO_WRITE
97
),
98
mesh_
,
99
dimensionedScalar
(
"nuSgs"
,
nu
().
dimensions
(), 0.0)
100
)
101
);
102
}
103
104
tmp<volScalarField>
laminar::nuEff
()
const
105
{
106
return
tmp<volScalarField>
107
(
108
new
volScalarField
(
"nuEff"
,
nu
())
109
);
110
}
111
112
113
tmp<volSymmTensorField>
laminar::B
()
const
114
{
115
return
tmp<volSymmTensorField>
116
(
117
new
volSymmTensorField
118
(
119
IOobject
120
(
121
"B"
,
122
runTime_
.
timeName
(),
123
mesh_
,
124
IOobject::NO_READ
,
125
IOobject::NO_WRITE
126
),
127
mesh_
,
128
dimensionedSymmTensor
129
(
130
"B"
,
sqr
(
U
().dimensions()),
symmTensor::zero
131
)
132
)
133
);
134
}
135
136
137
tmp<volSymmTensorField>
laminar::devBeff
()
const
138
{
139
return
-
nu
()*
dev
(
twoSymm
(
fvc::grad
(
U
())));
140
}
141
142
143
tmp<fvVectorMatrix>
laminar::divDevBeff
(
volVectorField
& U)
const
144
{
145
return
146
(
147
-
fvm::laplacian
(
nu
(), U) -
fvc::div
(
nu
()*
dev
(
fvc::grad
(U)().
T
()))
148
);
149
}
150
151
152
bool
laminar::read
()
153
{
154
return
LESModel::read
();
155
}
156
157
158
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159
160
}
// End namespace LESModels
161
}
// End namespace incompressible
162
}
// End namespace Foam
163
164
// ************************ vim: set sw=4 sts=4 et: ************************ //