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
SpalartAllmarasDDES
SpalartAllmarasDDES.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) 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
\*---------------------------------------------------------------------------*/
25
26
#include "
SpalartAllmarasDDES.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
(SpalartAllmarasDDES, 0);
41
addToRunTimeSelectionTable
(LESModel, SpalartAllmarasDDES, dictionary);
42
43
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
44
45
tmp<volScalarField> SpalartAllmarasDDES::rd
46
(
47
const
volScalarField
& visc,
48
const
volScalarField
& S
49
)
const
50
{
51
return
min
52
(
53
visc
54
/(
55
max
56
(
57
S,
58
dimensionedScalar
(
"SMALL"
, S.dimensions(), SMALL)
59
)*
sqr
(
kappa_
*
y_
)
60
+
dimensionedScalar
61
(
62
"ROOTVSMALL"
,
63
dimensionSet(0, 2 , -1, 0, 0),
64
ROOTVSMALL
65
)
66
),
67
scalar(10)
68
);
69
}
70
71
72
tmp<volScalarField> SpalartAllmarasDDES::fd(
const
volScalarField
& S)
const
73
{
74
return
1 -
tanh
(
pow3
(8*rd(
nuEff
(), S)));
75
}
76
77
78
tmp<volScalarField>
SpalartAllmarasDDES::S
(
const
volTensorField
& gradU)
const
79
{
80
return
sqrt
(2.0)*
mag
(
symm
(gradU));
81
}
82
83
84
tmp<volScalarField>
SpalartAllmarasDDES::dTilda
(
const
volScalarField
& S)
const
85
{
86
return
max
87
(
88
y_
89
- fd(S)
90
*
max
(
y_
-
CDES_
*
delta
(),
dimensionedScalar
(
"zero"
,
dimLength
, 0)),
91
dimensionedScalar
(
"small"
,
dimLength
, SMALL)
92
);
93
}
94
95
96
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
97
98
SpalartAllmarasDDES::SpalartAllmarasDDES
99
(
100
const
volVectorField
&
U
,
101
const
surfaceScalarField
&
phi
,
102
transportModel
& transport
103
)
104
:
105
SpalartAllmaras
(U, phi, transport, typeName)
106
{}
107
108
109
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111
}
// End namespace LESModels
112
}
// End namespace incompressible
113
}
// End namespace Foam
114
115
// ************************ vim: set sw=4 sts=4 et: ************************ //